12 Oct, 2020

1 commit


13 May, 2020

1 commit


05 Mar, 2020

1 commit

  • request_irq() is preferred over setup_irq(). Invocations of setup_irq()
    occur after memory allocators are ready.

    Per tglx[1], setup_irq() existed in olden days when allocators were not
    ready by the time early interrupts were initialized.

    Hence replace setup_irq() by request_irq().

    remove_irq() has been replaced by free_irq() as well.

    There were build error's during previous version, couple of which was
    reported by kbuild test robot of which one was reported
    by Thomas Bogendoerfer as well. There were a
    few more issues including build errors, those also have been fixed.

    [1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos

    Signed-off-by: afzal mohammed
    Signed-off-by: Thomas Bogendoerfer

    afzal mohammed
     

06 Jan, 2020

1 commit


23 Nov, 2018

1 commit

  • There is no good reason to duplicate the PCI menu in every architecture.
    Instead provide a selectable HAVE_PCI symbol that indicates availability
    of PCI support, and a FORCE_PCI symbol to for PCI on and the handle the
    rest in drivers/pci.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Palmer Dabbelt
    Acked-by: Max Filippov
    Acked-by: Thomas Gleixner
    Acked-by: Bjorn Helgaas
    Acked-by: Geert Uytterhoeven
    Acked-by: Paul Burton
    Signed-off-by: Masahiro Yamada

    Christoph Hellwig
     

18 Jul, 2018

1 commit

  • prom_putchar() is used centrally in early printk infrastructure therefore
    at least MIPS should agree on the function return type.

    [paul.burton@mips.com:
    - Include linux/types.h in asm/setup.h to gain the bool typedef before
    we start include asm/setup.h elsewhere.
    - Include asm/setup.h in all files that use or define prom_putchar().
    - Also standardise on signed rather than unsigned char argument.]

    Signed-off-by: Alexander Sverdlin
    Signed-off-by: Paul Burton
    Patchwork: https://patchwork.linux-mips.org/patch/19842/
    Cc: linux-mips@linux-mips.org
    Cc: Ralf Baechle
    Cc: James Hogan
    Cc: Jonas Gorski
    Cc: Florian Fainelli
    Cc: Kate Stewart
    Cc: Philippe Ombredanne

    Alexander Sverdlin
     

29 Jun, 2018

1 commit

  • random_ether_addr is a #define for eth_random_addr which is
    generally preferred in kernel code by ~3:1

    Convert the uses of random_ether_addr to enable removing the #define

    Signed-off-by: Joe Perches
    Signed-off-by: Paul Burton
    Patchwork: https://patchwork.linux-mips.org/patch/19600/
    Cc: Ralf Baechle
    Cc: James Hogan
    Cc: linux-mips@linux-mips.org

    Joe Perches
     

25 Jun, 2018

1 commit

  • Provide phys_to_dma/dma_to_phys helpers only if PCI support is
    enabled, everything else is generic.

    Signed-off-by: Christoph Hellwig
    Patchwork: https://patchwork.linux-mips.org/patch/19547/
    Signed-off-by: Paul Burton
    Cc: Florian Fainelli
    Cc: David Daney
    Cc: Kevin Cernekee
    Cc: Jiaxun Yang
    Cc: Tom Bogendoerfer
    Cc: Huacai Chen
    Cc: iommu@lists.linux-foundation.org
    Cc: linux-mips@linux-mips.org

    Christoph Hellwig
     

23 Feb, 2018

1 commit

  • Currently there is no null check on a failed allocation of board_data,
    and hence a null pointer dereference will occurr. Fix this by checking
    for the out of memory null pointer.

    Fixes: a7473717483e ("MIPS: ath25: add board configuration detection")
    Signed-off-by: Colin Ian King
    Cc: Ralf Baechle
    Cc: linux-mips@linux-mips.org
    Cc: # 3.19+
    Patchwork: https://patchwork.linux-mips.org/patch/18657/
    Signed-off-by: James Hogan

    Colin Ian King
     

10 Jan, 2018

1 commit

  • Currently MIPS allnoconfig with CONFIG_ATH25=y fails to link due to
    missing support for early_serial_setup():

    LD vmlinux
    arch/mips/ath25/devices.o: In function ath25_serial_setup':
    devices.c:(.init.text+0x68): undefined reference to 'early_serial_setup'

    Rather than adding dependencies to the platform to force inclusion of
    SERIAL_8250_CONSOLE together with it's dependencies like TTY, HAS_IOMEM,
    etc, just make ath25_serial_setup() a no-op when the dependency is not
    selected in the kernel config.

    Signed-off-by: Matt Redfearn
    Cc: James Hogan
    Cc: Thomas Gleixner
    Cc: Philippe Ombredanne
    Cc: Kate Stewart
    Cc: Greg Kroah-Hartman
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/17700/
    Signed-off-by: Ralf Baechle

    Matt Redfearn
     

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
     

16 Sep, 2015

1 commit

  • Most interrupt flow handlers do not use the irq argument. Those few
    which use it can retrieve the irq number from the irq descriptor.

    Remove the argument.

    Search and replace was done with coccinelle and some extra helper
    scripts around it. Thanks to Julia for her help!

    Signed-off-by: Thomas Gleixner
    Cc: Julia Lawall
    Cc: Jiang Liu

    Thomas Gleixner
     

02 Jul, 2015

1 commit

  • Pull irq fixes from Thomas Gleixner:
    "This contains:

    - a series of fixes for interrupt drivers to prevent a potential race
    when installing a chained interrupt handler

    - a fix for cpumask pointer misuse

    - a fix for using the wrong interrupt number from struct irq_data

    - removal of unused code and outdated comments

    - a few new helper functions which allow us to cleanup the interrupt
    handling code further in 4.3

    I decided against doing the cleanup at the end of this merge window
    and rather do the preparatory steps for 4.3, so we can run the final
    ABI change at the end of the 4.3 merge window with less risk"

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits)
    ARM/LPC32xx: Use irq not hwirq for __irq_set_handler_locked()
    genirq: Implement irq_set_handler_locked()/irq_set_chip_handler_name_locked()
    genirq: Introduce helper irq_desc_get_irq()
    genirq: Remove irq_node()
    genirq: Clean up outdated comments related to include/linux/irqdesc.h
    mn10300: Fix incorrect use of irq_data->affinity
    MIPS/ralink: Fix race in installing chained IRQ handler
    MIPS/pci: Fix race in installing chained IRQ handler
    MIPS/ath25: Fix race in installing chained IRQ handler
    MIPS/ath25: Fix race in installing chained IRQ handler
    m68k/psc: Fix race in installing chained IRQ handler
    avr32/at32ap: Fix race in installing chained IRQ handler
    sh/intc: Fix race in installing chained IRQ handler
    sh/intc: Fix potential race in installing chained IRQ handler
    pinctrl/sun4i: Fix race in installing chained IRQ handler
    pinctrl/samsung: Fix race in installing chained IRQ handler
    pinctrl/samsung: Fix race in installing chained IRQ handler
    pinctrl/exynos: Fix race in installing chained IRQ handler
    pinctrl/st: Fix race in installing chained IRQ handler
    pinctrl/adi2: Fix race in installing chained IRQ handler
    ...

    Linus Torvalds
     

25 Jun, 2015

2 commits

  • Fix a race where a pending interrupt could be received and the handler
    called before the handler's data has been setup, by converting to
    irq_set_chained_handler_and_data().

    Search and conversion was done with coccinelle:

    @@
    expression E1, E2, E3;
    @@
    (
    -if (irq_set_chained_handler(E1, E3) != 0)
    - BUG();
    |
    -irq_set_chained_handler(E1, E3);
    )
    -irq_set_handler_data(E1, E2);
    +irq_set_chained_handler_and_data(E1, E3, E2);

    @@
    expression E1, E2, E3;
    @@
    (
    -if (irq_set_chained_handler(E1, E3) != 0)
    - BUG();
    ...
    |
    -irq_set_chained_handler(E1, E3);
    ...
    )
    -irq_set_handler_data(E1, E2);
    +irq_set_chained_handler_and_data(E1, E3, E2);

    Reported-by: Russell King
    Signed-off-by: Thomas Gleixner
    Cc: Julia Lawall
    Cc: Ralf Baechle
    Cc: Sergey Ryazanov
    Cc: linux-mips@linux-mips.org

    Thomas Gleixner
     
  • Fix a race where a pending interrupt could be received and the handler
    called before the handler's data has been setup, by converting to
    irq_set_chained_handler_and_data().

    Search and conversion was done with coccinelle:

    @@
    expression E1, E2, E3;
    @@
    (
    -if (irq_set_chained_handler(E1, E3) != 0)
    - BUG();
    |
    -irq_set_chained_handler(E1, E3);
    )
    -irq_set_handler_data(E1, E2);
    +irq_set_chained_handler_and_data(E1, E3, E2);

    @@
    expression E1, E2, E3;
    @@
    (
    -if (irq_set_chained_handler(E1, E3) != 0)
    - BUG();
    ...
    |
    -irq_set_chained_handler(E1, E3);
    ...
    )
    -irq_set_handler_data(E1, E2);
    +irq_set_chained_handler_and_data(E1, E3, E2);

    Reported-by: Russell King
    Signed-off-by: Thomas Gleixner
    Cc: Julia Lawall
    Cc: Ralf Baechle
    Cc: Sergey Ryazanov
    Cc: linux-mips@linux-mips.org

    Thomas Gleixner
     

22 Jun, 2015

2 commits

  • Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
    already have a pointer to corresponding irq_desc.

    Signed-off-by: Jiang Liu
    Acked-by: Sergey Ryazanov
    Cc: Thomas Gleixner
    Cc: Bjorn Helgaas
    Cc: Benjamin Herrenschmidt
    Cc: Ingo Molnar
    Cc: H. Peter Anvin
    Cc: Rafael J. Wysocki
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Cc: Borislav Petkov
    Cc: Aleksey Makarov
    Cc: David Daney
    Cc: Christoph Lameter
    Cc: John Crispin
    Cc: Andrew Bresticker
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: x86@kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-pci@vger.kernel.org
    Cc: linux-acpi@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/10086/
    Signed-off-by: Ralf Baechle

    Jiang Liu
     
  • We removed __cpuinit support (leaving no-op stubs) quite some time ago.
    However this one crept back in as of commit 43cc739fd98b8c517ad45756d869f
    ("MIPS: ath25: add common parts")

    Since we want to clobber the stubs soon, get this removed now.

    Signed-off-by: Paul Gortmaker
    Acked-by: Sergey Ryazanov
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/9891/
    Signed-off-by: Ralf Baechle

    Paul Gortmaker
     

24 Nov, 2014

11 commits