Commit graph

878,290 commits

Author SHA1 Message Date
Greg Kroah-Hartman
3605968cf0 ANDROID: GKI: add android_kabi.h
This header file is to be used for various macros to help make keeping
the kernel ABI "stable" during an "ABI Freeze" period.

They are to be used both before the freeze (to anticipate places where
there will be changes), and after the freeze (to keep the abi stable for
structures where there were changes due to LTS or other changes to the
kernel tree.)

Strongly based on rh_kabi.h from Red Hat's RHEL kernel tree.

This adds support for "real" padding and the ability to replace fields
with other fields.

But, note that ABI changes will still be caught by libabigail at this
point in time, work on that is still ongoing.  When that is completed,
all that will be needed is to modify the _ANDROID_KABI_RESERVE() macro
in this file.  No other file changes should be needed.

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I77038cc251c819c3ed22a9cb8843b185416b6727
2020-03-17 10:07:47 +01:00
Greg Kroah-Hartman
a7f12e137a ANDROID: GKI: update abi due to CONFIG_JUMP_LABEL being enabled
Leaf changes summary: 3 artifacts changed
Changed leaf types summary: 3 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

'struct module at module.h:348:1' changed:
  type size changed from 6656 to 7168 (in bits)
  2 data member insertions:
    'jump_entry* module::jump_entries', at offset 5888 (in bits) at module.h:469:1
    'unsigned int module::num_jump_entries', at offset 5952 (in bits) at module.h:470:1
  there are data member changes:
   'unsigned int module::num_trace_bprintk_fmt' offset changed from 5888 to 5984 (in bits) (by +96 bits)
   'const char** module::trace_bprintk_fmt_start' offset changed from 5952 to 6016 (in bits) (by +64 bits)
   'trace_event_call** module::trace_events' offset changed from 6016 to 6080 (in bits) (by +64 bits)
   'unsigned int module::num_trace_events' offset changed from 6080 to 6144 (in bits) (by +64 bits)
   'trace_eval_map** module::trace_evals' offset changed from 6144 to 6208 (in bits) (by +64 bits)
   'unsigned int module::num_trace_evals' offset changed from 6208 to 6272 (in bits) (by +64 bits)
   'list_head module::source_list' offset changed from 6272 to 6336 (in bits) (by +64 bits)
   'list_head module::target_list' offset changed from 6400 to 6464 (in bits) (by +64 bits)
   'void ()* module::exit' offset changed from 6528 to 6592 (in bits) (by +64 bits)
   'atomic_t module::refcnt' offset changed from 6592 to 6656 (in bits) (by +64 bits)

  1380 impacted interfaces:

'struct static_key at jump_label.h:110:1' changed:
  type size changed from 32 to 128 (in bits)
  1 data member insertion:
    'union {unsigned long int type; jump_entry* entries; static_key_mod* next;}', at offset 64 (in bits) at jump_label.h:102:1

  1380 impacted interfaces:

'struct tracepoint at tracepoint-defs.h:30:1' changed:
  type size changed from 320 to 384 (in bits)
  there are data member changes:
   type 'struct static_key' of 'tracepoint::key' changed as reported earlier
   and size changed from 32 to 128 (in bits) (by +96 bits)
   'void ()* tracepoint::regfunc' offset changed from 128 to 192 (in bits) (by +64 bits)
   'void ()* tracepoint::unregfunc' offset changed from 192 to 256 (in bits) (by +64 bits)
   'tracepoint_func* tracepoint::funcs' offset changed from 256 to 320 (in bits) (by +64 bits)

  1380 impacted interfaces:

Bug: 145162121
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0b023abe07fe3e5bdb0f51797e39a989c643c3b9
2020-03-16 18:41:13 +01:00
Greg Kroah-Hartman
9e9bc61655 ANDROID: GKI: enable CONFIG_JUMP_LABEL
It's needed to speed up trace points and other dynamic debugging stuff.

Bug: 145162121
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I811b538bc5280a633c56e0544ba1f54cd6b234f2
2020-03-16 18:19:53 +01:00
Quentin Perret
d233a23d4c ANDROID: Add build.config.gki-debug.x86_64
Add a gki-debug build.config file which disables whitelisting trimming.
This is intended to ease GKI development.

Bug: 150772411
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: I4b7f001eaca37fe993260ddff914fb05a1310df9
2020-03-16 14:27:00 +00:00
Greg Kroah-Hartman
a04649afdb ANDROID: update the abi signatures
Someone modified the DRM settings but forgot to update the ABI...

Leaf changes summary: 3 artifacts changed
Changed leaf types summary: 3 leaf types changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

'struct drm_connector at drm_connector.h:1090:1' changed:
  type size changed from 14528 to 14208 (in bits)
  16 data member deletions:
    'u8 drm_connector::pt_scan_info', at offset 13440 (in bits) at drm_connector.h:1370:1

    'u8 drm_connector::it_scan_info', at offset 13448 (in bits) at drm_connector.h:1371:1

    'u8 drm_connector::ce_scan_info', at offset 13456 (in bits) at drm_connector.h:1372:1

    'u32 drm_connector::color_enc_fmt', at offset 13472 (in bits) at drm_connector.h:1373:1

    'u32 drm_connector::hdr_eotf', at offset 13504 (in bits) at drm_connector.h:1374:1

    'bool drm_connector::hdr_metadata_type_one', at offset 13536 (in bits) at drm_connector.h:1375:1

    'u32 drm_connector::hdr_max_luminance', at offset 13568 (in bits) at drm_connector.h:1376:1

    'u32 drm_connector::hdr_avg_luminance', at offset 13600 (in bits) at drm_connector.h:1377:1

    'u32 drm_connector::hdr_min_luminance', at offset 13632 (in bits) at drm_connector.h:1378:1

    'bool drm_connector::hdr_supported', at offset 13664 (in bits) at drm_connector.h:1379:1

    'u8 drm_connector::hdr_plus_app_ver', at offset 13672 (in bits) at drm_connector.h:1380:1

    'int drm_connector::max_tmds_char', at offset 13696 (in bits) at drm_connector.h:1392:1

    'bool drm_connector::scdc_present', at offset 13728 (in bits) at drm_connector.h:1393:1

    'bool drm_connector::rr_capable', at offset 13736 (in bits) at drm_connector.h:1394:1

    'bool drm_connector::supports_scramble', at offset 13744 (in bits) at drm_connector.h:1395:1

    'int drm_connector::flags_3d', at offset 13760 (in bits) at drm_connector.h:1396:1

  there are data member changes:
   type 'struct drm_display_info' of 'drm_connector::display_info' changed:
     type size hasn't changed
     there are data member changes:
      type 'struct drm_hdmi_info' of 'drm_display_info::hdmi' changed:
        type size hasn't changed
        1 data member deletion:
          'u16 drm_hdmi_info::colorimetry', at offset 400 (in bits) at drm_connector.h:213:1

        145 impacted interfaces:

     145 impacted interfaces:
   'bool drm_connector::edid_corrupt' offset changed from 13792 to 13440 (in bits) (by -352 bits)
   'u8 drm_connector::real_edid_checksum' offset changed from 13800 to 13448 (in bits) (by -352 bits)
   'dentry* drm_connector::debugfs_entry' offset changed from 13824 to 13504 (in bits) (by -320 bits)
   'drm_connector_state* drm_connector::state' offset changed from 13888 to 13568 (in bits) (by -320 bits)
   'drm_property_blob* drm_connector::tile_blob_ptr' offset changed from 13952 to 13632 (in bits) (by -320 bits)
   'bool drm_connector::has_tile' offset changed from 14016 to 13696 (in bits) (by -320 bits)
   'drm_tile_group* drm_connector::tile_group' offset changed from 14080 to 13760 (in bits) (by -320 bits)
   'bool drm_connector::tile_is_single_monitor' offset changed from 14144 to 13824 (in bits) (by -320 bits)
   'uint8_t drm_connector::num_h_tile' offset changed from 14152 to 13832 (in bits) (by -320 bits)
   'uint8_t drm_connector::num_v_tile' offset changed from 14160 to 13840 (in bits) (by -320 bits)
   'uint8_t drm_connector::tile_h_loc' offset changed from 14168 to 13848 (in bits) (by -320 bits)
   'uint8_t drm_connector::tile_v_loc' offset changed from 14176 to 13856 (in bits) (by -320 bits)
   'uint16_t drm_connector::tile_h_size' offset changed from 14192 to 13872 (in bits) (by -320 bits)
   'uint16_t drm_connector::tile_v_size' offset changed from 14208 to 13888 (in bits) (by -320 bits)
   'llist_node drm_connector::free_node' offset changed from 14272 to 13952 (in bits) (by -320 bits)
   'hdr_sink_metadata drm_connector::hdr_sink_metadata' offset changed from 14336 to 14016 (in bits) (by -320 bits)
   'drm_panel* drm_connector::panel' offset changed from 14464 to 14144 (in bits) (by -320 bits)

  145 impacted interfaces:

'struct drm_display_info at drm_connector.h:369:1' changed:
  details were reported earlier

'struct drm_hdmi_info at drm_connector.h:186:1' changed:
  details were reported earlier

Bug: 139653858
Cc: Abhinav Kumar <abhinavk@codeaurora.org>
Cc: Alistair Delva <adelva@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia9d74c49921f406400d3dcc45faf550472c44849
2020-03-16 11:56:58 +00:00
Quentin Perret
8b5eaebec7 ANDROID: Add build.config.gki-debug.aarch64
Add a gki-debug build.config file which disables whitelisting trimming.
This is intended to ease GKI development.

Bug: 150772411
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: Ia5241f17b1cf730b357c6501180834bd01eb589f
2020-03-16 09:20:25 +00:00
Abhinav Kumar
075e5d2e43 Revert "ANDROID: drm: edid: add support for additional CEA extension blocks"
Necessary changes to parse required CEA extension EDID blocks
have been made to vendor specific drivers. No need to retain
the block parsing in DRM framework.

This reverts commit 1e3594cbb8.

Bug: 139653858
Change-Id: Ia88ab5ed0314b964ad44556e40c2e4d55e0b181c
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2020-03-16 01:41:14 +00:00
Alistair Delva
193d9030de Revert "ANDROID: drm: Parse Colorimetry data block from EDID"
Necessary changes to parse required CEA extension EDID blocks
have been made to vendor specific drivers. No need to retain
the block parsing in DRM framework.

This reverts commit 0152f0b272.

Bug: 139653858
Change-Id: I44570da5c06403c9bfb75c853e78cac233a4eeac
Signed-off-by: Alistair Delva <adelva@google.com>
2020-03-16 01:41:04 +00:00
Alistair Delva
d244d02b99 ANDROID: Add build.config files for ARM 32-bit
Enables us to catch build-breaks for 32-bit ARM with an allmodconfig
build in continuous integration testing.

Bug: 151459448
Change-Id: I825a18771c214e6389fc2755fce20c8fc2531695
Signed-off-by: Alistair Delva <adelva@google.com>
2020-03-15 22:51:11 +00:00
Todd Kjos
37975e4427 ANDROID: Kconfig.gki: Add FRAME_VECTOR
Enable hidden config FRAME_VECTOR needed by VIDEOBUF2_MEMOPS=m

Bug: 151405653
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I7567f2af29412dfbda459b4957353a433fd86ad4
2020-03-13 16:29:30 -07:00
Michal Koutný
21ee296526 UPSTREAM: cgroup: Iterate tasks that did not finish do_exit()
PF_EXITING is set earlier than actual removal from css_set when a task
is exitting. This can confuse cgroup.procs readers who see no PF_EXITING
tasks, however, rmdir is checking against css_set membership so it can
transitionally fail with EBUSY.

Fix this by listing tasks that weren't unlinked from css_set active
lists.
It may happen that other users of the task iterator (without
CSS_TASK_ITER_PROCS) spot a PF_EXITING task before cgroup_exit(). This
is equal to the state before commit c03cd7738a ("cgroup: Include dying
leaders with live threads in PROCS iterations") but it may be reviewed
later.

Reported-by: Suren Baghdasaryan <surenb@google.com>
Fixes: c03cd7738a ("cgroup: Include dying leaders with live threads in PROCS iterations")
Signed-off-by: Michal Koutný <mkoutny@suse.com>
(cherry picked from commit 9c974c77246460fa6a92c18554c3311c8c83c160)
Bug: 141213848
Bug: 146758430
Test: test_cgcore_destroy from linux-kselftest
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Iac57661b931129ed1e44b89675f8115bb89084ff
2020-03-13 19:49:15 +00:00
Orson Zhai
8a656c1dc1 ANDROID: gki_defconfig: Enable more USB_CONFIGFS gadgets
More USB gadgets are needed in Unisoc product like modules under
CONFIG_USB_CONFIGFS_SERIAL,
CONFIG_USB_CONFIGFS_RNDIS and
CONFIG_USB_CONFIGFS_MASS_STORAGE.

Bug: 151405649
Change-Id: If81e1d50f7b440f902e941d2450a551d0452314f
Signed-off-by: Orson Zhai <orson.zhai@unisoc.com>
[add x86 config chunk too - gregkh]
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2020-03-13 17:20:30 +00:00
Alistair Delva
588ccddf13 Revert "ANDROID: tty: serdev: Fix broken serial console input"
We don't need this any more as devices which are consoles and also
platform devices are automatically excluded from binding unless the user
opts into it.

This reverts commit 2fdad105a07232f954c3401f1e2609e548c896e7.

Bug: 146517987
Change-Id: I2b9cc9c13870e5ecccbf04addadd48e59658aee3
Signed-off-by: Alistair Delva <adelva@google.com>
2020-03-13 15:32:19 +00:00
Alistair Delva
3a97aabe4f ANDROID: serdev: restrict claim of platform devices
Make the fallback path for claiming platform devices trigger only if a
new module parameter is specified:

  serdev_ttyport.pdev_tty_port=ttyS2

Bug: 146517987
Change-Id: Ibf331ad6e6d8712a405921530f217f7122428b13
Signed-off-by: Alistair Delva <adelva@google.com>
2020-03-13 15:30:41 +00:00
A. Cody Schuffelen
8d69223e50 ANDROID: Add TPM support and the vTPM proxy to Cuttlefish.
This module allows presenting the kernel TPM interface while proxying
the TPM commands into a file descriptor. The module was originally
implemented to support running a TPM simulator on the same host system
and exposing a kernel TPM interface to a Linux container, but it is also
a convenient incremental step while we figure out our long-term strategy
with crosvm, which does not have TPM support following the same
standards as qemu.

CONFIG_TCG_TPM, the base config for the various TPM drivers, required
CONFIG_SECURITYFS. CONFIG_SECURITYFS exists only as a boolean and not a
tristate, so we can't install it as a module.

Bug: 148102533
Test: Build and run locally with cuttlefish, check for /dev/vtpmx
Change-Id: I568a50c2ecb7899aae70e7a20efaedc84443511d
Signed-off-by: A. Cody Schuffelen <schuffelen@google.com>
2020-03-13 15:01:14 +00:00
Baolin Wang
0e98759911 FROMGIT: ASoC: sprd: Allow the MCDT driver to build into modules
Change the config to 'tristate' for MCDT driver to allow it to build into
modules, as well as changing to use IS_ENABLED() to validate if need supply
dummy functions when building the MCDT driver as a module.

bug: 151273001
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Link: https://lore.kernel.org/r/9306f2b99641136653ae4fe6cf9e859b7f698f77.1583387748.git.baolin.wang7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit fd357ec595d36676c239d8d16706a270a961ac32
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next)
2020-03-13 11:04:43 +00:00
Freeman Liu
9f18dfb4b5 FROMGIT: thermal: sprd: Add Spreadtrum thermal driver support
This patch adds the support for Spreadtrum thermal sensor controller,
which can support maximum 8 sensors.

bug: 151273001
Signed-off-by: Freeman Liu <freeman.liu@unisoc.com>
Co-developed-with: Baolin Wang <baolin.wang@unisoc.com>
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/ebeb2839cff4d4027b37e787427c5af0e11880c8.1582013101.git.baolin.wang7@gmail.com
(cherry picked from commit e0c528800a2cbc5744f5f828f298fdb976f41918
https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git thermal/linux-next)
2020-03-13 11:04:30 +00:00
Baolin Wang
dd3530bdc3 FROMGIT: dt-bindings: thermal: sprd: Add the Spreadtrum thermal documentation
Add the Spreadtrum thermal documentation.

bug: 151273001
Signed-off-by: Baolin Wang <baolin.wang@unisoc.com>
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/444e45ce0a9b390b2502dfcefd1ddb36948fa8e1.1582013101.git.baolin.wang7@gmail.com
(cherry picked from commit 526736a5fc84ebbe2bfd6796ff67d1c68c50a624
https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git thermal/linux-next)
2020-03-13 11:04:19 +00:00
Greg Kroah-Hartman
5b21548746 ANDROID: ABI update due to power supply patches being merged
Leaf changes summary: 1 artifact changed
Changed leaf types summary: 1 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

'struct power_supply_battery_info at power_supply.h:339:1' changed:
  type size changed from 2880 to 3008 (in bits)
  2 data member insertions:
    'power_supply_resistance_temp_table* power_supply_battery_info::resist_table', at offset 2880 (in bits) at power_supply.h:357:1
    'int power_supply_battery_info::resist_table_size', at offset 2944 (in bits) at power_supply.h:358:1

  3 impacted interfaces:
    function power_supply_battery_ocv_table* power_supply_find_ocv2cap_table(power_supply_battery_info*, int, int*)
    function int power_supply_get_battery_info(power_supply*, power_supply_battery_info*)
    function void power_supply_put_battery_info(power_supply*, power_supply_battery_info*)

Bug: 146864653
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1550ac758ec09ffef51605b722d2de99d2cc030a
2020-03-13 10:43:54 +00:00
Baolin Wang
c4545076cf FROMGIT: pinctrl: sprd: Fix the kconfig warning
On X86 plaform, if the CONFIG_OF is not selected, and set the
CONFIG_SPRD_SC9860 as 'm', that will cause below waring:

WARNING: unmet direct dependencies detected for PINCTRL_SPRD
  Depends on [n]: PINCTRL [=y] && OF [=n] && (ARCH_SPRD || COMPILE_TEST [=y])
  Selected by [m]:
  - PINCTRL_SPRD_SC9860 [=m] && PINCTRL [=y]

Thus move the configuration dependency under CONFIG_PINCTRL_SPRD_SC9860
to fix the warning.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Link: https://lore.kernel.org/r/eeb12d7843fb06f80e19f98eb25711231c3b610f.1583205650.git.baolin.wang7@gmail.com
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit 9eb81d69ad6bcd8a81933d02d402e80c8472ccf9
https://git.linaro.org/people/linus.walleij/linux-pinctrl.git)
Bug: 150258181
Signed-off-by: Orson Zhai <orson.zhai@unisoc.com>
Change-Id: I19888d9f770daa883677513b9691a77b19130cd5
2020-03-12 18:24:49 +00:00
Baolin Wang
2f18c2fccd FROMGIT: pinctrl: sprd: Allow the SPRD pinctrl driver building into a module
Change the config to 'tristate' and export some symbols needed by modules
to allow the Spreadtrum pinctrl driver building into a module.

Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Link: https://lore.kernel.org/r/d7239f3c7379e402f665fc8927f635ac56691380.1582776447.git.baolin.wang7@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit 1df49cc80da167f3fa91e3a47c3c1aabd4a3953c
https://git.linaro.org/people/linus.walleij/linux-pinctrl.git)
Bug: 150258181
Signed-off-by: Orson Zhai <orson.zhai@unisoc.com>
Change-Id: I2e6ac4fa789e629c6b4a2ef72935c5b7c4fca913
2020-03-12 18:24:34 +00:00
Baolin Wang
65b5420254 FROMGIT: pinctrl: Export some needed symbols at module load time
Export the pin_get_name()/pinconf_generic_parse_dt_config() symbols needed
by the Spreadtrum pinctrl driver when building it as a module.

Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Link: https://lore.kernel.org/r/f4e7e20afacb23e6fa7a6b33ea4319b2b3492840.1582776447.git.baolin.wang7@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit b88d145191ad02b865c601ff87c2c685ca11a20a
https://git.linaro.org/people/linus.walleij/linux-pinctrl.git)
Bug: 150258181
Signed-off-by: Orson Zhai <orson.zhai@unisoc.com>
Change-Id: I4c94de3747571d64b2f91b873ddb0a377bdf7371
2020-03-12 18:24:14 +00:00
Greg Kroah-Hartman
6d52041543 This is the 5.4.25 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl5qJSMACgkQONu9yGCS
 aT6/Dw//Usg9m0cBB4Ip4fYxI0EVz8BgnVe9KSdt+71gM63QCOi1ZeTS0NDMUtO0
 MTsQSudUpfntrT8QHCmBwCZ5LlAAZvxDS9UOqnhkWbqNY5jGmUhH5u28RJL28dp2
 8wJY6zZKg+pfOWXd81slW86uN27QZvURNEthT81sN2ucxe5DXV1gs87FILSdMpXm
 I0Z3LpUoZDjpONeA6WTZqkDNA0J7Z9QjULx9/4LFi/gc0q1ApWC7FV1A9gpQHaBa
 w4kDWJCGqq3mNx8Hi9BHau50VUHX5tuKvpn9RcmSl9BBba25pE5h0EVIGo8Dlq+9
 T9hkVR5iXeMbFERnLm5iR0DjFHog/mOgAgUHSTTXB3BcdgIKWwUcc2gCcr2Y7KIK
 CD7l+kX1nWUk4yYre7zXiG/vO9ilYgeboc8C5Qdq3XR6zaO90+8NUbCOpa2+6yEF
 H7kugstb6l+iCJ1k8YJd0ORGOobl68+P79TLxAOFnkNGJRzuAoXmBH+xkqAugz1H
 YKKAbE+MzW75sre7PxU1g1uPOHxfMfd5e3uRtUU5OETJv0A2kTte8ay5rqLNbe7H
 QYqdfwTr2oFssnWKW5d/KdSopD5A/31/Kjkmzl6ED2xaLMEpA7zyed5p+G/Beu5s
 dkPlteya8wCQ1W/KtDJRhbCauoG/NyCKIeoQitHBJwMapcEo8ZU=
 =rDP8
 -----END PGP SIGNATURE-----

Merge 5.4.25 into android-5.4

Changes in 5.4.25
	block, bfq: get extra ref to prevent a queue from being freed during a group move
	block, bfq: do not insert oom queue into position tree
	ALSA: hda/realtek - Fix a regression for mute led on Lenovo Carbon X1
	net: dsa: bcm_sf2: Forcibly configure IMP port for 1Gb/sec
	net: stmmac: fix notifier registration
	dm thin metadata: fix lockdep complaint
	RDMA/core: Fix pkey and port assignment in get_new_pps
	RDMA/core: Fix use of logical OR in get_new_pps
	kbuild: fix 'No such file or directory' warning when cleaning
	kprobes: Fix optimize_kprobe()/unoptimize_kprobe() cancellation logic
	blktrace: fix dereference after null check
	ALSA: hda: do not override bus codec_mask in link_get()
	serial: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE
	selftests: fix too long argument
	usb: gadget: composite: Support more than 500mA MaxPower
	usb: gadget: ffs: ffs_aio_cancel(): Save/restore IRQ flags
	usb: gadget: serial: fix Tx stall after buffer overflow
	habanalabs: halt the engines before hard-reset
	habanalabs: do not halt CoreSight during hard reset
	habanalabs: patched cb equals user cb in device memset
	drm/msm/mdp5: rate limit pp done timeout warnings
	drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI
	drm/modes: Make sure to parse valid rotation value from cmdline
	drm/modes: Allow DRM_MODE_ROTATE_0 when applying video mode parameters
	scsi: megaraid_sas: silence a warning
	drm/msm/dsi: save pll state before dsi host is powered off
	drm/msm/dsi/pll: call vco set rate explicitly
	selftests: forwarding: use proto icmp for {gretap, ip6gretap}_mac testing
	selftests: forwarding: vxlan_bridge_1d: fix tos value
	net: atlantic: check rpc result and wait for rpc address
	net: ks8851-ml: Remove 8-bit bus accessors
	net: ks8851-ml: Fix 16-bit data access
	net: ks8851-ml: Fix 16-bit IO operation
	net: ethernet: dm9000: Handle -EPROBE_DEFER in dm9000_parse_dt()
	watchdog: da9062: do not ping the hw during stop()
	s390/cio: cio_ignore_proc_seq_next should increase position index
	s390: make 'install' not depend on vmlinux
	efi: Only print errors about failing to get certs if EFI vars are found
	net/mlx5: DR, Fix matching on vport gvmi
	iommu/amd: Disable IOMMU on Stoney Ridge systems
	nvme/pci: Add sleep quirk for Samsung and Toshiba drives
	nvme-pci: Use single IRQ vector for old Apple models
	x86/boot/compressed: Don't declare __force_order in kaslr_64.c
	s390/qdio: fill SL with absolute addresses
	nvme: Fix uninitialized-variable warning
	ice: Don't tell the OS that link is going down
	x86/xen: Distribute switch variables for initialization
	net: thunderx: workaround BGX TX Underflow issue
	csky/mm: Fixup export invalid_pte_table symbol
	csky: Set regs->usp to kernel sp, when the exception is from kernel
	csky/smp: Fixup boot failed when CONFIG_SMP
	csky: Fixup ftrace modify panic
	csky: Fixup compile warning for three unimplemented syscalls
	arch/csky: fix some Kconfig typos
	selftests: forwarding: vxlan_bridge_1d: use more proper tos value
	firmware: imx: scu: Ensure sequential TX
	binder: prevent UAF for binderfs devices
	binder: prevent UAF for binderfs devices II
	ALSA: hda/realtek - Add Headset Mic supported
	ALSA: hda/realtek - Add Headset Button supported for ThinkPad X1
	ALSA: hda/realtek - Fix silent output on Gigabyte X570 Aorus Master
	ALSA: hda/realtek - Enable the headset of ASUS B9450FA with ALC294
	cifs: don't leak -EAGAIN for stat() during reconnect
	cifs: fix rename() by ensuring source handle opened with DELETE bit
	usb: storage: Add quirk for Samsung Fit flash
	usb: quirks: add NO_LPM quirk for Logitech Screen Share
	usb: dwc3: gadget: Update chain bit correctly when using sg list
	usb: cdns3: gadget: link trb should point to next request
	usb: cdns3: gadget: toggle cycle bit before reset endpoint
	usb: core: hub: fix unhandled return by employing a void function
	usb: core: hub: do error out if usb_autopm_get_interface() fails
	usb: core: port: do error out if usb_autopm_get_interface() fails
	vgacon: Fix a UAF in vgacon_invert_region
	mm, numa: fix bad pmd by atomically check for pmd_trans_huge when marking page tables prot_numa
	mm: fix possible PMD dirty bit lost in set_pmd_migration_entry()
	mm, hotplug: fix page online with DEBUG_PAGEALLOC compiled but not enabled
	fat: fix uninit-memory access for partial initialized inode
	btrfs: fix RAID direct I/O reads with alternate csums
	arm64: dts: socfpga: agilex: Fix gmac compatible
	arm: dts: dra76x: Fix mmc3 max-frequency
	tty:serial:mvebu-uart:fix a wrong return
	tty: serial: fsl_lpuart: free IDs allocated by IDA
	serial: 8250_exar: add support for ACCES cards
	vt: selection, close sel_buffer race
	vt: selection, push console lock down
	vt: selection, push sel_lock up
	media: hantro: Fix broken media controller links
	media: mc-entity.c: use & to check pad flags, not ==
	media: vicodec: process all 4 components for RGB32 formats
	media: v4l2-mem2mem.c: fix broken links
	perf intel-pt: Fix endless record after being terminated
	perf intel-bts: Fix endless record after being terminated
	perf cs-etm: Fix endless record after being terminated
	perf arm-spe: Fix endless record after being terminated
	spi: spidev: Fix CS polarity if GPIO descriptors are used
	x86/pkeys: Manually set X86_FEATURE_OSPKE to preserve existing changes
	s390/pci: Fix unexpected write combine on resource
	s390/mm: fix panic in gup_fast on large pud
	dmaengine: imx-sdma: fix context cache
	dmaengine: imx-sdma: Fix the event id check to include RX event for UART6
	dmaengine: tegra-apb: Fix use-after-free
	dmaengine: tegra-apb: Prevent race conditions of tasklet vs free list
	dm integrity: fix recalculation when moving from journal mode to bitmap mode
	dm integrity: fix a deadlock due to offloading to an incorrect workqueue
	dm integrity: fix invalid table returned due to argument count mismatch
	dm cache: fix a crash due to incorrect work item cancelling
	dm: report suspended device during destroy
	dm writecache: verify watermark during resume
	dm zoned: Fix reference counter initial value of chunk works
	dm: fix congested_fn for request-based device
	arm64: dts: meson-sm1-sei610: add missing interrupt-names
	ARM: dts: ls1021a: Restore MDIO compatible to gianfar
	spi: bcm63xx-hsspi: Really keep pll clk enabled
	drm/virtio: make resource id workaround runtime switchable.
	drm/virtio: fix resource id creation race
	ASoC: topology: Fix memleak in soc_tplg_link_elems_load()
	ASoC: topology: Fix memleak in soc_tplg_manifest_load()
	ASoC: SOF: Fix snd_sof_ipc_stream_posn()
	ASoC: intel: skl: Fix pin debug prints
	ASoC: intel: skl: Fix possible buffer overflow in debug outputs
	powerpc: define helpers to get L1 icache sizes
	powerpc: Convert flush_icache_range & friends to C
	powerpc/mm: Fix missing KUAP disable in flush_coherent_icache()
	ASoC: pcm: Fix possible buffer overflow in dpcm state sysfs output
	ASoC: pcm512x: Fix unbalanced regulator enable call in probe error path
	ASoC: Intel: Skylake: Fix available clock counter incrementation
	ASoC: dapm: Correct DAPM handling of active widgets during shutdown
	spi: atmel-quadspi: fix possible MMIO window size overrun
	drm/panfrost: Don't try to map on error faults
	drm: kirin: Revert "Fix for hikey620 display offset problem"
	drm/sun4i: Add separate DE3 VI layer formats
	drm/sun4i: Fix DE2 VI layer format support
	drm/sun4i: de2/de3: Remove unsupported VI layer formats
	drm/i915: Program MBUS with rmw during initialization
	drm/i915/selftests: Fix return in assert_mmap_offset()
	phy: mapphone-mdm6600: Fix timeouts by adding wake-up handling
	phy: mapphone-mdm6600: Fix write timeouts with shorter GPIO toggle interval
	ARM: dts: imx6: phycore-som: fix emmc supply
	arm64: dts: imx8qxp-mek: Remove unexisting Ethernet PHY
	firmware: imx: misc: Align imx sc msg structs to 4
	firmware: imx: scu-pd: Align imx sc msg structs to 4
	firmware: imx: Align imx_sc_msg_req_cpu_start to 4
	soc: imx-scu: Align imx sc msg structs to 4
	Revert "RDMA/cma: Simplify rdma_resolve_addr() error flow"
	RDMA/rw: Fix error flow during RDMA context initialization
	RDMA/nldev: Fix crash when set a QP to a new counter but QPN is missing
	RDMA/siw: Fix failure handling during device creation
	RDMA/iwcm: Fix iwcm work deallocation
	RDMA/core: Fix protection fault in ib_mr_pool_destroy
	regulator: stm32-vrefbuf: fix a possible overshoot when re-enabling
	RMDA/cm: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen()
	IB/hfi1, qib: Ensure RCU is locked when accessing list
	ARM: imx: build v7_cpu_resume() unconditionally
	ARM: dts: am437x-idk-evm: Fix incorrect OPP node names
	ARM: dts: dra7xx-clocks: Fixup IPU1 mux clock parent source
	ARM: dts: imx7-colibri: Fix frequency for sd/mmc
	hwmon: (adt7462) Fix an error return in ADT7462_REG_VOLT()
	dma-buf: free dmabuf->name in dma_buf_release()
	dmaengine: coh901318: Fix a double lock bug in dma_tc_handle()
	arm64: dts: meson: fix gxm-khadas-vim2 wifi
	bus: ti-sysc: Fix 1-wire reset quirk
	EDAC/synopsys: Do not print an error with back-to-back snprintf() calls
	powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems
	efi/x86: Align GUIDs to their size in the mixed mode runtime wrapper
	efi/x86: Handle by-ref arguments covering multiple pages in mixed mode
	efi: READ_ONCE rng seed size before munmap
	block, bfq: get a ref to a group when adding it to a service tree
	block, bfq: remove ifdefs from around gets/puts of bfq groups
	csky: Implement copy_thread_tls
	drm/virtio: module_param_named() requires linux/moduleparam.h
	Linux 5.4.25

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8ba29f273c7a2b02bfa54593f7a9087c34607cd5
2020-03-12 17:09:04 +01:00
Baolin Wang
a9ca5eca65 FROMGIT: power: reset: sc27xx: Allow the SC27XX poweroff driver building into a module
Change the config to 'tristate' and use module_platform_driver() to
allow the SC27XX poweroff driver building into a module, as well as
adding some mudule information.

bug: 146864653
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit f78c55e3b4806974f7d590b2aab8683232b7bd25
https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next)
2020-03-12 15:21:54 +00:00
Baolin Wang
072cc0324b FROMGIT: power: reset: sc27xx: Change to use cpu_down()
To allow the SC27XX driver can be built as a module, and the
freeze_secondary_cpus() symbol is not exported, thus we can change
to use the exported cpu_down() API to shut down other cpus to avoid
racing, which is same as the freeze_secondary_cpus().

bug: 146864653
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit 274afbc3ad33136962d66447e89d02e3c142a30a
https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next)
2020-03-12 15:21:46 +00:00
Sherry Zong
3a2e32d2a4 FROMGIT: power: reset: sc27xx: Power off the external subsystems' connection
When powering off the whole system, we should power off some external
subsystems' connection firstly, otherwise some external subsystems
will hold some power and result in powering down abnormally.

bug: 146864653
Signed-off-by: Sherry Zong <sherry.zong@unisoc.com>
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit 6cdd5b09cbe67365c42aee539f6fd00f2ecfdaab
https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next)
2020-03-12 15:21:32 +00:00
Baolin Wang
342d695133 FROMGIT: power: supply: sc27xx: Add POWER_SUPPLY_PROP_CHARGE_NOW attribute
Add the POWER_SUPPLY_PROP_CHARGE_NOW attribute to allow user to get
current battery capacity (uAh) to do measurement.

bug: 146864653
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit 1c5dfc5e3f2df5892a849621d729daa87cfef436
https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next)
2020-03-12 15:21:20 +00:00
Baolin Wang
d58359038a UPSTREAM: power: supply: sc27xx: Calibrate the resistance of coulomb counter
There are some deviations between the real resistance and the ideal
resistance of coulomb counter, which will affect the accuracy of
the coulomb counter, thus calibrate the real resistance of coulomb
counter to improve the accuracy.

bug: 146864653
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit 058d42563a5692a4e663df0dc270f4ffd2c70274)
2020-03-12 15:19:58 +00:00
Baolin Wang
23e48efcb4 UPSTREAM: dt-bindings: power: sc27xx: Add a new property to describe the real resistance of coulomb counter chip
Add a new property to describe the real resistance of coulomb counter chip,
which is used to calibrate the accuracy of the coulomb counter chip.

bug: 146864653
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit 7772d22e4b0681b5d0ff1bf4127c1b35e7641d07)
2020-03-12 15:19:48 +00:00
Yuanjiang Yu
8e2e2126b8 UPSTREAM: power: supply: sc27xx: Optimize the battery resistance with measuring temperature
Optimize the battery internal resistance in a certain temerature to
get a accurate battery internal resistance.

bug: 146864653
Signed-off-by: Yuanjiang Yu <yuanjiang.yu@unisoc.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit 6af8288834b6a9dfcbe9847b675ff24d39d30679)
2020-03-12 15:19:37 +00:00
Baolin Wang
a96c947b07 UPSTREAM: power: supply: core: Add battery internal resistance temperature table support
Since the battery internal resistance can be changed with the temperature
changes, thus add a resistance temperature table support to look up
the accurate battery internal resistance in a certain temperature.

bug: 146864653
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit 65dbad713d5d6a8581921804ae3f5eb4a9bf032e)
2020-03-12 15:19:23 +00:00
Baolin Wang
8244790b20 UPSTREAM: dt-bindings: power: Introduce one property to describe the battery resistance with temperature changes
Since the battery internal resistance can be changed as the temperature
changes, thus add one table to describe the battery resistance percent
in different temperatures to get a accurate battery internal resistance.

bug: 146864653
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit 9a056a879111f88149dad428e7cc4f85c87a62bc)
2020-03-12 15:19:09 +00:00
Quentin Perret
eb7eaffe06 ANDROID: abi_gki_aarch64_whitelist: update after whitelist changes
Leaf changes summary: 21 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 21 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

21 Added functions:

  [A] 'function int __clk_determine_rate(clk_hw*, clk_rate_request*)'
  [A] 'function const char* __clk_get_name(const clk*)'
  [A] 'function bool __clk_is_enabled(clk*)'
  [A] 'function int __clk_mux_determine_rate_closest(clk_hw*, clk_rate_request*)'
  [A] 'function unsigned long int clk_hw_get_flags(const clk_hw*)'
  [A] 'function const char* clk_hw_get_name(const clk_hw*)'
  [A] 'function clk_hw* clk_hw_get_parent_by_index(const clk_hw*, unsigned int)'
  [A] 'function bool clk_hw_is_prepared(const clk_hw*)'
  [A] 'function unsigned long int clk_hw_round_rate(clk_hw*, unsigned long int)'
  [A] 'function void* devres_alloc_node(void ()*, unsigned long int, unsigned int, int)'
  [A] 'function long int divider_ro_round_rate_parent(clk_hw*, clk_hw*, unsigned long int, unsigned long int*, const clk_div_table*, u8, unsigned long int, unsigned int)'
  [A] 'function int kmem_cache_alloc_bulk(kmem_cache*, unsigned int, unsigned long int, void**)'
  [A] 'function void kmem_cache_free_bulk(kmem_cache*, size_t, void**)'
  [A] 'function int of_genpd_add_provider_onecell(device_node*, genpd_onecell_data*)'
  [A] 'function void of_genpd_del_provider(device_node*)'
  [A] 'function const unsigned int* of_prop_next_u32(property*, const unsigned int*, unsigned int*)'
  [A] 'function void pci_release_region(pci_dev*, int)'
  [A] 'function int pci_request_region(pci_dev*, int, const char*)'
  [A] 'function int platform_get_irq_optional(platform_device*, unsigned int)'
  [A] 'function int pm_genpd_add_subdomain(generic_pm_domain*, generic_pm_domain*)'
  [A] 'function int pm_genpd_remove_subdomain(generic_pm_domain*, generic_pm_domain*)'

Bug: 147894960
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: I13dce4c6924e00ec6603f22287de928c2098655f
2020-03-12 14:40:56 +00:00
Quentin Perret
924825e24a ANDROID: update abi_gki_aarch64_cuttlefish_whitelist
Bug: 147894960
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: Ie66420d1c36ec460186935fe76efbec0fe9866ff
2020-03-12 14:34:21 +00:00
Quentin Perret
586883b368 ANDROID: update abi_gki_aarch64_db845c_whitelist
Bug: 147894960
Signed-off-by: Quentin Perret <qperret@google.com>
Change-Id: Id2a3a8e3a88d9e0d2bf30bfb56065340d88b4ac0
2020-03-12 14:34:21 +00:00
Greg Kroah-Hartman
353013334b ANDROID: update abi due to interconnect changes
Leaf changes summary: 1 artifact changed
Changed leaf types summary: 1 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

'struct icc_path at core.c:50:1' changed:
  type size changed from 64 to 128 (in bits)
  1 data member insertion:
    'const char* icc_path::name', at offset 0 (in bits) at internal.h:37:1
  there are data member changes:
   'size_t icc_path::num_nodes' offset changed from 0 to 64 (in bits) (by +64 bits)
   'icc_req icc_path::reqs[]' offset changed from 64 to 128 (in bits) (by +64 bits)

  3 impacted interfaces:
    function void icc_put(icc_path*)
    function int icc_set_bw(icc_path*, u32, u32)
    function icc_path* of_icc_get(device*, const char*)

Bug: 151255205
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I01a15b1dee23268381aa2b8b067c1687054481fa
2020-03-12 14:52:57 +01:00
Georgi Djakov
45bba71ccc UPSTREAM: interconnect: Handle memory allocation errors
When we allocate memory, kasprintf() can fail and we must check its
return value.

Bug: 151255205
Fixes: 05309830e1f8 ("interconnect: Add a name to struct icc_path")
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Link: https://lore.kernel.org/r/20200226110420.5357-2-georgi.djakov@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 3791163602f7140011a8dc1691cfe6ec0cb1ef07)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3eced73454428bf486e511cb5065f4b75bdfe3c4
2020-03-12 14:52:54 +01:00
Georgi Djakov
870b75db7a UPSTREAM: interconnect: Add basic tracepoints
The tracepoints can help with understanding the system behavior of a
given interconnect path when the consumer drivers change their bandwidth
demands. This might be interesting when we want to monitor the requested
interconnect bandwidth for each client driver. The paths may share the
same nodes and this will help to understand "who and when is requesting
what". All this is useful for subsystem drivers developers and may also
provide hints when optimizing the power and performance profile of the
system.

Bug: 151255205
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
(cherry picked from commit c46ab9db64979b0875fff79e1b00013343ca8286)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia2276cc83a2a73c66207bdf14b87402b96d623a7
2020-03-12 14:52:54 +01:00
Georgi Djakov
8d8f1c6738 UPSTREAM: interconnect: Add a name to struct icc_path
When debugging interconnect things, it turned out that saving the path
name and including it in the traces is quite useful, especially for
devices with multiple paths.

For the path name we use the one specified in DT, or if we use platform
data, the name is based on the source and destination node names.

Bug: 151255205
Suggested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
(cherry picked from commit 05309830e1f869f939e283576dd3684313390062)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I81ef3e94092682e8ca986f4dafce03be46e28218
2020-03-12 14:52:54 +01:00
Georgi Djakov
33d94128d4 UPSTREAM: interconnect: Move internal structs into a separate file
Move the interconnect framework internal structs into a separate file,
so that it can be included and used by ftrace code. This will allow us
to expose some more useful information in the traces.

Bug: 151255205
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
(cherry picked from commit dd018a9cf9108f9c7d924f6fe09aed745e78a67e)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I913023038160d36c75dec1d04c89cd4671977321
2020-03-12 14:52:54 +01:00
Greg Kroah-Hartman
18fe53f6df Linux 5.4.25 2020-03-12 13:00:32 +01:00
Stephen Rothwell
564f7c2b56 drm/virtio: module_param_named() requires linux/moduleparam.h
commit b0138364da17617db052c4a738b58bf45e42f500 upstream.

Fixes: 3e93bc2a58aa ("drm/virtio: make resource id workaround runtime switchable.")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: http://patchwork.freedesktop.org/patch/msgid/20190828185516.22b03da8@canb.auug.org.au
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 13:00:32 +01:00
Guo Ren
09a8dd779e csky: Implement copy_thread_tls
commit 0b9f386c4be6493d282aab0af6f9b70c62142777 upstream.

This is required for clone3 which passes the TLS value through a
struct rather than a register.

Cc: Amanieu d'Antras <amanieu@gmail.com>
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 13:00:32 +01:00
Paolo Valente
e28c9b3caf block, bfq: remove ifdefs from around gets/puts of bfq groups
commit 4d8340d0d4d90e7ca367d18ec16c2fefa89a339c upstream.

ifdefs around gets and puts of bfq groups reduce readability, remove them.

Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Reported-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 13:00:32 +01:00
Paolo Valente
92ed51e651 block, bfq: get a ref to a group when adding it to a service tree
commit db37a34c563bf4692b36990ae89005c031385e52 upstream.

BFQ schedules generic entities, which may represent either bfq_queues
or groups of bfq_queues. When an entity is inserted into a service
tree, a reference must be taken, to make sure that the entity does not
disappear while still referred in the tree. Unfortunately, such a
reference is mistakenly taken only if the entity represents a
bfq_queue. This commit takes a reference also in case the entity
represents a group.

Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Tested-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 13:00:32 +01:00
Jason A. Donenfeld
e657b1f6b9 efi: READ_ONCE rng seed size before munmap
commit be36f9e7517e17810ec369626a128d7948942259 upstream.

This function is consistent with using size instead of seed->size
(except for one place that this patch fixes), but it reads seed->size
without using READ_ONCE, which means the compiler might still do
something unwanted. So, this commit simply adds the READ_ONCE
wrapper.

Fixes: 636259880a ("efi: Add support for seeding the RNG from a UEFI ...")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: linux-efi@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20200217123354.21140-1-Jason@zx2c4.com
Link: https://lore.kernel.org/r/20200221084849.26878-5-ardb@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 13:00:31 +01:00
Ard Biesheuvel
cca130fc00 efi/x86: Handle by-ref arguments covering multiple pages in mixed mode
commit 8319e9d5ad98ffccd19f35664382c73cea216193 upstream.

The mixed mode runtime wrappers are fragile when it comes to how the
memory referred to by its pointer arguments are laid out in memory, due
to the fact that it translates these addresses to physical addresses that
the runtime services can dereference when running in 1:1 mode. Since
vmalloc'ed pages (including the vmap'ed stack) are not contiguous in the
physical address space, this scheme only works if the referenced memory
objects do not cross page boundaries.

Currently, the mixed mode runtime service wrappers require that all by-ref
arguments that live in the vmalloc space have a size that is a power of 2,
and are aligned to that same value. While this is a sensible way to
construct an object that is guaranteed not to cross a page boundary, it is
overly strict when it comes to checking whether a given object violates
this requirement, as we can simply take the physical address of the first
and the last byte, and verify that they point into the same physical page.

When this check fails, we emit a WARN(), but then simply proceed with the
call, which could cause data corruption if the next physical page belongs
to a mapping that is entirely unrelated.

Given that with vmap'ed stacks, this condition is much more likely to
trigger, let's relax the condition a bit, but fail the runtime service
call if it does trigger.

Fixes: f6697df36b ("x86/efi: Prevent mixed mode boot corruption with CONFIG_VMAP_STACK=y")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: linux-efi@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20200221084849.26878-4-ardb@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 13:00:31 +01:00
Ard Biesheuvel
61a7f1e13b efi/x86: Align GUIDs to their size in the mixed mode runtime wrapper
commit 63056e8b5ebf41d52170e9f5ba1fc83d1855278c upstream.

Hans reports that his mixed mode systems running v5.6-rc1 kernels hit
the WARN_ON() in virt_to_phys_or_null_size(), caused by the fact that
efi_guid_t objects on the vmap'ed stack happen to be misaligned with
respect to their sizes. As a quick (i.e., backportable) fix, copy GUID
pointer arguments to the local stack into a buffer that is naturally
aligned to its size, so that it is guaranteed to cover only one
physical page.

Note that on x86, we cannot rely on the stack pointer being aligned
the way the compiler expects, so we need to allocate an 8-byte aligned
buffer of sufficient size, and copy the GUID into that buffer at an
offset that is aligned to 16 bytes.

Fixes: f6697df36b ("x86/efi: Prevent mixed mode boot corruption with CONFIG_VMAP_STACK=y")
Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Cc: linux-efi@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20200221084849.26878-2-ardb@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 13:00:31 +01:00
Desnes A. Nunes do Rosario
da44902fcf powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems
commit fc37a1632d40c80c067eb1bc235139f5867a2667 upstream.

PowerVM systems running compatibility mode on a few Power8 revisions are
still vulnerable to the hardware defect that loses PMU exceptions arriving
prior to a context switch.

The software fix for this issue is enabled through the CPU_FTR_PMAO_BUG
cpu_feature bit, nevertheless this bit also needs to be set for PowerVM
compatibility mode systems.

Fixes: 68f2f0d431 ("powerpc: Add a cpu feature CPU_FTR_PMAO_BUG")
Signed-off-by: Desnes A. Nunes do Rosario <desnesn@linux.ibm.com>
Reviewed-by: Leonardo Bras <leonardo@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200227134715.9715-1-desnesn@linux.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 13:00:31 +01:00
Sherry Sun
90335d6681 EDAC/synopsys: Do not print an error with back-to-back snprintf() calls
commit dfc6014e3b60713f375d0601d7549eed224c4615 upstream.

handle_error() currently calls snprintf() a couple of times in
succession to output the message for a CE/UE, therefore overwriting each
part of the message which was formatted with the previous snprintf()
call. As a result, only the part of the message from the last snprintf()
call will be printed.

The simplest and most effective way to fix this problem is to combine
the whole string into one which to supply to a single snprintf() call.

 [ bp: Massage. ]

Fixes: b500b4a029 ("EDAC, synopsys: Add ECC support for ZynqMP DDR controller")
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: James Morse <james.morse@arm.com>
Cc: Manish Narani <manish.narani@xilinx.com>
Link: https://lkml.kernel.org/r/1582792452-32575-1-git-send-email-sherry.sun@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 13:00:31 +01:00