27 Aug, 2019

1 commit

  • Commit 428826f5358c ("fdt: add support for rng-seed") moves of_fdt_crc32
    from early_init_dt_verify() to early_init_dt_scan() since
    early_init_dt_scan_chosen() may modify fdt to erase rng-seed.

    However, arm and some other arch won't call early_init_dt_scan(), they
    call early_init_dt_verify() then early_init_dt_scan_nodes().

    Restore of_fdt_crc32 to early_init_dt_verify() then update it in
    early_init_dt_scan_chosen() if fdt if updated.

    Fixes: 428826f5358c ("fdt: add support for rng-seed")
    Reported-by: Geert Uytterhoeven
    Signed-off-by: Hsin-Yi Wang
    Tested-by: Geert Uytterhoeven
    Signed-off-by: Will Deacon

    Hsin-Yi Wang
     

23 Aug, 2019

1 commit

  • Introducing a chosen node, rng-seed, which is an entropy that can be
    passed to kernel called very early to increase initial device
    randomness. Bootloader should provide this entropy and the value is
    read from /chosen/rng-seed in DT.

    Obtain of_fdt_crc32 for CRC check after early_init_dt_scan_nodes(),
    since early_init_dt_scan_chosen() would modify fdt to erase rng-seed.

    Add a new interface add_bootloader_randomness() for rng-seed use case.
    Depends on whether the seed is trustworthy, rng seed would be passed to
    add_hwgenerator_randomness(). Otherwise it would be passed to
    add_device_randomness(). Decision is controlled by kernel config
    RANDOM_TRUST_BOOTLOADER.

    Signed-off-by: Hsin-Yi Wang
    Reviewed-by: Stephen Boyd
    Reviewed-by: Rob Herring
    Reviewed-by: Theodore Ts'o # drivers/char/random.c
    Signed-off-by: Will Deacon

    Hsin-Yi Wang
     

09 Jul, 2019

1 commit


18 Jun, 2019

1 commit

  • When CONFIG_OF_EARLY_FLATTREE is disabled, there is a compiler
    warning,

    drivers/of/fdt.c:129:19: warning: ‘of_fdt_match’ defined but not used [-Wunused-function]
    static int __init of_fdt_match(const void *blob, unsigned long node,

    Since the only caller of of_fdt_match() is of_flat_dt_match(),
    let's move the body of of_fdt_match() into of_flat_dt_match()
    and eliminate of_fdt_match().

    Meanwhile, move of_fdt_is_compatible() under CONFIG_OF_EARLY_FLATTREE,
    as all callers are over there.

    Fixes: 9b4d2b635bd0 ("of/fdt: Remove dead code and mark functions with __init")
    Cc: Frank Rowand
    Signed-off-by: Kefeng Wang
    Reviewed-by: Stephen Boyd
    Signed-off-by: Rob Herring

    Kefeng Wang
     

25 May, 2019

2 commits

  • The FDT pointer, i.e. initial_boot_params, shouldn't be changed after
    init. It's only set by boot code and then the only user of the FDT is
    the raw sysfs reading API. Mark this pointer with __ro_after_init so
    that the pointer can't be changed after init.

    Cc: Hsin-Yi Wang
    Signed-off-by: Stephen Boyd
    Signed-off-by: Rob Herring

    Stephen Boyd
     
  • Some functions in here are never called, and others are only called
    during __init. Remove the dead code and some dead exports for functions
    that don't exist (I'm looking at you of_fdt_get_string!). Mark some
    functions with __init so we can throw them away after we boot up and
    poke at the FDT blob too.

    Cc: Hsin-Yi Wang
    Signed-off-by: Stephen Boyd
    Signed-off-by: Rob Herring

    Stephen Boyd
     

30 Apr, 2019

1 commit


13 Mar, 2019

1 commit

  • Add check for the return value of memblock_alloc*() functions and call
    panic() in case of error. The panic message repeats the one used by
    panicing memblock allocators with adjustment of parameters to include
    only relevant ones.

    The replacement was mostly automated with semantic patches like the one
    below with manual massaging of format strings.

    @@
    expression ptr, size, align;
    @@
    ptr = memblock_alloc(size, align);
    + if (!ptr)
    + panic("%s: Failed to allocate %lu bytes align=0x%lx\n", __func__, size, align);

    [anders.roxell@linaro.org: use '%pa' with 'phys_addr_t' type]
    Link: http://lkml.kernel.org/r/20190131161046.21886-1-anders.roxell@linaro.org
    [rppt@linux.ibm.com: fix format strings for panics after memblock_alloc]
    Link: http://lkml.kernel.org/r/1548950940-15145-1-git-send-email-rppt@linux.ibm.com
    [rppt@linux.ibm.com: don't panic if the allocation in sparse_buffer_init fails]
    Link: http://lkml.kernel.org/r/20190131074018.GD28876@rapoport-lnx
    [akpm@linux-foundation.org: fix xtensa printk warning]
    Link: http://lkml.kernel.org/r/1548057848-15136-20-git-send-email-rppt@linux.ibm.com
    Signed-off-by: Mike Rapoport
    Signed-off-by: Anders Roxell
    Reviewed-by: Guo Ren [c-sky]
    Acked-by: Paul Burton [MIPS]
    Acked-by: Heiko Carstens [s390]
    Reviewed-by: Juergen Gross [Xen]
    Reviewed-by: Geert Uytterhoeven [m68k]
    Acked-by: Max Filippov [xtensa]
    Cc: Catalin Marinas
    Cc: Christophe Leroy
    Cc: Christoph Hellwig
    Cc: "David S. Miller"
    Cc: Dennis Zhou
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Guan Xuetao
    Cc: Guo Ren
    Cc: Mark Salter
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Petr Mladek
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Rob Herring
    Cc: Rob Herring
    Cc: Russell King
    Cc: Stafford Horne
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

11 Jan, 2019

1 commit


04 Dec, 2018

1 commit

  • On architectures that only get their bootargs through devicetree's
    chosen node (such as RISC-V), that node is mandatory. After a
    discussion with Rob [1] I'm adding a warning in case chosen node
    is not present, to let users know about it.

    [1]: https://patchwork.ozlabs.org/patch/984224/#2016136

    Signed-off-by: Nick Kossifidis
    Reviewed-by: Palmer Dabbelt
    Signed-off-by: Rob Herring

    Nick Kossifidis
     

27 Nov, 2018

2 commits

  • Now that ARM64 uses phys_initrd_start/phys_initrd_size, we can get rid
    of its custom __early_init_dt_declare_initrd() which causes a fair
    amount of objects rebuild when changing CONFIG_BLK_DEV_INITRD. In order
    to make sure ARM64 does not produce a BUG() when VM debugging is turned
    on though, we must avoid early calls to __va() which is what
    __early_init_dt_declare_initrd() does and wrap this around to avoid
    running that code on ARM64.

    Signed-off-by: Florian Fainelli
    Reviewed-by: Mike Rapoport
    Signed-off-by: Rob Herring

    Florian Fainelli
     
  • Now that we have central and global variables holding the physical
    address and size of the initrd, we can have
    early_init_dt_check_for_initrd() populate
    phys_initrd_start/phys_initrd_size for us.

    This allows us to remove a chunk of code from arch/arm/mm/init.c
    introduced with commit 65939301acdb ("arm: set initrd_start/initrd_end
    for fdt scan").

    Signed-off-by: Florian Fainelli
    Reviewed-by: Mike Rapoport
    Signed-off-by: Rob Herring

    Florian Fainelli
     

31 Oct, 2018

3 commits

  • Move remaining definitions and declarations from include/linux/bootmem.h
    into include/linux/memblock.h and remove the redundant header.

    The includes were replaced with the semantic patch below and then
    semi-automated removal of duplicated '#include

    @@
    @@
    - #include
    + #include

    [sfr@canb.auug.org.au: dma-direct: fix up for the removal of linux/bootmem.h]
    Link: http://lkml.kernel.org/r/20181002185342.133d1680@canb.auug.org.au
    [sfr@canb.auug.org.au: powerpc: fix up for removal of linux/bootmem.h]
    Link: http://lkml.kernel.org/r/20181005161406.73ef8727@canb.auug.org.au
    [sfr@canb.auug.org.au: x86/kaslr, ACPI/NUMA: fix for linux/bootmem.h removal]
    Link: http://lkml.kernel.org/r/20181008190341.5e396491@canb.auug.org.au
    Link: http://lkml.kernel.org/r/1536927045-23536-30-git-send-email-rppt@linux.vnet.ibm.com
    Signed-off-by: Mike Rapoport
    Signed-off-by: Stephen Rothwell
    Acked-by: Michal Hocko
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: "James E.J. Bottomley"
    Cc: Jonas Bonn
    Cc: Jonathan Corbet
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Palmer Dabbelt
    Cc: Paul Burton
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Serge Semin
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • The conversion is done using

    sed -i 's@memblock_virt_alloc@memblock_alloc@g' \
    $(git grep -l memblock_virt_alloc)

    Link: http://lkml.kernel.org/r/1536927045-23536-8-git-send-email-rppt@linux.vnet.ibm.com
    Signed-off-by: Mike Rapoport
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: "James E.J. Bottomley"
    Cc: Jonas Bonn
    Cc: Jonathan Corbet
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Hocko
    Cc: Michal Simek
    Cc: Palmer Dabbelt
    Cc: Paul Burton
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Serge Semin
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • All architecures use memblock for early memory management. There is no need
    for the CONFIG_HAVE_MEMBLOCK configuration option.

    [rppt@linux.vnet.ibm.com: of/fdt: fixup #ifdefs]
    Link: http://lkml.kernel.org/r/20180919103457.GA20545@rapoport-lnx
    [rppt@linux.vnet.ibm.com: csky: fixups after bootmem removal]
    Link: http://lkml.kernel.org/r/20180926112744.GC4628@rapoport-lnx
    [rppt@linux.vnet.ibm.com: remove stale #else and the code it protects]
    Link: http://lkml.kernel.org/r/1538067825-24835-1-git-send-email-rppt@linux.vnet.ibm.com
    Link: http://lkml.kernel.org/r/1536927045-23536-4-git-send-email-rppt@linux.vnet.ibm.com
    Signed-off-by: Mike Rapoport
    Acked-by: Michal Hocko
    Tested-by: Jonathan Cameron
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Kroah-Hartman
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: "James E.J. Bottomley"
    Cc: Jonas Bonn
    Cc: Jonathan Corbet
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Martin Schwidefsky
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Palmer Dabbelt
    Cc: Paul Burton
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Serge Semin
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vineet Gupta
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

27 Oct, 2018

1 commit

  • Memory region size is rounded down to page boundary and with sub-page
    region it becomes 0 and there is no point to add an empty region.
    Moreover, when the base is less than PAGE_SIZE we get a bogus size as
    (base + size - 1) evaluates to -1.

    8cccffc52694 ("of: check for size < 0 after rounding in
    early_init_dt_add_memory_arch") introduced a test for wrap around for the
    case when base is not page aligned, the same test can be used to ignore
    sub-page region sizes.

    Link: http://lkml.kernel.org/r/1533326330-31677-3-git-send-email-rppt@linux.vnet.ibm.com
    Signed-off-by: Mike Rapoport
    Reviewed-by: Rob Herring
    Cc: Guan Xuetao
    Cc: Ley Foon Tan
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Michal Hocko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

08 Aug, 2018

1 commit

  • When the OF code was originally made common by Grant in commit
    51975db0b733 ("of/flattree: merge early_init_dt_scan_memory() common
    code") (Feb 2010), the common code inherited a hack to handle
    PPC "longtrail" machines, which had a "memory@0" node with no
    device_type.

    That check was then made to only apply to PPC32 in b44aa25d20e2 ("of:
    Handle memory@0 node on PPC32 only") (May 2014).

    But according to Paul Mackerras the "longtrail" machines are long
    dead, if they were ever seen in the wild at all. If someone does still
    have one, we can handle this firmware wart in powerpc platform code.

    So remove the hack once and for all.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Rob Herring

    Michael Ellerman
     

23 Apr, 2018

1 commit

  • Commit 99492c39f39f ("earlycon: Fix __earlycon_table stride") tried to fix
    __earlycon_table stride by forcing the earlycon_id struct alignment to 32
    and asking the linker to 32-byte align the __earlycon_table symbol. This
    fix was based on commit 07fca0e57fca92 ("tracing: Properly align linker
    defined symbols") which tried a similar fix for the tracing subsystem.

    However, this fix doesn't quite work because there is no guarantee that
    gcc will place structures packed into an array format. In fact, gcc 4.9
    chooses to 64-byte align these structs by inserting additional padding
    between the entries because it has no clue that they are supposed to be in
    an array. If we are unlucky, the linker will assign symbol
    "__earlycon_table" to a 32-byte aligned address which does not correspond
    to the 64-byte aligned contents of section "__earlycon_table".

    To address this same problem, the fix to the tracing system was
    subsequently re-implemented using a more robust table of pointers approach
    by commits:
    3d56e331b653 ("tracing: Replace syscall_meta_data struct array with pointer array")
    654986462939 ("tracepoints: Fix section alignment using pointer array")
    e4a9ea5ee7c8 ("tracing: Replace trace_event struct array with pointer array")

    Let's use this same "array of pointers to structs" approach for
    EARLYCON_TABLE.

    Fixes: 99492c39f39f ("earlycon: Fix __earlycon_table stride")
    Signed-off-by: Daniel Kurtz
    Suggested-by: Aaron Durbin
    Reviewed-by: Rob Herring
    Tested-by: Guenter Roeck
    Reviewed-by: Guenter Roeck
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Daniel Kurtz
     

08 Jan, 2018

2 commits

  • memblock_virt_alloc() works for both memblock and bootmem, so use it and
    make early_init_dt_alloc_memory_arch a static function. The arches using
    bootmem define early_init_dt_alloc_memory_arch as either:

    __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS))

    or:

    alloc_bootmem_align(size, align)

    Both of these evaluate to the same thing as does memblock_virt_alloc for
    bootmem. So we can disable the arch specific functions by making
    early_init_dt_alloc_memory_arch static and they can be removed in
    subsequent commits.

    Cc: Frank Rowand
    Signed-off-by: Rob Herring

    Rob Herring
     
  • Convert remaining DT files to use SPDX-License-Identifier tags.

    Cc: Benjamin Herrenschmidt
    Cc: Guennadi Liakhovetski
    Cc: Paul Mackerras
    Cc: Pantelis Antoniou
    Reviewed-by: Frank Rowand
    Reviewed-by: Philippe Ombredanne
    Signed-off-by: Rob Herring

    Rob Herring
     

17 Oct, 2017

3 commits


04 Oct, 2017

1 commit

  • With dependencies on a statically allocated full path name converted to
    use %pOF format specifier, we can store just the basename of node, and
    the unflattening of the FDT can be simplified.

    This commit will affect the remaining users of full_name. After
    analyzing these users, the remaining cases should only change some print
    messages. The main users of full_name are providing a name for struct
    resource. The resource names shouldn't be important other than providing
    /proc/iomem names.

    We no longer distinguish between pre and post 0x10 dtb formats as either
    a full path or basename will work. However, less than 0x10 formats have
    been broken since the conversion to use libfdt (and no one has cared).
    The conversion of the unflattening code to be non-recursive also broke
    pre 0x10 formats as the populate_node function would return 0 in that
    case.

    Signed-off-by: Rob Herring

    Rob Herring
     

08 Jul, 2017

1 commit

  • Pull DeviceTree updates from Rob Herring:

    - vsprintf format specifier %pOF for device_node's. This will enable us
    to stop storing the full node names. Conversion of users will happen
    next cycle.

    - Update documentation to point to DT specification instead of ePAPR.

    - Split out graph and property functions to a separate file.

    - New of-graph functions for ALSA

    - Add vendor prefixes for RISC-V, Linksys, iWave Systems, Roofull,
    Itead, and BananaPi.

    - Improve dtx_diff utility filename printing.

    * tag 'devicetree-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (32 commits)
    of: document /sys/firmware/fdt
    dt-bindings: Add RISC-V vendor prefix
    vsprintf: Add %p extension "%pOF" for device tree
    of: find_node_by_full_name rewrite to compare each level
    of: use kbasename instead of open coding
    dt-bindings: thermal: add file extension to brcm,ns-thermal
    of: update ePAPR references to point to Devicetree Specification
    scripts/dtc: dtx_diff - Show real file names in diff header
    of: detect invalid phandle in overlay
    of: be consistent in form of file mode
    of: make __of_attach_node() static
    of: address.c header comment typo
    of: fdt.c header comment typo
    of: make of_fdt_is_compatible() static
    dt-bindings: display-timing.txt convert non-ascii characters to ascii
    Documentation: remove overlay-notes reference to non-existent file
    dt-bindings: usb: exynos-usb: Add missing required VDD properties
    dt-bindings: Add vendor prefix for Linksys
    MAINTAINERS: add device tree ABI documentation file
    of: Add vendor prefix for iWave Systems Technologies Pvt. Ltd
    ...

    Linus Torvalds
     

23 Jun, 2017

2 commits


20 May, 2017

1 commit


18 May, 2017

1 commit

  • The memory allocator passed to __unflatten_device_tree() (e.g. a wrapped
    kzalloc) can fail so add the missing sanity check to avoid dereferencing
    a NULL pointer.

    Fixes: fe14042358fa ("of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree")
    Cc: stable # 2.6.38
    Signed-off-by: Johan Hovold
    Signed-off-by: Rob Herring

    Johan Hovold
     

13 May, 2017

1 commit

  • Pull more powerpc updates from Michael Ellerman:
    "The change to the Linux page table geometry was delayed for more
    testing with 16G pages, and there's the new CPU features stuff which
    just needed one more polish before going in. Plus a few changes from
    Scott which came in a bit late. And then various fixes, mostly minor.

    Summary highlights:

    - rework the Linux page table geometry to lower memory usage on
    64-bit Book3S (IBM chips) using the Hash MMU.

    - support for a new device tree binding for discovering CPU features
    on future firmwares.

    - Freescale updates from Scott:
    "Includes a fix for a powerpc/next mm regression on 64e, a fix for
    a kernel hang on 64e when using a debugger inside a relocated
    kernel, a qman fix, and misc qe improvements."

    Thanks to: Christophe Leroy, Gavin Shan, Horia Geantă, LiuHailong,
    Nicholas Piggin, Roy Pledge, Scott Wood, Valentin Longchamp"

    * tag 'powerpc-4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
    powerpc/64s: Support new device tree binding for discovering CPU features
    powerpc: Don't print cpu_spec->cpu_name if it's NULL
    of/fdt: introduce of_scan_flat_dt_subnodes and of_get_flat_dt_phandle
    powerpc/64s: Fix unnecessary machine check handler relocation branch
    powerpc/mm/book3s/64: Rework page table geometry for lower memory usage
    powerpc: Fix distclean with Makefile.postlink
    powerpc/64e: Don't place the stack beyond TASK_SIZE
    powerpc/powernv: Block PCI config access on BCM5718 during EEH recovery
    powerpc/8xx: Adding support of IRQ in MPC8xx GPIO
    soc/fsl/qbman: Disable IRQs for deferred QBMan work
    soc/fsl/qe: add EXPORT_SYMBOL for the 2 qe_tdm functions
    soc/fsl/qe: only apply QE_General4 workaround on affected SoCs
    soc/fsl/qe: round brg_freq to 1kHz granularity
    soc/fsl/qe: get rid of immrbar_virt_to_phys()
    net: ethernet: ucc_geth: fix MEM_PART_MURAM mode
    powerpc/64e: Fix hang when debugging programs with relocated kernel

    Linus Torvalds
     

09 May, 2017

1 commit


05 May, 2017

1 commit

  • sparse generates the following warnings in drivers/of/:

    ../drivers/of/fdt.c:63:36: warning: cast to restricted __be32
    ../drivers/of/fdt.c:68:33: warning: cast to restricted __be32
    ../drivers/of/irq.c:105:88: warning: incorrect type in initializer (different base types)
    ../drivers/of/irq.c:105:88: expected restricted __be32
    ../drivers/of/irq.c:105:88: got int
    ../drivers/of/irq.c:526:35: warning: incorrect type in assignment (different modifiers)
    ../drivers/of/irq.c:526:35: expected int ( *const [usertype] irq_init_cb )( ... )
    ../drivers/of/irq.c:526:35: got void const *const data
    ../drivers/of/of_reserved_mem.c:200:50: warning: incorrect type in initializer (different modifiers)
    ../drivers/of/of_reserved_mem.c:200:50: expected int ( *[usertype] initfn )( ... )
    ../drivers/of/of_reserved_mem.c:200:50: got void const *const data
    ../drivers/of/resolver.c:95:42: warning: incorrect type in assignment (different base types)
    ../drivers/of/resolver.c:95:42: expected unsigned int [unsigned] [usertype]
    ../drivers/of/resolver.c:95:42: got restricted __be32 [usertype]

    All these are harmless type mismatches fixed by adjusting the types.

    Signed-off-by: Rob Herring

    Rob Herring
     

28 Apr, 2017

1 commit


23 Feb, 2017

1 commit

  • Pull DeviceTree updates from Rob Herring:
    "Pretty standard stuff with dtc upstream sync being the biggest piece.

    - Sync dtc to upstream commit 0931cea3ba20. This picks up overlay
    support in dtc.

    - Set dma_ops for reserved memory users.

    - Make references to IOMMU consistent in DT bindings.

    - Cleanup references to pm_power_off in bindings.

    - Move some display bindings that snuck into the old bindings/video/
    path.

    - Fix some wrong documentation paths caused from binding
    restructuring.

    - Vendor prefixes for Faraday and Fujitsu.

    - Fix an of_node ref counting leak in of_find_node_opts_by_path

    - Introduce new graph helper of_graph_get_remote_node() which will be
    used by DRM drivers in 4.12"

    * tag 'devicetree-for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (27 commits)
    DT: add Faraday Tec. as vendor
    of: introduce of_graph_get_remote_node
    of: Add missing space at end of pr_fmt().
    of: make of_device_make_bus_id() static
    of: fix of_node leak caused in of_find_node_opts_by_path
    dt-bindings: net: remove reference to fixed link support
    dt-bindings: power: reset: qnap-poweroff: Drop reference to pm_power_off
    dt-bindings: power: reset: gpio-poweroff: Drop reference to pm_power_off
    dt-bindings: mfd: as3722: Drop reference to pm_power_off
    dt-bindings: display: move ANX7814 and SiI8620 bridge bindings
    of/unittest: Swap arguments of of_unittest_apply_overlay()
    Documentation: usb: fix wrong documentation paths
    serial: fsl-imx-uart.txt: Remove generic property
    devicetree: Add Fujitsu Ltd. vendor prefix
    Documentation: display: fix wrong documentation paths
    of: remove redundant memset in overlay
    bus:qcom : Fix typo in qcom,ebi2.txt
    dt-bindings: qman: Remove pool channel node
    Documentation: panel-dpi: fix path to display-timing.txt
    devicetree: bindings: clk: mvebu: fix description for sata1 on Armada XP
    ...

    Linus Torvalds
     

09 Feb, 2017

1 commit


03 Jan, 2017

1 commit


13 Dec, 2016

1 commit

  • When movable nodes are enabled, any node containing only hotpluggable
    memory is made movable at boot time.

    On x86, hotpluggable memory is discovered by parsing the ACPI SRAT,
    making corresponding calls to memblock_mark_hotplug().

    If we introduce a dt property to describe memory as hotpluggable,
    configs supporting early fdt may then also do this marking and use
    movable nodes.

    Link: http://lkml.kernel.org/r/1479160961-25840-5-git-send-email-arbab@linux.vnet.ibm.com
    Signed-off-by: Reza Arbab
    Tested-by: Balbir Singh
    Acked-by: Balbir Singh
    Cc: "Aneesh Kumar K.V"
    Cc: "H. Peter Anvin"
    Cc: Alistair Popple
    Cc: Aneesh Kumar K.V
    Cc: Benjamin Herrenschmidt
    Cc: Bharata B Rao
    Cc: Frank Rowand
    Cc: Ingo Molnar
    Cc: Michael Ellerman
    Cc: Nathan Fontenot
    Cc: Paul Mackerras
    Cc: Rob Herring
    Cc: Stewart Smith
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Reza Arbab
     

28 Sep, 2016

1 commit

  • We have multiple "earlycon" early_param handlers - merge the DT one into
    the main earlycon one. It's a cleanup that also will be useful
    to defer setting up DT console until ACPI/DT decision is made.

    Rename the exported function to avoid clashing with the function from
    arch/microblaze/kernel/prom.c

    Signed-off-by: Leif Lindholm
    Signed-off-by: Aleksey Makarov
    Acked-by: Rob Herring
    Acked-by: Greg Kroah-Hartman
    Reviewed-by: Peter Hurley
    Tested-by: Kefeng Wang
    Tested-by: Christopher Covington
    Signed-off-by: Greg Kroah-Hartman

    Leif Lindholm
     

10 Aug, 2016

1 commit

  • @mynodes is set to NULL when __unflatten_device_tree() is called
    to unflatten device sub-tree in PCI hot add scenario on PowerPC
    PowerNV platform. Marking @mynodes detached unconditionally causes
    kernel crash as below backtrace shows:

    Unable to handle kernel paging request for data at address 0x00000000
    Faulting instruction address: 0xc000000000b26f64
    cpu 0x0: Vector: 300 (Data Access) at [c000003fcc7cf740]
    pc: c000000000b26f64: __unflatten_device_tree+0xf4/0x190
    lr: c000000000b26f40: __unflatten_device_tree+0xd0/0x190
    sp: c000003fcc7cf9c0
    msr: 900000000280b033
    dar: 0
    dsisr: 40000000
    current = 0xc000003fcc281680
    paca = 0xc00000000ff00000 softe: 0 irq_happened: 0x01
    pid = 2724, comm = sh
    Linux version 4.7.0-gavin-07754-g92a6836 (gwshan@gwshan) (gcc version \
    4.9.3 (Buildroot 2016.02-rc2-00093-g5ea3bce) ) #539 SMP Mon Aug 1 \
    12:40:29 AEST 2016
    enter ? for help
    [c000003fcc7cfa50] c000000000b27060 of_fdt_unflatten_tree+0x60/0x90
    [c000003fcc7cfaa0] c0000000004c6288 pnv_php_set_slot_power_state+0x118/0x440
    [c000003fcc7cfb80] c0000000004c6a10 pnv_php_enable+0xc0/0x170
    [c000003fcc7cfbd0] c0000000004c4d80 power_write_file+0xa0/0x190
    [c000003fcc7cfc50] c0000000004be93c pci_slot_attr_store+0x3c/0x60
    [c000003fcc7cfc70] c0000000002d3fd4 sysfs_kf_write+0x94/0xc0
    [c000003fcc7cfcb0] c0000000002d2c30 kernfs_fop_write+0x180/0x260
    [c000003fcc7cfd00] c000000000230fe0 __vfs_write+0x40/0x190
    [c000003fcc7cfd90] c000000000232278 vfs_write+0xc8/0x240
    [c000003fcc7cfde0] c000000000233d90 SyS_write+0x60/0x110
    [c000003fcc7cfe30] c000000000009524 system_call+0x38/0x108

    This avoids the kernel crash by marking @mynodes detached only when
    @mynodes is dereferencing valid device node in __unflatten_device_tree().

    Fixes: 1d1bde550ea3 ("of: fdt: mark unflattened tree as detached")
    Reported-by: Meng Li
    Signed-off-by: Gavin Shan
    Signed-off-by: Rob Herring

    Gavin Shan
     

31 Jul, 2016

1 commit

  • Pull DeviceTree updates from Rob Herring:

    - remove most of_platform_populate() calls in arch code. Now the DT
    core code calls it in the default case and platforms only need to
    call it if they have special needs

    - use pr_fmt on all the DT core print statements

    - CoreSight binding doc improvements to block name descriptions

    - add dt_to_config script which can parse dts files and list
    corresponding kernel config options

    - fix memory leak hit with a PowerMac DT

    - correct a bunch of STMicro compatible strings to use the correct
    vendor prefix

    - fix DA9052 PMIC binding doc to match what is actually used in dts
    files

    * tag 'devicetree-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (35 commits)
    documentation: da9052: Update regulator bindings names to match DA9052/53 DTS expectations
    xtensa: Partially Revert "xtensa: Remove unnecessary of_platform_populate with default match table"
    xtensa: Fix build error due to missing include file
    MIPS: ath79: Add missing include file
    Fix spelling errors in Documentation/devicetree
    ARM: dts: fix STMicroelectronics compatible strings
    powerpc/dts: fix STMicroelectronics compatible strings
    Documentation: dt: i2c: use correct STMicroelectronics vendor prefix
    scripts/dtc: dt_to_config - kernel config options for a devicetree
    of: fdt: mark unflattened tree as detached
    of: overlay: add resolver error prints
    coresight: document binding acronyms
    Documentation/devicetree: document cavium-pip rx-delay/tx-delay properties
    of: use pr_fmt prefix for all console printing
    of/irq: Mark initialised interrupt controllers as populated
    of: fix memory leak related to safe_name()
    Revert "of/platform: export of_default_bus_match_table"
    of: unittest: use of_platform_default_populate() to populate default bus
    memory: omap-gpmc: use of_platform_default_populate() to populate default bus
    bus: uniphier-system-bus: use of_platform_default_populate() to populate default bus
    ...

    Linus Torvalds