Skip to content

Commit

Permalink
Merge 4.14.99 into kernel.lnx.4.14.r7-rel
Browse files Browse the repository at this point in the history
Changes in 4.14.99: (202 commits)
        drm/bufs: Fix Spectre v1 vulnerability
        staging: iio: adc: ad7280a: handle error from __ad7280_read32()
        drm/vgem: Fix vgem_init to get drm device available.
        pinctrl: bcm2835: Use raw spinlock for RT compatibility
        ASoC: Intel: mrfld: fix uninitialized variable access
        gpu: ipu-v3: image-convert: Prevent race between run and unprepare
        ath9k: dynack: use authentication messages for 'late' ack
        scsi: lpfc: Correct LCB RJT handling
        scsi: mpt3sas: Call sas_remove_host before removing the target devices
        scsi: lpfc: Fix LOGO/PLOGI handling when triggerd by ABTS Timeout event
        ARM: 8808/1: kexec:offline panic_smp_self_stop CPU
        clk: boston: fix possible memory leak in clk_boston_setup()
        dlm: Don't swamp the CPU with callbacks queued during recovery
        x86/PCI: Fix Broadcom CNB20LE unintended sign extension (redux)
        powerpc/pseries: add of_node_put() in dlpar_detach_node()
        crypto: aes_ti - disable interrupts while accessing S-box
        drm/vc4: ->x_scaling[1] should never be set to VC4_SCALING_NONE
        serial: fsl_lpuart: clear parity enable bit when disable parity
        ptp: check gettime64 return code in PTP_SYS_OFFSET ioctl
        MIPS: Boston: Disable EG20T prefetch
        staging:iio:ad2s90: Make probe handle spi_setup failure
        fpga: altera-cvp: Fix registration for CvP incapable devices
        Tools: hv: kvp: Fix a warning of buffer overflow with gcc 8.0.1
        platform/chrome: don't report EC_MKBP_EVENT_SENSOR_FIFO as wakeup
        staging: iio: ad7780: update voltage on read
        usbnet: smsc95xx: fix rx packet alignment
        drm/rockchip: fix for mailbox read size
        ARM: OMAP2+: hwmod: Fix some section annotations
        net/mlx5: EQ, Use the right place to store/read IRQ affinity hint
        modpost: validate symbol names also in find_elf_symbol
        perf tools: Add Hygon Dhyana support
        soc/tegra: Don't leak device tree node reference
        media: mtk-vcodec: Release device nodes in mtk_vcodec_init_enc_pm()
        ptp: Fix pass zero to ERR_PTR() in ptp_clock_register
        dmaengine: xilinx_dma: Remove __aligned attribute on zynqmp_dma_desc_ll
        iio: adc: meson-saradc: check for devm_kasprintf failure
        iio: adc: meson-saradc: fix internal clock names
        iio: accel: kxcjk1013: Add KIOX010A ACPI Hardware-ID
        media: adv*/tc358743/ths8200: fill in min width/height/pixelclock
        ACPI: SPCR: Consider baud rate 0 as preconfigured state
        staging: pi433: fix potential null dereference
        f2fs: move dir data flush to write checkpoint process
        f2fs: fix race between write_checkpoint and write_begin
        f2fs: fix wrong return value of f2fs_acl_create
        i2c: sh_mobile: add support for r8a77990 (R-Car E3)
        arm64: io: Ensure calls to delay routines are ordered against prior readX()
        sunvdc: Do not spin in an infinite loop when vio_ldc_send() returns EAGAIN
        soc: bcm: brcmstb: Don't leak device tree node reference
        nfsd4: fix crash on writing v4_end_grace before nfsd startup
        drm: Clear state->acquire_ctx before leaving drm_atomic_helper_commit_duplicated_state()
        arm64: io: Ensure value passed to __iormb() is held in a 64-bit register
        Thermal: do not clear passive state during system sleep
        firmware/efi: Add NULL pointer checks in efivars API functions
        s390/zcrypt: improve special ap message cmd handling
        arm64: ftrace: don't adjust the LR value
        ARM: dts: mmp2: fix TWSI2
        x86/fpu: Add might_fault() to user_insn()
        media: DaVinci-VPBE: fix error handling in vpbe_initialize()
        smack: fix access permissions for keyring
        usb: dwc3: Correct the logic for checking TRB full in __dwc3_prepare_one_trb()
        usb: hub: delay hub autosuspend if USB3 port is still link training
        timekeeping: Use proper seqcount initializer
        usb: mtu3: fix the issue about SetFeature(U1/U2_Enable)
        clk: sunxi-ng: a33: Set CLK_SET_RATE_PARENT for all audio module clocks
        driver core: Move async_synchronize_full call
        kobject: return error code if writing /sys/.../uevent fails
        IB/hfi1: Unreserve a reserved request when it is completed
        usb: dwc3: trace: add missing break statement to make compiler happy
        pinctrl: sx150x: handle failure case of devm_kstrdup
        iommu/amd: Fix amd_iommu=force_isolation
        ARM: dts: Fix OMAP4430 SDP Ethernet startup
        mips: bpf: fix encoding bug for mm_srlv32_op
        media: coda: fix H.264 deblocking filter controls
        ARM: dts: Fix up the D-Link DIR-685 MTD partition info
        watchdog: renesas_wdt: don't set divider while watchdog is running
        usb: dwc3: gadget: Disable CSP for stream OUT ep
        iommu/arm-smmu: Add support for qcom,smmu-v2 variant
        iommu/arm-smmu-v3: Use explicit mb() when moving cons pointer
        sata_rcar: fix deferred probing
        clk: imx6sl: ensure MMDC CH0 handshake is bypassed
        cpuidle: big.LITTLE: fix refcount leak
        OPP: Use opp_table->regulators to verify no regulator case
        i2c-axxia: check for error conditions first
        phy: sun4i-usb: add support for missing USB PHY index
        udf: Fix BUG on corrupted inode
        switchtec: Fix SWITCHTEC_IOCTL_EVENT_IDX_ALL flags overwrite
        selftests/bpf: use __bpf_constant_htons in test_prog.c
        ARM: pxa: avoid section mismatch warning
        ASoC: fsl: Fix SND_SOC_EUKREA_TLV320 build error on i.MX8M
        KVM: PPC: Book3S: Only report KVM_CAP_SPAPR_TCE_VFIO on powernv machines
        mmc: bcm2835: Recover from MMC_SEND_EXT_CSD
        mmc: bcm2835: reset host on timeout
        memstick: Prevent memstick host from getting runtime suspended during card detection
        mmc: sdhci-of-esdhc: Fix timeout checks
        mmc: sdhci-xenon: Fix timeout checks
        tty: serial: samsung: Properly set flags in autoCTS mode
        perf test: Fix perf_event_attr test failure
        perf header: Fix unchecked usage of strncpy()
        perf probe: Fix unchecked usage of strncpy()
        arm64: KVM: Skip MMIO insn after emulation
        usb: musb: dsps: fix otg state machine
        percpu: convert spin_lock_irq to spin_lock_irqsave.
        powerpc/uaccess: fix warning/error with access_ok()
        mac80211: fix radiotap vendor presence bitmap handling
        xfrm6_tunnel: Fix spi check in __xfrm6_tunnel_alloc_spi
        Bluetooth: Fix unnecessary error message for HCI request completion
        mlxsw: spectrum: Properly cleanup LAG uppers when removing port from LAG
        scsi: smartpqi: correct host serial num for ssa
        scsi: smartpqi: correct volume status
        scsi: smartpqi: increase fw status register read timeout
        cw1200: Fix concurrency use-after-free bugs in cw1200_hw_scan()
        powerpc/perf: Fix thresholding counter data for unknown type
        drbd: narrow rcu_read_lock in drbd_sync_handshake
        drbd: disconnect, if the wrong UUIDs are attached on a connected peer
        drbd: skip spurious timeout (ping-timeo) when failing promote
        drbd: Avoid Clang warning about pointless switch statment
        video: clps711x-fb: release disp device node in probe()
        md: fix raid10 hang issue caused by barrier
        fbdev: fbmem: behave better with small rotated displays and many CPUs
        i40e: define proper net_device::neigh_priv_len
        igb: Fix an issue that PME is not enabled during runtime suspend
        ACPI/APEI: Clear GHES block_status before panic()
        fbdev: fbcon: Fix unregister crash when more than one framebuffer
        powerpc/mm: Fix reporting of kernel execute faults on the 8xx
        pinctrl: meson: meson8: fix the GPIO function for the GPIOAO pins
        pinctrl: meson: meson8b: fix the GPIO function for the GPIOAO pins
        KVM: x86: svm: report MSR_IA32_MCG_EXT_CTL as unsupported
        powerpc/fadump: Do not allow hot-remove memory from fadump reserved area.
        kvm: Change offset in kvm_write_guest_offset_cached to unsigned
        NFS: nfs_compare_mount_options always compare auth flavors.
        hwmon: (lm80) fix a missing check of the status of SMBus read
        hwmon: (lm80) fix a missing check of bus read in lm80 probe
        seq_buf: Make seq_buf_puts() null-terminate the buffer
        crypto: ux500 - Use proper enum in cryp_set_dma_transfer
        crypto: ux500 - Use proper enum in hash_set_dma_transfer
        MIPS: ralink: Select CONFIG_CPU_MIPSR2_IRQ_VI on MT7620/8
        cifs: check ntwrk_buf_start for NULL before dereferencing it
        um: Avoid marking pages with "changed protection"
        niu: fix missing checks of niu_pci_eeprom_read
        f2fs: fix sbi->extent_list corruption issue
        cgroup: fix parsing empty mount option string
        scripts/decode_stacktrace: only strip base path when a prefix of the path
        ocfs2: don't clear bh uptodate for block read
        ocfs2: improve ocfs2 Makefile
        isdn: hisax: hfc_pci: Fix a possible concurrency use-after-free bug in HFCPCI_l1hw()
        gdrom: fix a memory leak bug
        fsl/fman: Use GFP_ATOMIC in {memac,tgec}_add_hash_mac_address()
        block/swim3: Fix -EBUSY error when re-opening device after unmount
        thermal: bcm2835: enable hwmon explicitly
        kdb: Don't back trace on a cpu that didn't round up
        thermal: generic-adc: Fix adc to temp interpolation
        HID: lenovo: Add checks to fix of_led_classdev_register
        kernel/hung_task.c: break RCU locks based on jiffies
        proc/sysctl: fix return error for proc_doulongvec_minmax()
        kernel/hung_task.c: force console verbose before panic
        fs/epoll: drop ovflist branch prediction
        exec: load_script: don't blindly truncate shebang string
        scripts/gdb: fix lx-version string output
        thermal: hwmon: inline helpers when CONFIG_THERMAL_HWMON is not set
        dccp: fool proof ccid_hc_[rt]x_parse_options()
        enic: fix checksum validation for IPv6
        net: dp83640: expire old TX-skb
        rxrpc: bad unlock balance in rxrpc_recvmsg
        skge: potential memory corruption in skge_get_regs()
        rds: fix refcount bug in rds_sock_addref
        net: systemport: Fix WoL with password after deep sleep
        net/mlx5e: Force CHECKSUM_UNNECESSARY for short ethernet frames
        net: dsa: slave: Don't propagate flag changes on down slave interfaces
        ALSA: compress: Fix stop handling on compressed capture streams
        ALSA: hda - Serialize codec registrations
        fuse: call pipe_buf_release() under pipe lock
        fuse: decrement NR_WRITEBACK_TEMP on the right page
        fuse: handle zero sized retrieve correctly
        dmaengine: bcm2835: Fix interrupt race on RT
        dmaengine: bcm2835: Fix abort of transactions
        dmaengine: imx-dma: fix wrong callback invoke
        futex: Handle early deadlock return correctly
        irqchip/gic-v3-its: Plug allocation race for devices sharing a DevID
        usb: phy: am335x: fix race condition in _probe
        usb: dwc3: gadget: Handle 0 xfer length for OUT EP
        usb: gadget: udc: net2272: Fix bitwise and boolean operations
        usb: gadget: musb: fix short isoc packets with inventra dma
        staging: speakup: fix tty-operation NULL derefs
        scsi: cxlflash: Prevent deadlock when adapter probe fails
        scsi: aic94xx: fix module loading
        KVM: x86: work around leak of uninitialized stack contents (CVE-2019-7222)
        kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974)
        KVM: nVMX: unconditionally cancel preemption timer in free_nested (CVE-2019-7221)
        cpu/hotplug: Fix "SMT disabled by BIOS" detection for KVM
        perf/x86/intel/uncore: Add Node ID mask
        x86/MCE: Initialize mce.bank in the case of a fatal error in mce_no_way_out()
        perf/core: Don't WARN() for impossible ring-buffer sizes
        perf tests evsel-tp-sched: Fix bitwise operator
        serial: fix race between flush_to_ldisc and tty_open
        serial: 8250_pci: Make PCI class test non fatal
        nfsd4: fix cached replies to solo SEQUENCE compounds
        nfsd4: catch some false session retries
        IB/hfi1: Add limit test for RC/UC send via loopback
        perf/x86/intel: Delay memory deallocation until x86_pmu_dead_cpu()
        ath9k: dynack: make ewma estimation faster
        ath9k: dynack: check da->enabled first in sampling routines
        Linux 4.14.99

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Conflicts:
	drivers/iommu/arm-smmu.c
	drivers/thermal/thermal_core.c
	kernel/sched/fair.c
  • Loading branch information
nathanchance committed May 21, 2019
2 parents bbeab52 + 383e9b6 commit 3196db9
Show file tree
Hide file tree
Showing 230 changed files with 1,356 additions and 646 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 14
SUBLEVEL = 98
SUBLEVEL = 99
EXTRAVERSION =
NAME = Petit Gorille

Expand Down
16 changes: 6 additions & 10 deletions arch/arm/boot/dts/gemini-dlink-dir-685.dts
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,16 @@
read-only;
};
/*
* Between the boot loader and the rootfs is the kernel
* in a custom Storlink format flashed from the boot
* menu. The rootfs is in squashfs format.
* This firmware image contains the kernel catenated
* with the squashfs root filesystem. For some reason
* this is called "upgrade" on the vendor system.
*/
partition@1800c0 {
label = "rootfs";
reg = <0x001800c0 0x01dbff40>;
read-only;
};
partition@1f40000 {
partition@40000 {
label = "upgrade";
reg = <0x01f40000 0x00040000>;
reg = <0x00040000 0x01f40000>;
read-only;
};
/* RGDB, Residental Gateway Database? */
partition@1f80000 {
label = "rgdb";
reg = <0x01f80000 0x00040000>;
Expand Down
9 changes: 6 additions & 3 deletions arch/arm/boot/dts/mmp2.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,15 @@
status = "disabled";
};

twsi2: i2c@d4025000 {
twsi2: i2c@d4031000 {
compatible = "mrvl,mmp-twsi";
reg = <0xd4025000 0x1000>;
interrupts = <58>;
reg = <0xd4031000 0x1000>;
interrupt-parent = <&intcmux17>;
interrupts = <0>;
clocks = <&soc_clocks MMP2_CLK_TWSI1>;
resets = <&soc_clocks MMP2_CLK_TWSI1>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};

Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap4-sdp.dts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
gpio = <&gpio2 16 GPIO_ACTIVE_HIGH>; /* gpio line 48 */
enable-active-high;
regulator-boot-on;
startup-delay-us = <25000>;
};

vbat: fixedregulator-vbat {
Expand Down
15 changes: 15 additions & 0 deletions arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,21 @@ void smp_send_stop(void)
pr_warn("SMP: failed to stop secondary CPUs\n");
}

/* In case panic() and panic() called at the same time on CPU1 and CPU2,
* and CPU 1 calls panic_smp_self_stop() before crash_smp_send_stop()
* CPU1 can't receive the ipi irqs from CPU2, CPU1 will be always online,
* kdump fails. So split out the panic_smp_self_stop() and add
* set_cpu_online(smp_processor_id(), false).
*/
void panic_smp_self_stop(void)
{
pr_debug("CPU %u will stop doing anything useful since another CPU has paniced\n",
smp_processor_id());
set_cpu_online(smp_processor_id(), false);
while (1)
cpu_relax();
}

/*
* not supported here
*/
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/mach-omap2/omap_hwmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -2497,7 +2497,7 @@ static int __init _init(struct omap_hwmod *oh, void *data)
* a stub; implementing this properly requires iclk autoidle usecounting in
* the clock code. No return value.
*/
static void __init _setup_iclk_autoidle(struct omap_hwmod *oh)
static void _setup_iclk_autoidle(struct omap_hwmod *oh)
{
struct omap_hwmod_ocp_if *os;

Expand Down Expand Up @@ -2528,7 +2528,7 @@ static void __init _setup_iclk_autoidle(struct omap_hwmod *oh)
* reset. Returns 0 upon success or a negative error code upon
* failure.
*/
static int __init _setup_reset(struct omap_hwmod *oh)
static int _setup_reset(struct omap_hwmod *oh)
{
int r;

Expand Down Expand Up @@ -2589,7 +2589,7 @@ static int __init _setup_reset(struct omap_hwmod *oh)
*
* No return value.
*/
static void __init _setup_postsetup(struct omap_hwmod *oh)
static void _setup_postsetup(struct omap_hwmod *oh)
{
u8 postsetup_state;

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/cm-x300.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ static struct pxa3xx_u2d_platform_data cm_x300_u2d_platform_data = {
.exit = cm_x300_u2d_exit,
};

static void cm_x300_init_u2d(void)
static void __init cm_x300_init_u2d(void)
{
pxa3xx_set_u2d_info(&cm_x300_u2d_platform_data);
}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/littleton.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ static struct pxafb_mach_info littleton_lcd_info = {
.lcd_conn = LCD_COLOR_TFT_16BPP,
};

static void littleton_init_lcd(void)
static void __init littleton_init_lcd(void)
{
pxa_set_fb_info(NULL, &littleton_lcd_info);
}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/zeus.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ static struct pxaohci_platform_data zeus_ohci_platform_data = {
.flags = ENABLE_PORT_ALL | POWER_SENSE_LOW,
};

static void zeus_register_ohci(void)
static void __init zeus_register_ohci(void)
{
/* Port 2 is shared between host and client interface. */
UP2OCR = UP2OCR_HXOE | UP2OCR_HXS | UP2OCR_DMPDE | UP2OCR_DPPDE;
Expand Down
32 changes: 24 additions & 8 deletions arch/arm64/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,23 @@ static inline u64 __raw_readq_no_log(const volatile void __iomem *addr)
#define __raw_readq(a) __raw_read_logged((a), q, u64)

/* IO barriers */
#define __iormb() rmb()
#define __iormb(v) \
({ \
unsigned long tmp; \
\
rmb(); \
\
/* \
* Create a dummy control dependency from the IO read to any \
* later instructions. This ensures that a subsequent call to \
* udelay() will be ordered due to the ISB in get_cycles(). \
*/ \
asm volatile("eor %0, %1, %1\n" \
"cbnz %0, ." \
: "=r" (tmp) : "r" ((unsigned long)(v)) \
: "memory"); \
})

#define __iowmb() wmb()

#define mmiowb() do { } while (0)
Expand Down Expand Up @@ -179,10 +195,10 @@ static inline u64 __raw_readq_no_log(const volatile void __iomem *addr)
* following Normal memory access. Writes are ordered relative to any prior
* Normal memory access.
*/
#define readb(c) ({ u8 __v = readb_relaxed(c); __iormb(); __v; })
#define readw(c) ({ u16 __v = readw_relaxed(c); __iormb(); __v; })
#define readl(c) ({ u32 __v = readl_relaxed(c); __iormb(); __v; })
#define readq(c) ({ u64 __v = readq_relaxed(c); __iormb(); __v; })
#define readb(c) ({ u8 __v = readb_relaxed(c); __iormb(__v); __v; })
#define readw(c) ({ u16 __v = readw_relaxed(c); __iormb(__v); __v; })
#define readl(c) ({ u32 __v = readl_relaxed(c); __iormb(__v); __v; })
#define readq(c) ({ u64 __v = readq_relaxed(c); __iormb(__v); __v; })

#define writeb(v,c) ({ __iowmb(); writeb_relaxed((v),(c)); })
#define writew(v,c) ({ __iowmb(); writew_relaxed((v),(c)); })
Expand Down Expand Up @@ -251,9 +267,9 @@ extern void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size);
/*
* io{read,write}{16,32,64}be() macros
*/
#define ioread16be(p) ({ __u16 __v = be16_to_cpu((__force __be16)__raw_readw(p)); __iormb(); __v; })
#define ioread32be(p) ({ __u32 __v = be32_to_cpu((__force __be32)__raw_readl(p)); __iormb(); __v; })
#define ioread64be(p) ({ __u64 __v = be64_to_cpu((__force __be64)__raw_readq(p)); __iormb(); __v; })
#define ioread16be(p) ({ __u16 __v = be16_to_cpu((__force __be16)__raw_readw(p)); __iormb(__v); __v; })
#define ioread32be(p) ({ __u32 __v = be32_to_cpu((__force __be32)__raw_readl(p)); __iormb(__v); __v; })
#define ioread64be(p) ({ __u64 __v = be64_to_cpu((__force __be64)__raw_readq(p)); __iormb(__v); __v; })

#define iowrite16be(v,p) ({ __iowmb(); __raw_writew((__force __u16)cpu_to_be16(v), p); })
#define iowrite32be(v,p) ({ __iowmb(); __raw_writel((__force __u32)cpu_to_be32(v), p); })
Expand Down
1 change: 0 additions & 1 deletion arch/arm64/kernel/entry-ftrace.S
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
.macro mcount_get_lr reg
ldr \reg, [x29]
ldr \reg, [\reg, #8]
mcount_adjust_addr \reg, \reg
.endm

.macro mcount_get_lr_addr reg
Expand Down
6 changes: 6 additions & 0 deletions arch/mips/boot/dts/img/boston.dts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@
#size-cells = <2>;
#interrupt-cells = <1>;

eg20t_phub@2,0,0 {
compatible = "pci8086,8801";
reg = <0x00020000 0 0 0 0>;
intel,eg20t-prefetch = <0>;
};

eg20t_mac@2,0,1 {
compatible = "pci8086,8802";
reg = <0x00020100 0 0 0 0>;
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/include/uapi/asm/inst.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ enum mm_32a_minor_op {
mm_ext_op = 0x02c,
mm_pool32axf_op = 0x03c,
mm_srl32_op = 0x040,
mm_srlv32_op = 0x050,
mm_sra_op = 0x080,
mm_srlv32_op = 0x090,
mm_rotr_op = 0x0c0,
mm_lwxs_op = 0x118,
mm_addu32_op = 0x150,
Expand Down
1 change: 1 addition & 0 deletions arch/mips/ralink/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ choice

config SOC_MT7620
bool "MT7620/8"
select CPU_MIPSR2_IRQ_VI
select HW_HAS_PCI

config SOC_MT7621
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/fadump.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ struct fad_crash_memory_ranges {
unsigned long long size;
};

extern int is_fadump_boot_memory_area(u64 addr, ulong size);
extern int is_fadump_memory_area(u64 addr, ulong size);
extern int early_init_dt_scan_fw_dump(unsigned long node,
const char *uname, int depth, void *data);
extern int fadump_reserve_mem(void);
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#endif

#define access_ok(type, addr, size) \
(__chk_user_ptr(addr), \
(__chk_user_ptr(addr), (void)(type), \
__access_ok((__force unsigned long)(addr), (size), get_fs()))

/*
Expand Down
10 changes: 8 additions & 2 deletions arch/powerpc/kernel/fadump.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,19 @@ int __init early_init_dt_scan_fw_dump(unsigned long node,

/*
* If fadump is registered, check if the memory provided
* falls within boot memory area.
* falls within boot memory area and reserved memory area.
*/
int is_fadump_boot_memory_area(u64 addr, ulong size)
int is_fadump_memory_area(u64 addr, ulong size)
{
u64 d_start = fw_dump.reserve_dump_area_start;
u64 d_end = d_start + fw_dump.reserve_dump_area_size;

if (!fw_dump.dump_registered)
return 0;

if (((addr + size) > d_start) && (addr <= d_end))
return 1;

return (addr + size) > RMA_START && addr <= fw_dump.boot_memory_size;
}

Expand Down
5 changes: 4 additions & 1 deletion arch/powerpc/kvm/powerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,11 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
#ifdef CONFIG_PPC_BOOK3S_64
case KVM_CAP_SPAPR_TCE:
case KVM_CAP_SPAPR_TCE_64:
/* fallthrough */
r = 1;
break;
case KVM_CAP_SPAPR_TCE_VFIO:
r = !!cpu_has_feature(CPU_FTR_HVMODE);
break;
case KVM_CAP_PPC_RTAS:
case KVM_CAP_PPC_FIXUP_HCALL:
case KVM_CAP_PPC_ENABLE_HCALL:
Expand Down
4 changes: 3 additions & 1 deletion arch/powerpc/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ static int mm_fault_error(struct pt_regs *regs, unsigned long addr, int fault)
static bool bad_kernel_fault(bool is_exec, unsigned long error_code,
unsigned long address)
{
if (is_exec && (error_code & (DSISR_NOEXEC_OR_G | DSISR_KEYFAULT))) {
/* NX faults set DSISR_PROTFAULT on the 8xx, DSISR_NOEXEC_OR_G on others */
if (is_exec && (error_code & (DSISR_NOEXEC_OR_G | DSISR_KEYFAULT |
DSISR_PROTFAULT))) {
printk_ratelimited(KERN_CRIT "kernel tried to execute"
" exec-protected page (%lx) -"
"exploit attempt? (uid: %d)\n",
Expand Down
7 changes: 6 additions & 1 deletion arch/powerpc/perf/isa207-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,13 @@ void isa207_get_mem_weight(u64 *weight)
u64 mmcra = mfspr(SPRN_MMCRA);
u64 exp = MMCRA_THR_CTR_EXP(mmcra);
u64 mantissa = MMCRA_THR_CTR_MANT(mmcra);
u64 sier = mfspr(SPRN_SIER);
u64 val = (sier & ISA207_SIER_TYPE_MASK) >> ISA207_SIER_TYPE_SHIFT;

*weight = mantissa << (2 * exp);
if (val == 0 || val == 7)
*weight = 0;
else
*weight = mantissa << (2 * exp);
}

int isa207_get_constraint(u64 event, unsigned long *maskp, unsigned long *valp)
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/platforms/pseries/dlpar.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ int dlpar_detach_node(struct device_node *dn)
if (rc)
return rc;

of_node_put(dn);

return 0;
}

Expand Down
7 changes: 5 additions & 2 deletions arch/powerpc/platforms/pseries/hotplug-memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,11 @@ static bool lmb_is_removable(struct of_drconf_cell *lmb)
phys_addr = lmb->base_addr;

#ifdef CONFIG_FA_DUMP
/* Don't hot-remove memory that falls in fadump boot memory area */
if (is_fadump_boot_memory_area(phys_addr, block_sz))
/*
* Don't hot-remove memory that falls in fadump boot memory area
* and memory that is reserved for capturing old kernel memory.
*/
if (is_fadump_memory_area(phys_addr, block_sz))
return false;
#endif

Expand Down
4 changes: 2 additions & 2 deletions arch/s390/include/uapi/asm/zcrypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ struct ica_xcRB {
* @cprb_len: CPRB header length [0x0020]
* @cprb_ver_id: CPRB version id. [0x04]
* @pad_000: Alignment pad bytes
* @flags: Admin cmd [0x80] or functional cmd [0x00]
* @func_id: Function id / subtype [0x5434]
* @flags: Admin bit [0x80], Special bit [0x20]
* @func_id: Function id / subtype [0x5434] "T4"
* @source_id: Source id [originator id]
* @target_id: Target id [usage/ctrl domain id]
* @ret_code: Return code
Expand Down
9 changes: 8 additions & 1 deletion arch/um/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,17 @@ static inline pte_t pte_mkold(pte_t pte)

static inline pte_t pte_wrprotect(pte_t pte)
{
pte_clear_bits(pte, _PAGE_RW);
if (likely(pte_get_bits(pte, _PAGE_RW)))
pte_clear_bits(pte, _PAGE_RW);
else
return pte;
return(pte_mknewprot(pte));
}

static inline pte_t pte_mkread(pte_t pte)
{
if (unlikely(pte_get_bits(pte, _PAGE_USER)))
return pte;
pte_set_bits(pte, _PAGE_USER);
return(pte_mknewprot(pte));
}
Expand All @@ -221,6 +226,8 @@ static inline pte_t pte_mkyoung(pte_t pte)

static inline pte_t pte_mkwrite(pte_t pte)
{
if (unlikely(pte_get_bits(pte, _PAGE_RW)))
return pte;
pte_set_bits(pte, _PAGE_RW);
return(pte_mknewprot(pte));
}
Expand Down
Loading

0 comments on commit 3196db9

Please sign in to comment.