Skip to content

Commit

Permalink
Merge 3.18.3 into android-3.18
Browse files Browse the repository at this point in the history
Changes in 3.18.3:
	drivers/rtc/rtc-sirfsoc.c: move hardware initilization earlier in probe
	rtc: omap: fix clock-source configuration
	rtc: omap: fix missing wakealarm attribute
	drivers/rtc/rtc-isl12057.c: fix masking of register values
	ocfs2: fix journal commit deadlock
	ocfs2: fix the wrong directory passed to ocfs2_lookup_ino_from_name() when link file
	ath9k_hw: fix hardware queue allocation
	ath9k: fix BE/BK queue order
	can: peak_usb: fix cleanup sequence order in case of error during init
	can: peak_usb: fix memset() usage
	swiotlb-xen: pass dev_addr to xen_dma_unmap_page and xen_dma_sync_single_for_cpu
	swiotlb-xen: remove BUG_ON in xen_bus_to_phys
	swiotlb-xen: call xen_dma_sync_single_for_device when appropriate
	swiotlb-xen: pass dev_addr to swiotlb_tbl_unmap_single
	iwlwifi: dvm: fix flush support for old firmware
	iwlwifi: mvm: update values for Smart Fifo
	iwlwifi: add new device IDs for 3165
	ath5k: fix hardware queue index assignment
	ASoC: eukrea-tlv320: Fix of_node_put() call with uninitialized object
	ASoC: sigmadsp: Refuse to load firmware files with a non-supported version
	ASoC: max98090: Fix ill-defined sidetone route
	ASoC: tlv320aic31xx: Fix off by one error in the loop stucture.
	ASoC: pcm512x: Trigger auto-increment of register addresses on i2c
	ASoC: dwc: Ensure FIFOs are flushed to prevent channel swap
	ktest: Fix make_min_config to handle new assign_configs call
	powerpc: Fix bad NULL pointer check in udbg_uart_getc_poll()
	powerpc/book3s: Fix partial invalidation of TLBs in MCE code.
	powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle mode
	powerpc/perf/hv-24x7: Use per-cpu page buffer
	powerpc: add little endian flag to syscall_get_arch()
	Bluetooth: ath3k: Add support of MCI 13d3:3408 bt device
	Bluetooth: 6lowpan: fix skb_unshare behaviour
	Bluetooth: Fix LE connection timeout deadlock
	Bluetooth: Fix check for direct advertising
	Bluetooth: Clear LE white list when resetting controller
	Bluetooth: Fix controller configuration with HCI_QUIRK_INVALID_BDADDR
	Bluetooth: Fix accepting connections when not using mgmt
	PCI: Restore detection of read-only BARs
	brcmfmac: Fix ifidx for rx data by msgbuf.
	pstore-ram: Fix hangs by using write-combine mappings
	pstore-ram: Allow optional mapping with pgprot_noncached
	UBI: Fix invalid vfree()
	UBI: Fix double free after do_sync_erase()
	iommu/vt-d: Fix an off-by-one bug in __domain_mapping()
	iommu/vt-d: Fix dmar_domain leak in iommu_attach_device
	blk-mq: use 'nr_cpu_ids' as highest CPU ID count for hwq <-> cpu map
	blk-mq: Fix a use-after-free
	blk-mq: Avoid that __bt_get_word() wraps multiple times
	blk-mq: Fix a race between bt_clear_tag() and bt_get()
	blk-mq: Fix uninitialized kobject at CPU hotplugging
	HID: yet another buggy ELAN touchscreen
	HID: wacom: re-add accidentally dropped Lenovo PID
	HID: wacom: fix freeze on open when autosuspend is on
	HID: i2c-hid: fix race condition reading reports
	HID: i2c-hid: prevent buffer overflow in early IRQ
	HID: roccat: potential out of bounds in pyra_sysfs_write_settings()
	HID: i2c-hid: Do not free buffers in i2c_hid_stop()
	HID: add battery quirk for USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO keyboard
	HID: Add a new id 0x501a for Genius MousePen i608X
	x86: export get_xsave_addr
	KVM: x86: support XSAVES usage in the host
	KVM: x86: em_ret_far overrides cpl
	kvm: x86: mask out XSAVES
	KVM: s390: Fix size of monitor-class number field
	KVM: s390: flush CPU on load control
	KVM: s390: Fix ipte locking
	kvm: x86: drop severity of "generation wraparound" message
	x86_64, vdso: Fix the vdso address randomization algorithm
	x86, vdso: Use asm volatile in __getcpu
	driver core: Fix unbalanced device reference in drivers_probe
	misc: genwqe: check for error from get_user_pages_fast()
	i8k: Add support for Dell Latitude E6440
	i2c: designware: Fix falling time bindings doc
	ALSA: usb-audio: extend KEF X300A FU 10 tweak to Arcam rPAC
	ALSA: hda/realtek - New codec support for ALC298
	ALSA: hda/realtek - New codec support for ALC256
	ALSA: hda/realtek - Add new Dell desktop for ALC3234 headset mode
	ALSA: hda - using uninitialized data
	ALSA: fireworks: fix an endianness bug for transaction length
	ALSA: snd-usb-caiaq: fix stream count check
	ALSA: hda - Fix wrong gpio_dir & gpio_mask hint setups for IDT/STAC codecs
	ALSA: hda - Add new GPU codec ID 0x10de0072 to snd-hda
	md/raid5: fetch_block must fetch all the blocks handle_stripe_dirtying wants.
	USB: cdc-acm: check for valid interfaces
	usb: renesas_usbhs: gadget: fix NULL pointer dereference in ep_disable()
	usb: gadget: at91_udc: move prepare clk into process context
	USB: qcserial: Add support for HP lt4112 LTE/HSPA+ Gobi 4G Modem
	Add USB_EHCI_EXYNOS to multi_v7_defconfig
	genhd: check for int overflow in disk_expand_part_tbl()
	cdc-acm: memory leak in error case
	drbd: merge_bvec_fn: properly remap bvm->bi_bdev
	drbd: Fix state change in case of connection timeout
	writeback: fix a subtle race condition in I_DIRTY clearing
	tracing/sched: Check preempt_count() for current when reading task->state
	tty: serial: men_z135_uart: Add terminating entry for men_z135_ids
	serial: samsung: wait for transfer completion before clock disable
	xtensa: fix kmap_prot definition
	reiserfs: destroy allocated commit workqueue
	n_tty: Fix read_buf race condition, increment read_head after pushing data
	Drivers: hv: vmbus: Fix a race condition when unregistering a device
	Drivers: hv: util: make struct hv_do_fcopy match Hyper-V host messages
	fs: nfsd: Fix signedness bug in compare_blob
	nfsd4: fix xdr4 inclusion of escaped char
	nfsd4: fix xdr4 count of server in fs_location4
	nfsd: fix fi_delegees leak when fi_had_conflict returns true
	ACPI / video: update the skip case for acpi_video_device_in_dod()
	ceph: do_sync is never initialized
	mtd: tests: abort torturetest on erase errors
	MTD: m25p80: fix inconsistency in m25p_ids compared to spi_nor_ids
	mtd: nand: omap: Fix NAND enumeration on 3430 LDP
	nilfs2: fix the nilfs_iget() vs. nilfs_new_inode() races
	scripts/kernel-doc: don't eat struct members with __aligned
	sched/deadline: Fix migration of SCHED_DEADLINE tasks
	sched/deadline: Avoid double-accounting in case of missed deadlines
	sched: Add missing rcu protection to wake_up_all_idle_cpus
	ARM: dts: am437x-sk: fix lcd enable pin mux data
	ARM: dts: am437x-sk-evm.dts: fix LCD timings
	ARM: defconfigs: use CONFIG_CPUFREQ_DT
	ARM: dts: DRA7: wdt: Fix compatible property for watchdog node
	ARM: dts: Enable PWM node by default for s3c64xx
	ARM: OMAP4: PM: Only do static dependency configuration in omap4_init_static_deps
	Revert "ARM: 7830/1: delay: don't bother reporting bogomips in /proc/cpuinfo"
	rpc: fix xdr_truncate_encode to handle buffer ending on page boundary
	ACPI / video: Add some Samsung models to disable_native_backlight list
	ACPI / PM: Fix PM initialization for devices that are not present
	Input: alps - v7: ignore new packets
	Input: alps - v7: sometimes a single touch is reported in mt[1]
	Input: alps - v7: fix finger counting for > 2 fingers on clickpads
	arm64: Move cpu_resume into the text section
	arm64: kernel: fix __cpu_suspend mm switch on warm-boot
	arm64/efi: add missing call to early_ioremap_reset()
	crypto: sha-mb - Add avx2_supported check.
	crypto: aesni - fix "by8" variant for 128 bit keys
	Btrfs: don't delay inode ref updates during log replay
	Revert "mac80211: Fix accounting of the tailroom-needed counter"
	perf/x86/intel/uncore: Make sure only uncore events are collected
	perf: Fix events installation during moving group
	perf/x86/uncore/hsw-ep: Handle systems with only two SBOXes
	perf session: Do not fail on processing out of order event
	spi: sh-msiof: Add runtime PM lock in initializing
	drm/nouveau/nouveau: Do not BUG_ON(!spin_is_locked()) on UP
	nouveau: bring back legacy mmap handler
	regulator: s2mps11: Fix dw_mmc failure on Gear 2
	mmc: sdhci: Fix sleep in atomic after inserting SD card
	exit: fix race between wait_consider_task() and wait_task_zombie()
	mm: protect set_page_dirty() from ongoing truncation
	mm, vmscan: prevent kswapd livelock due to pfmemalloc-throttled process being killed
	mm: propagate error from stack expansion even for guard page
	mm: Don't count the stack guard page towards RLIMIT_STACK
	Linux 3.18.3

Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Mar 29, 2017
2 parents fdd5448 + 219b188 commit 1aced1d
Show file tree
Hide file tree
Showing 139 changed files with 1,013 additions and 474 deletions.
4 changes: 2 additions & 2 deletions Documentation/devicetree/bindings/i2c/i2c-designware.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Optional properties :
- i2c-sda-hold-time-ns : should contain the SDA hold time in nanoseconds.
This option is only supported in hardware blocks version 1.11a or newer.

- i2c-scl-falling-time : should contain the SCL falling time in nanoseconds.
- i2c-scl-falling-time-ns : should contain the SCL falling time in nanoseconds.
This value which is by default 300ns is used to compute the tLOW period.

- i2c-sda-falling-time : should contain the SDA falling time in nanoseconds.
- i2c-sda-falling-time-ns : should contain the SDA falling time in nanoseconds.
This value which is by default 300ns is used to compute the tHIGH period.

Example :
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION = 3
PATCHLEVEL = 18
SUBLEVEL = 2
SUBLEVEL = 3
EXTRAVERSION =
NAME = Shuffling Zombie Juror

Expand Down
15 changes: 7 additions & 8 deletions arch/arm/boot/dts/am437x-sk-evm.dts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
};

lcd0: display {
compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
compatible = "newhaven,nhd-4.3-480272ef-atxl", "panel-dpi";
label = "lcd";

pinctrl-names = "default";
Expand All @@ -112,11 +112,11 @@
clock-frequency = <9000000>;
hactive = <480>;
vactive = <272>;
hfront-porch = <8>;
hback-porch = <43>;
hsync-len = <4>;
vback-porch = <12>;
vfront-porch = <4>;
hfront-porch = <2>;
hback-porch = <2>;
hsync-len = <41>;
vfront-porch = <2>;
vback-porch = <2>;
vsync-len = <10>;
hsync-active = <0>;
vsync-active = <0>;
Expand Down Expand Up @@ -320,8 +320,7 @@

lcd_pins: lcd_pins {
pinctrl-single,pins = <
/* GPIO 5_8 to select LCD / HDMI */
0x238 (PIN_OUTPUT_PULLUP | MUX_MODE7)
0x1c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpcm_ad7.gpio1_7 */
>;
};
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/dra7.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@
};

wdt2: wdt@4ae14000 {
compatible = "ti,omap4-wdt";
compatible = "ti,omap3-wdt";
reg = <0x4ae14000 0x80>;
interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
ti,hwmods = "wd_timer2";
Expand Down
4 changes: 0 additions & 4 deletions arch/arm/boot/dts/s3c6410-mini6410.dts
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,6 @@
status = "okay";
};

&pwm {
status = "okay";
};

&pinctrl0 {
gpio_leds: gpio-leds {
samsung,pins = "gpk-4", "gpk-5", "gpk-6", "gpk-7";
Expand Down
1 change: 0 additions & 1 deletion arch/arm/boot/dts/s3c64xx.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@
clocks = <&clocks PCLK_PWM>;
samsung,pwm-outputs = <0>, <1>;
#pwm-cells = <3>;
status = "disabled";
};

pinctrl0: pinctrl@7f008000 {
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/configs/multi_v7_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_MVEBU=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_EXYNOS=y
CONFIG_USB_EHCI_TEGRA=y
CONFIG_USB_EHCI_HCD_PLATFORM=y
CONFIG_USB_ISP1760_HCD=y
Expand Down Expand Up @@ -445,4 +446,4 @@ CONFIG_DEBUG_FS=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_LOCKUP_DETECTOR=y
CONFIG_CRYPTO_DEV_TEGRA_AES=y
CONFIG_GENERIC_CPUFREQ_CPU0=y
CONFIG_CPUFREQ_DT=y
2 changes: 1 addition & 1 deletion arch/arm/configs/shmobile_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -176,5 +176,5 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_THERMAL=y
CONFIG_GENERIC_CPUFREQ_CPU0=y
CONFIG_CPUFREQ_DT=y
CONFIG_REGULATOR_DA9210=y
9 changes: 9 additions & 0 deletions arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,15 @@ static int c_show(struct seq_file *m, void *v)
seq_printf(m, "model name\t: %s rev %d (%s)\n",
cpu_name, cpuid & 15, elf_platform);

#if defined(CONFIG_SMP)
seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
per_cpu(cpu_data, i).loops_per_jiffy / (500000UL/HZ),
(per_cpu(cpu_data, i).loops_per_jiffy / (5000UL/HZ)) % 100);
#else
seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
loops_per_jiffy / (500000/HZ),
(loops_per_jiffy / (5000/HZ)) % 100);
#endif
/* dump out the processor features */
seq_puts(m, "Features\t: ");

Expand Down
13 changes: 11 additions & 2 deletions arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,17 @@ asmlinkage void secondary_start_kernel(void)

void __init smp_cpus_done(unsigned int max_cpus)
{
printk(KERN_INFO "SMP: Total of %d processors activated.\n",
num_online_cpus());
int cpu;
unsigned long bogosum = 0;

for_each_online_cpu(cpu)
bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy;

printk(KERN_INFO "SMP: Total of %d processors activated "
"(%lu.%02lu BogoMIPS).\n",
num_online_cpus(),
bogosum / (500000/HZ),
(bogosum / (5000/HZ)) % 100);

hyp_mode_check();
}
Expand Down
29 changes: 9 additions & 20 deletions arch/arm/mach-omap2/pm44xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,26 +160,6 @@ static inline int omap4_init_static_deps(void)
struct clockdomain *ducati_clkdm, *l3_2_clkdm;
int ret = 0;

if (omap_rev() == OMAP4430_REV_ES1_0) {
WARN(1, "Power Management not supported on OMAP4430 ES1.0\n");
return -ENODEV;
}

pr_err("Power Management for TI OMAP4.\n");
/*
* OMAP4 chip PM currently works only with certain (newer)
* versions of bootloaders. This is due to missing code in the
* kernel to properly reset and initialize some devices.
* http://www.spinics.net/lists/arm-kernel/msg218641.html
*/
pr_warn("OMAP4 PM: u-boot >= v2012.07 is required for full PM support\n");

ret = pwrdm_for_each(pwrdms_setup, NULL);
if (ret) {
pr_err("Failed to setup powerdomains\n");
return ret;
}

/*
* The dynamic dependency between MPUSS -> MEMIF and
* MPUSS -> L4_PER/L3_* and DUCATI -> L3_* doesn't work as
Expand Down Expand Up @@ -272,6 +252,15 @@ int __init omap4_pm_init(void)

pr_info("Power Management for TI OMAP4+ devices.\n");

/*
* OMAP4 chip PM currently works only with certain (newer)
* versions of bootloaders. This is due to missing code in the
* kernel to properly reset and initialize some devices.
* http://www.spinics.net/lists/arm-kernel/msg218641.html
*/
if (cpu_is_omap44xx())
pr_warn("OMAP4 PM: u-boot >= v2012.07 is required for full PM support\n");

ret = pwrdm_for_each(pwrdms_setup, NULL);
if (ret) {
pr_err("Failed to setup powerdomains.\n");
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/include/asm/reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@
#define __MSR (MSR_ME | MSR_RI | MSR_IR | MSR_DR | MSR_ISF |MSR_HV)
#ifdef __BIG_ENDIAN__
#define MSR_ __MSR
#define MSR_IDLE (MSR_ME | MSR_SF | MSR_HV)
#else
#define MSR_ (__MSR | MSR_LE)
#define MSR_IDLE (MSR_ME | MSR_SF | MSR_HV | MSR_LE)
#endif
#define MSR_KERNEL (MSR_ | MSR_64BIT)
#define MSR_USER32 (MSR_ | MSR_PR | MSR_EE)
Expand Down
6 changes: 5 additions & 1 deletion arch/powerpc/include/asm/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ static inline void syscall_set_arguments(struct task_struct *task,

static inline int syscall_get_arch(void)
{
return is_32bit_task() ? AUDIT_ARCH_PPC : AUDIT_ARCH_PPC64;
int arch = is_32bit_task() ? AUDIT_ARCH_PPC : AUDIT_ARCH_PPC64;
#ifdef __LITTLE_ENDIAN__
arch |= __AUDIT_ARCH_LE;
#endif
return arch;
}
#endif /* _ASM_SYSCALL_H */
18 changes: 17 additions & 1 deletion arch/powerpc/kernel/idle_power7.S
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,23 @@ _GLOBAL(power7_powersave_common)
std r9,_MSR(r1)
std r1,PACAR1(r13)

_GLOBAL(power7_enter_nap_mode)
/*
* Go to real mode to do the nap, as required by the architecture.
* Also, we need to be in real mode before setting hwthread_state,
* because as soon as we do that, another thread can switch
* the MMU context to the guest.
*/
LOAD_REG_IMMEDIATE(r5, MSR_IDLE)
li r6, MSR_RI
andc r6, r9, r6
LOAD_REG_ADDR(r7, power7_enter_nap_mode)
mtmsrd r6, 1 /* clear RI before setting SRR0/1 */
mtspr SPRN_SRR0, r7
mtspr SPRN_SRR1, r5
rfid

.globl power7_enter_nap_mode
power7_enter_nap_mode:
#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
/* Tell KVM we're napping */
li r4,KVM_HWTHREAD_IN_NAP
Expand Down
4 changes: 2 additions & 2 deletions arch/powerpc/kernel/mce_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static long mce_handle_derror(uint64_t dsisr, uint64_t slb_error_bits)
}
if (dsisr & P7_DSISR_MC_TLB_MULTIHIT_MFTLB) {
if (cur_cpu_spec && cur_cpu_spec->flush_tlb)
cur_cpu_spec->flush_tlb(TLBIEL_INVAL_PAGE);
cur_cpu_spec->flush_tlb(TLBIEL_INVAL_SET);
/* reset error bits */
dsisr &= ~P7_DSISR_MC_TLB_MULTIHIT_MFTLB;
}
Expand Down Expand Up @@ -110,7 +110,7 @@ static long mce_handle_common_ierror(uint64_t srr1)
break;
case P7_SRR1_MC_IFETCH_TLB_MULTIHIT:
if (cur_cpu_spec && cur_cpu_spec->flush_tlb) {
cur_cpu_spec->flush_tlb(TLBIEL_INVAL_PAGE);
cur_cpu_spec->flush_tlb(TLBIEL_INVAL_SET);
handled = 1;
}
break;
Expand Down
6 changes: 5 additions & 1 deletion arch/powerpc/kernel/udbg_16550.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ static void udbg_uart_putc(char c)

static int udbg_uart_getc_poll(void)
{
if (!udbg_uart_in || !(udbg_uart_in(UART_LSR) & LSR_DR))
if (!udbg_uart_in)
return -1;

if (!(udbg_uart_in(UART_LSR) & LSR_DR))
return udbg_uart_in(UART_RBR);

return -1;
}

Expand Down
21 changes: 9 additions & 12 deletions arch/powerpc/perf/hv-24x7.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,14 @@ static bool is_physical_domain(int domain)
domain == HV_24X7_PERF_DOMAIN_PHYSICAL_CORE;
}

DEFINE_PER_CPU(char, hv_24x7_reqb[4096]) __aligned(4096);
DEFINE_PER_CPU(char, hv_24x7_resb[4096]) __aligned(4096);

static unsigned long single_24x7_request(u8 domain, u32 offset, u16 ix,
u16 lpar, u64 *res,
bool success_expected)
{
unsigned long ret = -ENOMEM;
unsigned long ret;

/*
* request_buffer and result_buffer are not required to be 4k aligned,
Expand All @@ -243,13 +246,11 @@ static unsigned long single_24x7_request(u8 domain, u32 offset, u16 ix,
BUILD_BUG_ON(sizeof(*request_buffer) > 4096);
BUILD_BUG_ON(sizeof(*result_buffer) > 4096);

request_buffer = kmem_cache_zalloc(hv_page_cache, GFP_USER);
if (!request_buffer)
goto out;
request_buffer = (void *)get_cpu_var(hv_24x7_reqb);
result_buffer = (void *)get_cpu_var(hv_24x7_resb);

result_buffer = kmem_cache_zalloc(hv_page_cache, GFP_USER);
if (!result_buffer)
goto out_free_request_buffer;
memset(request_buffer, 0, 4096);
memset(result_buffer, 0, 4096);

*request_buffer = (struct reqb) {
.buf = {
Expand Down Expand Up @@ -278,15 +279,11 @@ static unsigned long single_24x7_request(u8 domain, u32 offset, u16 ix,
domain, offset, ix, lpar, ret, ret,
result_buffer->buf.detailed_rc,
result_buffer->buf.failing_request_ix);
goto out_free_result_buffer;
goto out;
}

*res = be64_to_cpu(result_buffer->result);

out_free_result_buffer:
kfree(result_buffer);
out_free_request_buffer:
kfree(request_buffer);
out:
return ret;
}
Expand Down
20 changes: 14 additions & 6 deletions arch/s390/kvm/gaccess.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,12 @@ static void ipte_lock_simple(struct kvm_vcpu *vcpu)
goto out;
ic = &vcpu->kvm->arch.sca->ipte_control;
do {
old = ACCESS_ONCE(*ic);
old = *ic;
barrier();
while (old.k) {
cond_resched();
old = ACCESS_ONCE(*ic);
old = *ic;
barrier();
}
new = old;
new.k = 1;
Expand All @@ -251,7 +253,9 @@ static void ipte_unlock_simple(struct kvm_vcpu *vcpu)
goto out;
ic = &vcpu->kvm->arch.sca->ipte_control;
do {
new = old = ACCESS_ONCE(*ic);
old = *ic;
barrier();
new = old;
new.k = 0;
} while (cmpxchg(&ic->val, old.val, new.val) != old.val);
wake_up(&vcpu->kvm->arch.ipte_wq);
Expand All @@ -265,10 +269,12 @@ static void ipte_lock_siif(struct kvm_vcpu *vcpu)

ic = &vcpu->kvm->arch.sca->ipte_control;
do {
old = ACCESS_ONCE(*ic);
old = *ic;
barrier();
while (old.kg) {
cond_resched();
old = ACCESS_ONCE(*ic);
old = *ic;
barrier();
}
new = old;
new.k = 1;
Expand All @@ -282,7 +288,9 @@ static void ipte_unlock_siif(struct kvm_vcpu *vcpu)

ic = &vcpu->kvm->arch.sca->ipte_control;
do {
new = old = ACCESS_ONCE(*ic);
old = *ic;
barrier();
new = old;
new.kh--;
if (!new.kh)
new.k = 0;
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/kvm/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ static int __must_check __deliver_prog_irq(struct kvm_vcpu *vcpu,
break;
case PGM_MONITOR:
rc = put_guest_lc(vcpu, pgm_info->mon_class_nr,
(u64 *)__LC_MON_CLASS_NR);
(u16 *)__LC_MON_CLASS_NR);
rc |= put_guest_lc(vcpu, pgm_info->mon_code,
(u64 *)__LC_MON_CODE);
break;
Expand Down
4 changes: 2 additions & 2 deletions arch/s390/kvm/priv.c
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ int kvm_s390_handle_lctl(struct kvm_vcpu *vcpu)
break;
reg = (reg + 1) % 16;
} while (1);

kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
return 0;
}

Expand Down Expand Up @@ -863,7 +863,7 @@ static int handle_lctlg(struct kvm_vcpu *vcpu)
break;
reg = (reg + 1) % 16;
} while (1);

kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
return 0;
}

Expand Down
Loading

0 comments on commit 1aced1d

Please sign in to comment.