1. 15 8月, 2020 7 次提交
  2. 13 8月, 2020 30 次提交
    • O
      drm/xen-front: Pass dumb buffer data offset to the backend · 585c6ed7
      Oleksandr Andrushchenko 提交于
      While importing a dmabuf it is possible that the data of the buffer
      is put with offset which is indicated by the SGT offset.
      Respect the offset value and forward it to the backend.
      Signed-off-by: NOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
      Acked-by: NNoralf Trønnes <noralf@tronnes.org>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      585c6ed7
    • O
      drm/xen-front: Add YUYV to supported formats · 12957299
      Oleksandr Andrushchenko 提交于
      Add YUYV to supported formats, so the frontend can work with the
      formats used by cameras and other HW.
      Signed-off-by: NOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
      Acked-by: NNoralf Trønnes <noralf@tronnes.org>
      Link: https://lore.kernel.org/r/20200813062113.11030-4-andr2000@gmail.comSigned-off-by: NJuergen Gross <jgross@suse.com>
      12957299
    • O
      drm/xen-front: Fix misused IS_ERR_OR_NULL checks · 14dee058
      Oleksandr Andrushchenko 提交于
      The patch c575b7ee: "drm/xen-front: Add support for Xen PV
      display frontend" from Apr 3, 2018, leads to the following static
      checker warning:
      
      	drivers/gpu/drm/xen/xen_drm_front_gem.c:140 xen_drm_front_gem_create()
      	warn: passing zero to 'ERR_CAST'
      
      drivers/gpu/drm/xen/xen_drm_front_gem.c
         133  struct drm_gem_object *xen_drm_front_gem_create(struct drm_device *dev,
         134                                                  size_t size)
         135  {
         136          struct xen_gem_object *xen_obj;
         137
         138          xen_obj = gem_create(dev, size);
         139          if (IS_ERR_OR_NULL(xen_obj))
         140                  return ERR_CAST(xen_obj);
      
      Fix this and the rest of misused places with IS_ERR_OR_NULL in the
      driver.
      
      Fixes:  c575b7ee: "drm/xen-front: Add support for Xen PV display frontend"
      Signed-off-by: NOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: NDan Carpenter <dan.carpenter@oracle.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20200813062113.11030-3-andr2000@gmail.comSigned-off-by: NJuergen Gross <jgross@suse.com>
      14dee058
    • O
      xen/gntdev: Fix dmabuf import with non-zero sgt offset · 5fa4e6f1
      Oleksandr Andrushchenko 提交于
      It is possible that the scatter-gather table during dmabuf import has
      non-zero offset of the data, but user-space doesn't expect that.
      Fix this by failing the import, so user-space doesn't access wrong data.
      
      Fixes: bf8dc55b ("xen/gntdev: Implement dma-buf import functionality")
      Signed-off-by: NOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
      Acked-by: NJuergen Gross <jgross@suse.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20200813062113.11030-2-andr2000@gmail.comSigned-off-by: NJuergen Gross <jgross@suse.com>
      5fa4e6f1
    • S
      mfd: syscon: Use a unique name with regmap_config · e15d7f2b
      Suman Anna 提交于
      The DT node full name is currently being used in regmap_config
      which in turn is used to create the regmap debugfs directories.
      This name however is not guaranteed to be unique and the regmap
      debugfs registration can fail in the cases where the syscon nodes
      have the same unit-address but are present in different DT node
      hierarchies. Replace this logic using the syscon reg resource
      address instead (inspired from logic used while creating platform
      devices) to ensure a unique name is given for each syscon.
      Signed-off-by: NSuman Anna <s-anna@ti.com>
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      e15d7f2b
    • A
      mfd: Replace HTTP links with HTTPS ones · 4f4ed454
      Alexander A. Klimov 提交于
      Rationale:
      Reduces attack surface on kernel devs opening the links for MITM
      as HTTPS traffic is much harder to manipulate.
      
      Deterministic algorithm:
      For each file:
        If not .svg:
          For each line:
            If doesn't contain `\bxmlns\b`:
              For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
      	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
                  If both the HTTP and HTTPS versions
                  return 200 OK and serve the same content:
                    Replace HTTP with HTTPS.
      Signed-off-by: NAlexander A. Klimov <grandmaster@al2klimov.de>
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      4f4ed454
    • A
      mfd: dln2: Run event handler loop under spinlock · 3d858942
      Andy Shevchenko 提交于
      The event handler loop must be run with interrupts disabled.
      Otherwise we will have a warning:
      
      [ 1970.785649] irq 31 handler lineevent_irq_handler+0x0/0x20 enabled interrupts
      [ 1970.792739] WARNING: CPU: 0 PID: 0 at kernel/irq/handle.c:159 __handle_irq_event_percpu+0x162/0x170
      [ 1970.860732] RIP: 0010:__handle_irq_event_percpu+0x162/0x170
      ...
      [ 1970.946994] Call Trace:
      [ 1970.949446]  <IRQ>
      [ 1970.951471]  handle_irq_event_percpu+0x2c/0x80
      [ 1970.955921]  handle_irq_event+0x23/0x43
      [ 1970.959766]  handle_simple_irq+0x57/0x70
      [ 1970.963695]  generic_handle_irq+0x42/0x50
      [ 1970.967717]  dln2_rx+0xc1/0x210 [dln2]
      [ 1970.971479]  ? usb_hcd_unmap_urb_for_dma+0xa6/0x1c0
      [ 1970.976362]  __usb_hcd_giveback_urb+0x77/0xe0
      [ 1970.980727]  usb_giveback_urb_bh+0x8e/0xe0
      [ 1970.984837]  tasklet_action_common.isra.0+0x4a/0xe0
      ...
      
      Recently xHCI driver switched to tasklets in the commit 36dc0165
      ("usb: host: xhci: Support running urb giveback in tasklet context").
      
      The handle_irq_event_* functions are expected to be called with interrupts
      disabled and they rightfully complain here because we run in tasklet context
      with interrupts enabled.
      
      Use a event spinlock to protect event handler from being interrupted.
      
      Note, that there are only two users of this GPIO and ADC drivers and both of
      them are using generic_handle_irq() which makes above happen.
      
      Fixes: 338a1281 ("mfd: Add support for Diolan DLN-2 devices")
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      3d858942
    • C
      mfd: madera: Improve handling of regulator unbinding · 77b3ddab
      Charles Keepax 提交于
      The current unbinding process for Madera has some issues. The trouble
      is runtime PM is disabled as the first step of the process, but
      some of the drivers release IRQs causing regmap IRQ to issue a
      runtime get which fails. To allow runtime PM to remain enabled during
      mfd_remove_devices, the DCVDD regulator must remain available. In
      the case of external DCVDD's this is simple, the regulator can simply
      be disabled/put after the call to mfd_remove_devices. However, in
      the case of an internally supplied DCVDD the regulator needs to be
      released after the other MFD children depending on it.
      
      Use the new MFD mfd_remove_devices_late functionality to split
      the DCVDD regulator off from the other drivers.
      Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      77b3ddab
    • C
      mfd: mfd-core: Add mechanism for removal of a subset of children · 114294d2
      Charles Keepax 提交于
      Currently, the only way to remove MFD children is with a call to
      mfd_remove_devices, which will remove all the children. Under
      some circumstances it is useful to remove only a subset of the
      child devices. For example if some additional clean up is required
      between removal of certain child devices.
      
      To accomplish this a level field is added to mfd_cell, the normal
      mfd_remove_devices is modified to not remove devices that are set
      to a higher level and a corresponding mfd_remove_devices_late
      function is added to remove those children.
      
      See further discussion at:
      https://lore.kernel.org/lkml/20200616075834.GF2608702@dell/Suggested-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      114294d2
    • X
      mfd: intel_soc_pmic_mrfld: Simplify the return expression of intel_scu_ipc_dev_iowrite8() · 4ee1d9dc
      Xu Wang 提交于
      Simplify the return expression.
      Signed-off-by: NXu Wang <vulab@iscas.ac.cn>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      4ee1d9dc
    • C
      mfd: max14577: Remove redundant initialization of variable current_bits · 1f0fa85c
      Colin Ian King 提交于
      The variable current_bits is being initialized with a value that is
      never read and it is being updated later with a new value. The
      initialization is redundant and can be removed.
      
      Addresses-Coverity: ("Unused value")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Reviewed-by: NKrzysztof Kozlowski <krzk@kernel.org>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      1f0fa85c
    • A
      mfd: rn5t618: Fix caching of battery related registers · 594f1935
      Andreas Kemnade 提交于
      Battery status changes dynamically, so the corresponding registers
      need to be considered volatile. Affected registers are:
      
       - fuel gauge
       - battery status
       - battery interrupt
      Signed-off-by: NAndreas Kemnade <andreas@kemnade.info>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      594f1935
    • A
      mfd: rn5t618: Make restart handler atomic safe · cf84dc0b
      Andreas Kemnade 提交于
      The restart handler is executed during the shutdown phase which is
      atomic/irq-less. The i2c framework supports atomic transfers since
      commit 63b96983 ("i2c: core: introduce callbacks for atomic
      transfers") to address this use case. Using i2c regmap in that
      situation is not allowed:
      
      [  165.177465] [ BUG: Invalid wait context ]
      [  165.181479] 5.8.0-rc3-00003-g0e9088558027-dirty #11 Not tainted
      [  165.187400] -----------------------------
      [  165.191410] systemd-shutdow/1 is trying to lock:
      [  165.196030] d85b4438 (rn5t618:170:(&rn5t618_regmap_config)->lock){+.+.}-{3:3}, at: regmap_update_bits_base+0x30/0x70
      [  165.206573] other info that might help us debug this:
      [  165.211625] context-{4:4}
      [  165.214248] 2 locks held by systemd-shutdow/1:
      [  165.218691]  #0: c131c47c (system_transition_mutex){+.+.}-{3:3}, at: __do_sys_reboot+0x90/0x204
      [  165.227405]  #1: c131efb4 (rcu_read_lock){....}-{1:2}, at: __atomic_notifier_call_chain+0x0/0x118
      [  165.236288] stack backtrace:
      [  165.239174] CPU: 0 PID: 1 Comm: systemd-shutdow Not tainted 5.8.0-rc3-00003-g0e9088558027-dirty #11
      [  165.248220] Hardware name: Freescale i.MX6 SoloLite (Device Tree)
      [  165.254330] [<c0112110>] (unwind_backtrace) from [<c010bfa0>] (show_stack+0x10/0x14)
      [  165.262084] [<c010bfa0>] (show_stack) from [<c058093c>] (dump_stack+0xe8/0x120)
      [  165.269407] [<c058093c>] (dump_stack) from [<c01835a4>] (__lock_acquire+0x81c/0x2ca0)
      [  165.277246] [<c01835a4>] (__lock_acquire) from [<c0186344>] (lock_acquire+0xe4/0x490)
      [  165.285090] [<c0186344>] (lock_acquire) from [<c0c98638>] (__mutex_lock+0x74/0x954)
      [  165.292756] [<c0c98638>] (__mutex_lock) from [<c0c98f34>] (mutex_lock_nested+0x1c/0x24)
      [  165.300769] [<c0c98f34>] (mutex_lock_nested) from [<c07593ec>] (regmap_update_bits_base+0x30/0x70)
      [  165.309741] [<c07593ec>] (regmap_update_bits_base) from [<c076b838>] (rn5t618_trigger_poweroff_sequence+0x34/0x64)
      [  165.320097] [<c076b838>] (rn5t618_trigger_poweroff_sequence) from [<c076b874>] (rn5t618_restart+0xc/0x2c)
      [  165.329669] [<c076b874>] (rn5t618_restart) from [<c01514f8>] (notifier_call_chain+0x48/0x80)
      [  165.338113] [<c01514f8>] (notifier_call_chain) from [<c01516a8>] (__atomic_notifier_call_chain+0x70/0x118)
      [  165.347770] [<c01516a8>] (__atomic_notifier_call_chain) from [<c0151768>] (atomic_notifier_call_chain+0x18/0x20)
      [  165.357949] [<c0151768>] (atomic_notifier_call_chain) from [<c010a828>] (machine_restart+0x68/0x80)
      [  165.367001] [<c010a828>] (machine_restart) from [<c0153224>] (__do_sys_reboot+0x11c/0x204)
      [  165.375272] [<c0153224>] (__do_sys_reboot) from [<c0100080>] (ret_fast_syscall+0x0/0x28)
      [  165.383364] Exception stack(0xd80a5fa8 to 0xd80a5ff0)
      [  165.388420] 5fa0:                   00406948 00000000 fee1dead 28121969 01234567 73299b00
      [  165.396602] 5fc0: 00406948 00000000 00000000 00000058 be91abc8 00000000 be91ab60 004056f8
      [  165.404781] 5fe0: 00000058 be91aabc b6ed4d45 b6e56746
      Signed-off-by: NAndreas Kemnade <andreas@kemnade.info>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      cf84dc0b
    • S
      mfd: kempld-core: Fix 'assignment of read-only location' error · 564de762
      Stephen Rothwell 提交于
       drivers/mfd/kempld-core.c: In function 'kempld_register_cells_generic':
       drivers/mfd/kempld-core.c:105:13: error: assignment of read-only location 'devs[i++]'
        105 |   devs[i++] = kempld_devs[KEMPLD_I2C];
            |             ^
       drivers/mfd/kempld-core.c:108:13: error: assignment of read-only location 'devs[i++]'
        108 |   devs[i++] = kempld_devs[KEMPLD_WDT];
            |             ^
       drivers/mfd/kempld-core.c:111:13: error: assignment of read-only location 'devs[i++]'
        111 |   devs[i++] = kempld_devs[KEMPLD_GPIO];
            |             ^
       drivers/mfd/kempld-core.c:114:13: error: assignment of read-only location 'devs[i++]'
        114 |   devs[i++] = kempld_devs[KEMPLD_UART];
            |             ^
      
      Fixes: e49aa9a9bd22 ("mfd: core: Make a best effort attempt to match devices with the correct of_nodes")
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      564de762
    • F
      mfd: axp20x: Allow the AXP803 to be probed by I2C · 85c30785
      Frank Lee 提交于
      The AXP803 can be used both using the RSB proprietary bus, or a more
      traditional I2C bus.
      
      Let's add that possibility.
      Signed-off-by: NFrank Lee <frank@allwinnertech.com>
      Acked-by: NChen-Yu Tsai <wens@csie.org>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      85c30785
    • A
      mfd: da9063: Add support for latest DA silicon revision · 9ece3601
      Adam Thomson 提交于
      This update adds new regmap tables to support the latest DA silicon
      which will automatically be selected based on the chip and variant
      information read from the device.
      Signed-off-by: NAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      9ece3601
    • A
      mfd: da9063: Fix revision handling to correctly select reg tables · 091c6110
      Adam Thomson 提交于
      The current implementation performs checking in the i2c_probe()
      function of the variant_code but does this immediately after the
      containing struct has been initialised as all zero. This means the
      check for variant code will always default to using the BB tables
      and will never select AD. The variant code is subsequently set
      by device_init() and later used by the RTC so really it's a little
      fortunate this mismatch works.
      
      This update adds raw I2C read access functionality to read the chip
      and variant/revision information (common to all revisions) so that
      it can subsequently correctly choose the proper regmap tables for
      real initialisation.
      Signed-off-by: NAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      091c6110
    • T
      mfd: motorola-cpcap: Disable interrupt for suspend · 819e42e0
      Tony Lindgren 提交于
      Otherwise we get spammed with errors on resume after rtcwake:
      
       cpcap-core spi0.0: Failed to read IRQ status: -108
      
      Note that rtcwake is still capable of waking up the system with
      this patch.
      
      Cc: Merlijn Wajer <merlijn@wizzup.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Sebastian Reichel <sebastian.reichel@collabora.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      819e42e0
    • M
      mfd: smsc-ece1099: Remove driver · 7d2594cd
      Michael Walle 提交于
      This MFD driver has no user. The keypad driver of this device never made
      it into the kernel. Therefore, this driver is useless. Remove it.
      Signed-off-by: NMichael Walle <michael@walle.cc>
      Cc: Sourav Poddar <sourav.poddar@ti.com>
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      7d2594cd
    • L
      mfd: core: Make a best effort attempt to match devices with the correct of_nodes · 466a62d7
      Lee Jones 提交于
      Currently, when a child platform device (sometimes referred to as a
      sub-device) is registered via the Multi-Functional Device (MFD) API,
      the framework attempts to match the newly registered platform device
      with its associated Device Tree (OF) node.  Until now, the device has
      been allocated the first node found with an identical OF compatible
      string.  Unfortunately, if there are, say for example '3' devices
      which are to be handled by the same driver and therefore have the same
      compatible string, each of them will be allocated a pointer to the
      *first* node.
      
      An example Device Tree entry might look like this:
      
        mfd_of_test {
                compatible = "mfd,of-test-parent";
                #address-cells = <0x02>;
                #size-cells = <0x02>;
      
                child@aaaaaaaaaaaaaaaa {
                        compatible = "mfd,of-test-child";
                        reg = <0xaaaaaaaa 0xaaaaaaaa 0 0x11>,
                              <0xbbbbbbbb 0xbbbbbbbb 0 0x22>;
                };
      
                child@cccccccc {
                        compatible = "mfd,of-test-child";
                        reg = <0x00000000 0xcccccccc 0 0x33>;
                };
      
                child@dddddddd00000000 {
                        compatible = "mfd,of-test-child";
                        reg = <0xdddddddd 0x00000000 0 0x44>;
                };
        };
      
      When used with example sub-device registration like this:
      
        static const struct mfd_cell mfd_of_test_cell[] = {
              OF_MFD_CELL("mfd-of-test-child", NULL, NULL, 0, 0, "mfd,of-test-child"),
              OF_MFD_CELL("mfd-of-test-child", NULL, NULL, 0, 1, "mfd,of-test-child"),
              OF_MFD_CELL("mfd-of-test-child", NULL, NULL, 0, 2, "mfd,of-test-child")
        };
      
      ... the current implementation will result in all devices being allocated
      the first OF node found containing a matching compatible string:
      
        [0.712511] mfd-of-test-child mfd-of-test-child.0: Probing platform device: 0
        [0.712710] mfd-of-test-child mfd-of-test-child.0: Using OF node: child@aaaaaaaaaaaaaaaa
        [0.713033] mfd-of-test-child mfd-of-test-child.1: Probing platform device: 1
        [0.713381] mfd-of-test-child mfd-of-test-child.1: Using OF node: child@aaaaaaaaaaaaaaaa
        [0.713691] mfd-of-test-child mfd-of-test-child.2: Probing platform device: 2
        [0.713889] mfd-of-test-child mfd-of-test-child.2: Using OF node: child@aaaaaaaaaaaaaaaa
      
      After this patch each device will be allocated a unique OF node:
      
        [0.712511] mfd-of-test-child mfd-of-test-child.0: Probing platform device: 0
        [0.712710] mfd-of-test-child mfd-of-test-child.0: Using OF node: child@aaaaaaaaaaaaaaaa
        [0.713033] mfd-of-test-child mfd-of-test-child.1: Probing platform device: 1
        [0.713381] mfd-of-test-child mfd-of-test-child.1: Using OF node: child@cccccccc
        [0.713691] mfd-of-test-child mfd-of-test-child.2: Probing platform device: 2
        [0.713889] mfd-of-test-child mfd-of-test-child.2: Using OF node: child@dddddddd00000000
      
      Which is fine if all OF nodes are identical.  However if we wish to
      apply an attribute to particular device, we really need to ensure the
      correct OF node will be associated with the device containing the
      correct address.  We accomplish this by matching the device's address
      expressed in DT with one provided during sub-device registration.
      Like this:
      
        static const struct mfd_cell mfd_of_test_cell[] = {
              OF_MFD_CELL_REG("mfd-of-test-child", NULL, NULL, 0, 1, "mfd,of-test-child", 0xdddddddd00000000),
              OF_MFD_CELL_REG("mfd-of-test-child", NULL, NULL, 0, 2, "mfd,of-test-child", 0xaaaaaaaaaaaaaaaa),
              OF_MFD_CELL_REG("mfd-of-test-child", NULL, NULL, 0, 3, "mfd,of-test-child", 0x00000000cccccccc)
        };
      
      This will ensure a specific device (designated here using the
      platform_ids; 1, 2 and 3) is matched with a particular OF node:
      
        [0.712511] mfd-of-test-child mfd-of-test-child.0: Probing platform device: 0
        [0.712710] mfd-of-test-child mfd-of-test-child.0: Using OF node: child@dddddddd00000000
        [0.713033] mfd-of-test-child mfd-of-test-child.1: Probing platform device: 1
        [0.713381] mfd-of-test-child mfd-of-test-child.1: Using OF node: child@aaaaaaaaaaaaaaaa
        [0.713691] mfd-of-test-child mfd-of-test-child.2: Probing platform device: 2
        [0.713889] mfd-of-test-child mfd-of-test-child.2: Using OF node: child@cccccccc
      
      This implementation is still not infallible, hence the mention of
      "best effort" in the commit subject.  Since we have not *insisted* on
      the existence of 'reg' properties (in some scenarios they just do not
      make sense) and no device currently uses the new 'of_reg' attribute,
      we have to make an on-the-fly judgement call whether to associate the
      OF node anyway.  Which we do in cases where parent drivers haven't
      specified a particular OF node to match to.  So there is a *slight*
      possibility of the following result (note: the implementation here is
      convoluted, but it shows you one means by which this process can
      still break):
      
        /*
         * First entry will match to the first OF node with matching compatible
         * Second will fail, since the first took its OF node and is no longer available
         * Third will succeed
         */
        static const struct mfd_cell mfd_of_test_cell[] = {
              OF_MFD_CELL("mfd-of-test-child", NULL, NULL, 0, 1, "mfd,of-test-child"),
      	OF_MFD_CELL_REG("mfd-of-test-child", NULL, NULL, 0, 2, "mfd,of-test-child", 0xaaaaaaaaaaaaaaaa),
              OF_MFD_CELL_REG("mfd-of-test-child", NULL, NULL, 0, 3, "mfd,of-test-child", 0x00000000cccccccc)
        };
      
      The result:
      
        [0.753869] mfd-of-test-parent mfd_of_test: Registering 3 devices
        [0.756597] mfd-of-test-child: Failed to locate of_node [id: 2]
        [0.759999] mfd-of-test-child mfd-of-test-child.1: Probing platform device: 1
        [0.760314] mfd-of-test-child mfd-of-test-child.1: Using OF node: child@aaaaaaaaaaaaaaaa
        [0.760908] mfd-of-test-child mfd-of-test-child.2: Probing platform device: 2
        [0.761183] mfd-of-test-child mfd-of-test-child.2: No OF node associated with this device
        [0.761621] mfd-of-test-child mfd-of-test-child.3: Probing platform device: 3
        [0.761899] mfd-of-test-child mfd-of-test-child.3: Using OF node: child@cccccccc
      
      We could code around this with some pre-parsing semantics, but the
      added complexity required to cover each and every corner-case is not
      justified.  Merely patching the current failing (via this patch) is
      already working with some pretty small corner-cases.  Other issues
      should be patched in the parent drivers which can be achieved simply
      by implementing OF_MFD_CELL_REG().
      Signed-off-by: NLee Jones <lee.jones@linaro.org>
      466a62d7
    • J
      net: ethernet: stmmac: Disable hardware multicast filter · df43dd52
      Jonathan McDowell 提交于
      The IPQ806x does not appear to have a functional multicast ethernet
      address filter. This was observed as a failure to correctly receive IPv6
      packets on a LAN to the all stations address. Checking the vendor driver
      shows that it does not attempt to enable the multicast filter and
      instead falls back to receiving all multicast packets, internally
      setting ALLMULTI.
      
      Use the new fallback support in the dwmac1000 driver to correctly
      achieve the same with the mainline IPQ806x driver. Confirmed to fix IPv6
      functionality on an RB3011 router.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJonathan McDowell <noodles@earth.li>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df43dd52
    • J
      net: stmmac: dwmac1000: provide multicast filter fallback · 592d751c
      Jonathan McDowell 提交于
      If we don't have a hardware multicast filter available then instead of
      silently failing to listen for the requested ethernet broadcast
      addresses fall back to receiving all multicast packets, in a similar
      fashion to other drivers with no multicast filter.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJonathan McDowell <noodles@earth.li>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      592d751c
    • D
      i2c: iproc: fix race between client unreg and isr · b1eef236
      Dhananjay Phadke 提交于
      When i2c client unregisters, synchronize irq before setting
      iproc_i2c->slave to NULL.
      
      (1) disable_irq()
      (2) Mask event enable bits in control reg
      (3) Erase slave address (avoid further writes to rx fifo)
      (4) Flush tx and rx FIFOs
      (5) Clear pending event (interrupt) bits in status reg
      (6) enable_irq()
      (7) Set client pointer to NULL
      
      Unable to handle kernel NULL pointer dereference at virtual address 0000000000000318
      
      [  371.020421] pc : bcm_iproc_i2c_isr+0x530/0x11f0
      [  371.025098] lr : __handle_irq_event_percpu+0x6c/0x170
      [  371.030309] sp : ffff800010003e40
      [  371.033727] x29: ffff800010003e40 x28: 0000000000000060
      [  371.039206] x27: ffff800010ca9de0 x26: ffff800010f895df
      [  371.044686] x25: ffff800010f18888 x24: ffff0008f7ff3600
      [  371.050165] x23: 0000000000000003 x22: 0000000001600000
      [  371.055645] x21: ffff800010f18888 x20: 0000000001600000
      [  371.061124] x19: ffff0008f726f080 x18: 0000000000000000
      [  371.066603] x17: 0000000000000000 x16: 0000000000000000
      [  371.072082] x15: 0000000000000000 x14: 0000000000000000
      [  371.077561] x13: 0000000000000000 x12: 0000000000000001
      [  371.083040] x11: 0000000000000000 x10: 0000000000000040
      [  371.088519] x9 : ffff800010f317c8 x8 : ffff800010f317c0
      [  371.093999] x7 : ffff0008f805b3b0 x6 : 0000000000000000
      [  371.099478] x5 : ffff0008f7ff36a4 x4 : ffff8008ee43d000
      [  371.104957] x3 : 0000000000000000 x2 : ffff8000107d64c0
      [  371.110436] x1 : 00000000c00000af x0 : 0000000000000000
      
      [  371.115916] Call trace:
      [  371.118439]  bcm_iproc_i2c_isr+0x530/0x11f0
      [  371.122754]  __handle_irq_event_percpu+0x6c/0x170
      [  371.127606]  handle_irq_event_percpu+0x34/0x88
      [  371.132189]  handle_irq_event+0x40/0x120
      [  371.136234]  handle_fasteoi_irq+0xcc/0x1a0
      [  371.140459]  generic_handle_irq+0x24/0x38
      [  371.144594]  __handle_domain_irq+0x60/0xb8
      [  371.148820]  gic_handle_irq+0xc0/0x158
      [  371.152687]  el1_irq+0xb8/0x140
      [  371.155927]  arch_cpu_idle+0x10/0x18
      [  371.159615]  do_idle+0x204/0x290
      [  371.162943]  cpu_startup_entry+0x24/0x60
      [  371.166990]  rest_init+0xb0/0xbc
      [  371.170322]  arch_call_rest_init+0xc/0x14
      [  371.174458]  start_kernel+0x404/0x430
      
      Fixes: c245d94e ("i2c: iproc: Add multi byte read-write support for slave mode")
      Signed-off-by: NDhananjay Phadke <dphadke@linux.microsoft.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Acked-by: NRay Jui <ray.jui@broadcom.com>
      Signed-off-by: NWolfram Sang <wsa@kernel.org>
      b1eef236
    • E
      sfc: fix ef100 design-param checking · 41077c99
      Edward Cree 提交于
      The handling of the RXQ/TXQ size granularity design-params had two
       problems: it had a 64-bit divide that didn't build on 32-bit platforms,
       and it could divide by zero if the NIC supplied 0 as the value of the
       design-param.  Fix both by checking for 0 and for a granularity bigger
       than our min-size; if the granularity <= EFX_MIN_DMAQ_SIZE then it fits
       in 32 bits, so we can cast it to u32 for the divide.
      Reported-by: Nkernel test robot <lkp@intel.com>
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      41077c99
    • P
      mm/gup: remove task_struct pointer for all gup code · 64019a2e
      Peter Xu 提交于
      After the cleanup of page fault accounting, gup does not need to pass
      task_struct around any more.  Remove that parameter in the whole gup
      stack.
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: NJohn Hubbard <jhubbard@nvidia.com>
      Link: http://lkml.kernel.org/r/20200707225021.200906-26-peterx@redhat.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      64019a2e
    • P
      mm: do page fault accounting in handle_mm_fault · bce617ed
      Peter Xu 提交于
      Patch series "mm: Page fault accounting cleanups", v5.
      
      This is v5 of the pf accounting cleanup series.  It originates from Gerald
      Schaefer's report on an issue a week ago regarding to incorrect page fault
      accountings for retried page fault after commit 4064b982 ("mm: allow
      VM_FAULT_RETRY for multiple times"):
      
        https://lore.kernel.org/lkml/20200610174811.44b94525@thinkpad/
      
      What this series did:
      
        - Correct page fault accounting: we do accounting for a page fault
          (no matter whether it's from #PF handling, or gup, or anything else)
          only with the one that completed the fault.  For example, page fault
          retries should not be counted in page fault counters.  Same to the
          perf events.
      
        - Unify definition of PERF_COUNT_SW_PAGE_FAULTS: currently this perf
          event is used in an adhoc way across different archs.
      
          Case (1): for many archs it's done at the entry of a page fault
          handler, so that it will also cover e.g.  errornous faults.
      
          Case (2): for some other archs, it is only accounted when the page
          fault is resolved successfully.
      
          Case (3): there're still quite some archs that have not enabled
          this perf event.
      
          Since this series will touch merely all the archs, we unify this
          perf event to always follow case (1), which is the one that makes most
          sense.  And since we moved the accounting into handle_mm_fault, the
          other two MAJ/MIN perf events are well taken care of naturally.
      
        - Unify definition of "major faults": the definition of "major
          fault" is slightly changed when used in accounting (not
          VM_FAULT_MAJOR).  More information in patch 1.
      
        - Always account the page fault onto the one that triggered the page
          fault.  This does not matter much for #PF handlings, but mostly for
          gup.  More information on this in patch 25.
      
      Patchset layout:
      
      Patch 1:     Introduced the accounting in handle_mm_fault(), not enabled.
      Patch 2-23:  Enable the new accounting for arch #PF handlers one by one.
      Patch 24:    Enable the new accounting for the rest outliers (gup, iommu, etc.)
      Patch 25:    Cleanup GUP task_struct pointer since it's not needed any more
      
      This patch (of 25):
      
      This is a preparation patch to move page fault accountings into the
      general code in handle_mm_fault().  This includes both the per task
      flt_maj/flt_min counters, and the major/minor page fault perf events.  To
      do this, the pt_regs pointer is passed into handle_mm_fault().
      
      PERF_COUNT_SW_PAGE_FAULTS should still be kept in per-arch page fault
      handlers.
      
      So far, all the pt_regs pointer that passed into handle_mm_fault() is
      NULL, which means this patch should have no intented functional change.
      Suggested-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Albert Ou <aou@eecs.berkeley.edu>
      Cc: Alexander Gordeev <agordeev@linux.ibm.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Cain <bcain@codeaurora.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
      Cc: Greentime Hu <green.hu@gmail.com>
      Cc: Guo Ren <guoren@kernel.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: John Hubbard <jhubbard@nvidia.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Ley Foon Tan <ley.foon.tan@intel.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Nick Hu <nickhu@andestech.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Rich Felker <dalias@libc.org>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Link: http://lkml.kernel.org/r/20200707225021.200906-1-peterx@redhat.com
      Link: http://lkml.kernel.org/r/20200707225021.200906-2-peterx@redhat.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bce617ed
    • G
      rapidio/rio_mport_cdev: use array_size() helper in copy_{from,to}_user() · d7137549
      Gustavo A. R. Silva 提交于
      Use array_size() helper instead of the open-coded version in
      copy_{from,to}_user().  These sorts of multiplication factors need to be
      wrapped in array_size().
      
      This issue was found with the help of Coccinelle and, audited and fixed
      manually.
      Signed-off-by: NGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Alexandre Bounine <alex.bou9@gmail.com>
      Link: http://lkml.kernel.org/r/20200616183050.GA31840@embeddedor
      Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d7137549
    • G
      drivers/rapidio/rio-scan.c: use struct_size() helper · 330d5589
      Gustavo A. R. Silva 提交于
      Make use of the struct_size() helper instead of an open-coded version in
      order to avoid any potential type mistakes.
      
      Also, while there, use the preferred form for passing a size of a struct.
      The alternative form where struct name is spelled out hurts readability
      and introduces an opportunity for a bug when the pointer variable type is
      changed but the corresponding sizeof that is passed as argument is not.
      
      This issue was found with the help of Coccinelle and, audited and fixed
      manually.
      
      Addresses KSPP ID: https://github.com/KSPP/linux/issues/83Signed-off-by: NGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Alexandre Bounine <alex.bou9@gmail.com>
      Link: http://lkml.kernel.org/r/20200619170445.GA22641@embeddedorSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      330d5589
    • G
      drivers/rapidio/devices/rio_mport_cdev.c: use struct_size() helper · 216ec27f
      Gustavo A. R. Silva 提交于
      Make use of the struct_size() helper instead of an open-coded version in
      order to avoid any potential type mistakes.
      
      This issue was found with the help of Coccinelle and, audited and fixed
      manually.
      
      Addresses KSPP ID: https://github.com/KSPP/linux/issues/83Signed-off-by: NGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Matt Porter <mporter@kernel.crashing.org>
      Cc: Alexandre Bounine <alex.bou9@gmail.com>
      Link: http://lkml.kernel.org/r/20200619170843.GA24923@embeddedorSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      216ec27f
    • C
      uaccess: add force_uaccess_{begin,end} helpers · 3d13f313
      Christoph Hellwig 提交于
      Add helpers to wrap the get_fs/set_fs magic for undoing any damange done
      by set_fs(KERNEL_DS).  There is no real functional benefit, but this
      documents the intent of these calls better, and will allow stubbing the
      functions out easily for kernels builds that do not allow address space
      overrides in the future.
      
      [hch@lst.de: drop two incorrect hunks, fix a commit log typo]
        Link: http://lkml.kernel.org/r/20200714105505.935079-6-hch@lst.deSigned-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      Acked-by: NGreentime Hu <green.hu@gmail.com>
      Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Nick Hu <nickhu@andestech.com>
      Cc: Vincent Chen <deanbo422@gmail.com>
      Cc: Paul Walmsley <paul.walmsley@sifive.com>
      Cc: Palmer Dabbelt <palmer@dabbelt.com>
      Link: http://lkml.kernel.org/r/20200710135706.537715-6-hch@lst.deSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3d13f313
  3. 12 8月, 2020 3 次提交