1. Aug 24, 2023
    • Rob Herring's avatar
      arc: Explicitly include correct DT includes · 7ebc443d
      Rob Herring authored
      
      
      The DT of_device.h and of_platform.h date back to the separate
      of_platform_bus_type before it as merged into the regular platform bus.
      As part of that merge prepping Arm DT support 13 years ago, they
      "temporarily" include each other. They also include platform_device.h
      and of.h. As a result, there's a pretty much random mix of those include
      files used throughout the tree. In order to detangle these headers and
      replace the implicit includes with struct declarations, users need to
      explicitly include the correct includes.
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Tested-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
      Signed-off-by: default avatarVineet Gupta <vgupta@kernel.org>
      7ebc443d
  2. Aug 19, 2023
    • Vineet Gupta's avatar
      ARC: pt_regs: create seperate type for ecr · 58d9ceb7
      Vineet Gupta authored
      
      
      Reduces duplication in each ISA specific pt_regs
      
      Tested-by: default avatarkernel test robot <lkp@intel.com>
      Closes: https://lore.kernel.org/oe-kbuild-all/202308151342.ROQ9Urvv-lkp@intel.com
      
      
      Signed-off-by: default avatarVineet Gupta <vgupta@kernel.org>
      58d9ceb7
    • Vineet Gupta's avatar
      ARCv2: entry: rearrange pt_regs slightly · d4624bf6
      Vineet Gupta authored
      
      
      Instead of r26,fp,sp,r12,r30 order as fp,r30,r12,r26,sp
      
       - keeps SP at well known position (right abive hardware autosave)
       - r26,r12 saved specifically for ARCv2 (and not in ARCv3) kept
         closer for easy ifdef'ry later
      
      Signed-off-by: default avatarVineet Gupta <vgupta@kernel.org>
      d4624bf6
    • Vineet Gupta's avatar
      ARC: entry: replace 8 byte ADD.ne with 4 byte ADD2.ne · 656f18ad
      Vineet Gupta authored
      
      
      ARCv2 current
      ------------
      000007e0 <EV_Trap>:
       7e0:   2482 3c01               sub     sp,sp,112
       7e4:   1c28 3006               std     r0r1,[sp,40]
       7e8:   1c30 3086               std     r2r3,[sp,48]
       7ec:   1c38 3106               std     r4r5,[sp,56]
       7f0:   1c40 3186               std     r6r7,[sp,64]
       7f4:   1c48 3206               std     r8r9,[sp,72]
       7f8:   1c50 3286               std     r10r11,[sp,80]
       7fc:   1c58 37c0               st      blink,[sp,88]
       800:   1c0c 36c0               st      fp,[sp,12]
       804:   1c18 3680               st      gp,[sp,24]
       808:   1c10 3780               st      r30,[sp,16]
       80c:   1c14 3300               st      r12,[sp,20]
       810:   226a 1340               lr      r10,[aux_user_sp]
       814:   22ca 1702               mov.ne  r10,sp
       818:   22c0 1f82 0000 0070     add.ne  r10,r10,0x70
                        ^^^^^^^^^
      With fix
      --------
      000007b4 <EV_Trap>:
       7b4:   2482 3c01               sub     sp,sp,112
       7b8:   1c28 3006               std     r0r1,[sp,40]
       7bc:   1c30 3086               std     r2r3,[sp,48]
       7c0:   1c38 3106               std     r4r5,[sp,56]
       7c4:   1c40 3186               std     r6r7,[sp,64]
       7c8:   1c48 3206               std     r8r9,[sp,72]
       7cc:   1c50 3286               std     r10r11,[sp,80]
       7d0:   1c58 37c0               st      blink,[sp,88]
       7d4:   1c0c 36c0               st      fp,[sp,12]
       7d8:   1c18 3680               st      gp,[sp,24]
       7dc:   1c10 3780               st      r30,[sp,16]
       7e0:   1c14 3300               st      r12,[sp,20]
       7e4:   226a 1340               lr      r10,[aux_user_sp]
       7e8:   22ca 1702               mov.ne  r10,sp
       7ec:   22d5 1722               add2.ne r10,r10,0x1c
      
      Signed-off-by: default avatarVineet Gupta <vgupta@kernel.org>
      656f18ad
    • Vineet Gupta's avatar
      ARC: entry: replace 8 byte OR with 4 byte BSET · dfb12071
      Vineet Gupta authored
      
      
      FAKE_RET_FROM_EXCEPTION drops down to pure kernel mode. It currently has
      an 8 byte instruction which can be replaced with 4 byte BSET
      
      This is applicable to both ARCv2 and ARCv3 entr code.
      
      ARCv2 current
      ------------
      00000804 <EV_Trap>:
      ...
       874:   216a 1280               lr      r9,[status32]
       878:   2146 1809               bic     r9,r9,0x20
       87c:   2105 1f89 8000 0000     or      r9,r9,0x80000000
                        ^^^^^^^^^
       884:   2029 8240               kflag   r9
      
      ARCv2 after
      ----------
      000007e0 <EV_Trap>:
      ...
       850:   216a 1280               lr      r9,[status32]
       854:   2150 1149               bclr    r9,r9,0x5
       858:   214f 17c9               bset    r9,r9,0x1f
       85c:   2029 8240               kflag   r9
      
      Signed-off-by: default avatarVineet Gupta <vgupta@kernel.org>
      dfb12071
    • Vineet Gupta's avatar
      ARC: entry: Add more common chores to EXCEPTION_PROLOGUE · 13347c10
      Vineet Gupta authored
      
      
      THe high level structure of most ARC exception handlers is
       1. save regfile with EXCEPTION_PROLOGUE
       2. setup r0: EFA (not part of pt_regs)
       3. setup r1: pointer to pt_regs (SP)
       4. drop down to pure kernel mode (from exception)
       5. call the Linux "C" handler
      
      Remove the boiler plate code by moving #2, #3, #4 into #1.
      
      The exceptions to most exceptions are syscall Trap and Machine check
      which don't do some of above for various reasons, so call a newly
      introduced variant EXCEPTION_PROLOGUE_KEEP_AE (same as original
      EXCEPTION_PROLOGUE)
      
      Tested-by: default avatarPavel Kozlov <Pavel.Kozlov@synopsys.com>
      Signed-off-by: default avatarVineet Gupta <vgupta@kernel.org>
      13347c10
  3. Aug 18, 2023
  4. Aug 16, 2023
    • Pavel Kozlov's avatar
      ARC: atomics: Add compiler barrier to atomic operations... · 42f51fb2
      Pavel Kozlov authored
      ... to avoid unwanted gcc optimizations
      
      SMP kernels fail to boot with commit 596ff4a0
      ("cpumask: re-introduce constant-sized cpumask optimizations").
      
      |
      | percpu: BUG: failure at mm/percpu.c:2981/pcpu_build_alloc_info()!
      |
      
      The write operation performed by the SCOND instruction in the atomic
      inline asm code is not properly passed to the compiler. The compiler
      cannot correctly optimize a nested loop that runs through the cpumask
      in the pcpu_build_alloc_info() function.
      
      Fix this by add a compiler barrier (memory clobber in inline asm).
      
      Apparently atomic ops used to have memory clobber implicitly via
      surrounding smp_mb(). However commit b64be683
      ("ARC: atomics: implement relaxed variants") removed the smp_mb() for
      the relaxed variants, but failed to add the explicit compiler barrier.
      
      Link: https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/135
      Cc: <stable@vger.kernel.org> # v6.3+
      Fixes: b64be683
      
       ("ARC: atomics: implement relaxed variants")
      Signed-off-by: default avatarPavel Kozlov <pavel.kozlov@synopsys.com>
      Signed-off-by: default avatarVineet Gupta <vgupta@kernel.org>
      [vgupta: tweaked the changelog and added Fixes tag]
      42f51fb2
  5. Aug 14, 2023
  6. Aug 13, 2023
  7. Aug 12, 2023
    • Linus Torvalds's avatar
      Merge tag 'usb-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 469a2f50
      Linus Torvalds authored
      Pull USB / Thunderbolt driver fixes from Greg KH:
       "Here are some small USB and Thunderbolt driver fixes for reported
        problems. Included in here are:
      
         - thunderbolt driver memory leak fix
      
         - thunderbolt display flicker fix
      
         - usb dwc3 driver fix
      
         - usb gadget uvc disconnect crash fix
      
         - usb typec Kconfig build dependency fix
      
         - usb typec small fixes
      
         - usb-con-gpio bugfix
      
         - usb-storage old driver bugfix
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'usb-6.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        thunderbolt: Fix memory leak in tb_handle_dp_bandwidth_request()
        usb: dwc3: Properly handle processing of pending events
        usb-storage: alauda: Fix uninit-value in alauda_check_media()
        usb: common: usb-conn-gpio: Prevent bailing out if initial role is none
        USB: Gadget: core: Help prevent panic during UVC unconfigure
        usb: typec: mux: intel: Add dependency on USB_COMMON
        usb: typec: nb7vpq904m: Add an error handling path in nb7vpq904m_probe()
        usb: typec: altmodes/displayport: Signal hpd when configuring pin assignment
        usb: typec: tcpm: Fix response to vsafe0V event
        thunderbolt: Fix Thunderbolt 3 display flickering issue on 2nd hot plug onwards
      469a2f50
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v6.5_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 43972cf2
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - Do not parse the confidential computing blob on non-AMD hardware as
         it leads to an EFI config table ending up unmapped
      
       - Use the correct segment selector in the 32-bit version of getcpu() in
         the vDSO
      
       - Make sure vDSO and VVAR regions are placed in the 47-bit VA range
         even on 5-level paging systems
      
       - Add models 0x90-0x91 to the range of AMD Zenbleed-affected CPUs
      
      * tag 'x86_urgent_for_v6.5_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu/amd: Enable Zenbleed fix for AMD Custom APU 0405
        x86/mm: Fix VDSO and VVAR placement on 5-level paging machines
        x86/linkage: Fix typo of BUILD_VDSO in asm/linkage.h
        x86/vdso: Choose the right GDT_ENTRY_CPUNODE for 32-bit getcpu() on 64-bit kernel
        x86/sev: Do not try to parse for the CC blob on non-AMD hardware
      43972cf2
    • Linus Torvalds's avatar
      Merge tag 'x86_bugs_for_v6.5_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 272b86ba
      Linus Torvalds authored
      Pull x86 mitigation fixes from Borislav Petkov:
       "The first set of fallout fixes after the embargo madness. There will
        be another set next week too.
      
         - A first series of cleanups/unifications and documentation
           improvements to the SRSO and GDS mitigations code which got
           postponed to after the embargo date
      
         - Fix the SRSO aliasing addresses assertion so that the LLVM linker
           can parse it too"
      
      * tag 'x86_bugs_for_v6.5_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        driver core: cpu: Fix the fallback cpu_show_gds() name
        x86: Move gds_ucode_mitigated() declaration to header
        x86/speculation: Add cpu_show_gds() prototype
        driver core: cpu: Make cpu_show_not_affected() static
        x86/srso: Fix build breakage with the LLVM linker
        Documentation/srso: Document IBPB aspect and fix formatting
        driver core: cpu: Unify redundant silly stubs
        Documentation/hw-vuln: Unify filename specification in index
      272b86ba
    • Linus Torvalds's avatar
      Merge tag 'tpmdd-v6.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd · f8de32cc
      Linus Torvalds authored
      Pull tpm irq fixes from Jarkko Sakkinen:
       "These change the probing and enabling of interrupts advertised by the
        platform firmware (i.e. ACPI, Device Tree) to be an opt-in for tpm_tis,
        which can be set from the kernel command-line.
      
        Note that the opt-in change is only for the PC MMIO tpm_tis module. It
        does not affect other similar drivers using IRQs, like tpm_tis_spi and
        synquacer"
      
      * tag 'tpmdd-v6.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
        tpm_tis: Opt-in interrupts
        tpm: tpm_tis: Fix UPX-i11 DMI_MATCH condition
      f8de32cc