Linux 4.7.8
Greg KH
maintainerI'm announcing the release of the 4.7.8 kernel.
All users of the 4.7 kernel series must upgrade.
The updated 4.7.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.7.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/virtual/kvm/devices/vcpu.txt | 4 - Makefile | 2 arch/arm/boot/dts/armada-390.dtsi | 3 arch/arm/boot/dts/qcom-apq8064.dtsi | 76 ++++++++++++++++----- arch/arm64/kernel/stacktrace.c | 5 + arch/arm64/kernel/traps.c | 10 +- arch/mips/kvm/emulate.c | 63 +++++++++++++++--- arch/powerpc/include/asm/pci-bridge.h | 1 arch/powerpc/include/asm/reg.h | 1 arch/powerpc/kernel/pci-common.c | 36 ++++++++++ arch/powerpc/kvm/book3s_emulate.c | 2 arch/powerpc/kvm/booke.c | 2 arch/powerpc/platforms/pseries/pci.c | 4 + arch/powerpc/platforms/pseries/pci_dlpar.c | 7 +- arch/x86/include/asm/fpu/xstate.h | 7 +- arch/x86/include/asm/mpspec.h | 2 arch/x86/kernel/acpi/boot.c | 2 arch/x86/kernel/apic/apic.c | 17 ++-- arch/x86/kernel/apic/io_apic.c | 4 - arch/x86/kernel/apic/probe_32.c | 2 arch/x86/kernel/apic/vector.c | 23 +++++- arch/x86/kernel/e820.c | 14 +--- arch/x86/kernel/process_64.c | 13 ++- arch/x86/kernel/ptrace.c | 4 - arch/x86/kernel/smpboot.c | 28 +++++--- arch/x86/xen/smp.c | 6 + drivers/char/tpm/tpm-dev.c | 2 drivers/char/tpm/tpm-interface.c | 51 ++++++++------ drivers/char/tpm/tpm-sysfs.c | 2 drivers/char/tpm/tpm.h | 12 ++- drivers/char/tpm/tpm2-cmd.c | 101 ++++++++++++++++++----------- drivers/char/tpm/tpm_crb.c | 7 +- drivers/cpuidle/cpuidle-arm.c | 1 drivers/mfd/Kconfig | 1 drivers/mfd/atmel-hlcdc.c | 5 - drivers/mfd/rtsx_usb.c | 10 +- drivers/misc/cxl/vphb.c | 10 ++ drivers/pci/host-bridge.c | 1 drivers/usb/dwc3/gadget.c | 3 include/linux/mfd/88pm80x.h | 4 - kernel/time/timekeeping.c | 7 +- security/integrity/ima/ima_appraise.c | 4 - security/integrity/ima/ima_main.c | 2 sound/pci/ali5451/ali5451.c | 2 sound/usb/line6/driver.c | 2 sound/usb/mixer_quirks.c | 22 ++++-- virt/kvm/arm/pmu.c | 8 ++ virt/kvm/arm/vgic/vgic.c | 6 + 48 files changed, 425 insertions(+), 176 deletions(-)
Andrew Donnellan (1):
cxl: use pcibios_free_controller_deferred() when removing vPHBs
Anssi Hannula (1):
ALSA: usb-audio: Extend DragonFly dB scale quirk to cover other variants
Boris Brezillon (1):
mfd: atmel-hlcdc: Do not sleep in atomic context
Boris Ostrovsky (1):
xen/x86: Update topology map for PV VCPUs
Christoffer Dall (2):
KVM: arm64: Require in-kernel irqchip for PMU support
KVM: arm/arm64: vgic: Don't flush/sync without a working vgic
Christophe Jaillet (1):
ARM: cpuidle: Fix error return code
Dan Carpenter (2):
mfd: 88pm80x: Double shifting bug in suspend/resume
KVM: PPC: BookE: Fix a sanity check
Dan Williams (1):
x86/boot: Fix kdump, cleanup aborted E820_PRAM max_pfn manipulation
Dave Hansen (1):
x86/pkeys: Make protection keys an "eager" feature
Denys Vlasenko (1):
x86/apic: Get rid of apic_version[] array
Greg Kroah-Hartman (1):
Linux 4.7.8
Grzegorz Jaszczyk (1):
ARM: dts: mvebu: armada-390: add missing compatibility string and bracket
James Hogan (1):
KVM: MIPS: Drop other CPU ASIDs on guest MMU changes
Jarkko Sakkinen (2):
tpm: fix a race condition in tpm2_unseal_trusted()
tpm_crb: fix crb_req_canceled behavior
John Stultz (1):
timekeeping: Fix __ktime_get_fast_ns() regression
Josh Poimboeuf (1):
x86/dumpstack: Fix x86_32 kernel_stack_pointer() previous stack access
Linus Walleij (1):
ARM: dts: MSM8064 remove flags from SPMI/MPP IRQs
Lu Baolu (2):
usb: dwc3: fix Clear Stall EP command failure
mfd: rtsx_usb: Avoid setting ucr->current_sg.status
Mark Rutland (1):
arm64: fix dump_backtrace/unwind_frame with NULL tsk
Mauricio Faria de Oliveira (1):
powerpc/pseries: use pci_host_bridge.release_fn() to kfree(phb)
Mika Westerberg (1):
x86/irq: Prevent force migration of irqs which are not in the vector domain
Miklos Szeredi (1):
ima: use file_dentry()
Nicolas Iooss (1):
x86/mm/pkeys: Do not skip PKRU register if debug registers are not used
Prarit Bhargava (1):
arch/x86: Handle non enumerated CPU after physical hotplug
Takashi Iwai (1):
ALSA: ali5451: Fix out-of-bound position reporting
Takashi Sakamoto (1):
ALSA: usb-line6: use the same declaration as definition in header for MIDI manufacturer ID
Thomas Huth (1):
KVM: PPC: Book3s PR: Allow access to unprivileged MMCR2 register
Uwe Kleine-König (1):
mfd: wm8350-i2c: Make sure the i2c regmap functions are compiled
Greg KH
maintainerDocumentation/virtual/kvm/devices/vcpu.txt +3 -1
@@ -30,4 +30,6 @@ Returns: -ENODEV: PMUv3 not supported attribute -EBUSY: PMUv3 already initialized -Request the initialization of the PMUv3. +Request the initialization of the PMUv3. This must be done after creating the +in-kernel irqchip. Creating a PMU with a userspace irqchip is currently not +supported.
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 7 -SUBLEVEL = 7 +SUBLEVEL = 8 EXTRAVERSION = NAME = Psychotic Stoned Sheep
arch/arm/boot/dts/armada-390.dtsi +3 -0
@@ -47,6 +47,8 @@ #include "armada-39x.dtsi" / { + compatible = "marvell,armada390"; + soc { internal-regs { pinctrl@18000 {
@@ -54,4 +56,5 @@ reg = <0x18000 0x20>; }; }; + }; };
arch/arm/boot/dts/qcom-apq8064.dtsi +57 -19
94 lines not on this page · raw message
arch/arm64/kernel/stacktrace.c +4 -1
@@ -43,6 +43,9 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame)unsigned long fp = frame->fp;unsigned long irq_stack_ptr; +if (!tsk) + tsk = current; +/* * Switching between stacks is valid when tracing current and in * non-preemptible context.
@@ -67,7 +70,7 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame) frame->pc =READ_ONCE_NOCHECK (*(unsigned long *)(fp +8 ));#ifdef CONFIG_FUNCTION_GRAPH_TRACER -if (tsk && tsk->ret_stack && +if (tsk->ret_stack && (frame->pc == (unsigned long )return_to_handler)) {/* * This is a case where function graph tracer has
arch/arm64/kernel/traps.c +5 -5
@@ -149,6 +149,11 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)unsigned long irq_stack_ptr;int skip; +pr_debug ("%s(regs = %p tsk = %p)\n" , __func__, regs, tsk); + +if (!tsk) + tsk = current; +/* * Switching between stacks is valid when tracing current and in * non-preemptible context.
@@ -158,11 +163,6 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)else irq_stack_ptr =0 ; -pr_debug ("%s(regs = %p tsk = %p)\n" , __func__, regs, tsk); - -if (!tsk) - tsk = current; -if (tsk == current) { frame.fp = (unsigned long )__builtin_frame_address (0 ); frame.sp = current_stack_pointer;
arch/mips/kvm/emulate.c +53 -10
95 lines not on this page · raw message
arch/powerpc/include/asm/pci-bridge.h +1 -0
@@ -299,6 +299,7 @@ extern void pci_process_bridge_OF_ranges(struct pci_controller *hose,/* Allocate & free a PCI host bridge structure */ extern struct pci_controller *pcibios_alloc_controller (struct device_node *dev);extern void pcibios_free_controller (struct pci_controller *phb); +extern void pcibios_free_controller_deferred (struct pci_host_bridge *bridge);#ifdef CONFIG_PCI extern int pcibios_vaddr_is_ioport (void __iomem *address);
arch/powerpc/include/asm/reg.h +1 -0
@@ -718,6 +718,7 @@#define MMCR0_FCHV 0x00000001UL/* freeze conditions in hypervisor mode */ #define SPRN_MMCR1 798#define SPRN_MMCR2 785 +#define SPRN_UMMCR2 769#define SPRN_MMCRA 0x312#define MMCRA_SDSYNC 0x80000000UL/* SDAR synced with SIAR */ #define MMCRA_SDAR_DCACHE_MISS 0x40000000UL
arch/powerpc/kernel/pci-common.c +36 -0
@@ -103,6 +103,42 @@ void pcibios_free_controller(struct pci_controller *phb)EXPORT_SYMBOL_GPL (pcibios_free_controller);/* +* This function is used to call pcibios_free_controller() +* in a deferred manner: a callback from the PCI subsystem. +* +* _*DO NOT*_ call pcibios_free_controller() explicitly if +* this is used (or it may access an invalid *phb pointer). +* +* The callback occurs when all references to the root bus +* are dropped (e.g., child buses/devices and their users). +* +* It's called as .release_fn() of 'struct pci_host_bridge' +* which is associated with the 'struct pci_controller.bus' +* (root bus) - it expects .release_data to hold a pointer +* to 'struct pci_controller'. +* +* In order to use it, register .release_fn()/release_data +* like this: +* +* pci_set_host_bridge_release(bridge, +* pcibios_free_controller_deferred +* (void *) phb); +* +* e.g. in the pcibios_root_bridge_prepare() callback from +* pci_create_root_bus(). +*/ +void pcibios_free_controller_deferred (struct pci_host_bridge *bridge) +{ +struct pci_controller *phb = (struct pci_controller *) + bridge->release_data; + +pr_debug ("domain %d, dynamic %d\n" , phb->global_number, phb->is_dynamic); + +pcibios_free_controller (phb); +} +EXPORT_SYMBOL_GPL (pcibios_free_controller_deferred); + +/* * The function is used to return the minimal alignment * for memory or I/O windows of the associated P2P bridge. * By default, 4KiB alignment for I/O windows and 1MiB for
arch/powerpc/kvm/book3s_emulate.c +2 -0
@@ -498,6 +498,7 @@ int kvmppc_core_emulate_mtspr_pr(struct kvm_vcpu *vcpu, int sprn, ulong spr_val)case SPRN_MMCR0 :case SPRN_MMCR1 :case SPRN_MMCR2 : +case SPRN_UMMCR2 :#endif break ; unprivileged:
@@ -640,6 +641,7 @@ int kvmppc_core_emulate_mfspr_pr(struct kvm_vcpu *vcpu, int sprn, ulong *spr_valcase SPRN_MMCR0 :case SPRN_MMCR1 :case SPRN_MMCR2 : +case SPRN_UMMCR2 :case SPRN_TIR :#endif *spr_val =0 ;
arch/powerpc/kvm/booke.c +1 -1
@@ -2038,7 +2038,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu,if (type ==KVMPPC_DEBUG_NONE )continue ; -if (type & !(KVMPPC_DEBUG_WATCH_READ | +if (type & ~(KVMPPC_DEBUG_WATCH_READ |KVMPPC_DEBUG_WATCH_WRITE |KVMPPC_DEBUG_BREAKPOINT ))return -EINVAL ;
arch/powerpc/platforms/pseries/pci.c +4 -0
@@ -119,6 +119,10 @@ int pseries_root_bridge_prepare(struct pci_host_bridge *bridge) bus = bridge->bus; +/* Rely on the pcibios_free_controller_deferred() callback. */ +pci_set_host_bridge_release (bridge, pcibios_free_controller_deferred, + (void *)pci_bus_to_host (bus)); + dn =pcibios_get_phb_of_node (bus);if (!dn)return 0 ;
arch/powerpc/platforms/pseries/pci_dlpar.c +5 -2
@@ -106,8 +106,11 @@ int remove_phb_dynamic(struct pci_controller *phb)release_resource (res); } -/* Free pci_controller data structure */ -pcibios_free_controller (phb); +/* +* The pci_controller data structure is freed by +* the pcibios_free_controller_deferred() callback; +* see pseries_root_bridge_prepare(). +*/ return 0 ; }
arch/x86/include/asm/fpu/xstate.h +4 -3
@@ -24,11 +24,12 @@ XFEATURE_MASK_YMM | \ XFEATURE_MASK_OPMASK | \ XFEATURE_MASK_ZMM_Hi256 | \ - XFEATURE_MASK_Hi16_ZMM | \ - XFEATURE_MASK_PKRU) + XFEATURE_MASK_Hi16_ZMM)/* Supported features which require eager state saving */ -#define XFEATURE_MASK_EAGER (XFEATURE_MASK_BNDREGS | XFEATURE_MASK_BNDCSR) +#define XFEATURE_MASK_EAGER (XFEATURE_MASK_BNDREGS | \ + XFEATURE_MASK_BNDCSR | \ + XFEATURE_MASK_PKRU)/* All currently supported features */ #define XCNTXT_MASK (XFEATURE_MASK_LAZY | XFEATURE_MASK_EAGER)
arch/x86/include/asm/mpspec.h +1 -1
@@ -6,7 +6,6 @@#include <asm/x86_init.h> #include <asm/apicdef.h> -extern int apic_version[];extern int pic_mode;#ifdef CONFIG_X86_32
@@ -40,6 +39,7 @@ extern int mp_bus_id_to_type[MAX_MP_BUSSES]; extern DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);extern unsigned int boot_cpu_physical_apicid; +extern u8 boot_cpu_apic_version;extern unsigned long mp_lapic_addr;#ifdef CONFIG_X86_LOCAL_APIC
arch/x86/kernel/acpi/boot.c +1 -1
@@ -180,7 +180,7 @@ static int acpi_register_lapic(int id, u8 enabled) }if (boot_cpu_physical_apicid !=-1U ) - ver = apic_version[boot_cpu_physical_apicid]; + ver = boot_cpu_apic_version;return generic_processor_info (id, ver); }
arch/x86/kernel/apic/apic.c +7 -10
@@ -64,6 +64,8 @@ unsigned disabled_cpus;unsigned int boot_cpu_physical_apicid =-1U ;EXPORT_SYMBOL_GPL (boot_cpu_physical_apicid); +u8 boot_cpu_apic_version; +/* * The highest APIC ID seen during enumeration. */
@@ -1790,8 +1792,7 @@ void __init init_apic_mappings(void)* since smp_sanity_check is prepared for such a case * and disable smp mode */ - apic_version[new_apicid] = -GET_APIC_VERSION (apic_read (APIC_LVR )); + boot_cpu_apic_version =GET_APIC_VERSION (apic_read (APIC_LVR )); } }
@@ -1806,13 +1807,10 @@ void __init register_lapic_address(unsigned long address) }if (boot_cpu_physical_apicid ==-1U ) { boot_cpu_physical_apicid =read_apic_id (); - apic_version[boot_cpu_physical_apicid] = -GET_APIC_VERSION (apic_read (APIC_LVR )); + boot_cpu_apic_version =GET_APIC_VERSION (apic_read (APIC_LVR )); } } -int apic_version[MAX_LOCAL_APIC ]; -/* * Local APIC interrupts */
@@ -2102,11 +2100,10 @@ int generic_processor_info(int apicid, int version) cpu, apicid); version =0x10 ; } - apic_version[apicid] = version; -if (version != apic_version[boot_cpu_physical_apicid]) { +if (version != boot_cpu_apic_version) {pr_warning ("BIOS bug: APIC version mismatch, boot CPU: %x, CPU %d: version %x\n" , - apic_version[boot_cpu_physical_apicid], cpu, version); + boot_cpu_apic_version, cpu, version); }physid_set (apicid, phys_cpu_present_map);
@@ -2249,7 +2246,7 @@ int __init APIC_init_uniprocessor(void)* Complain if the BIOS pretends there is one. */ if (!boot_cpu_has (X86_FEATURE_APIC ) && -APIC_INTEGRATED (apic_version[boot_cpu_physical_apicid])) { +APIC_INTEGRATED (boot_cpu_apic_version)) {pr_err ("BIOS bug, local APIC 0x%x not detected!...\n" , boot_cpu_physical_apicid);return -1 ;
arch/x86/kernel/apic/io_apic.c +2 -2
@@ -1592,7 +1592,7 @@ void __init setup_ioapic_ids_from_mpc(void)* no meaning without the serial APIC bus. */ if (!(boot_cpu_data.x86_vendor ==X86_VENDOR_INTEL ) - ||APIC_XAPIC (apic_version[boot_cpu_physical_apicid])) + ||APIC_XAPIC (boot_cpu_apic_version))return ;setup_ioapic_ids_from_mpc_nocheck (); }
@@ -2422,7 +2422,7 @@ static int io_apic_get_unique_id(int ioapic, int apic_id)static u8 io_apic_unique_id (int idx,u8 id) {if ((boot_cpu_data.x86_vendor ==X86_VENDOR_INTEL ) && - !APIC_XAPIC (apic_version[boot_cpu_physical_apicid])) + !APIC_XAPIC (boot_cpu_apic_version))return io_apic_get_unique_id (idx, id);else return id;
arch/x86/kernel/apic/probe_32.c +1 -1
@@ -153,7 +153,7 @@ early_param("apic", parse_apic);void __init default_setup_apic_routing (void ) { -int version = apic_version[boot_cpu_physical_apicid]; +int version = boot_cpu_apic_version;if (num_possible_cpus () >8 ) {switch (boot_cpu_data.x86_vendor) {
arch/x86/kernel/apic/vector.c +20 -3
@@ -661,11 +661,28 @@ void irq_complete_move(struct irq_cfg *cfg)*/ void irq_force_complete_move (struct irq_desc *desc) { -struct irq_data *irqdata =irq_desc_get_irq_data (desc); -struct apic_chip_data *data =apic_chip_data (irqdata); -struct irq_cfg *cfg = data ? &data->cfg :NULL ; +struct irq_data *irqdata; +struct apic_chip_data *data; +struct irq_cfg *cfg;unsigned int cpu; +/* +* The function is called for all descriptors regardless of which +* irqdomain they belong to. For example if an IRQ is provided by +* an irq_chip as part of a GPIO driver, the chip data for that +* descriptor is specific to the irq_chip in question. +* +* Check first that the chip_data is what we expect +* (apic_chip_data) before touching it any further. +*/ + irqdata =irq_domain_get_irq_data (x86_vector_domain, +irq_desc_get_irq (desc)); +if (!irqdata) +return ; + + data =apic_chip_data (irqdata); + cfg = data ? &data->cfg :NULL ; +if (!cfg)return ;
arch/x86/kernel/e820.c +5 -9
@@ -348,7 +348,7 @@ int __init sanitize_e820_map(struct e820entry *biosmap, int max_nr_map,* continue building up new bios map based on this * information */ -if (current_type != last_type || current_type ==E820_PRAM ) { +if (current_type != last_type) {if (last_type !=0 ) { new_bios[new_bios_entry].size = change_point[chgidx]->addr - last_addr;
@@ -754,7 +754,7 @@ u64 __init early_reserve_e820(u64 size, u64 align)/* * Find the highest page frame number we have available */ -static unsigned long __init e820_end_pfn (unsigned long limit_pfn) +static unsigned long __init e820_end_pfn (unsigned long limit_pfn,unsigned type) {int i;unsigned long last_pfn =0 ;
@@ -765,11 +765,7 @@ static unsigned long __init e820_end_pfn(unsigned long limit_pfn)unsigned long start_pfn;unsigned long end_pfn; -/* -* Persistent memory is accounted as ram for purposes of -* establishing max_pfn and mem_map. -*/ -if (ei->type !=E820_RAM && ei->type !=E820_PRAM ) +if (ei->type != type)continue ; start_pfn = ei->addr >>PAGE_SHIFT ;
@@ -794,12 +790,12 @@ static unsigned long __init e820_end_pfn(unsigned long limit_pfn) }unsigned long __init e820_end_of_ram_pfn (void ) { -return e820_end_pfn (MAX_ARCH_PFN ); +return e820_end_pfn (MAX_ARCH_PFN ,E820_RAM ); }unsigned long __init e820_end_of_low_ram_pfn (void ) { -return e820_end_pfn (1UL << (32 -PAGE_SHIFT )); +return e820_end_pfn (1UL << (32 -PAGE_SHIFT ),E820_RAM ); }static void early_panic (char *msg)
arch/x86/kernel/process_64.c +7 -6
@@ -110,12 +110,13 @@ void __show_regs(struct pt_regs *regs, int all)get_debugreg (d7,7 );/* Only print out debug registers if they are in their non-default state. */ -if ((d0 ==0 ) && (d1 ==0 ) && (d2 ==0 ) && (d3 ==0 ) && - (d6 ==DR6_RESERVED ) && (d7 ==0x400 )) -return ; - -printk (KERN_DEFAULT "DR0: %016lx DR1: %016lx DR2: %016lx\n" , d0, d1, d2); -printk (KERN_DEFAULT "DR3: %016lx DR6: %016lx DR7: %016lx\n" , d3, d6, d7); +if (!((d0 ==0 ) && (d1 ==0 ) && (d2 ==0 ) && (d3 ==0 ) && + (d6 ==DR6_RESERVED ) && (d7 ==0x400 ))) { +printk (KERN_DEFAULT "DR0: %016lx DR1: %016lx DR2: %016lx\n" , + d0, d1, d2); +printk (KERN_DEFAULT "DR3: %016lx DR6: %016lx DR7: %016lx\n" , + d3, d6, d7); + }if (boot_cpu_has (X86_FEATURE_OSPKE ))printk (KERN_DEFAULT "PKRU: %08x\n" ,read_pkru ());
arch/x86/kernel/ptrace.c +2 -2
@@ -173,8 +173,8 @@ unsigned long kernel_stack_pointer(struct pt_regs *regs)return sp; prev_esp = (u32 *)(context); -if (prev_esp) -return (unsigned long )prev_esp; +if (*prev_esp) +return (unsigned long )*prev_esp;return (unsigned long )regs; }
arch/x86/kernel/smpboot.c +20 -8
@@ -676,7 +676,7 @@ wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip)* Give the other CPU some time to accept the IPI. */ udelay (200 ); -if (APIC_INTEGRATED (apic_version[boot_cpu_physical_apicid])) { +if (APIC_INTEGRATED (boot_cpu_apic_version)) { maxlvt =lapic_get_maxlvt ();if (maxlvt >3 )/* Due to the Pentium erratum 3AP. */ apic_write (APIC_ESR ,0 );
@@ -703,7 +703,7 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)/* * Be paranoid about clearing APIC errors. */ -if (APIC_INTEGRATED (apic_version[phys_apicid])) { +if (APIC_INTEGRATED (boot_cpu_apic_version)) {if (maxlvt >3 )/* Due to the Pentium erratum 3AP. */ apic_write (APIC_ESR ,0 );apic_read (APIC_ESR );
@@ -742,7 +742,7 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)* Determine this based on the APIC version. * If we don't have an integrated APIC, don't send the STARTUP IPIs. */ -if (APIC_INTEGRATED (apic_version[phys_apicid])) +if (APIC_INTEGRATED (boot_cpu_apic_version)) num_starts =2 ;else num_starts =0 ;
@@ -980,7 +980,7 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)/* * Be paranoid about clearing APIC errors. */ -if (APIC_INTEGRATED (apic_version[boot_cpu_physical_apicid])) { +if (APIC_INTEGRATED (boot_cpu_apic_version)) {apic_write (APIC_ESR ,0 );apic_read (APIC_ESR ); }
@@ -1235,7 +1235,7 @@ static int __init smp_sanity_check(unsigned max_cpus)/* * If we couldn't find a local APIC, then get out of here now! */ -if (APIC_INTEGRATED (apic_version[boot_cpu_physical_apicid]) && +if (APIC_INTEGRATED (boot_cpu_apic_version) && !boot_cpu_has (X86_FEATURE_APIC )) {if (!disable_apic) { pr_err("BIOS bug, local APIC #%d not detected!...\n",
@@ -1393,9 +1393,21 @@ __init void prefill_possible_map(void) {int i, possible; -/* no processor from mptable or madt */ -if (!num_processors) - num_processors =1 ; +/* No boot processor was found in mptable or ACPI MADT */ +if (!num_processors) { +int apicid = boot_cpu_physical_apicid; +int cpu =hard_smp_processor_id (); + +pr_warn ("Boot CPU (id %d) not listed by BIOS\n" , cpu); + +/* Make sure boot cpu is enumerated */ +if (apic->cpu_present_to_apicid (0 ) ==BAD_APICID && + apic->apic_id_valid (apicid)) +generic_processor_info (apicid, boot_cpu_apic_version); + +if (!num_processors) + num_processors =1 ; + } i = setup_max_cpus ?:1 ;if (setup_possible_cpus ==-1 ) {
arch/x86/xen/smp.c +6 -0
@@ -87,6 +87,12 @@ static void cpu_bringup(void)cpu_data (cpu).x86_max_cores =1 ;set_cpu_sibling_map (cpu); +/* +* identify_cpu() may have set logical_pkg_id to -1 due +* to incorrect phys_proc_id. Let's re-comupte it. +*/ +topology_update_package_map (apic->cpu_present_to_apicid (cpu), cpu); +xen_setup_cpu_clockevents ();notify_cpu_starting (cpu);
drivers/char/tpm/tpm-dev.c +1 -1
@@ -139,7 +139,7 @@ static ssize_t tpm_write(struct file *file, const char __user *buf,/* atomic tpm command send and result receive */ out_size =tpm_transmit (priv->chip, priv->data_buffer, -sizeof (priv->data_buffer)); +sizeof (priv->data_buffer),0 );if (out_size <0 ) {mutex_unlock (&priv->buffer_mutex);return out_size;
drivers/char/tpm/tpm-interface.c +28 -23
162 lines not on this page · raw message
drivers/char/tpm/tpm-sysfs.c +1 -1
@@ -39,7 +39,7 @@ static ssize_t pubek_show(struct device *dev, struct device_attribute *attr,struct tpm_chip *chip =dev_get_drvdata (dev); tpm_cmd.header.in = tpm_readpubek_header; - err =tpm_transmit_cmd (chip, &tpm_cmd,READ_PUBEK_RESULT_SIZE , + err =tpm_transmit_cmd (chip, &tpm_cmd,READ_PUBEK_RESULT_SIZE ,0 ,"attempting to read the PUBEK" );if (err) goto out;
drivers/char/tpm/tpm.h +8 -4
@@ -494,11 +494,15 @@ extern struct class *tpm_class;extern dev_t tpm_devt;extern const struct file_operations tpm_fops; +enum tpm_transmit_flags { +TPM_TRANSMIT_UNLOCKED =BIT (0 ), +}; + +ssize_t tpm_transmit (struct tpm_chip *chip,const u8 *buf,size_t bufsiz, +unsigned int flags); +ssize_t tpm_transmit_cmd (struct tpm_chip *chip,const void *cmd,int len, +unsigned int flags,const char *desc);ssize_t tpm_getcap (struct device *,__be32 ,cap_t *,const char *); -ssize_t tpm_transmit (struct tpm_chip *chip,const char *buf, -size_t bufsiz); -ssize_t tpm_transmit_cmd (struct tpm_chip *chip,void *cmd,int len, -const char *desc);extern int tpm_get_timeouts (struct tpm_chip *);extern void tpm_gen_interrupt (struct tpm_chip *);extern int tpm_do_selftest (struct tpm_chip *);
drivers/char/tpm/tpm2-cmd.c +65 -36
221 lines not on this page · raw message
drivers/char/tpm/tpm_crb.c +5 -2
@@ -142,6 +142,11 @@ static int crb_send(struct tpm_chip *chip, u8 *buf, size_t len)struct crb_priv *priv = chip->vendor.priv;int rc =0 ; +/* Zero the cancel register so that the next command will not get +* canceled. +*/ +iowrite32 (0 , &priv->cca->cancel); +if (len >ioread32 (&priv->cca->cmd_size)) { dev_err(&chip->dev, "invalid command count value %x %zx\n",
@@ -175,8 +180,6 @@ static void crb_cancel(struct tpm_chip *chip)if ((priv->flags &CRB_FL_ACPI_START ) &&crb_do_acpi_start (chip))dev_err (&chip->dev,"ACPI Start failed\n" ); - -iowrite32 (0 , &priv->cca->cancel); }static bool crb_req_canceled (struct tpm_chip *chip,u8 status)
drivers/cpuidle/cpuidle-arm.c +1 -0
@@ -135,6 +135,7 @@ static int __init arm_idle_init(void) dev =kzalloc (sizeof (*dev),GFP_KERNEL );if (!dev) {pr_err ("Failed to allocate cpuidle device\n" ); + ret = -ENOMEM ; goto out_fail; } dev->cpu = cpu;
drivers/mfd/Kconfig +1 -0
@@ -1535,6 +1535,7 @@ config MFD_WM8350 config MFD_WM8350_I2C bool "Wolfson Microelectronics WM8350 with I2C" select MFD_WM8350 + select REGMAP_I2C depends on I2C=y help The WM8350 is an integrated audio and power management
drivers/mfd/atmel-hlcdc.c +3 -2
@@ -50,8 +50,9 @@ static int regmap_atmel_hlcdc_reg_write(void *context, unsigned int reg,if (reg <=ATMEL_HLCDC_DIS ) {u32 status; -readl_poll_timeout (hregmap->regs +ATMEL_HLCDC_SR , status, - !(status &ATMEL_HLCDC_SIP ),1 ,100 ); +readl_poll_timeout_atomic (hregmap->regs +ATMEL_HLCDC_SR , + status, !(status &ATMEL_HLCDC_SIP ), +1 ,100 ); }writel (val, hregmap->regs + reg);
drivers/mfd/rtsx_usb.c +5 -5
@@ -46,9 +46,6 @@ static void rtsx_usb_sg_timed_out(unsigned long data)dev_dbg (&ucr->pusb_intf->dev,"%s: sg transfer timed out" , __func__);usb_sg_cancel (&ucr->current_sg); - -/* we know the cancellation is caused by time-out */ - ucr->current_sg.status = -ETIMEDOUT ; } static int rtsx_usb_bulk_transfer_sglist(struct rtsx_ucr *ucr,
@@ -67,12 +64,15 @@ static int rtsx_usb_bulk_transfer_sglist(struct rtsx_ucr *ucr, ucr->sg_timer.expires = jiffies +msecs_to_jiffies (timeout);add_timer (&ucr->sg_timer);usb_sg_wait (&ucr->current_sg); -del_timer_sync (&ucr->sg_timer); +if (!del_timer_sync (&ucr->sg_timer)) + ret = -ETIMEDOUT ; +else + ret = ucr->current_sg.status;if (act_len) *act_len = ucr->current_sg.bytes; -return ucr->current_sg.status; +return ret; } int rtsx_usb_transfer_data(struct rtsx_ucr *ucr, unsigned int pipe,
drivers/misc/cxl/vphb.c +9 -1
@@ -243,6 +243,11 @@ int cxl_pci_vphb_add(struct cxl_afu *afu)if (phb->bus ==NULL )return -ENXIO ; +/* Set release hook on root bus */ +pci_set_host_bridge_release (to_pci_host_bridge (phb->bus->bridge), + pcibios_free_controller_deferred, + (void *) phb); +/* Claim resources. This might need some rework as well depending * whether we are doing probe-only or not, like assigning unassigned * resources etc...
@@ -269,7 +274,10 @@ void cxl_pci_vphb_remove(struct cxl_afu *afu) afu->phb =NULL ;pci_remove_root_bus (phb->bus); -pcibios_free_controller (phb); +/* +* We don't free phb here - that's handled by +* pcibios_free_controller_deferred() +*/ }bool cxl_pci_is_vphb_device (struct pci_dev *dev)
drivers/pci/host-bridge.c +1 -0
@@ -44,6 +44,7 @@ void pci_set_host_bridge_release(struct pci_host_bridge *bridge, bridge->release_fn = release_fn; bridge->release_data = release_data; } +EXPORT_SYMBOL_GPL (pci_set_host_bridge_release);void pcibios_resource_to_bus (struct pci_bus *bus,struct pci_bus_region *region,struct resource *res)
drivers/usb/dwc3/gadget.c +2 -1
@@ -363,7 +363,8 @@ static int dwc3_send_clear_stall_ep_cmd(struct dwc3_ep *dep)* IN transfers due to a mishandled error condition. Synopsys * STAR 9000614252. */ -if (dep->direction && (dwc->revision >=DWC3_REVISION_260A )) +if (dep->direction && (dwc->revision >=DWC3_REVISION_260A ) && + (dwc->gadget.speed >=USB_SPEED_SUPER )) cmd |=DWC3_DEPCMD_CLEARPENDIN ;memset (¶ms,0 ,sizeof (params));
include/linux/mfd/88pm80x.h +2 -2
@@ -350,7 +350,7 @@ static inline int pm80x_dev_suspend(struct device *dev)int irq =platform_get_irq (pdev,0 );if (device_may_wakeup (dev)) -set_bit ((1 << irq), &chip->wu_flag); +set_bit (irq, &chip->wu_flag);return 0 ; }
@@ -362,7 +362,7 @@ static inline int pm80x_dev_resume(struct device *dev)int irq =platform_get_irq (pdev,0 );if (device_may_wakeup (dev)) -clear_bit ((1 << irq), &chip->wu_flag); +clear_bit (irq, &chip->wu_flag);return 0 ; }
kernel/time/timekeeping.c +5 -2
@@ -403,8 +403,11 @@ static __always_inline u64 __ktime_get_fast_ns(struct tk_fast *tkf) tkr = tkf->base + (seq &0x01 ); now =ktime_to_ns (tkr->base); - now +=clocksource_delta (tkr->read (tkr->clock), - tkr->cycle_last, tkr->mask); + now +=timekeeping_delta_to_ns (tkr, +clocksource_delta ( + tkr->read (tkr->clock), + tkr->cycle_last, + tkr->mask)); }while (read_seqcount_retry (&tkf->seq, seq));return now;
security/integrity/ima/ima_appraise.c +2 -2
@@ -190,7 +190,7 @@ int ima_appraise_measurement(enum ima_hooks func, {static const char op[] ="appraise_data" ;char *cause ="unknown" ; -struct dentry *dentry = file->f_path.dentry; +struct dentry *dentry =file_dentry (file);struct inode *inode =d_backing_inode (dentry);enum integrity_status status =INTEGRITY_UNKNOWN ;int rc = xattr_len, hash_start =0 ;
@@ -295,7 +295,7 @@ out:*/ void ima_update_xattr (struct integrity_iint_cache *iint,struct file *file) { -struct dentry *dentry = file->f_path.dentry; +struct dentry *dentry =file_dentry (file);int rc =0 ;/* do not collect and update hash for digital signatures */
security/integrity/ima/ima_main.c +1 -1
@@ -222,7 +222,7 @@ static int process_measurement(struct file *file, char *buf, loff_t size,if ((action &IMA_APPRAISE_SUBMASK ) ||strcmp (template_desc->name,IMA_TEMPLATE_IMA_NAME ) !=0 )/* read 'security.ima' */ - xattr_len =ima_read_xattr (file->f_path.dentry, &xattr_value); + xattr_len =ima_read_xattr (file_dentry (file), &xattr_value); hash_algo =ima_get_hash_algo (xattr_value, xattr_len);
sound/pci/ali5451/ali5451.c +2 -0
@@ -1408,6 +1408,7 @@ snd_ali_playback_pointer(struct snd_pcm_substream *substream)spin_unlock (&codec->reg_lock);dev_dbg (codec->card->dev,"playback pointer returned cso=%xh.\n" , cso); + cso %= runtime->buffer_size;return cso; }
@@ -1428,6 +1429,7 @@ static snd_pcm_uframes_t snd_ali_pointer(struct snd_pcm_substream *substream) cso =inw (ALI_REG (codec,ALI_CSO_ALPHA_FMS +2 ));spin_unlock (&codec->reg_lock); + cso %= runtime->buffer_size;return cso; }
sound/usb/line6/driver.c +1 -1
@@ -29,7 +29,7 @@/* This is Line 6's MIDI manufacturer ID. */ -const unsigned char line6_midi_id[] = { +const unsigned char line6_midi_id[3 ] = {0x00 ,0x01 ,0x0c };EXPORT_SYMBOL_GPL (line6_midi_id);
sound/usb/mixer_quirks.c +16 -6
@@ -1831,6 +1831,7 @@ void snd_usb_mixer_rc_memory_change(struct usb_mixer_interface *mixer, }static void snd_dragonfly_quirk_db_scale (struct usb_mixer_interface *mixer, +struct usb_mixer_elem_info *cval,struct snd_kcontrol *kctl) {/* Approximation using 10 ranges based on output measurement on hw v1.2.
@@ -1848,10 +1849,19 @@ static void snd_dragonfly_quirk_db_scale(struct usb_mixer_interface *mixer, 41, 50, TLV_DB_MINMAX_ITEM(-441, 0), ); -usb_audio_info (mixer->chip,"applying DragonFly dB scale quirk\n" ); - kctl->tlv.p = scale; - kctl->vd[0 ].access |=SNDRV_CTL_ELEM_ACCESS_TLV_READ ; - kctl->vd[0 ].access &= ~SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK ; +if (cval->min ==0 && cval->max ==50 ) { +usb_audio_info (mixer->chip,"applying DragonFly dB scale quirk (0-50 variant)\n" ); + kctl->tlv.p = scale; + kctl->vd[0 ].access |=SNDRV_CTL_ELEM_ACCESS_TLV_READ ; + kctl->vd[0 ].access &= ~SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK ; + + }else if (cval->min ==0 && cval->max <=1000 ) { +/* Some other clearly broken DragonFly variant. +* At least a 0..53 variant (hw v1.0) exists. +*/ +usb_audio_info (mixer->chip,"ignoring too narrow dB range on a DragonFly device" ); + kctl->vd[0 ].access &= ~SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK ; + } } void snd_usb_mixer_fu_apply_quirk(struct usb_mixer_interface *mixer,
@@ -1860,8 +1870,8 @@ void snd_usb_mixer_fu_apply_quirk(struct usb_mixer_interface *mixer, {switch (mixer->chip->usb_id) {case USB_ID (0x21b4 ,0x0081 ):/* AudioQuest DragonFly */ -if (unitid ==7 && cval->min ==0 && cval->max ==50 ) -snd_dragonfly_quirk_db_scale (mixer, kctl); +if (unitid ==7 && cval->control ==UAC_FU_VOLUME ) +snd_dragonfly_quirk_db_scale (mixer, cval, kctl);break ; } }
virt/kvm/arm/pmu.c +8 -0
@@ -423,6 +423,14 @@ static int kvm_arm_pmu_v3_init(struct kvm_vcpu *vcpu)if (!kvm_arm_support_pmu_v3 ())return -ENODEV ; +/* +* We currently require an in-kernel VGIC to use the PMU emulation, +* because we do not support forwarding PMU overflow interrupts to +* userspace yet. +*/ +if (!irqchip_in_kernel (vcpu->kvm) || !vgic_initialized (vcpu->kvm)) +return -ENODEV ; +if (!test_bit (KVM_ARM_VCPU_PMU_V3 , vcpu->arch.features) || !kvm_arm_pmu_irq_initialized (vcpu))return -ENXIO ;
virt/kvm/arm/vgic/vgic.c +6 -0
@@ -553,6 +553,9 @@ next:/* Sync back the hardware VGIC state into our emulation after a guest's run. */ void kvm_vgic_sync_hwstate (struct kvm_vcpu *vcpu) { +if (unlikely (!vgic_initialized (vcpu->kvm))) +return ; +vgic_process_maintenance_interrupt (vcpu);vgic_fold_lr_state (vcpu);vgic_prune_ap_list (vcpu);
@@ -561,6 +564,9 @@ void kvm_vgic_sync_hwstate(struct kvm_vcpu *vcpu)/* Flush our emulation state into the GIC hardware before entering the guest. */ void kvm_vgic_flush_hwstate (struct kvm_vcpu *vcpu) { +if (unlikely (!vgic_initialized (vcpu->kvm))) +return ; +spin_lock (&vcpu->arch.vgic_cpu.ap_list_lock);vgic_flush_lr_state (vcpu);spin_unlock (&vcpu->arch.vgic_cpu.ap_list_lock);