13 Jun, 2019

1 commit

  • As part of trying to understand the locking (or lack thereof) in the
    fbcon/vt/fbdev maze, annotate everything.

    Signed-off-by: Daniel Vetter
    Reviewed-by: Sam Ravnborg
    Reviewed-by: Maarten Lankhorst
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Hans de Goede
    Cc: Daniel Vetter
    Cc: Greg Kroah-Hartman
    Cc: Kees Cook
    Cc: Nicolas Pitre
    Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-2-daniel.vetter@ffwll.ch

    Daniel Vetter
     

21 May, 2019

3 commits

  • Add SPDX license identifiers to all Make/Kconfig files which:

    - Have no license information of any form

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0-only

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Add SPDX license identifiers to all files which:

    - Have no license information of any form

    - Have MODULE_LICENCE("GPL*") inside which was used in the initial
    scan/conversion to ignore the file

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0-only

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Add SPDX license identifiers to all files which:

    - Have no license information of any form

    - Have EXPORT_.*_SYMBOL_GPL inside which was used in the
    initial scan/conversion to ignore the file

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0-only

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

18 Jan, 2019

1 commit

  • When CONFIG_VGACON_SOFT_SCROLLBACK is selected, the VGA display memory
    index and vc_visible_origin don't change when scrollback is activated.
    The actual screen content is saved away and the scrollbackdata is copied
    over it. However the vt code, and /dev/vcs devices in particular, still
    expect vc_origin to always point at the actual screen content not the
    displayed scrollback content.

    So adjust vc_origin to point at the saved screen content when scrollback
    is active and set it back to vc_visible_origin when restoring the screen.

    This fixes /dev/vcsa that return scrollback content when they
    shouldn't (onli /dev/vcsa without a number should), and also fixes
    /dev/vcsu that should return scrollback content when scrollback is
    active but currently doesn't.

    An unnecessary call to vga_set_mem_top() is also removed.

    Signed-off-by: Nicolas Pitre
    Cc: stable@vger.kernel.org # v4.19+
    Signed-off-by: Greg Kroah-Hartman

    Nicolas Pitre
     

10 Aug, 2018

2 commits


25 Jul, 2018

1 commit

  • It's been a pretty good while since kernel modesetting was introduced.
    It has almost entirely replaced previous solutions which required
    userspace modesetting, and I can't even recall any drivers off the top
    of my head for modern day hardware that don't only support one or the
    other. Even nvidia's ugly blob does not require the use of nomodeset,
    and only requires that nouveau be blacklisted.

    Effectively, the only thing nomodeset does in the year 2018 is disable
    your graphics drivers. Since VESA is a thing, this will give many users
    the false impression that they've actually fixed an issue they were
    having with their machine simply because the laptop will boot up to a
    degraded GUI. This of course, is never actually the case.

    Things get even worse when you consider that there's still an enormous
    amount of tutorials users find on the internet that still suggest adding
    nomodeset, along with various users who have been around long enough to
    still suggest it.

    There really isn't any legitimate reason I can see for this to be an
    option that's used by anyone else other then developers, or properly
    informed users. So, let's end the confusion and start printing warnings
    whenever it's enabled.

    Signed-off-by: Lyude Paul
    Reviewed-by: Daniel Vetter
    Acked-by: Jani Nikula
    Cc: Kees Cook
    Cc: "Jan H. Schönherr"
    Cc: Bjorn Helgaas
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Lyude Paul
     

29 Jun, 2018

1 commit


28 Jun, 2018

1 commit

  • Currently fbcon claims fbdevs as soon as they are registered and takes over
    the console as soon as the first fbdev gets registered.

    This behavior is undesirable in cases where a smooth graphical bootup is
    desired, in such cases we typically want the contents of the framebuffer
    (typically a vendor logo) to stay in place as is.

    The current solution for this problem (on embedded systems) is to not
    enable fbcon.

    This commit adds a new FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER config option,
    which when enabled defers fbcon taking over the console from the dummy
    console until the first text is displayed on the console. Together with the
    "quiet" kernel commandline option, this allows fbcon to still be used
    together with a smooth graphical bootup, having it take over the console as
    soon as e.g. an error message is logged.

    Note the choice to detect the first console output in the dummycon driver,
    rather then handling this entirely inside the fbcon code, was made after
    2 failed attempts to handle this entirely inside the fbcon code. The fbcon
    code is woven quite tightly into the console code, making this to only
    feasible option.

    Reviewed-by: Daniel Vetter
    Signed-off-by: Hans de Goede
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Hans de Goede
     

13 Jun, 2018

1 commit

  • The kzalloc() function has a 2-factor argument form, kcalloc(). This
    patch replaces cases of:

    kzalloc(a * b, gfp)

    with:
    kcalloc(a * b, gfp)

    as well as handling cases of:

    kzalloc(a * b * c, gfp)

    with:

    kzalloc(array3_size(a, b, c), gfp)

    as it's slightly less ugly than:

    kzalloc_array(array_size(a, b), c, gfp)

    This does, however, attempt to ignore constant size factors like:

    kzalloc(4 * 1024, gfp)

    though any constants defined via macros get caught up in the conversion.

    Any factors with a sizeof() of "unsigned char", "char", and "u8" were
    dropped, since they're redundant.

    The Coccinelle script used for this was:

    // Fix redundant parens around sizeof().
    @@
    type TYPE;
    expression THING, E;
    @@

    (
    kzalloc(
    - (sizeof(TYPE)) * E
    + sizeof(TYPE) * E
    , ...)
    |
    kzalloc(
    - (sizeof(THING)) * E
    + sizeof(THING) * E
    , ...)
    )

    // Drop single-byte sizes and redundant parens.
    @@
    expression COUNT;
    typedef u8;
    typedef __u8;
    @@

    (
    kzalloc(
    - sizeof(u8) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(__u8) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(char) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(unsigned char) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(u8) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(__u8) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(char) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(unsigned char) * COUNT
    + COUNT
    , ...)
    )

    // 2-factor product with sizeof(type/expression) and identifier or constant.
    @@
    type TYPE;
    expression THING;
    identifier COUNT_ID;
    constant COUNT_CONST;
    @@

    (
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (COUNT_ID)
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * COUNT_ID
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (COUNT_CONST)
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * COUNT_CONST
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (COUNT_ID)
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * COUNT_ID
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (COUNT_CONST)
    + COUNT_CONST, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * COUNT_CONST
    + COUNT_CONST, sizeof(THING)
    , ...)
    )

    // 2-factor product, only identifiers.
    @@
    identifier SIZE, COUNT;
    @@

    - kzalloc
    + kcalloc
    (
    - SIZE * COUNT
    + COUNT, SIZE
    , ...)

    // 3-factor product with 1 sizeof(type) or sizeof(expression), with
    // redundant parens removed.
    @@
    expression THING;
    identifier STRIDE, COUNT;
    type TYPE;
    @@

    (
    kzalloc(
    - sizeof(TYPE) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    )

    // 3-factor product with 2 sizeof(variable), with redundant parens removed.
    @@
    expression THING1, THING2;
    identifier COUNT;
    type TYPE1, TYPE2;
    @@

    (
    kzalloc(
    - sizeof(TYPE1) * sizeof(TYPE2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    kzalloc(
    - sizeof(THING1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(THING1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    )

    // 3-factor product, only identifiers, with redundant parens removed.
    @@
    identifier STRIDE, SIZE, COUNT;
    @@

    (
    kzalloc(
    - (COUNT) * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    )

    // Any remaining multi-factor products, first at least 3-factor products,
    // when they're not all constants...
    @@
    expression E1, E2, E3;
    constant C1, C2, C3;
    @@

    (
    kzalloc(C1 * C2 * C3, ...)
    |
    kzalloc(
    - (E1) * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - (E1) * (E2) * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - (E1) * (E2) * (E3)
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - E1 * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    )

    // And then all remaining 2 factors products when they're not all constants,
    // keeping sizeof() as the second factor argument.
    @@
    expression THING, E1, E2;
    type TYPE;
    constant C1, C2, C3;
    @@

    (
    kzalloc(sizeof(THING) * C2, ...)
    |
    kzalloc(sizeof(TYPE) * C2, ...)
    |
    kzalloc(C1 * C2 * C3, ...)
    |
    kzalloc(C1 * C2, ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (E2)
    + E2, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * E2
    + E2, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (E2)
    + E2, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * E2
    + E2, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - (E1) * E2
    + E1, E2
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - (E1) * (E2)
    + E1, E2
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - E1 * E2
    + E1, E2
    , ...)
    )

    Signed-off-by: Kees Cook

    Kees Cook
     

11 Apr, 2018

1 commit

  • Pull fbdev updates from Bartlomiej Zolnierkiewicz:
    "There is nothing really major here, just a couple of small bugfixes,
    improvements and cleanups:

    - make it possible to load radeonfb driver when offb driver is loaded
    first (Mathieu Malaterre)

    - fix memory leak in offb driver (Mathieu Malaterre)

    - fix unaligned access in udlfb driver (Ladislav Michl)

    - convert atmel_lcdfb driver to use GPIO descriptors (Ludovic
    Desroches)

    - avoid mismatched prototypes in sisfb driver (Arnd Bergmann)

    - remove VLA usage from viafb driver (Gustavo A. R. Silva)

    - add missing help text to FB_I810_I2 config option (Ulf Magnusson)

    - misc fixes (Gustavo A. R. Silva, Colin Ian King, Markus Elfring)

    - remove dead code from s3c-fb driver for Exynos and S5PV210
    platforms

    - misc cleanups (Corentin Labbe, Ladislav Michl, Ulf Magnusson,
    Vladimir Zapolskiy, Markus Elfring)"

    * tag 'fbdev-v4.17' of git://github.com/bzolnier/linux: (32 commits)
    video: fbdev: s3c-fb: remove dead platform code for Exynos and S5PV210 platforms
    video: au1100fb: Delete an unnecessary variable initialisation in au1100fb_drv_probe()
    video: au1100fb: Improve a size determination in au1100fb_drv_probe()
    video: au1100fb: Delete an error message for a failed memory allocation in au1100fb_drv_probe()
    video/console/sticore: Delete an error message for a failed memory allocation in sti_try_rom_generic()
    video: ARM CLCD: Improve a size determination in clcdfb_probe()
    video: ARM CLCD: Delete an error message for a failed memory allocation in clcdfb_probe()
    video: matroxfb: Delete an error message for a failed memory allocation in matroxfb_crtc2_probe()
    video: s3c-fb: Improve a size determination in s3c_fb_probe()
    video: s3c-fb: Delete an error message for a failed memory allocation in s3c_fb_probe()
    video: fsl-diu-fb: Delete an error message for a failed memory allocation in fsl_diu_init()
    video: ssd1307fb: Improve a size determination in ssd1307fb_probe()
    video: smscufx: Delete an error message for a failed memory allocation in ufx_realloc_framebuffer()
    video: smscufx: Return an error code only as a constant in ufx_realloc_framebuffer()
    video: smscufx: Less checks in ufx_usb_probe() after error detection
    video: udlfb: Return an error code only as a constant in dlfb_realloc_framebuffer()
    video/fbdev/stifb: Delete an error message for a failed memory allocation in stifb_init_fb()
    video/fbdev/stifb: Return -ENOMEM after a failed kzalloc() in stifb_init_fb()
    video: fbdev: aty128fb: use true and false for boolean values
    fbdev: aty: fix missing indentation in if statement
    ...

    Linus Torvalds
     

10 Apr, 2018

1 commit

  • Pull s390 updates from Martin Schwidefsky:

    - Improvements for the spectre defense:
    * The spectre related code is consolidated to a single file
    nospec-branch.c
    * Automatic enable/disable for the spectre v2 defenses (expoline vs.
    nobp)
    * Syslog messages for specve v2 are added
    * Enable CONFIG_GENERIC_CPU_VULNERABILITIES and define the attribute
    functions for spectre v1 and v2

    - Add helper macros for assembler alternatives and use them to shorten
    the code in entry.S.

    - Add support for persistent configuration data via the SCLP Store Data
    interface. The H/W interface requires a page table that uses 4K pages
    only, the code to setup such an address space is added as well.

    - Enable virtio GPU emulation in QEMU. To do this the depends
    statements for a few common Kconfig options are modified.

    - Add support for format-3 channel path descriptors and add a binary
    sysfs interface to export the associated utility strings.

    - Add a sysfs attribute to control the IFCC handling in case of
    constant channel errors.

    - The vfio-ccw changes from Cornelia.

    - Bug fixes and cleanups.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (40 commits)
    s390/kvm: improve stack frame constants in entry.S
    s390/lpp: use assembler alternatives for the LPP instruction
    s390/entry.S: use assembler alternatives
    s390: add assembler macros for CPU alternatives
    s390: add sysfs attributes for spectre
    s390: report spectre mitigation via syslog
    s390: add automatic detection of the spectre defense
    s390: move nobp parameter functions to nospec-branch.c
    s390/cio: add util_string sysfs attribute
    s390/chsc: query utility strings via fmt3 channel path descriptor
    s390/cio: rename struct channel_path_desc
    s390/cio: fix unbind of io_subchannel_driver
    s390/qdio: split up CCQ handling for EQBS / SQBS
    s390/qdio: don't retry EQBS after CCQ 96
    s390/qdio: restrict buffer merging to eligible devices
    s390/qdio: don't merge ERROR output buffers
    s390/qdio: simplify math in get_*_buffer_frontier()
    s390/decompressor: trim uncompressed image head during the build
    s390/crypto: Fix kernel crash on aes_s390 module remove.
    s390/defkeymap: fix global init to zero
    ...

    Linus Torvalds
     

05 Apr, 2018

1 commit

  • Pull tty/serial driver updates from Greg KH:
    "Here is the big set of tty and serial driver patches for 4.17-rc1

    Not all that big really, most are just small fixes and additions to
    existing drivers. There's a bunch of work on the imx serial driver
    recently for some reason, and a new embedded serial driver added as
    well.

    Full details are in the shortlog.

    All of these have been in the linux-next tree for a while with no
    reported issues"

    * tag 'tty-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (66 commits)
    serial: expose buf_overrun count through proc interface
    serial: mvebu-uart: fix tx lost characters
    tty: serial: msm_geni_serial: Fix return value check in qcom_geni_serial_probe()
    tty: serial: msm_geni_serial: Add serial driver support for GENI based QUP
    8250-men-mcb: add support for 16z025 and 16z057
    powerpc: Mark the variable earlycon_acpi_spcr_enable maybe_unused
    serial: stm32: fix initialization of RS485 mode
    ARM: dts: STi: Remove "console=ttyASN" from bootargs for STi boards
    vt: change SGR 21 to follow the standards
    serdev: Fix typo in serdev_device_alloc
    ARM: dts: STi: Fix aliases property name for STi boards
    tty: st-asc: Update tty alias
    serial: stm32: add support for RS485 hardware control mode
    dt-bindings: serial: stm32: add RS485 optional properties
    selftests: add devpts selftests
    devpts: comment devpts_mntget()
    devpts: resolve devpts bind-mounts
    devpts: hoist out check for DEVPTS_SUPER_MAGIC
    serial: 8250: Add Nuvoton NPCM UART
    serial: mxs-auart: disable clks of Alphascale ASM9260
    ...

    Linus Torvalds
     

03 Apr, 2018

1 commit

  • Pul removal of obsolete architecture ports from Arnd Bergmann:
    "This removes the entire architecture code for blackfin, cris, frv,
    m32r, metag, mn10300, score, and tile, including the associated device
    drivers.

    I have been working with the (former) maintainers for each one to
    ensure that my interpretation was right and the code is definitely
    unused in mainline kernels. Many had fond memories of working on the
    respective ports to start with and getting them included in upstream,
    but also saw no point in keeping the port alive without any users.

    In the end, it seems that while the eight architectures are extremely
    different, they all suffered the same fate: There was one company in
    charge of an SoC line, a CPU microarchitecture and a software
    ecosystem, which was more costly than licensing newer off-the-shelf
    CPU cores from a third party (typically ARM, MIPS, or RISC-V). It
    seems that all the SoC product lines are still around, but have not
    used the custom CPU architectures for several years at this point. In
    contrast, CPU instruction sets that remain popular and have actively
    maintained kernel ports tend to all be used across multiple licensees.

    [ See the new nds32 port merged in the previous commit for the next
    generation of "one company in charge of an SoC line, a CPU
    microarchitecture and a software ecosystem" - Linus ]

    The removal came out of a discussion that is now documented at
    https://lwn.net/Articles/748074/. Unlike the original plans, I'm not
    marking any ports as deprecated but remove them all at once after I
    made sure that they are all unused. Some architectures (notably tile,
    mn10300, and blackfin) are still being shipped in products with old
    kernels, but those products will never be updated to newer kernel
    releases.

    After this series, we still have a few architectures without mainline
    gcc support:

    - unicore32 and hexagon both have very outdated gcc releases, but the
    maintainers promised to work on providing something newer. At least
    in case of hexagon, this will only be llvm, not gcc.

    - openrisc, risc-v and nds32 are still in the process of finishing
    their support or getting it added to mainline gcc in the first
    place. They all have patched gcc-7.3 ports that work to some
    degree, but complete upstream support won't happen before gcc-8.1.
    Csky posted their first kernel patch set last week, their situation
    will be similar

    [ Palmer Dabbelt points out that RISC-V support is in mainline gcc
    since gcc-7, although gcc-7.3.0 is the recommended minimum - Linus ]"

    This really says it all:

    2498 files changed, 95 insertions(+), 467668 deletions(-)

    * tag 'arch-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (74 commits)
    MAINTAINERS: UNICORE32: Change email account
    staging: iio: remove iio-trig-bfin-timer driver
    tty: hvc: remove tile driver
    tty: remove bfin_jtag_comm and hvc_bfin_jtag drivers
    serial: remove tile uart driver
    serial: remove m32r_sio driver
    serial: remove blackfin drivers
    serial: remove cris/etrax uart drivers
    usb: Remove Blackfin references in USB support
    usb: isp1362: remove blackfin arch glue
    usb: musb: remove blackfin port
    usb: host: remove tilegx platform glue
    pwm: remove pwm-bfin driver
    i2c: remove bfin-twi driver
    spi: remove blackfin related host drivers
    watchdog: remove bfin_wdt driver
    can: remove bfin_can driver
    mmc: remove bfin_sdh driver
    input: misc: remove blackfin rotary driver
    input: keyboard: remove bf54x driver
    ...

    Linus Torvalds
     

28 Mar, 2018

1 commit


26 Mar, 2018

1 commit


19 Mar, 2018

2 commits

  • The S390 architecture does not support any graphics hardware,
    but with the latest support for Virtio GPU in Linux and Virtio
    GPU emulation in QEMU, it's possible to enable graphics for
    S390 using the Virtio GPU device.

    To enable display we need to enable the Linux Virtual Terminal (VT)
    layer for S390. But the VT subsystem initializes quite early
    at boot so we need a dummy console driver till the Virtio GPU
    driver is initialized and we can run the framebuffer console.

    The framebuffer console over a Virtio GPU device can be run
    in combination with the serial SCLP console (default on S390).
    The SCLP console can still be accessed by management applications
    (eg: via Libvirt's virsh console).

    Signed-off-by: Farhan Ali
    Acked-by: Christian Borntraeger
    Reviewed-by: Thomas Huth
    Message-Id:
    Signed-off-by: Christian Borntraeger
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Martin Schwidefsky

    Farhan Ali
     
  • The 'commit e25df1205f37 ("[S390] Kconfig: menus with depends on HAS_IOMEM.")'
    added the HAS_IOMEM dependecy for "Graphics support". This disabled the
    "Graphics support" menu for S390. But if we enable VT layer for S390,
    we would also need to enable the dummy console. So let's remove the
    HAS_IOMEM dependency.

    Move this dependency to sub menu items and console drivers that use
    io memory.

    Signed-off-by: Farhan Ali
    Reviewed-by: Thomas Huth
    Message-Id:
    Acked-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Farhan Ali
     

13 Mar, 2018

1 commit


10 Mar, 2018

1 commit


28 Feb, 2018

1 commit

  • Commit 4fe505119778 ("console: Expand dummy functions for CFI") accidentally
    added "static" to newport_con instance of struct consw, while trying to
    normalize the declarations. This, however, needed to stay non-static as it
    has an extern.

    Reported-by: kbuild test robot
    Fixes: 4fe505119778 ("console: Expand dummy functions for CFI")
    Signed-off-by: Kees Cook
    Signed-off-by: Greg Kroah-Hartman

    Kees Cook
     

27 Feb, 2018

1 commit

  • This expands the no-op dummy functions into full prototypes to avoid
    indirect call mismatches when running under Control Flow Integrity
    checking, like with Clang's -fsanitize=cfi.

    Co-Developed-by: Sami Tolvanen
    Signed-off-by: Sami Tolvanen
    Signed-off-by: Kees Cook
    Signed-off-by: Greg Kroah-Hartman

    Kees Cook
     

22 Feb, 2018

1 commit

  • nds32 does not support VGA console, so prevent that kconfig symbol from
    being enabled for nds32, thus fixing these build errors:

    drivers/video/console/vgacon.o: In function `vgacon_save_screen':
    /NOBACKUP/sqa2/greentime/contrib/src_pkg/linux-nds32/drivers/video/console/vgacon.c:1327:
    undefined reference to `screen_info'
    /NOBACKUP/sqa2/greentime/contrib/src_pkg/linux-nds32/drivers/video/console/vgacon.c:1327:
    undefined reference to `screen_info'
    /NOBACKUP/sqa2/greentime/contrib/src_pkg/linux-nds32/drivers/video/console/vgacon.c:1328:
    undefined reference to `screen_info'
    /NOBACKUP/sqa2/greentime/contrib/src_pkg/linux-nds32/drivers/video/console/vgacon.c:1328:
    undefined reference to `screen_info'
    drivers/video/console/vgacon.o: In function `vgacon_init':
    /NOBACKUP/sqa2/greentime/contrib/src_pkg/linux-nds32/drivers/video/console/vgacon.c:591:
    undefined reference to `screen_info'
    drivers/video/console/vgacon.o:/NOBACKUP/sqa2/greentime/contrib/src_pkg/linux-nds32/drivers/video/console/vgacon.c:591:
    more undefined references to `screen_info' follow
    make: *** [vmlinux] Error 1

    Signed-off-by: Greentime Hu

    Greentime Hu
     

08 Feb, 2018

1 commit

  • Pull fbdev updates from Bartlomiej Zolnierkiewicz:
    "There is nothing really major here:

    - fix display-timings lookup in the Device Tree in atmel_lcdfb driver
    (Johan Hovold)

    - fix video mode and line_length to be set correctly in vfb driver
    (Pieter "PoroCYon" Sluys)

    - fix returning nonsensical values to the user-space on GIO_FONTX
    ioctl when using dummy console (Nicolas Pitre)

    - add missing license tag to mmpfb driver (Arnd Bergmann)

    - convert radeonfb and pxa3xx_gcu drivers to use ktime_get[_ts64]()
    instead of the deprecated do_gettimeofday() (Arnd Bergmann)

    - switch udlfb driver from using the pr_*() logging functions to the
    dev_*() ones + related cleanups (Ladislav Michl)

    - use __raw I/O accessors also on arm64 (Ji Zhang)

    - fix Kconfig help text for intelfb driver (Randy Dunlap)

    - do not duplicate features data in omapfb driver (Ladislav Michl)

    - misc cleanups (Colin Ian King, Markus Elfring, Rasmus Villemoes,
    Vasyl Gomonovych, Himanshu Jha, Michael Trimarchi)"

    * tag 'fbdev-v4.16' of git://github.com/bzolnier/linux: (25 commits)
    video: udlfb: Switch from the pr_*() to the dev_*() logging functions
    video: udlfb: Constify read only data
    video: fbdev/mmp: add MODULE_LICENSE
    console/dummy: leave .con_font_get set to NULL
    fbdev: mxsfb: use framebuffer_alloc in the correct way
    video: udlfb: Do not name private data 'dev'
    video: udlfb: Remove noisy warnings
    video: udlfb: Remove redundant gdev variable
    video: udlfb: Remove unnecessary local variable
    fbdev: auo_k190x: Use zeroing memory allocator instead of allocator/memset
    vfb: fix video mode and line_length being set when loaded
    fbdev: arm64 use __raw I/O memory api
    omapfb: dss: Do not duplicate features data
    video: fbdev: omap2: Use PTR_ERR_OR_ZERO()
    fbdev: au1200fb: delete duplicate header contents
    fbdev: pxa3xx: use ktime_get_ts64 for time stamps
    fbdev: radeon: use ktime_get() for HZ calibration
    video: smscufx: Improve a size determination in two functions
    video: udlfb: Delete an unnecessary return statement in two functions
    video: udlfb: Improve a size determination in dlfb_alloc_urb_list()
    ...

    Linus Torvalds
     

16 Jan, 2018

1 commit

  • When this method is set, the caller expects struct console_font fields
    to be properly initialized when it returns. Leave it unset otherwise
    nonsensical (leaked kernel stack) values are returned to user space.

    Signed-off-by: Nicolas Pitre
    Cc: stable@vger.kernel.org
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Nicolas Pitre
     

19 Dec, 2017

1 commit

  • Set the resource type when we reserve VGA-related I/O port resources.

    The resource code doesn't actually look at the type, so it inserts
    resources without a type in the tree correctly even without this change.
    But if we ever print a resource without a type, it looks like this:

    vga+ [??? 0x000003c0-0x000003df flags 0x0]

    Setting the type means it will be printed correctly as:

    vga+ [io 0x000003c0-0x000003df]

    Signed-off-by: Bjorn Helgaas

    Bjorn Helgaas
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

15 Sep, 2017

1 commit

  • Pull fbdev updates from Bartlomiej Zolnierkiewicz:

    - make fbcon a built-time depency for fbdev (fbcon was tristate option
    before, now it is a bool) - this is a first step in preparations for
    making console_lock usage saner (currently it acts like the BKL for
    all things fbdev/fbcon) (Daniel Vetter)

    - add fbcon=margin: command line option to select the fbcon
    margin color (David Lechner)

    - add DMI quirk table for x86 systems which need fbcon rotation
    (devices like Asus T100HA, GPD Pocket, the GPD win and the I.T.Works
    TW891) (Hans de Goede)

    - fix 1bpp logo support for unusual width (needed by LEGO MINDSTORMS
    EV3) (David Lechner)

    - enable Xilinx FB driver for ARM ZynqMP platform (Michal Simek)

    - fix use after free in the error path of udlfb driver (Anton Vasilyev)

    - fix error return code handling in pxa3xx_gcu driver (Gustavo A. R.
    Silva)

    - fix bootparams.screeninfo arguments checking in vgacon (Jan H.
    Schönherr)

    - do not leak uninitialized padding in clk to userspace in the debug
    code of atyfb driver (Vladis Dronov)

    - fix compiler warnings in fbcon code and matroxfb driver (Arnd
    Bergmann)

    - convert fbdev susbsytem to using %pOF instead of full_name (Rob
    Herring)

    - structures constifications (Arvind Yadav, Bhumika Goyal, Gustavo A.
    R. Silva, Julia Lawall)

    - misc cleanups (Gustavo A. R. Silva, Hyun Kwon, Julia Lawall, Kuninori
    Morimoto, Lynn Lei)

    * tag 'fbdev-v4.14' of git://github.com/bzolnier/linux: (75 commits)
    video/console: Update BIOS dates list for GPD win console rotation DMI quirk
    video/console: Add rotated LCD-panel DMI quirk for the VIOS LTH17
    video: fbdev: sis: fix duplicated code for different branches
    video: fbdev: make fb_var_screeninfo const
    video: fbdev: aty: do not leak uninitialized padding in clk to userspace
    vgacon: Prevent faulty bootparams.screeninfo from causing harm
    video: fbdev: make fb_videomode const
    video/console: Add new BIOS date for GPD pocket to dmi quirk table
    fbcon: remove restriction on margin color
    video: ARM CLCD: constify amba_id
    video: fm2fb: constify zorro_device_id
    video: fbdev: annotate fb_fix_screeninfo with const and __initconst
    omapfb: constify omap_video_timings structures
    video: fbdev: udlfb: Fix use after free on dlfb_usb_probe error path
    fbdev: i810: make fb_ops const
    fbdev: matrox: make fb_ops const
    video: fbdev: pxa3xx_gcu: fix error return code in pxa3xx_gcu_probe()
    video: fbdev: Enable Xilinx FB for ZynqMP
    video: fbdev: Fix multiple style issues in xilinxfb
    video: fbdev: udlfb: constify usb_device_id.
    ...

    Linus Torvalds
     

04 Sep, 2017

1 commit

  • If a zero for the number of colums or rows manages to slip through,
    gotoxy() will underflow vc->vc_pos, causing the next action on the
    referenced memory to end with a page fault.

    Make the check in vgacon_startup() more pessimistic to prevent that.

    Signed-off-by: Jan H. Schönherr
    Cc: Greg Kroah-Hartman
    Cc: Jiri Slaby
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Jan H. Schönherr
     

22 Aug, 2017

1 commit


01 Aug, 2017

1 commit

  • There's a bunch of folks who're trying to make printk less
    contended and faster, but there's a problem: printk uses the
    console_lock, and the console lock has become the BKL for all things
    fbdev/fbcon, which in turn pulled in half the drm subsystem under that
    lock. That's awkward.

    There reasons for that is probably just a historical accident:

    - fbcon is a runtime option of fbdev, i.e. at runtime you can pick
    whether your fbdev driver instances are used as kernel consoles.
    Unfortunately this wasn't implemented with some module option, but
    through some module loading magic: As long as you don't load
    fbcon.ko, there's no fbdev console support, but loading it (in any
    order wrt fbdev drivers) will create console instances for all fbdev
    drivers.

    - This was implemented through a notifier chain. fbcon.ko enumerates
    all fbdev instances at load time and also registers itself as
    listener in the fbdev notifier. The fbdev core tries to register new
    fbdev instances with fbcon using the notifier.

    - On top of that the modifier chain is also used at runtime by the
    fbdev subsystem to e.g. control backlights for panels.

    - The problem is that the notifier puts a mutex locking context
    between fbdev and fbcon, which mixes up the locking contexts for
    both the runtime usage and the register time usage to notify fbcon.
    And at runtime fbcon (through the fbdev core) might call into the
    notifier from a printk critical section while console_lock is held.

    - This means console_lock must be an outer lock for the entire fbdev
    subsystem, which also means it must be acquired when registering a
    new framebuffer driver as the outermost lock since we might call
    into fbcon (through the notifier) which would result in a locking
    inversion if fbcon would acquire the console_lock from its notifier
    callback (which it needs to register the console).

    - console_lock can be held anywhere, since printk can be called
    anywhere, and through the above story, plus drm/kms being an fbdev
    driver, we pull in a shocking amount of locking hiercharchy
    underneath the console_lock. Which makes cleaning up printk really
    hard (not even splitting console_lock into an rwsem is all that
    useful due to this).

    There's various ways to address this, but the cleanest would be to
    make fbcon a compile-time option, where fbdev directly calls the fbcon
    register functions from register_framebuffer, or dummy static inline
    versions if fbcon is disabled. Maybe augmented with a runtime knob to
    disable fbcon, if that's needed (for debugging perhaps).

    But this could break some users who rely on the magic "loading
    fbcon.ko enables/disables fbdev framebuffers at runtime" thing, even
    if that's unlikely. Hence we must be careful:

    1. Create a compile-time dependency between fbcon and fbdev in the
    least minimal way. This is what this patch does.

    2. Wait at least 1 year to give possible users time to scream about
    how we broke their setup. Unlikely, since all distros make fbcon
    compile-in, and embedded platforms only compile stuff they know they
    need anyway. But still.

    3. Convert the notifier to direct functions calls, with dummy static
    inlines if fbcon is disabled. We'll still need the fb notifier for the
    other uses (like backlights), but we can probably move it into the fb
    core (atm it must be built-into vmlinux).

    4. Push console_lock down the call-chain, until it is down in
    console_register again.

    5. Finally start to clean up and rework the printk/console locking.

    For context of this saga see

    commit 50e244cc793d511b86adea24972f3a7264cae114
    Author: Alan Cox
    Date: Fri Jan 25 10:28:15 2013 +1000

    fb: rework locking to fix lock ordering on takeover

    plus the pile of commits on top that tried to make this all work
    without terminally upsetting lockdep. We've uncovered all this when
    console_lock lockdep annotations where added in

    commit daee779718a319ff9f83e1ba3339334ac650bb22
    Author: Daniel Vetter
    Date: Sat Sep 22 19:52:11 2012 +0200

    console: implement lockdep support for console_lock

    On the patch itself:
    - Switch CONFIG_FRAMEBUFFER_CONSOLE to be a boolean, using the overall
    CONFIG_FB tristate to decided whether it should be a module or
    built-in.

    - At first I thought I could force the build depency with just a dummy
    symbol that fbcon.ko exports and fb.ko uses. But that leads to a
    module depency cycle (it works fine when built-in).

    Since this tight binding is the entire goal the simplest solution is
    to move all the fbcon modules (and there's a bunch of optinal
    source-files which are each modules of their own, for no good
    reason) into the overall fb.ko core module. That's a bit more than
    what I would have liked to do in this patch, but oh well.

    Signed-off-by: Daniel Vetter
    Cc: Alan Cox
    Cc: Sergey Senozhatsky
    Cc: Steven Rostedt
    Reviewed-by: Sean Paul
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Daniel Vetter
     

14 Jun, 2017

3 commits

  • MDA_ADDR is one of those macros which could be an inline function. So
    convert MDA_ADDR to mda_addr.

    Note that we take x and y as unsigned now. But they are absolute
    coordinates, so this is no problem.

    Signed-off-by: Jiri Slaby
    Cc: Tomi Valkeinen
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Jiri Slaby
     
  • Given every user of mda_vram_base expects a pointer, let
    mda_vram_base be a pointer to u16.

    The offset calculation in mda_detect had to be adjusted by / 2 (due to
    different pointer arithmetic now).

    We introduce a cast to a value returned from VGA_MAP_MEM. But I will
    change VGA_MAP_MEM to return a pointer later too. But vgacon needs a
    similar change first.

    Signed-off-by: Jiri Slaby
    Cc: Tomi Valkeinen
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Jiri Slaby
     
  • This is just a whitespace cleanup. The code was a mess having multiple
    commands on one line like:
    scr_writew(0xAA55, p); if (scr_readw(p) == 0xAA55) count++;

    Indent that properly and make it nicer for reading.

    Signed-off-by: Jiri Slaby
    Cc: Tomi Valkeinen
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Jiri Slaby
     

21 Apr, 2017

1 commit


26 Feb, 2017

1 commit

  • Pull fbdev updates from Bartlomiej Zolnierkiewicz:

    - fix for font color when console is switched to another fb driver

    - deferred probing fixes for simplefb driver

    - preparations to add support of an optional GPIO to enable panel for
    ARM CLCD driver

    - some improvements for ssd1307fb driver

    - cleanups for OMAP fbdev LCD drivers

    - misc fixes/cleanups for various fb drivers

    * tag 'fbdev-v4.11' of git://github.com/bzolnier/linux: (30 commits)
    video: fbdev: fsl-diu-fb: fix spelling mistake "palette"
    fbdev: ssd1307fb: include linux/gpio/consumer.h
    video: fbdev: fsl-diu-fb: remove impossible condition
    video: fbdev: amifb: remove impossible condition
    fbdev/ssd1307fb: clear screen in probe
    fbdev/ssd1307fb: add support to enable VBAT
    fbdev: ssd1307fb: Make reset gpio devicetree property optional
    fbdev: ssd1307fb: Remove reset-active-low from the DT binding document
    fbdev: ssd1307fb: Start to use gpiod API for reset gpio
    video: fbdev: sh_mobile_lcdcfb: fix error return code in sh_mobile_lcdc_probe()
    video: fbdev: offb: switch to using for_each_node_by_type
    video/console: use setup_timer and mod_timer instead of init_timer
    fbdev: omap/lcd: Make callbacks optional
    fbdev: omap/lcd: Staticize non-exported lcd_panel structs
    fbdev: omap/lcd: Remove no-op driver callbacks
    video/mbx: use simple_open()
    video: fbdev: stifb: handle NULL return value from ioremap_nocache
    video: fbdev: pmagb-b-fb: Remove bad `__init' annotation
    video: fbdev: pmag-ba-fb: Remove bad `__init' annotation
    video: ARM CLCD: use panel device node for getting backlight and mode
    ...

    Linus Torvalds
     

08 Feb, 2017

1 commit


25 Jan, 2017

2 commits

  • The impact of the persistent scrollback feature on the code size is
    rather small, so the config option is removed. The feature stays
    disabled by default and can be enabled by using the boot command line
    parameter 'vgacon.scrollback_persistent=1' or by setting
    VGACON_SOFT_SCROLLBACK_PERSISTENT_ENABLE_BY_DEFAULT=y.

    Signed-off-by: Manuel Schölling
    Suggested-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Greg Kroah-Hartman

    Manuel Schölling
     
  • Add a scrollback buffers for each VGA console. The benefit is that
    the scrollback history is not flushed when switching between consoles
    but is persistent.
    The buffers are allocated on demand when a new console is opened.

    This breaks tools like clear_console that rely on flushing the
    scrollback history by switching back and forth between consoles
    which is why this feature is disabled by default.
    Use the escape sequence \e[3J instead for flushing the buffer.

    Signed-off-by: Manuel Schölling
    Reviewed-by: Andrey Utkin
    Tested-by: Andrey Utkin
    Tested-by: Adam Borowski
    Signed-off-by: Greg Kroah-Hartman

    Manuel Schölling