07 Oct, 2020

1 commit

  • commit c1d0da83358a2316d9be7f229f26126dbaa07468 upstream.

    Patch series "mm: fix memory to node bad links in sysfs", v3.

    Sometimes, firmware may expose interleaved memory layout like this:

    Early memory node ranges
    node 1: [mem 0x0000000000000000-0x000000011fffffff]
    node 2: [mem 0x0000000120000000-0x000000014fffffff]
    node 1: [mem 0x0000000150000000-0x00000001ffffffff]
    node 0: [mem 0x0000000200000000-0x000000048fffffff]
    node 2: [mem 0x0000000490000000-0x00000007ffffffff]

    In that case, we can see memory blocks assigned to multiple nodes in
    sysfs:

    $ ls -l /sys/devices/system/memory/memory21
    total 0
    lrwxrwxrwx 1 root root 0 Aug 24 05:27 node1 -> ../../node/node1
    lrwxrwxrwx 1 root root 0 Aug 24 05:27 node2 -> ../../node/node2
    -rw-r--r-- 1 root root 65536 Aug 24 05:27 online
    -r--r--r-- 1 root root 65536 Aug 24 05:27 phys_device
    -r--r--r-- 1 root root 65536 Aug 24 05:27 phys_index
    drwxr-xr-x 2 root root 0 Aug 24 05:27 power
    -r--r--r-- 1 root root 65536 Aug 24 05:27 removable
    -rw-r--r-- 1 root root 65536 Aug 24 05:27 state
    lrwxrwxrwx 1 root root 0 Aug 24 05:25 subsystem -> ../../../../bus/memory
    -rw-r--r-- 1 root root 65536 Aug 24 05:25 uevent
    -r--r--r-- 1 root root 65536 Aug 24 05:27 valid_zones

    The same applies in the node's directory with a memory21 link in both
    the node1 and node2's directory.

    This is wrong but doesn't prevent the system to run. However when
    later, one of these memory blocks is hot-unplugged and then hot-plugged,
    the system is detecting an inconsistency in the sysfs layout and a
    BUG_ON() is raised:

    kernel BUG at /Users/laurent/src/linux-ppc/mm/memory_hotplug.c:1084!
    LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
    Modules linked in: rpadlpar_io rpaphp pseries_rng rng_core vmx_crypto gf128mul binfmt_misc ip_tables x_tables xfs libcrc32c crc32c_vpmsum autofs4
    CPU: 8 PID: 10256 Comm: drmgr Not tainted 5.9.0-rc1+ #25
    Call Trace:
    add_memory_resource+0x23c/0x340 (unreliable)
    __add_memory+0x5c/0xf0
    dlpar_add_lmb+0x1b4/0x500
    dlpar_memory+0x1f8/0xb80
    handle_dlpar_errorlog+0xc0/0x190
    dlpar_store+0x198/0x4a0
    kobj_attr_store+0x30/0x50
    sysfs_kf_write+0x64/0x90
    kernfs_fop_write+0x1b0/0x290
    vfs_write+0xe8/0x290
    ksys_write+0xdc/0x130
    system_call_exception+0x160/0x270
    system_call_common+0xf0/0x27c

    This has been seen on PowerPC LPAR.

    The root cause of this issue is that when node's memory is registered,
    the range used can overlap another node's range, thus the memory block
    is registered to multiple nodes in sysfs.

    There are two issues here:

    (a) The sysfs memory and node's layouts are broken due to these
    multiple links

    (b) The link errors in link_mem_sections() should not lead to a system
    panic.

    To address (a) register_mem_sect_under_node should not rely on the
    system state to detect whether the link operation is triggered by a hot
    plug operation or not. This is addressed by the patches 1 and 2 of this
    series.

    Issue (b) will be addressed separately.

    This patch (of 2):

    The memmap_context enum is used to detect whether a memory operation is
    due to a hot-add operation or happening at boot time.

    Make it general to the hotplug operation and rename it as
    meminit_context.

    There is no functional change introduced by this patch

    Suggested-by: David Hildenbrand
    Signed-off-by: Laurent Dufour
    Signed-off-by: Andrew Morton
    Reviewed-by: David Hildenbrand
    Reviewed-by: Oscar Salvador
    Acked-by: Michal Hocko
    Cc: Greg Kroah-Hartman
    Cc: "Rafael J . Wysocki"
    Cc: Nathan Lynch
    Cc: Scott Cheloha
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc:
    Link: https://lkml.kernel.org/r/20200915094143.79181-1-ldufour@linux.ibm.com
    Link: https://lkml.kernel.org/r/20200915132624.9723-1-ldufour@linux.ibm.com
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Laurent Dufour
     

03 Sep, 2020

2 commits

  • commit e4a42c82e943b97ce124539fcd7a47445b43fa0d upstream.

    Redefine GZIP, BZIP2, LZOP variables as KGZIP, KBZIP2, KLZOP resp.
    GZIP, BZIP2, LZOP env variables are reserved by the tools. The original
    attempt to redefine them internally doesn't work in makefiles/scripts
    intercall scenarios, e.g., "make GZIP=gzip bindeb-pkg" and results in
    broken builds. There can be other broken build commands because of this,
    so the universal solution is to use non-reserved env variables for the
    compression tools.

    Fixes: 8dfb61dcbace ("kbuild: add variables for compression tools")
    Signed-off-by: Denis Efremov
    Tested-by: Guenter Roeck
    Signed-off-by: Masahiro Yamada
    Cc: Matthias Maennich
    Signed-off-by: Greg Kroah-Hartman

    Denis Efremov
     
  • commit 8dfb61dcbaceb19a5ded5e9c9dcf8d05acc32294 upstream.

    Allow user to use alternative implementations of compression tools,
    such as pigz, pbzip2, pxz. For example, multi-threaded tools to
    speed up the build:
    $ make GZIP=pigz BZIP2=pbzip2

    Variables _GZIP, _BZIP2, _LZOP are used internally because original env
    vars are reserved by the tools. The use of GZIP in gzip tool is obsolete
    since 2015. However, alternative implementations (e.g., pigz) still rely
    on it. BZIP2, BZIP, LZOP vars are not obsolescent.

    The credit goes to @grsecurity.

    As a sidenote, for multi-threaded lzma, xz compression one can use:
    $ export XZ_OPT="--threads=0"

    Signed-off-by: Denis Efremov
    Signed-off-by: Masahiro Yamada
    Signed-off-by: Matthias Maennich
    Signed-off-by: Greg Kroah-Hartman

    Denis Efremov
     

22 Jul, 2020

1 commit

  • [ Upstream commit 679b2ec8e060ca7a90441aff5e7d384720a41b76 ]

    This kernel configuration is basically enabling/disabling sr driver quirks
    detection. While these quirks are for fairly rare devices (very old CD
    burners, and a glucometer), the additional detection of these models is a
    very minimal amount of code.

    The logic behind the quirks is always built into the sr driver.

    This also removes the config from all the defconfig files that are enabling
    this already.

    Link: https://lore.kernel.org/r/20200223191144.726-1-flameeyes@flameeyes.com
    Reviewed-by: Jens Axboe
    Signed-off-by: Diego Elio Pettenò
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Sasha Levin

    Diego Elio Pettenò
     

09 Jan, 2020

1 commit

  • commit feee6b2989165631b17ac6d4ccdbf6759254e85a upstream.

    We currently try to shrink a single zone when removing memory. We use
    the zone of the first page of the memory we are removing. If that
    memmap was never initialized (e.g., memory was never onlined), we will
    read garbage and can trigger kernel BUGs (due to a stale pointer):

    BUG: unable to handle page fault for address: 000000000000353d
    #PF: supervisor write access in kernel mode
    #PF: error_code(0x0002) - not-present page
    PGD 0 P4D 0
    Oops: 0002 [#1] SMP PTI
    CPU: 1 PID: 7 Comm: kworker/u8:0 Not tainted 5.3.0-rc5-next-20190820+ #317
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.4
    Workqueue: kacpi_hotplug acpi_hotplug_work_fn
    RIP: 0010:clear_zone_contiguous+0x5/0x10
    Code: 48 89 c6 48 89 c3 e8 2a fe ff ff 48 85 c0 75 cf 5b 5d c3 c6 85 fd 05 00 00 01 5b 5d c3 0f 1f 840
    RSP: 0018:ffffad2400043c98 EFLAGS: 00010246
    RAX: 0000000000000000 RBX: 0000000200000000 RCX: 0000000000000000
    RDX: 0000000000200000 RSI: 0000000000140000 RDI: 0000000000002f40
    RBP: 0000000140000000 R08: 0000000000000000 R09: 0000000000000001
    R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000140000
    R13: 0000000000140000 R14: 0000000000002f40 R15: ffff9e3e7aff3680
    FS: 0000000000000000(0000) GS:ffff9e3e7bb00000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 000000000000353d CR3: 0000000058610000 CR4: 00000000000006e0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    Call Trace:
    __remove_pages+0x4b/0x640
    arch_remove_memory+0x63/0x8d
    try_remove_memory+0xdb/0x130
    __remove_memory+0xa/0x11
    acpi_memory_device_remove+0x70/0x100
    acpi_bus_trim+0x55/0x90
    acpi_device_hotplug+0x227/0x3a0
    acpi_hotplug_work_fn+0x1a/0x30
    process_one_work+0x221/0x550
    worker_thread+0x50/0x3b0
    kthread+0x105/0x140
    ret_from_fork+0x3a/0x50
    Modules linked in:
    CR2: 000000000000353d

    Instead, shrink the zones when offlining memory or when onlining failed.
    Introduce and use remove_pfn_range_from_zone(() for that. We now
    properly shrink the zones, even if we have DIMMs whereby

    - Some memory blocks fall into no zone (never onlined)

    - Some memory blocks fall into multiple zones (offlined+re-onlined)

    - Multiple memory blocks that fall into different zones

    Drop the zone parameter (with a potential dubious value) from
    __remove_pages() and __remove_section().

    Link: http://lkml.kernel.org/r/20191006085646.5768-6-david@redhat.com
    Fixes: f1dd2cd13c4b ("mm, memory_hotplug: do not associate hotadded memory to zones until online") [visible after d0dc12e86b319]
    Signed-off-by: David Hildenbrand
    Reviewed-by: Oscar Salvador
    Cc: Michal Hocko
    Cc: "Matthew Wilcox (Oracle)"
    Cc: "Aneesh Kumar K.V"
    Cc: Pavel Tatashin
    Cc: Greg Kroah-Hartman
    Cc: Dan Williams
    Cc: Logan Gunthorpe
    Cc: [5.0+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    David Hildenbrand
     

25 Sep, 2019

6 commits

  • Merge updates from Andrew Morton:

    - a few hot fixes

    - ocfs2 updates

    - almost all of -mm (slab-generic, slab, slub, kmemleak, kasan,
    cleanups, debug, pagecache, memcg, gup, pagemap, memory-hotplug,
    sparsemem, vmalloc, initialization, z3fold, compaction, mempolicy,
    oom-kill, hugetlb, migration, thp, mmap, madvise, shmem, zswap,
    zsmalloc)

    * emailed patches from Andrew Morton : (132 commits)
    mm/zsmalloc.c: fix a -Wunused-function warning
    zswap: do not map same object twice
    zswap: use movable memory if zpool support allocate movable memory
    zpool: add malloc_support_movable to zpool_driver
    shmem: fix obsolete comment in shmem_getpage_gfp()
    mm/madvise: reduce code duplication in error handling paths
    mm: mmap: increase sockets maximum memory size pgoff for 32bits
    mm/mmap.c: refine find_vma_prev() with rb_last()
    riscv: make mmap allocation top-down by default
    mips: use generic mmap top-down layout and brk randomization
    mips: replace arch specific way to determine 32bit task with generic version
    mips: adjust brk randomization offset to fit generic version
    mips: use STACK_TOP when computing mmap base address
    mips: properly account for stack randomization and stack guard gap
    arm: use generic mmap top-down layout and brk randomization
    arm: use STACK_TOP when computing mmap base address
    arm: properly account for stack randomization and stack guard gap
    arm64, mm: make randomization selected by generic topdown mmap layout
    arm64, mm: move generic mmap layout functions to mm
    arm64: consider stack randomization for mmap base only when necessary
    ...

    Linus Torvalds
     
  • Both pgtable_cache_init() and pgd_cache_init() are used to initialize kmem
    cache for page table allocations on several architectures that do not use
    PAGE_SIZE tables for one or more levels of the page table hierarchy.

    Most architectures do not implement these functions and use __weak default
    NOP implementation of pgd_cache_init(). Since there is no such default
    for pgtable_cache_init(), its empty stub is duplicated among most
    architectures.

    Rename the definitions of pgd_cache_init() to pgtable_cache_init() and
    drop empty stubs of pgtable_cache_init().

    Link: http://lkml.kernel.org/r/1566457046-22637-1-git-send-email-rppt@linux.ibm.com
    Signed-off-by: Mike Rapoport
    Acked-by: Will Deacon [arm64]
    Acked-by: Thomas Gleixner [x86]
    Cc: Catalin Marinas
    Cc: Ingo Molnar
    Cc: Borislav Petkov
    Cc: Matthew Wilcox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • The ia64 implementation pte_alloc_one(), pte_alloc_one_kernel(),
    pte_free_kernel() and pte_free() is identical to the generic except of
    lack of __GFP_ACCOUNT for the user PTEs allocation.

    Switch ia64 to use generic version of these functions.

    Link: http://lkml.kernel.org/r/1565250728-21721-3-git-send-email-rppt@linux.ibm.com
    Signed-off-by: Mike Rapoport
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • Patch series "mm: remove quicklist page table caches".

    A while ago Nicholas proposed to remove quicklist page table caches [1].

    I've rebased his patch on the curren upstream and switched ia64 and sh to
    use generic versions of PTE allocation.

    [1] https://lore.kernel.org/linux-mm/20190711030339.20892-1-npiggin@gmail.com

    This patch (of 3):

    Remove page table allocator "quicklists". These have been around for a
    long time, but have not got much traction in the last decade and are only
    used on ia64 and sh architectures.

    The numbers in the initial commit look interesting but probably don't
    apply anymore. If anybody wants to resurrect this it's in the git
    history, but it's unhelpful to have this code and divergent allocator
    behaviour for minor archs.

    Also it might be better to instead make more general improvements to page
    allocator if this is still so slow.

    Link: http://lkml.kernel.org/r/1565250728-21721-2-git-send-email-rppt@linux.ibm.com
    Signed-off-by: Nicholas Piggin
    Signed-off-by: Mike Rapoport
    Cc: Tony Luck
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nicholas Piggin
     
  • Patch series "Make working with compound pages easier", v2.

    These three patches add three helpers and convert the appropriate
    places to use them.

    This patch (of 3):

    It's unnecessarily hard to find out the size of a potentially huge page.
    Replace 'PAGE_SIZE << compound_order(page)' with page_size(page).

    Link: http://lkml.kernel.org/r/20190721104612.19120-2-willy@infradead.org
    Signed-off-by: Matthew Wilcox (Oracle)
    Acked-by: Michal Hocko
    Reviewed-by: Andrew Morton
    Reviewed-by: Ira Weiny
    Acked-by: Kirill A. Shutemov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Wilcox (Oracle)
     
  • Fix

    arch/ia64/kernel/irq_ia64.c:586:1: warning: no return statement in function returning non-void [-Wreturn-type]
    arch/ia64/mm/contig.c:111:6: warning: unused variable 'rc' [-Wunused-variable]
    arch/ia64/mm/discontig.c:189:39: warning: unused variable 'rc' [-Wunused-variable]

    Signed-off-by: Tony Luck
    Signed-off-by: Linus Torvalds

    Tony Luck
     

20 Sep, 2019

2 commits

  • Pull Kbuild updates from Masahiro Yamada:

    - add modpost warn exported symbols marked as 'static' because 'static'
    and EXPORT_SYMBOL is an odd combination

    - break the build early if gold linker is used

    - optimize the Bison rule to produce .c and .h files by a single
    pattern rule

    - handle PREEMPT_RT in the module vermagic and UTS_VERSION

    - warn CONFIG options leaked to the user-space except existing ones

    - make single targets work properly

    - rebuild modules when module linker scripts are updated

    - split the module final link stage into scripts/Makefile.modfinal

    - fix the missed error code in merge_config.sh

    - improve the error message displayed on the attempt of the O= build in
    unclean source tree

    - remove 'clean-dirs' syntax

    - disable -Wimplicit-fallthrough warning for Clang

    - add CONFIG_CC_OPTIMIZE_FOR_SIZE_O3 for ARC

    - remove ARCH_{CPP,A,C}FLAGS variables

    - add $(BASH) to run bash scripts

    - change *CFLAGS_.o to take the relative path to $(obj)
    instead of the basename

    - stop suppressing Clang's -Wunused-function warnings when W=1

    - fix linux/export.h to avoid genksyms calculating CRC of trimmed
    exported symbols

    - misc cleanups

    * tag 'kbuild-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (63 commits)
    genksyms: convert to SPDX License Identifier for lex.l and parse.y
    modpost: use __section in the output to *.mod.c
    modpost: use MODULE_INFO() for __module_depends
    export.h, genksyms: do not make genksyms calculate CRC of trimmed symbols
    export.h: remove defined(__KERNEL__), which is no longer needed
    kbuild: allow Clang to find unused static inline functions for W=1 build
    kbuild: rename KBUILD_ENABLE_EXTRA_GCC_CHECKS to KBUILD_EXTRA_WARN
    kbuild: refactor scripts/Makefile.extrawarn
    merge_config.sh: ignore unwanted grep errors
    kbuild: change *FLAGS_.o to take the path relative to $(obj)
    modpost: add NOFAIL to strndup
    modpost: add guid_t type definition
    kbuild: add $(BASH) to run scripts with bash-extension
    kbuild: remove ARCH_{CPP,A,C}FLAGS
    kbuild,arc: add CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 for ARC
    kbuild: Do not enable -Wimplicit-fallthrough for clang for now
    kbuild: clean up subdir-ymn calculation in Makefile.clean
    kbuild: remove unneeded '+' marker from cmd_clean
    kbuild: remove clean-dirs syntax
    kbuild: check clean srctree even earlier
    ...

    Linus Torvalds
     
  • Pull dma-mapping updates from Christoph Hellwig:

    - add dma-mapping and block layer helpers to take care of IOMMU merging
    for mmc plus subsequent fixups (Yoshihiro Shimoda)

    - rework handling of the pgprot bits for remapping (me)

    - take care of the dma direct infrastructure for swiotlb-xen (me)

    - improve the dma noncoherent remapping infrastructure (me)

    - better defaults for ->mmap, ->get_sgtable and ->get_required_mask
    (me)

    - cleanup mmaping of coherent DMA allocations (me)

    - various misc cleanups (Andy Shevchenko, me)

    * tag 'dma-mapping-5.4' of git://git.infradead.org/users/hch/dma-mapping: (41 commits)
    mmc: renesas_sdhi_internal_dmac: Add MMC_CAP2_MERGE_CAPABLE
    mmc: queue: Fix bigger segments usage
    arm64: use asm-generic/dma-mapping.h
    swiotlb-xen: merge xen_unmap_single into xen_swiotlb_unmap_page
    swiotlb-xen: simplify cache maintainance
    swiotlb-xen: use the same foreign page check everywhere
    swiotlb-xen: remove xen_swiotlb_dma_mmap and xen_swiotlb_dma_get_sgtable
    xen: remove the exports for xen_{create,destroy}_contiguous_region
    xen/arm: remove xen_dma_ops
    xen/arm: simplify dma_cache_maint
    xen/arm: use dev_is_dma_coherent
    xen/arm: consolidate page-coherent.h
    xen/arm: use dma-noncoherent.h calls for xen-swiotlb cache maintainance
    arm: remove wrappers for the generic dma remap helpers
    dma-mapping: introduce a dma_common_find_pages helper
    dma-mapping: always use VM_DMA_COHERENT for generic DMA remap
    vmalloc: lift the arm flag for coherent mappings to common code
    dma-mapping: provide a better default ->get_required_mask
    dma-mapping: remove the dma_declare_coherent_memory export
    remoteproc: don't allow modular build
    ...

    Linus Torvalds
     

18 Sep, 2019

1 commit


17 Sep, 2019

3 commits

  • Pull scheduler updates from Ingo Molnar:

    - MAINTAINERS: Add Mark Rutland as perf submaintainer, Juri Lelli and
    Vincent Guittot as scheduler submaintainers. Add Dietmar Eggemann,
    Steven Rostedt, Ben Segall and Mel Gorman as scheduler reviewers.

    As perf and the scheduler is getting bigger and more complex,
    document the status quo of current responsibilities and interests,
    and spread the review pain^H^H^H^H fun via an increase in the Cc:
    linecount generated by scripts/get_maintainer.pl. :-)

    - Add another series of patches that brings the -rt (PREEMPT_RT) tree
    closer to mainline: split the monolithic CONFIG_PREEMPT dependencies
    into a new CONFIG_PREEMPTION category that will allow the eventual
    introduction of CONFIG_PREEMPT_RT. Still a few more hundred patches
    to go though.

    - Extend the CPU cgroup controller with uclamp.min and uclamp.max to
    allow the finer shaping of CPU bandwidth usage.

    - Micro-optimize energy-aware wake-ups from O(CPUS^2) to O(CPUS).

    - Improve the behavior of high CPU count, high thread count
    applications running under cpu.cfs_quota_us constraints.

    - Improve balancing with SCHED_IDLE (SCHED_BATCH) tasks present.

    - Improve CPU isolation housekeeping CPU allocation NUMA locality.

    - Fix deadline scheduler bandwidth calculations and logic when cpusets
    rebuilds the topology, or when it gets deadline-throttled while it's
    being offlined.

    - Convert the cpuset_mutex to percpu_rwsem, to allow it to be used from
    setscheduler() system calls without creating global serialization.
    Add new synchronization between cpuset topology-changing events and
    the deadline acceptance tests in setscheduler(), which were broken
    before.

    - Rework the active_mm state machine to be less confusing and more
    optimal.

    - Rework (simplify) the pick_next_task() slowpath.

    - Improve load-balancing on AMD EPYC systems.

    - ... and misc cleanups, smaller fixes and improvements - please see
    the Git log for more details.

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (53 commits)
    sched/psi: Correct overly pessimistic size calculation
    sched/fair: Speed-up energy-aware wake-ups
    sched/uclamp: Always use 'enum uclamp_id' for clamp_id values
    sched/uclamp: Update CPU's refcount on TG's clamp changes
    sched/uclamp: Use TG's clamps to restrict TASK's clamps
    sched/uclamp: Propagate system defaults to the root group
    sched/uclamp: Propagate parent clamps
    sched/uclamp: Extend CPU's cgroup controller
    sched/topology: Improve load balancing on AMD EPYC systems
    arch, ia64: Make NUMA select SMP
    sched, perf: MAINTAINERS update, add submaintainers and reviewers
    sched/fair: Use rq_lock/unlock in online_fair_sched_group
    cpufreq: schedutil: fix equation in comment
    sched: Rework pick_next_task() slow-path
    sched: Allow put_prev_task() to drop rq->lock
    sched/fair: Expose newidle_balance()
    sched: Add task_struct pointer to sched_class::set_curr_task
    sched: Rework CPU hotplug task selection
    sched/{rt,deadline}: Fix set_next_task vs pick_next_task
    sched: Fix kerneldoc comment for ia64_set_curr_task
    ...

    Linus Torvalds
     
  • Pull EFI updates from Ingo Molnar:

    - refactor the EFI config table handling across architectures

    - add support for the Dell EMC OEM config table

    - include AER diagnostic output to CPER handling of fatal PCIe errors

    * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    efi: cper: print AER info of PCIe fatal error
    efi: Export Runtime Configuration Interface table to sysfs
    efi: ia64: move SAL systab handling out of generic EFI code
    efi/x86: move UV_SYSTAB handling into arch/x86
    efi: x86: move efi_is_table_address() into arch/x86

    Linus Torvalds
     
  • Pull ia64 updates from Tony Luck:
    "The big change here is removal of support for SGI Altix"

    * tag 'please-pull-ia64_for_5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: (33 commits)
    genirq: remove the is_affinity_mask_valid hook
    ia64: remove CONFIG_SWIOTLB ifdefs
    ia64: remove support for machvecs
    ia64: move the screen_info setup to common code
    ia64: move the ROOT_DEV setup to common code
    ia64: rework iommu probing
    ia64: remove the unused sn_coherency_id symbol
    ia64: remove the SGI UV simulator support
    ia64: remove the zx1 swiotlb machvec
    ia64: remove CONFIG_ACPI ifdefs
    ia64: remove CONFIG_PCI ifdefs
    ia64: remove the hpsim platform
    ia64: remove now unused machvec indirections
    ia64: remove support for the SGI SN2 platform
    drivers: remove the SGI SN2 IOC4 base support
    drivers: remove the SGI SN2 IOC3 base support
    qla2xxx: remove SGI SN2 support
    qla1280: remove SGI SN2 support
    misc/sgi-xp: remove SGI SN2 support
    char/mspec: remove SGI SN2 support
    ...

    Linus Torvalds
     

04 Sep, 2019

1 commit

  • While the default ->mmap and ->get_sgtable implementations work for the
    majority of our dma_map_ops impementations they are inherently safe
    for others that don't use the page allocator or CMA and/or use their
    own way of remapping not covered by the common code. So remove the
    defaults if these methods are not wired up, but instead wire up the
    default implementations for all safe instances.

    Fixes: e1c7e324539a ("dma-mapping: always provide the dma_map_ops based implementation")
    Signed-off-by: Christoph Hellwig

    Christoph Hellwig
     

03 Sep, 2019

2 commits

  • While it does make sense to allow CONFIG_NUMA and !CONFIG_SMP in
    theory, it doesn't make much sense in practice.

    Follow other architectures and make CONFIG_NUMA select CONFIG_SMP.

    The motivation for this patch is to allow a new NUMA variable to be
    initialised in kernel/sched/topology.c.

    Signed-off-by: Matt Fleming
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Borislav Petkov
    Cc: Linus Torvalds
    Cc: Mel Gorman
    Cc: Peter Zijlstra
    Cc: Rik van Riel
    Cc: Suravee.Suthikulpanit@amd.com
    Cc: Thomas Gleixner
    Cc: Thomas.Lendacky@amd.com
    Cc: Tony Luck
    Link: https://lkml.kernel.org/r/20190808195301.13222-2-matt@codeblueprint.co.uk
    Signed-off-by: Ingo Molnar

    Matt Fleming
     
  • After commit cf65a0f6f6ff ("dma-mapping: move all DMA mapping code to
    kernel/dma") some of the files are referring to outdated information,
    i.e. old file names of DMA mapping sources. Fix it here.

    Note, the lines with "Glue code for..." have been removed completely.

    Signed-off-by: Andy Shevchenko
    Signed-off-by: Christoph Hellwig

    Andy Shevchenko
     

23 Aug, 2019

1 commit


22 Aug, 2019

1 commit

  • Add CONFIG_ASM_MODVERSIONS. This allows to remove one if-conditional
    nesting in scripts/Makefile.build.

    scripts/Makefile.build is run every time Kbuild descends into a
    sub-directory. So, I want to avoid $(wildcard ...) evaluation
    where possible although computing $(wildcard ...) is so cheap that
    it may not make measurable performance difference.

    Signed-off-by: Masahiro Yamada
    Acked-by: Geert Uytterhoeven

    Masahiro Yamada
     

21 Aug, 2019

1 commit


17 Aug, 2019

17 commits

  • CONFIG_SWIOTLB is now unconditionally selected on ia64, so remove the
    ifdefs.

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-28-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • The only thing remaining of the machvecs is a few checks if we are
    running on an SGI UV system. Replace those with the existing
    is_uv_system() check that has been rewritten to simply check the
    OEM ID directly.

    That leaves us with a generic kernel that is as fast as the previous
    DIG/ZX1/UV kernels, but can support all hardware. Support for UV
    and the HP SBA IOMMU is now optional based on new config options.

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-27-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • There is nothing really platform specific about setting about the
    screen_info from the ia64_boot_param structure, so move it from the
    dig machvec to common code.

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-26-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • I'm not sure how useful a platform default ROOT_DEV is these days,
    but it pretty sure isn't machvec dependent.

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-25-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • ia64 currently organizes the iommu probing along machves, which isn't
    very helpful. Instead just try to probe for Intel IOMMUs in mem_init
    as they are properly described in ACPI and if none was found initialize
    the swiotlb buffer. The HP SBA handling is then only done delayed when
    the actual hardware is probed. Only in the case that we actually found
    usable IOMMUs we then set up the DMA ops and free the not needed
    swiotlb buffer. This scheme gets rid of the need for the dma_init
    machvec operation, and the dig_vtd machvec.

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-24-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • The sn_coherency_id symbol isn't used anywhere, remove it.

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-23-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • The simulator support was marked as temporary since the initial commit,
    so drop it more than 10 years later.

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-22-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • The aim of this machvec is to support devices with < 32-bit dma
    masks. But given that ia64 only has a ZONE_DMA32 and not a ZONE_DMA
    that isn't supported by swiotlb either.

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-21-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • Now that hpsim support is gone, CONFIG_ACPI is forced on for ia64, and
    we can remove a few ifdefs for it.

    Acked-by: Tom Vaden
    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-20-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • Now that hpsim support is gone, CONFIG_PCI is forced on for ia64, and
    we can remove a few ifdefs for it.

    Acked-by: Tom Vaden
    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-19-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • The hpsim platform supports the HP IA64 simulator which was useful as a
    bring up platform. But it is fairly non-standard vs real IA64 system
    in that it for example doesn't support ACPI. It also comes with a
    whole bunch of simulator specific drivers. Remove it to simplify the
    IA64 port.

    Note that through a weird twist only them hpsim boot loader built the
    vmlinux.gz file, so the makefile targets for that are moved to the
    main ia64 Makefile now.

    Acked-by: Tom Vaden
    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-18-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • With the SGI SN2 machvec removal most of the indirections are unused
    now, so remove them. This includes the entire removal of the mmio
    read*/write* macros as the generic ones are identical to the
    asm-generic/io.h version.

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-17-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • The SGI SN2 (early Altix) is a very non-standard IA64 platform that was
    at the very high end of even IA64 hardware, and has been discontinued
    a long time ago. Remove it because there no upstream users left, and it
    has magic hooks all over the kernel.

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-16-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • The IOC4 is a multi-function chip seen on SGI SN2 and some SGI MIPS
    systems. This removes the base driver, which while not having an SN2
    Kconfig dependency was only for sub-drivers that had one.

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-15-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • The IOC3 is a multi-function chip seen on SGI SN2 and some SGI
    MIPS systems. This removes the last bit of SN2 specific support,
    while the bits used by the mips ports are still around (and being
    substantially rewritten at the moment).

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-14-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • Note this also marks xp broken on ia64 now, as the UV support, which
    was disable in generic kernels before actually never compiled due to
    undefined uv_gpa_to_soc_phys_ram and uv_gpa_in_mmr_space symbols since
    at least commit c2c9f1157414 ("x86: uv: update XPC to handle updated
    BIOS interface").

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-11-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig
     
  • The SGI SN2 support is about to be removed. Remove this driver that
    depends on the SN2 support.

    Signed-off-by: Christoph Hellwig
    Link: https://lkml.kernel.org/r/20190813072514.23299-9-hch@lst.de
    Signed-off-by: Tony Luck

    Christoph Hellwig