1. 16 Jan, 2021 3 commits
    • Atish Patra's avatar
      RISC-V: Fix maximum allowed phsyical memory for RV32 · e5577937
      Atish Patra authored
      Linux kernel can only map 1GB of address space for RV32 as the page offset
      is set to 0xC0000000. The current description in the Kconfig is confusing
      as it indicates that RV32 can support 2GB of physical memory. That is
      simply not true for current kernel. In future, a 2GB split support can be
      added to allow 2GB physical address space.
      Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
      Signed-off-by: default avatarAtish Patra <atish.patra@wdc.com>
      Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
      e5577937
    • Atish Patra's avatar
      RISC-V: Set current memblock limit · abb8e86b
      Atish Patra authored
      Currently, linux kernel can not use last 4k bytes of addressable space
      because IS_ERR_VALUE macro treats those as an error. This will be an issue
      for RV32 as any memblock allocator potentially allocate chunk of memory
      from the end of DRAM (2GB) leading bad address error even though the
      address was technically valid.
      
      Fix this issue by limiting the memblock if available memory spans the
      entire address space.
      Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
      Signed-off-by: default avatarAtish Patra <atish.patra@wdc.com>
      Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
      abb8e86b
    • Atish Patra's avatar
      RISC-V: Do not allocate memblock while iterating reserved memblocks · 797f0375
      Atish Patra authored
      Currently, resource tree allocates memory blocks while iterating on the
      list. It leads to following kernel warning because memblock allocation
      also invokes memory block reservation API.
      
      [    0.000000] ------------[ cut here ]------------
      [    0.000000] WARNING: CPU: 0 PID: 0 at kernel/resource.c:795
      __insert_resource+0x8e/0xd0
      [    0.000000] Modules linked in:
      [    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted
      5.10.0-00022-ge20097fb37e2-dirty #549
      [    0.000000] epc: c00125c2 ra : c001262c sp : c1c01f50
      [    0.000000]  gp : c1d456e0 tp : c1c0a980 t0 : ffffcf20
      [    0.000000]  t1 : 00000000 t2 : 00000000 s0 : c1c01f60
      [    0.000000]  s1 : ffffcf00 a0 : ffffff00 a1 : c1c0c0c4
      [    0.000000]  a2 : 80c12b15 a3 : 80402000 a4 : 80402000
      [    0.000000]  a5 : c1c0c0c4 a6 : 80c12b15 a7 : f5faf600
      [    0.000000]  s2 : c1c0c0c4 s3 : c1c0e000 s4 : c1009a80
      [    0.000000]  s5 : c1c0c000 s6 : c1d48000 s7 : c1613b4c
      [    0.000000]  s8 : 00000fff s9 : 80000200 s10: c1613b40
      [    0.000000]  s11: 00000000 t3 : c1d4a000 t4 : ffffffff
      
      This is also unnecessary as we can pre-compute the total memblocks required
      for each memory region and allocate it before the loop. It save precious
      boot time not going through memblock allocation code every time.
      
      Fixes: 00ab027a ("RISC-V: Add kernel image sections to the resource tree")
      Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
      Tested-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarAtish Patra <atish.patra@wdc.com>
      Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
      797f0375
  2. 15 Jan, 2021 1 commit
  3. 14 Jan, 2021 4 commits
  4. 13 Jan, 2021 3 commits
    • Guo Ren's avatar
      riscv: Fixup CONFIG_GENERIC_TIME_VSYSCALL · 0aa2ec8a
      Guo Ren authored
      The patch fix commit: ad5d1122 ("riscv: use vDSO common flow to
      reduce the latency of the time-related functions").
      
      The GENERIC_TIME_VSYSCALL should be CONFIG_GENERIC_TIME_VSYSCALL
      or vgettimeofday won't work.
      Signed-off-by: default avatarGuo Ren <guoren@linux.alibaba.com>
      Reviewed-by: default avatarPekka Enberg <penberg@kernel.org>
      Fixes: ad5d1122 ("riscv: use vDSO common flow to reduce the latency of the time-related functions")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
      0aa2ec8a
    • Kefeng Wang's avatar
      riscv: cacheinfo: Fix using smp_processor_id() in preemptible · 80709af7
      Kefeng Wang authored
      Use raw_smp_processor_id instead of smp_processor_id() to fix warning,
      
      BUG: using smp_processor_id() in preemptible [00000000] code: init/1
      caller is debug_smp_processor_id+0x1c/0x26
      CPU: 0 PID: 1 Comm: init Not tainted 5.10.0-rc4 #211
      Call Trace:
        walk_stackframe+0x0/0xaa
        show_stack+0x32/0x3e
        dump_stack+0x76/0x90
        check_preemption_disabled+0xaa/0xac
        debug_smp_processor_id+0x1c/0x26
        get_cache_size+0x18/0x68
        load_elf_binary+0x868/0xece
        bprm_execve+0x224/0x498
        kernel_execve+0xdc/0x142
        run_init_process+0x90/0x9e
        try_to_run_init_process+0x12/0x3c
        kernel_init+0xb4/0xf8
        ret_from_exception+0x0/0xc
      
      The issue is found when CONFIG_DEBUG_PREEMPT enabled.
      Reviewed-by: default avatarAtish Patra <atish.patra@wdc.com>
      Tested-by: default avatarAtish Patra <atish.patra@wdc.com>
      Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
      [Palmer: Added a comment.]
      Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
      80709af7
    • Atish Patra's avatar
      riscv: Trace irq on only interrupt is enabled · 7cd1af10
      Atish Patra authored
      We should call irq trace only if interrupt is going to be enabled during
      excecption handling. Otherwise, it results in following warning during
      boot with lock debugging enabled.
      
      [    0.000000] ------------[ cut here ]------------
      [    0.000000] DEBUG_LOCKS_WARN_ON(early_boot_irqs_disabled)
      [    0.000000] WARNING: CPU: 0 PID: 0 at kernel/locking/lockdep.c:4085 lockdep_hardirqs_on_prepare+0x22a/0x22e
      [    0.000000] Modules linked in:
      [    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.10.0-00022-ge20097fb37e2-dirty #548
      [    0.000000] epc: c005d5d4 ra : c005d5d4 sp : c1c01e80
      [    0.000000]  gp : c1d456e0 tp : c1c0a980 t0 : 00000000
      [    0.000000]  t1 : ffffffff t2 : 00000000 s0 : c1c01ea0
      [    0.000000]  s1 : c100f360 a0 : 0000002d a1 : c00666ee
      [    0.000000]  a2 : 00000000 a3 : 00000000 a4 : 00000000
      [    0.000000]  a5 : 00000000 a6 : c1c6b390 a7 : 3ffff00e
      [    0.000000]  s2 : c2384fe8 s3 : 00000000 s4 : 00000001
      [    0.000000]  s5 : c1c0a980 s6 : c1d48000 s7 : c1613b4c
      [    0.000000]  s8 : 00000fff s9 : 80000200 s10: c1613b40
      [    0.000000]  s11: 00000000 t3 : 00000000 t4 : 00000000
      [    0.000000]  t5 : 00000001 t6 : 00000000
      
      Fixes: 3c469798 ("riscv:Enable LOCKDEP_SUPPORT & fixup TRACE_IRQFLAGS_SUPPORT")
      Signed-off-by: default avatarAtish Patra <atish.patra@wdc.com>
      Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
      7cd1af10
  5. 09 Jan, 2021 1 commit
  6. 08 Jan, 2021 4 commits
  7. 03 Jan, 2021 1 commit
  8. 02 Jan, 2021 3 commits
    • Linus Torvalds's avatar
      Merge tag 's390-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 3516bd72
      Linus Torvalds authored
      Pull s390 cleanups from Vasily Gorbik:
       "Update defconfigs and sort config select list"
      
      * tag 's390-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/Kconfig: sort config S390 select list once again
        s390: update defconfigs
      3516bd72
    • Linus Torvalds's avatar
      Merge tag 'pm-5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · d9296a7b
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix a crash in intel_pstate during resume from suspend-to-RAM
        that may occur after recent changes and two resource leaks in error
        paths in the operating performance points (OPP) framework, add a new
        C-states table to intel_idle and update the cpuidle MAINTAINERS entry
        to cover the governors too.
      
        Specifics:
      
         - Fix recently introduced crash in the intel_pstate driver that
           occurs if scale-invariance is disabled during resume from
           suspend-to-RAM due to inconsistent changes of APERF or MPERF MSR
           values made by the platform firmware (Rafael Wysocki).
      
         - Fix a memory leak and add a missing clk_put() in error paths in the
           OPP framework (Quanyang Wang, Viresh Kumar).
      
         - Add new C-states table for SnowRidge processors to the intel_idle
           driver (Artem Bityutskiy).
      
         - Update the MAINTAINERS entry for cpuidle to make it clear that the
           governors are covered by it too (Lukas Bulwahn)"
      
      * tag 'pm-5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        intel_idle: add SnowRidge C-state table
        cpufreq: intel_pstate: Fix fast-switch fallback path
        opp: Call the missing clk_put() on error
        opp: fix memory leak in _allocate_opp_table
        MAINTAINERS: include governors into CPU IDLE TIME MANAGEMENT FRAMEWORK
      d9296a7b
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-cpufreq' and 'pm-cpuidle' · 89ecf09e
      Rafael J. Wysocki authored
      * pm-cpufreq:
        cpufreq: intel_pstate: Fix fast-switch fallback path
      
      * pm-cpuidle:
        intel_idle: add SnowRidge C-state table
        MAINTAINERS: include governors into CPU IDLE TIME MANAGEMENT FRAMEWORK
      89ecf09e
  9. 01 Jan, 2021 4 commits
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · eda809ae
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is a load of driver fixes (12 ufs, 1 mpt3sas, 1 cxgbi).
      
        The big core two fixes are for power management ("block: Do not accept
        any requests while suspended" and "block: Fix a race in the runtime
        power management code") which finally sorts out the resume problems
        we've occasionally been having.
      
        To make the resume fix, there are seven necessary precursors which
        effectively renames REQ_PREEMPT to REQ_PM, so every "special" request
        in block is automatically a power management exempt one.
      
        All of the non-PM preempt cases are removed except for the one in the
        SCSI Parallel Interface (spi) domain validation which is a genuine
        case where we have to run requests at high priority to validate the
        bus so this becomes an autopm get/put protected request"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (22 commits)
        scsi: cxgb4i: Fix TLS dependency
        scsi: ufs: Un-inline ufshcd_vops_device_reset function
        scsi: ufs: Re-enable WriteBooster after device reset
        scsi: ufs-mediatek: Use correct path to fix compile error
        scsi: mpt3sas: Signedness bug in _base_get_diag_triggers()
        scsi: block: Do not accept any requests while suspended
        scsi: block: Remove RQF_PREEMPT and BLK_MQ_REQ_PREEMPT
        scsi: core: Only process PM requests if rpm_status != RPM_ACTIVE
        scsi: scsi_transport_spi: Set RQF_PM for domain validation commands
        scsi: ide: Mark power management requests with RQF_PM instead of RQF_PREEMPT
        scsi: ide: Do not set the RQF_PREEMPT flag for sense requests
        scsi: block: Introduce BLK_MQ_REQ_PM
        scsi: block: Fix a race in the runtime power management code
        scsi: ufs-pci: Enable UFSHCD_CAP_RPM_AUTOSUSPEND for Intel controllers
        scsi: ufs-pci: Fix recovery from hibernate exit errors for Intel controllers
        scsi: ufs-pci: Ensure UFS device is in PowerDown mode for suspend-to-disk ->poweroff()
        scsi: ufs-pci: Fix restore from S4 for Intel controllers
        scsi: ufs-mediatek: Keep VCC always-on for specific devices
        scsi: ufs: Allow regulators being always-on
        scsi: ufs: Clear UAC for RPMB after ufshcd resets
        ...
      eda809ae
    • Linus Torvalds's avatar
      Merge tag 'block-5.11-2021-01-01' of git://git.kernel.dk/linux-block · 8b4805c6
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Two minor block fixes from this last week that should go into 5.11:
      
         - Add missing NOWAIT debugfs definition (Andres)
      
         - Fix kerneldoc warning introduced this merge window (Randy)"
      
      * tag 'block-5.11-2021-01-01' of git://git.kernel.dk/linux-block:
        block: add debugfs stanza for QUEUE_FLAG_NOWAIT
        fs: block_dev.c: fix kernel-doc warnings from struct block_device changes
      8b4805c6
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.11-2021-01-01' of git://git.kernel.dk/linux-block · dc3e24b2
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "A few fixes that should go into 5.11, all marked for stable as well:
      
         - Fix issue around identity COW'ing and users that share a ring
           across processes
      
         - Fix a hang associated with unregistering fixed files (Pavel)
      
         - Move the 'process is exiting' cancelation a bit earlier, so
           task_works aren't affected by it (Pavel)"
      
      * tag 'io_uring-5.11-2021-01-01' of git://git.kernel.dk/linux-block:
        kernel/io_uring: cancel io_uring before task works
        io_uring: fix io_sqe_files_unregister() hangs
        io_uring: add a helper for setting a ref node
        io_uring: don't assume mm is constant across submits
      dc3e24b2
    • Linus Torvalds's avatar
      depmod: handle the case of /sbin/depmod without /sbin in PATH · cedd1862
      Linus Torvalds authored
      Commit 436e980e ("kbuild: don't hardcode depmod path") stopped
      hard-coding the path of depmod, but in the process caused trouble for
      distributions that had that /sbin location, but didn't have it in the
      PATH (generally because /sbin is limited to the super-user path).
      
      Work around it for now by just adding /sbin to the end of PATH in the
      depmod.sh script.
      Reported-and-tested-by: default avatarSedat Dilek <sedat.dilek@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cedd1862
  10. 31 Dec, 2020 3 commits
  11. 30 Dec, 2020 6 commits
  12. 29 Dec, 2020 7 commits