Skip to content

Commit

Permalink
Merge tag 'v6.6.8' into 6.6
Browse files Browse the repository at this point in the history
This is the 6.6.8 stable release
  • Loading branch information
xanmod committed Dec 20, 2023
2 parents 90d9158 + 4c9646a commit 8813c2d
Show file tree
Hide file tree
Showing 194 changed files with 2,160 additions and 1,603 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 6
SUBLEVEL = 7
SUBLEVEL = 8
EXTRAVERSION =
NAME = Hurr durr I'ma ninja sloth

Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/Makefile
Expand Up @@ -158,7 +158,7 @@ endif

all: $(notdir $(KBUILD_IMAGE))


vmlinuz.efi: Image
Image vmlinuz.efi: vmlinux
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@

Expand Down
6 changes: 6 additions & 0 deletions arch/arm64/include/asm/pgtable.h
Expand Up @@ -826,6 +826,12 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
pte = set_pte_bit(pte, __pgprot(PTE_DIRTY));

pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask);
/*
* If we end up clearing hw dirtiness for a sw-dirty PTE, set hardware
* dirtiness again.
*/
if (pte_sw_dirty(pte))
pte = pte_mkdirty(pte);
return pte;
}

Expand Down
2 changes: 2 additions & 0 deletions arch/loongarch/Makefile
Expand Up @@ -142,6 +142,8 @@ vdso_install:

all: $(notdir $(KBUILD_IMAGE))

vmlinuz.efi: vmlinux.efi

vmlinux.elf vmlinux.efi vmlinuz.efi: vmlinux
$(Q)$(MAKE) $(build)=$(boot) $(bootvars-y) $(boot)/$@

Expand Down
3 changes: 1 addition & 2 deletions arch/loongarch/include/asm/asmmacro.h
Expand Up @@ -609,8 +609,7 @@
lu32i.d \reg, 0
lu52i.d \reg, \reg, 0
.pushsection ".la_abs", "aw", %progbits
768:
.dword 768b-766b
.dword 766b
.dword \sym
.popsection
#endif
Expand Down
2 changes: 1 addition & 1 deletion arch/loongarch/include/asm/setup.h
Expand Up @@ -25,7 +25,7 @@ extern void set_merr_handler(unsigned long offset, void *addr, unsigned long len
#ifdef CONFIG_RELOCATABLE

struct rela_la_abs {
long offset;
long pc;
long symvalue;
};

Expand Down
10 changes: 9 additions & 1 deletion arch/loongarch/kernel/relocate.c
Expand Up @@ -52,7 +52,7 @@ static inline void __init relocate_absolute(long random_offset)
for (p = begin; (void *)p < end; p++) {
long v = p->symvalue;
uint32_t lu12iw, ori, lu32id, lu52id;
union loongarch_instruction *insn = (void *)p - p->offset;
union loongarch_instruction *insn = (void *)p->pc;

lu12iw = (v >> 12) & 0xfffff;
ori = v & 0xfff;
Expand Down Expand Up @@ -102,6 +102,14 @@ static inline __init unsigned long get_random_boot(void)
return hash;
}

static int __init nokaslr(char *p)
{
pr_info("KASLR is disabled.\n");

return 0; /* Print a notice and silence the boot warning */
}
early_param("nokaslr", nokaslr);

static inline __init bool kaslr_disabled(void)
{
char *str;
Expand Down
23 changes: 9 additions & 14 deletions arch/loongarch/kernel/time.c
Expand Up @@ -58,43 +58,38 @@ static int constant_set_state_oneshot(struct clock_event_device *evt)
return 0;
}

static int constant_set_state_oneshot_stopped(struct clock_event_device *evt)
static int constant_set_state_periodic(struct clock_event_device *evt)
{
unsigned long period;
unsigned long timer_config;

raw_spin_lock(&state_lock);

timer_config = csr_read64(LOONGARCH_CSR_TCFG);
timer_config &= ~CSR_TCFG_EN;
period = const_clock_freq / HZ;
timer_config = period & CSR_TCFG_VAL;
timer_config |= (CSR_TCFG_PERIOD | CSR_TCFG_EN);
csr_write64(timer_config, LOONGARCH_CSR_TCFG);

raw_spin_unlock(&state_lock);

return 0;
}

static int constant_set_state_periodic(struct clock_event_device *evt)
static int constant_set_state_shutdown(struct clock_event_device *evt)
{
unsigned long period;
unsigned long timer_config;

raw_spin_lock(&state_lock);

period = const_clock_freq / HZ;
timer_config = period & CSR_TCFG_VAL;
timer_config |= (CSR_TCFG_PERIOD | CSR_TCFG_EN);
timer_config = csr_read64(LOONGARCH_CSR_TCFG);
timer_config &= ~CSR_TCFG_EN;
csr_write64(timer_config, LOONGARCH_CSR_TCFG);

raw_spin_unlock(&state_lock);

return 0;
}

static int constant_set_state_shutdown(struct clock_event_device *evt)
{
return 0;
}

static int constant_timer_next_event(unsigned long delta, struct clock_event_device *evt)
{
unsigned long timer_config;
Expand Down Expand Up @@ -161,7 +156,7 @@ int constant_clockevent_init(void)
cd->rating = 320;
cd->cpumask = cpumask_of(cpu);
cd->set_state_oneshot = constant_set_state_oneshot;
cd->set_state_oneshot_stopped = constant_set_state_oneshot_stopped;
cd->set_state_oneshot_stopped = constant_set_state_shutdown;
cd->set_state_periodic = constant_set_state_periodic;
cd->set_state_shutdown = constant_set_state_shutdown;
cd->set_next_event = constant_timer_next_event;
Expand Down
4 changes: 2 additions & 2 deletions arch/loongarch/mm/pgtable.c
Expand Up @@ -13,13 +13,13 @@ struct page *dmw_virt_to_page(unsigned long kaddr)
{
return pfn_to_page(virt_to_pfn(kaddr));
}
EXPORT_SYMBOL_GPL(dmw_virt_to_page);
EXPORT_SYMBOL(dmw_virt_to_page);

struct page *tlb_virt_to_page(unsigned long kaddr)
{
return pfn_to_page(pte_pfn(*virt_to_kpte(kaddr)));
}
EXPORT_SYMBOL_GPL(tlb_virt_to_page);
EXPORT_SYMBOL(tlb_virt_to_page);

pgd_t *pgd_alloc(struct mm_struct *mm)
{
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/configs/skiroot_defconfig
Expand Up @@ -301,7 +301,6 @@ CONFIG_WQ_WATCHDOG=y
CONFIG_DEBUG_SG=y
CONFIG_DEBUG_NOTIFIERS=y
CONFIG_BUG_ON_DATA_CORRUPTION=y
CONFIG_DEBUG_CREDENTIALS=y
# CONFIG_FTRACE is not set
CONFIG_XMON=y
# CONFIG_RUNTIME_TESTING_MENU is not set
4 changes: 2 additions & 2 deletions arch/riscv/Kconfig
Expand Up @@ -669,15 +669,15 @@ config RISCV_BOOT_SPINWAIT
If unsure what to do here, say N.

config ARCH_SUPPORTS_KEXEC
def_bool MMU
def_bool y

config ARCH_SELECTS_KEXEC
def_bool y
depends on KEXEC
select HOTPLUG_CPU if SMP

config ARCH_SUPPORTS_KEXEC_FILE
def_bool 64BIT && MMU
def_bool 64BIT

config ARCH_SELECTS_KEXEC_FILE
def_bool y
Expand Down
4 changes: 3 additions & 1 deletion arch/riscv/kernel/crash_core.c
Expand Up @@ -5,17 +5,19 @@

void arch_crash_save_vmcoreinfo(void)
{
VMCOREINFO_NUMBER(VA_BITS);
VMCOREINFO_NUMBER(phys_ram_base);

vmcoreinfo_append_str("NUMBER(PAGE_OFFSET)=0x%lx\n", PAGE_OFFSET);
vmcoreinfo_append_str("NUMBER(VMALLOC_START)=0x%lx\n", VMALLOC_START);
vmcoreinfo_append_str("NUMBER(VMALLOC_END)=0x%lx\n", VMALLOC_END);
#ifdef CONFIG_MMU
VMCOREINFO_NUMBER(VA_BITS);
vmcoreinfo_append_str("NUMBER(VMEMMAP_START)=0x%lx\n", VMEMMAP_START);
vmcoreinfo_append_str("NUMBER(VMEMMAP_END)=0x%lx\n", VMEMMAP_END);
#ifdef CONFIG_64BIT
vmcoreinfo_append_str("NUMBER(MODULES_VADDR)=0x%lx\n", MODULES_VADDR);
vmcoreinfo_append_str("NUMBER(MODULES_END)=0x%lx\n", MODULES_END);
#endif
#endif
vmcoreinfo_append_str("NUMBER(KERNEL_LINK_ADDR)=0x%lx\n", KERNEL_LINK_ADDR);
vmcoreinfo_append_str("NUMBER(va_kernel_pa_offset)=0x%lx\n",
Expand Down
1 change: 0 additions & 1 deletion arch/s390/configs/debug_defconfig
Expand Up @@ -834,7 +834,6 @@ CONFIG_DEBUG_IRQFLAGS=y
CONFIG_DEBUG_LIST=y
CONFIG_DEBUG_SG=y
CONFIG_DEBUG_NOTIFIERS=y
CONFIG_DEBUG_CREDENTIALS=y
CONFIG_RCU_TORTURE_TEST=m
CONFIG_RCU_REF_SCALE_TEST=m
CONFIG_RCU_CPU_STALL_TIMEOUT=300
Expand Down
25 changes: 21 additions & 4 deletions arch/x86/hyperv/hv_init.c
Expand Up @@ -15,6 +15,7 @@
#include <linux/io.h>
#include <asm/apic.h>
#include <asm/desc.h>
#include <asm/e820/api.h>
#include <asm/sev.h>
#include <asm/ibt.h>
#include <asm/hypervisor.h>
Expand Down Expand Up @@ -286,15 +287,31 @@ static int hv_cpu_die(unsigned int cpu)

static int __init hv_pci_init(void)
{
int gen2vm = efi_enabled(EFI_BOOT);
bool gen2vm = efi_enabled(EFI_BOOT);

/*
* For Generation-2 VM, we exit from pci_arch_init() by returning 0.
* The purpose is to suppress the harmless warning:
* A Generation-2 VM doesn't support legacy PCI/PCIe, so both
* raw_pci_ops and raw_pci_ext_ops are NULL, and pci_subsys_init() ->
* pcibios_init() doesn't call pcibios_resource_survey() ->
* e820__reserve_resources_late(); as a result, any emulated persistent
* memory of E820_TYPE_PRAM (12) via the kernel parameter
* memmap=nn[KMG]!ss is not added into iomem_resource and hence can't be
* detected by register_e820_pmem(). Fix this by directly calling
* e820__reserve_resources_late() here: e820__reserve_resources_late()
* depends on e820__reserve_resources(), which has been called earlier
* from setup_arch(). Note: e820__reserve_resources_late() also adds
* any memory of E820_TYPE_PMEM (7) into iomem_resource, and
* acpi_nfit_register_region() -> acpi_nfit_insert_resource() ->
* region_intersects() returns REGION_INTERSECTS, so the memory of
* E820_TYPE_PMEM won't get added twice.
*
* We return 0 here so that pci_arch_init() won't print the warning:
* "PCI: Fatal: No config space access function found"
*/
if (gen2vm)
if (gen2vm) {
e820__reserve_resources_late();
return 0;
}

/* For Generation-1 VM, we'll proceed in pci_arch_init(). */
return 1;
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/include/asm/alternative.h
Expand Up @@ -58,7 +58,7 @@
#define ANNOTATE_IGNORE_ALTERNATIVE \
"999:\n\t" \
".pushsection .discard.ignore_alts\n\t" \
".long 999b - .\n\t" \
".long 999b\n\t" \
".popsection\n\t"

/*
Expand Down Expand Up @@ -352,7 +352,7 @@ static inline int alternatives_text_reserved(void *start, void *end)
.macro ANNOTATE_IGNORE_ALTERNATIVE
.Lannotate_\@:
.pushsection .discard.ignore_alts
.long .Lannotate_\@ - .
.long .Lannotate_\@
.popsection
.endm

Expand Down
4 changes: 2 additions & 2 deletions arch/x86/include/asm/nospec-branch.h
Expand Up @@ -196,7 +196,7 @@
.macro ANNOTATE_RETPOLINE_SAFE
.Lhere_\@:
.pushsection .discard.retpoline_safe
.long .Lhere_\@ - .
.long .Lhere_\@
.popsection
.endm

Expand Down Expand Up @@ -334,7 +334,7 @@
#define ANNOTATE_RETPOLINE_SAFE \
"999:\n\t" \
".pushsection .discard.retpoline_safe\n\t" \
".long 999b - .\n\t" \
".long 999b\n\t" \
".popsection\n\t"

typedef u8 retpoline_thunk_t[RETPOLINE_THUNK_SIZE];
Expand Down
13 changes: 13 additions & 0 deletions block/blk-cgroup.c
Expand Up @@ -577,6 +577,7 @@ static void blkg_destroy_all(struct gendisk *disk)
struct request_queue *q = disk->queue;
struct blkcg_gq *blkg, *n;
int count = BLKG_DESTROY_BATCH_SIZE;
int i;

restart:
spin_lock_irq(&q->queue_lock);
Expand All @@ -602,6 +603,18 @@ static void blkg_destroy_all(struct gendisk *disk)
}
}

/*
* Mark policy deactivated since policy offline has been done, and
* the free is scheduled, so future blkcg_deactivate_policy() can
* be bypassed
*/
for (i = 0; i < BLKCG_MAX_POLS; i++) {
struct blkcg_policy *pol = blkcg_policy[i];

if (pol)
__clear_bit(pol->plid, q->blkcg_pols);
}

q->root_blkg = NULL;
spin_unlock_irq(&q->queue_lock);
}
Expand Down
2 changes: 2 additions & 0 deletions block/blk-throttle.c
Expand Up @@ -1320,6 +1320,7 @@ static void tg_conf_updated(struct throtl_grp *tg, bool global)
tg_bps_limit(tg, READ), tg_bps_limit(tg, WRITE),
tg_iops_limit(tg, READ), tg_iops_limit(tg, WRITE));

rcu_read_lock();
/*
* Update has_rules[] flags for the updated tg's subtree. A tg is
* considered to have rules if either the tg itself or any of its
Expand Down Expand Up @@ -1347,6 +1348,7 @@ static void tg_conf_updated(struct throtl_grp *tg, bool global)
this_tg->latency_target = max(this_tg->latency_target,
parent_tg->latency_target);
}
rcu_read_unlock();

/*
* We're already holding queue_lock and know @tg is valid. Let's
Expand Down
5 changes: 5 additions & 0 deletions drivers/accel/ivpu/ivpu_drv.h
Expand Up @@ -76,6 +76,11 @@

#define IVPU_WA(wa_name) (vdev->wa.wa_name)

#define IVPU_PRINT_WA(wa_name) do { \
if (IVPU_WA(wa_name)) \
ivpu_dbg(vdev, MISC, "Using WA: " #wa_name "\n"); \
} while (0)

struct ivpu_wa_table {
bool punit_disabled;
bool clear_runtime_mem;
Expand Down
17 changes: 14 additions & 3 deletions drivers/accel/ivpu/ivpu_hw_37xx.c
Expand Up @@ -53,10 +53,12 @@

#define ICB_0_1_IRQ_MASK ((((u64)ICB_1_IRQ_MASK) << 32) | ICB_0_IRQ_MASK)

#define BUTTRESS_IRQ_MASK ((REG_FLD(VPU_37XX_BUTTRESS_INTERRUPT_STAT, FREQ_CHANGE)) | \
(REG_FLD(VPU_37XX_BUTTRESS_INTERRUPT_STAT, ATS_ERR)) | \
#define BUTTRESS_IRQ_MASK ((REG_FLD(VPU_37XX_BUTTRESS_INTERRUPT_STAT, ATS_ERR)) | \
(REG_FLD(VPU_37XX_BUTTRESS_INTERRUPT_STAT, UFI_ERR)))

#define BUTTRESS_ALL_IRQ_MASK (BUTTRESS_IRQ_MASK | \
(REG_FLD(VPU_37XX_BUTTRESS_INTERRUPT_STAT, FREQ_CHANGE)))

#define BUTTRESS_IRQ_ENABLE_MASK ((u32)~BUTTRESS_IRQ_MASK)
#define BUTTRESS_IRQ_DISABLE_MASK ((u32)-1)

Expand Down Expand Up @@ -102,8 +104,17 @@ static void ivpu_hw_wa_init(struct ivpu_device *vdev)
vdev->wa.clear_runtime_mem = false;
vdev->wa.d3hot_after_power_off = true;

if (ivpu_device_id(vdev) == PCI_DEVICE_ID_MTL && ivpu_revision(vdev) < 4)
REGB_WR32(VPU_37XX_BUTTRESS_INTERRUPT_STAT, BUTTRESS_ALL_IRQ_MASK);
if (REGB_RD32(VPU_37XX_BUTTRESS_INTERRUPT_STAT) == BUTTRESS_ALL_IRQ_MASK) {
/* Writing 1s does not clear the interrupt status register */
vdev->wa.interrupt_clear_with_0 = true;
REGB_WR32(VPU_37XX_BUTTRESS_INTERRUPT_STAT, 0x0);
}

IVPU_PRINT_WA(punit_disabled);
IVPU_PRINT_WA(clear_runtime_mem);
IVPU_PRINT_WA(d3hot_after_power_off);
IVPU_PRINT_WA(interrupt_clear_with_0);
}

static void ivpu_hw_timeouts_init(struct ivpu_device *vdev)
Expand Down
4 changes: 4 additions & 0 deletions drivers/accel/ivpu/ivpu_hw_40xx.c
Expand Up @@ -125,6 +125,10 @@ static void ivpu_hw_wa_init(struct ivpu_device *vdev)

if (ivpu_hw_gen(vdev) == IVPU_HW_40XX)
vdev->wa.disable_clock_relinquish = true;

IVPU_PRINT_WA(punit_disabled);
IVPU_PRINT_WA(clear_runtime_mem);
IVPU_PRINT_WA(disable_clock_relinquish);
}

static void ivpu_hw_timeouts_init(struct ivpu_device *vdev)
Expand Down

0 comments on commit 8813c2d

Please sign in to comment.