Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Commit

Permalink
Merge branches 'clearlinux-patchset' and 'microsoft-patchset' into next
Browse files Browse the repository at this point in the history
* clearlinux-patchset:
  remove clear ioapic
  use lfence instead of rep and nop
  smpboot: reuse timer calibration
  Migrate some systemd defaults to the kernel defaults.
  locking: rwsem: spin faster
  ksm-wakeups
  give rdrand some credit
  do accept() in LIFO order for cache efficiency

* microsoft-patchset:
  gpu: dxgkrnl: Use proper enum in command_vgpu_to_host_init0
  gpu: dxgkrnl: Fix mmap_sem calls
  Drivers: hv: vmbus: hook up dxgkrnl
  gpu: dxgkrnl: hook up dxgkrnl
  gpu: dxgkrnl: core code
  x86/Hyper-V: Support for free page reporting
  init: allow schedule statistics to be chosen without DEBUG_KERNEL
  init: Do not select DEBUG_KERNEL by default
  nfit: probe asynchronously
  sysrq: Skip synchronize_rcu() if there is no old op
  Boot with rcu expedite on

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
  • Loading branch information
nathanchance committed Jun 18, 2020
3 parents ca5d2ee + 98d1022 + e47f0ca commit 41138a5
Show file tree
Hide file tree
Showing 39 changed files with 15,600 additions and 22 deletions.
24 changes: 24 additions & 0 deletions arch/x86/hyperv/hv_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,3 +525,27 @@ bool hv_is_hibernation_supported(void)
return acpi_sleep_state_supported(ACPI_STATE_S4);
}
EXPORT_SYMBOL_GPL(hv_is_hibernation_supported);

u64 hv_query_ext_cap(void)
{
u64 *cap;
unsigned long flags;
u64 ext_cap = 0;

/*
* Querying extended capabilities is an extended hypercall. Check if the
* partition supports extended hypercall, first.
*/
if (!(ms_hyperv.b_features & HV_ENABLE_EXTENDED_HYPERCALLS))
return 0;

local_irq_save(flags);
cap = *(u64 **)this_cpu_ptr(hyperv_pcpu_input_arg);
if (hv_do_hypercall(HV_EXT_CALL_QUERY_CAPABILITIES, NULL, cap) ==
HV_STATUS_SUCCESS)
ext_cap = *cap;

local_irq_restore(flags);
return ext_cap;
}
EXPORT_SYMBOL_GPL(hv_query_ext_cap);
2 changes: 1 addition & 1 deletion arch/x86/include/asm/vdso/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
static __always_inline void rep_nop(void)
{
asm volatile("rep; nop" ::: "memory");
asm volatile("lfence" ::: "memory");
}

static __always_inline void cpu_relax(void)
Expand Down
7 changes: 5 additions & 2 deletions arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1396,9 +1396,12 @@ void __init enable_IO_APIC(void)
}

/*
* Do not trust the IO-APIC being empty at bootup
* In hyper-v we can trust that IO_APIC will be cleared on boot. A call to
* clear_IO_APIC is therefore not necessary or desirable since it can
* cause significant delays in boot time.
*
* clear_IO_APIC();
*/
clear_IO_APIC();
}

void native_restore_boot_irq_mode(void)
Expand Down
6 changes: 4 additions & 2 deletions arch/x86/kernel/cpu/mshyperv.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,13 @@ static void __init ms_hyperv_init_platform(void)
* Extract the features and hints
*/
ms_hyperv.features = cpuid_eax(HYPERV_CPUID_FEATURES);
ms_hyperv.b_features = cpuid_ebx(HYPERV_CPUID_FEATURES);
ms_hyperv.misc_features = cpuid_edx(HYPERV_CPUID_FEATURES);
ms_hyperv.hints = cpuid_eax(HYPERV_CPUID_ENLIGHTMENT_INFO);

pr_info("Hyper-V: features 0x%x, hints 0x%x, misc 0x%x\n",
ms_hyperv.features, ms_hyperv.hints, ms_hyperv.misc_features);
pr_info("Hyper-V: features 0x%x, additional features: 0x%x, hints 0x%x, misc 0x%x\n",
ms_hyperv.features, ms_hyperv.b_features, ms_hyperv.hints,
ms_hyperv.misc_features);

ms_hyperv.max_vp_index = cpuid_eax(HYPERV_CPUID_IMPLEMENT_LIMITS);
ms_hyperv.max_lp_index = cpuid_ebx(HYPERV_CPUID_IMPLEMENT_LIMITS);
Expand Down
3 changes: 3 additions & 0 deletions arch/x86/kernel/tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1546,6 +1546,9 @@ unsigned long calibrate_delay_is_known(void)
if (!constant_tsc || !mask)
return 0;

if (cpu != 0)
return cpu_data(0).loops_per_jiffy;

sibling = cpumask_any_but(mask, cpu);
if (sibling < nr_cpu_ids)
return cpu_data(sibling).loops_per_jiffy;
Expand Down
3 changes: 3 additions & 0 deletions drivers/acpi/nfit/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3762,6 +3762,9 @@ static struct acpi_driver acpi_nfit_driver = {
.remove = acpi_nfit_remove,
.notify = acpi_nfit_notify,
},
.drv = {
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
};

static __init int nfit_init(void)
Expand Down
2 changes: 2 additions & 0 deletions drivers/char/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -1781,6 +1781,8 @@ static void __init init_std_data(struct entropy_store *r)
if (!arch_get_random_seed_long(&rv) &&
!arch_get_random_long(&rv))
rv = random_get_entropy();
else
credit_entropy_bits(r, 1);
mix_pool_bytes(r, &rv, sizeof(rv));
}
mix_pool_bytes(r, utsname(), sizeof(*(utsname())));
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# taken to initialize them in the correct order. Link order is the only way
# to ensure this currently.
obj-$(CONFIG_TEGRA_HOST1X) += host1x/
obj-y += drm/ vga/
obj-y += drm/ vga/ dxgkrnl/
obj-$(CONFIG_IMX_IPUV3_CORE) += ipu-v3/
obj-$(CONFIG_TRACE_GPU_MEM) += trace/
10 changes: 10 additions & 0 deletions drivers/gpu/dxgkrnl/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# dxgkrnl configuration
#

config DXGKRNL
tristate "Microsoft virtual GPU support"
depends on HYPERV
help
This driver supports Microsoft virtual GPU.

12 changes: 12 additions & 0 deletions drivers/gpu/dxgkrnl/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: GPL-2.0
# Makefile for the Linux video drivers.
# 5 Aug 1999, James Simmons, <mailto:jsimmons@users.sf.net>
# Rewritten to use lists instead of if-statements.

# Each configuration option enables a list of files.

# Uncomment to enable printing debug messages by default
#ccflags-y := -DDEBUG

obj-$(CONFIG_DXGKRNL) += dxgkrnl.o
dxgkrnl-y := dxgmodule.o hmgr.o misc.o dxgadapter.o ioctl.o dxgvmbus.o dxgprocess.o

0 comments on commit 41138a5

Please sign in to comment.