1. 27 6月, 2020 5 次提交
  2. 14 6月, 2020 1 次提交
    • M
      treewide: replace '---help---' in Kconfig files with 'help' · a7f7f624
      Masahiro Yamada 提交于
      Since commit 84af7a61 ("checkpatch: kconfig: prefer 'help' over
      '---help---'"), the number of '---help---' has been gradually
      decreasing, but there are still more than 2400 instances.
      
      This commit finishes the conversion. While I touched the lines,
      I also fixed the indentation.
      
      There are a variety of indentation styles found.
      
        a) 4 spaces + '---help---'
        b) 7 spaces + '---help---'
        c) 8 spaces + '---help---'
        d) 1 space + 1 tab + '---help---'
        e) 1 tab + '---help---'    (correct indentation)
        f) 1 tab + 1 space + '---help---'
        g) 1 tab + 2 spaces + '---help---'
      
      In order to convert all of them to 1 tab + 'help', I ran the
      following commend:
      
        $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      a7f7f624
  3. 10 6月, 2020 3 次提交
  4. 02 6月, 2020 5 次提交
  5. 29 5月, 2020 7 次提交
  6. 27 5月, 2020 4 次提交
  7. 22 5月, 2020 4 次提交
  8. 19 5月, 2020 6 次提交
    • G
      tty: n_gsm: Fix bogus i++ in gsm_data_kick · 4dd31f1f
      Gregory CLEMENT 提交于
      When submitting the previous fix "tty: n_gsm: Fix waking up upper tty
      layer when room available". It was suggested to switch from a while to
      a for loop, but when doing it, there was a remaining bogus i++.
      
      This patch removes this i++ and also reorganizes the code making it more
      compact.
      
      Fixes: e1eaea46 ("tty: n_gsm line discipline")
      Signed-off-by: NGregory CLEMENT <gregory.clement@bootlin.com>
      Link: https://lore.kernel.org/r/20200518084517.2173242-3-gregory.clement@bootlin.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4dd31f1f
    • G
      tty: n_gsm: Remove unnecessary test in gsm_print_packet() · 57626ff1
      Gregory CLEMENT 提交于
      If the length is zero then the print_hex_dump_bytes won't output
      anything, so testing the length before the call is unnecessary.
      Signed-off-by: NGregory CLEMENT <gregory.clement@bootlin.com>
      Link: https://lore.kernel.org/r/20200518084517.2173242-2-gregory.clement@bootlin.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      57626ff1
    • E
      serial: stm32: add no_console_suspend support · 55484fcc
      Erwan Le Ray 提交于
      In order to display console messages in low power mode, console pins
      must be kept active after suspend call.
      
      Initial patch "serial: stm32: add support for no_console_suspend" was part
      of "STM32 usart power improvement" series, but as dependancy to
      console_suspend pinctl state has been removed to fit with Rob comment [1],
      this patch has no more dependancy with any other patch of this series.
      
      [1] https://lkml.org/lkml/2019/7/9/451Signed-off-by: NErwan Le Ray <erwan.leray@st.com>
      
      Link: https://lore.kernel.org/r/20200519094104.27082-1-erwan.leray@st.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      55484fcc
    • D
      kgdboc: Add kgdboc_earlycon to support early kgdb using boot consoles · 22099562
      Douglas Anderson 提交于
      We want to enable kgdb to debug the early parts of the kernel.
      Unfortunately kgdb normally is a client of the tty API in the kernel
      and serial drivers don't register to the tty layer until fairly late
      in the boot process.
      
      Serial drivers do, however, commonly register a boot console.  Let's
      enable the kgdboc driver to work with boot consoles to provide early
      debugging.
      
      This change co-opts the existing read() function pointer that's part
      of "struct console".  It's assumed that if a boot console (with the
      flag CON_BOOT) has implemented read() that both the read() and write()
      function are polling functions.  That means they work without
      interrupts and read() will return immediately (with 0 bytes read) if
      there's nothing to read.  This should be a safe assumption since it
      appears that no current boot consoles implement read() right now and
      there seems no reason to do so unless they wanted to support
      "kgdboc_earlycon".
      
      The normal/expected way to make all this work is to use
      "kgdboc_earlycon" and "kgdboc" together.  You should point them both
      to the same physical serial connection.  At boot time, as the system
      transitions from the boot console to the normal console (and registers
      a tty), kgdb will switch over.
      
      One awkward part of all this, though, is that there can be a window
      where the boot console goes away and we can't quite transtion over to
      the main kgdboc that uses the tty layer.  There are two main problems:
      
      1. The act of registering the tty doesn't cause any call into kgdboc
         so there is a window of time when the tty is there but kgdboc's
         init code hasn't been called so we can't transition to it.
      
      2. On some serial drivers the normal console inits (and replaces the
         boot console) quite early in the system.  Presumably these drivers
         were coded up before earlycon worked as well as it does today and
         probably they don't need to do this anymore, but it causes us
         problems nontheless.
      
      Problem #1 is not too big of a deal somewhat due to the luck of probe
      ordering.  kgdboc is last in the tty/serial/Makefile so its probe gets
      right after all other tty devices.  It's not fun to rely on this, but
      it does work for the most part.
      
      Problem #2 is a big deal, but only for some serial drivers.  Other
      serial drivers end up registering the console (which gets rid of the
      boot console) and tty at nearly the same time.
      
      The way we'll deal with the window when the system has stopped using
      the boot console and the time when we're setup using the tty is to
      keep using the boot console.  This may sound surprising, but it has
      been found to work well in practice.  If it doesn't work, it shouldn't
      be too hard for a given serial driver to make it keep working.
      Specifically, it's expected that the read()/write() function provided
      in the boot console should be the same (or nearly the same) as the
      normal kgdb polling functions.  That means continuing to use them
      should work just fine.  To make things even more likely to work work
      we'll also trap the recently added exit() function in the boot console
      we're using and delay any calls to it until we're all done with the
      boot console.
      
      NOTE: there could be ways to use all this in weird / unexpected ways.
      If you do something like this, it's a bit of a buyer beware situation.
      Specifically:
      - If you specify only "kgdboc_earlycon" but not "kgdboc" then
        (depending on your serial driver) things will probably work OK, but
        you'll get a warning printed the first time you use kgdb after the
        boot console is gone.  You'd only be able to do this, of course, if
        the serial driver you're running atop provided an early boot console.
      - If your "kgdboc_earlycon" and "kgdboc" devices are not the same
        device things should work OK, but it'll be your job to switch over
        which device you're monitoring (including figuring out how to switch
        over gdb in-flight if you're using it).
      
      When trying to enable "kgdboc_earlycon" it should be noted that the
      names that are registered through the boot console layer and the tty
      layer are not the same for the same port.  For example when debugging
      on one board I'd need to pass "kgdboc_earlycon=qcom_geni
      kgdboc=ttyMSM0" to enable things properly.  Since digging up the boot
      console name is a pain and there will rarely be more than one boot
      console enabled, you can provide the "kgdboc_earlycon" parameter
      without specifying the name of the boot console.  In this case we'll
      just pick the first boot that implements read() that we find.
      
      This new "kgdboc_earlycon" parameter should be contrasted to the
      existing "ekgdboc" parameter.  While both provide a way to debug very
      early, the usage and mechanisms are quite different.  Specifically
      "kgdboc_earlycon" is meant to be used in tandem with "kgdboc" and
      there is a transition from one to the other.  The "ekgdboc" parameter,
      on the other hand, replaces the "kgdboc" parameter.  It runs the same
      logic as the "kgdboc" parameter but just relies on your TTY driver
      being present super early.  The only known usage of the old "ekgdboc"
      parameter is documented as "ekgdboc=kbd earlyprintk=vga".  It should
      be noted that "kbd" has special treatment allowing it to init early as
      a tty device.
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Tested-by: NSumit Garg <sumit.garg@linaro.org>
      Link: https://lore.kernel.org/r/20200507130644.v4.8.I8fba5961bf452ab92350654aa61957f23ecf0100@changeidSigned-off-by: NDaniel Thompson <daniel.thompson@linaro.org>
      22099562
    • D
      kgdboc: Remove useless #ifdef CONFIG_KGDB_SERIAL_CONSOLE in kgdboc · eae3e19c
      Douglas Anderson 提交于
      This file is only ever compiled if that config is on since the
      Makefile says:
      
        obj-$(CONFIG_KGDB_SERIAL_CONSOLE) += kgdboc.o
      
      Let's get rid of the useless #ifdef.
      Reported-by: NDaniel Thompson <daniel.thompson@linaro.org>
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Link: https://lore.kernel.org/r/20200507130644.v4.7.Icb528f03d0026d957e60f537aa711ada6fd219dc@changeidSigned-off-by: NDaniel Thompson <daniel.thompson@linaro.org>
      eae3e19c
    • D
      kgdboc: Use a platform device to handle tty drivers showing up late · 68e55f61
      Douglas Anderson 提交于
      If you build CONFIG_KGDB_SERIAL_CONSOLE into the kernel then you
      should be able to have KGDB init itself at bootup by specifying the
      "kgdboc=..." kernel command line parameter.  This has worked OK for me
      for many years, but on a new device I switched to it stopped working.
      
      The problem is that on this new device the serial driver gets its
      probe deferred.  Now when kgdb initializes it can't find the tty
      driver and when it gives up it never tries again.
      
      We could try to find ways to move up the initialization of the serial
      driver and such a thing might be worthwhile, but it's nice to be
      robust against serial drivers that load late.  We could move kgdb to
      init itself later but that penalizes our ability to debug early boot
      code on systems where the driver inits early.  We could roll our own
      system of detecting when new tty drivers get loaded and then use that
      to figure out when kgdb can init, but that's ugly.
      
      Instead, let's jump on the -EPROBE_DEFER bandwagon.  We'll create a
      singleton instance of a "kgdboc" platform device.  If we can't find
      our tty device when the singleton "kgdboc" probes we'll return
      -EPROBE_DEFER which means that the system will call us back later to
      try again when the tty device might be there.
      
      We won't fully transition all of the kgdboc to a platform device
      because early kgdb initialization (via the "ekgdboc" kernel command
      line parameter) still runs before the platform device has been
      created.  The kgdb platform device is merely used as a convenient way
      to hook into the system's normal probe deferral mechanisms.
      
      As part of this, we'll ever-so-slightly change how the "kgdboc=..."
      kernel command line parameter works.  Previously if you booted up and
      kgdb couldn't find the tty driver then later reading
      '/sys/module/kgdboc/parameters/kgdboc' would return a blank string.
      Now kgdb will keep track of the string that came as part of the
      command line and give it back to you.  It's expected that this should
      be an OK change.
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Reviewed-by: NDaniel Thompson <daniel.thompson@linaro.org>
      Link: https://lore.kernel.org/r/20200507130644.v4.3.I4a493cfb0f9f740ce8fd2ab58e62dc92d18fed30@changeid
      [daniel.thompson@linaro.org: Make config_mutex static]
      Signed-off-by: NDaniel Thompson <daniel.thompson@linaro.org>
      68e55f61
  9. 18 5月, 2020 1 次提交
  10. 15 5月, 2020 4 次提交