This is the 4.19.155 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl+jz0oACgkQONu9yGCS aT4hPA//Xp0LuMofylz77cZMkWiagSQ5k/4oKn2O2iEISKfdcFMzjcJbRBMmTFFP r1T0Uu5N2gZQ8ZAV67itpaA/KV9YlytbDrwRBKQ/mxNMP7xaX+hC43hbPrx72Qc5 on6v3z9xTxMB2+HwFlJZpsmYrrjqg1ruGtxR5UMZ37Jt7KUYDRbHDbqMEXRkKHko pWtZ/8GkY8UG3GNpiPlka9BfDK9X0k5m65r3vscbmgCd7bQFQi9rbp930N0y7MMX e/YIBss699EZp6r7hpH1+ETBP6Z2qHxRFY86kcL9I3NcZnI3NrX0pKql0hWlqPOm CeR3z6fpW9Xyf1CqQOkyDBCMfvMLsMarwQ+bb8d+zIQD/I4W12whPhGM4eh6rYcu 2WL4gwiyhju0OuPK7ZcCzMOEPUwWQYvyvwoBnoywZfN5L8702Xi4eN8QqP5l7Hcd lcZH5gv/v1z0Xb6pU4AMthbLB+VcQ5w5g3DfvF/A9kOyzmP0YvKa39y8J379mwdJ 6DXu8DRvee5bYW8LObszzKqshnF79eia+xcf7YFJn1Y2cwh63AQgOcSzaEc5q7/2 kuWNfrZJCyvt41j48bO7MtTEULeCAtPkuKvVrZuCO7Q4J2wFSWuGCUQTg3bm8dQd 5B9V6jQKaCIOn3+/dPXg5N6yaRKZR4dHIUsWpKOs1tOQuucpVmw= =2s9n -----END PGP SIGNATURE----- Merge 4.19.155 into android-4.19-stable Changes in 4.19.155 objtool: Support Clang non-section symbols in ORC generation scripts/setlocalversion: make git describe output more reliable arm64: Run ARCH_WORKAROUND_1 enabling code on all CPUs arm64: link with -z norelro regardless of CONFIG_RELOCATABLE x86/PCI: Fix intel_mid_pci.c build error when ACPI is not enabled efivarfs: Replace invalid slashes with exclamation marks in dentries. chelsio/chtls: fix deadlock issue chelsio/chtls: fix memory leaks in CPL handlers chelsio/chtls: fix tls record info to user gtp: fix an use-before-init in gtp_newlink() mlxsw: core: Fix memory leak on module removal netem: fix zero division in tabledist ravb: Fix bit fields checking in ravb_hwtstamp_get() tcp: Prevent low rmem stalls with SO_RCVLOWAT. tipc: fix memory leak caused by tipc_buf_append() r8169: fix issue with forced threading in combination with shared interrupts cxgb4: set up filter action after rewrites arch/x86/amd/ibs: Fix re-arming IBS Fetch x86/xen: disable Firmware First mode for correctable memory errors fuse: fix page dereference after free bpf: Fix comment for helper bpf_current_task_under_cgroup() evm: Check size of security.evm before using it p54: avoid accessing the data mapped to streaming DMA cxl: Rework error message for incompatible slots RDMA/addr: Fix race with netevent_callback()/rdma_addr_cancel() mtd: lpddr: Fix bad logic in print_drs_error serial: pl011: Fix lockdep splat when handling magic-sysrq interrupt ata: sata_rcar: Fix DMA boundary mask fscrypt: return -EXDEV for incompatible rename or link into encrypted dir fscrypt: clean up and improve dentry revalidation fscrypt: fix race allowing rename() and link() of ciphertext dentries fs, fscrypt: clear DCACHE_ENCRYPTED_NAME when unaliasing directory fscrypt: only set dentry_operations on ciphertext dentries fscrypt: fix race where ->lookup() marks plaintext dentry as ciphertext Revert "block: ratelimit handle_bad_sector() message" xen/events: don't use chip_data for legacy IRQs xen/events: avoid removing an event channel while handling it xen/events: add a proper barrier to 2-level uevent unmasking xen/events: fix race in evtchn_fifo_unmask() xen/events: add a new "late EOI" evtchn framework xen/blkback: use lateeoi irq binding xen/netback: use lateeoi irq binding xen/scsiback: use lateeoi irq binding xen/pvcallsback: use lateeoi irq binding xen/pciback: use lateeoi irq binding xen/events: switch user event channels to lateeoi model xen/events: use a common cpu hotplug hook for event channels xen/events: defer eoi in case of excessive number of events xen/events: block rogue events for some time x86/unwind/orc: Fix inactive tasks with stack pointer in %sp on GCC 10 compiled kernels mlxsw: core: Fix use-after-free in mlxsw_emad_trans_finish() RDMA/qedr: Fix memory leak in iWARP CM ata: sata_nv: Fix retrieving of active qcs futex: Fix incorrect should_fail_futex() handling powerpc/powernv/smp: Fix spurious DBG() warning mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race powerpc: select ARCH_WANT_IRQS_OFF_ACTIVATE_MM sparc64: remove mm_cpumask clearing to fix kthread_use_mm race f2fs: add trace exit in exception path f2fs: fix uninit-value in f2fs_lookup f2fs: fix to check segment boundary during SIT page readahead um: change sigio_spinlock to a mutex ARM: 8997/2: hw_breakpoint: Handle inexact watchpoint addresses power: supply: bq27xxx: report "not charging" on all types xfs: fix realtime bitmap/summary file truncation when growing rt volume video: fbdev: pvr2fb: initialize variables ath10k: start recovery process when payload length exceeds max htc length for sdio ath10k: fix VHT NSS calculation when STBC is enabled drm/brige/megachips: Add checking if ge_b850v3_lvds_init() is working correctly media: videodev2.h: RGB BT2020 and HSV are always full range media: platform: Improve queue set up flow for bug fixing usb: typec: tcpm: During PR_SWAP, source caps should be sent only after tSwapSourceStart media: tw5864: check status of tw5864_frameinterval_get media: imx274: fix frame interval handling mmc: via-sdmmc: Fix data race bug drm/bridge/synopsys: dsi: add support for non-continuous HS clock arm64: topology: Stop using MPIDR for topology information printk: reduce LOG_BUF_SHIFT range for H8300 ia64: kprobes: Use generic kretprobe trampoline handler kgdb: Make "kgdbcon" work properly with "kgdb_earlycon" media: uvcvideo: Fix dereference of out-of-bound list iterator riscv: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO cpufreq: sti-cpufreq: add stih418 support USB: adutux: fix debugging uio: free uio id after uio file node is freed usb: xhci: omit duplicate actions when suspending a runtime suspended host. arm64/mm: return cpu_all_mask when node is NUMA_NO_NODE xfs: don't free rt blocks when we're doing a REMAP bunmapi call ACPI: Add out of bounds and numa_off protections to pxm_to_node() drivers/net/wan/hdlc_fr: Correctly handle special skb->protocol values bus/fsl_mc: Do not rely on caller to provide non NULL mc_io power: supply: test_power: add missing newlines when printing parameters by sysfs drm/amd/display: HDMI remote sink need mode validation for Linux btrfs: fix replace of seed device md/bitmap: md_bitmap_get_counter returns wrong blocks bnxt_en: Log unknown link speed appropriately. rpmsg: glink: Use complete_all for open states clk: ti: clockdomain: fix static checker warning net: 9p: initialize sun_server.sun_path to have addr's value only when addr is valid drivers: watchdog: rdc321x_wdt: Fix race condition bugs ext4: Detect already used quota file early gfs2: add validation checks for size of superblock cifs: handle -EINTR in cifs_setattr arm64: dts: renesas: ulcb: add full-pwr-cycle-in-suspend into eMMC nodes ARM: dts: omap4: Fix sgx clock rate for 4430 memory: emif: Remove bogus debugfs error handling ARM: dts: s5pv210: remove DMA controller bus node name to fix dtschema warnings ARM: dts: s5pv210: move PMU node out of clock controller ARM: dts: s5pv210: remove dedicated 'audio-subsystem' node nbd: make the config put is called before the notifying the waiter sgl_alloc_order: fix memory leak nvme-rdma: fix crash when connect rejected md/raid5: fix oops during stripe resizing mmc: sdhci-acpi: AMDI0040: Set SDHCI_QUIRK2_PRESET_VALUE_BROKEN perf/x86/amd/ibs: Don't include randomized bits in get_ibs_op_count() perf/x86/amd/ibs: Fix raw sample data accumulation leds: bcm6328, bcm6358: use devres LED registering function media: uvcvideo: Fix uvc_ctrl_fixup_xu_info() not having any effect fs: Don't invalidate page buffers in block_write_full_page() NFS: fix nfs_path in case of a rename retry ACPI: button: fix handling lid state changes when input device closed ACPI / extlog: Check for RDMSR failure ACPI: video: use ACPI backlight for HP 635 Notebook ACPI: debug: don't allow debugging when ACPI is disabled acpi-cpufreq: Honor _PSD table setting on new AMD CPUs w1: mxc_w1: Fix timeout resolution problem leading to bus error scsi: mptfusion: Fix null pointer dereferences in mptscsih_remove() scsi: qla2xxx: Fix crash on session cleanup with unload btrfs: qgroup: fix wrong qgroup metadata reserve for delayed inode btrfs: improve device scanning messages btrfs: reschedule if necessary when logging directory items btrfs: send, recompute reference path after orphanization of a directory btrfs: use kvzalloc() to allocate clone_roots in btrfs_ioctl_send() btrfs: cleanup cow block on error btrfs: fix use-after-free on readahead extent after failure to create it usb: xhci: Workaround for S3 issue on AMD SNPS 3.0 xHC usb: dwc3: ep0: Fix ZLP for OUT ep0 requests usb: dwc3: gadget: Check MPS of the request length usb: dwc3: core: add phy cleanup for probe error handling usb: dwc3: core: don't trigger runtime pm when remove driver usb: cdc-acm: fix cooldown mechanism usb: typec: tcpm: reset hard_reset_count for any disconnect usb: host: fsl-mph-dr-of: check return of dma_set_mask() drm/i915: Force VT'd workarounds when running as a guest OS vt: keyboard, simplify vt_kdgkbsent vt: keyboard, extend func_buf_lock to readers HID: wacom: Avoid entering wacom_wac_pen_report for pad / battery udf: Fix memory leak when mounting dmaengine: dma-jz4780: Fix race in jz4780_dma_tx_status iio:light:si1145: Fix timestamp alignment and prevent data leak. iio:adc:ti-adc0832 Fix alignment issue with timestamp iio:adc:ti-adc12138 Fix alignment issue with timestamp iio:gyro:itg3200: Fix timestamp alignment and prevent data leak. powerpc/drmem: Make lmb_size 64 bit s390/stp: add locking to sysfs functions powerpc/rtas: Restrict RTAS requests from userspace powerpc: Warn about use of smt_snooze_delay powerpc/powernv/elog: Fix race while processing OPAL error log event. powerpc: Fix undetected data corruption with P9N DD2.1 VSX CI load emulation NFSv4.2: support EXCHGID4_FLAG_SUPP_FENCE_OPS 4.2 EXCHANGE_ID flag NFSD: Add missing NFSv2 .pc_func methods ubifs: dent: Fix some potential memory leaks while iterating entries perf python scripting: Fix printable strings in python3 scripts ubi: check kthread_should_stop() after the setting of task state ia64: fix build error with !COREDUMP i2c: imx: Fix external abort on interrupt in exit paths drm/amdgpu: don't map BO in reserved region drm/amd/display: Don't invoke kgdb_breakpoint() unconditionally ceph: promote to unsigned long long before shifting libceph: clear con->out_msg on Policy::stateful_server faults 9P: Cast to loff_t before multiplying ring-buffer: Return 0 on success from ring_buffer_resize() vringh: fix __vringh_iov() when riov and wiov are different ext4: fix leaking sysfs kobject after failed mount ext4: fix error handling code in add_new_gdb ext4: fix invalid inode checksum drm/ttm: fix eviction valuable range check. rtc: rx8010: don't modify the global rtc ops tty: make FONTX ioctl use the tty pointer they were actually passed arm64: berlin: Select DW_APB_TIMER_OF cachefiles: Handle readpage error correctly hil/parisc: Disable HIL driver when it gets stuck arm: dts: mt7623: add missing pause for switchport ARM: samsung: fix PM debug build with DEBUG_LL but !MMU ARM: s3c24xx: fix missing system reset device property: Keep secondary firmware node secondary by type device property: Don't clear secondary pointer for shared primary firmware node KVM: arm64: Fix AArch32 handling of DBGD{CCINT,SCRext} and DBGVCR staging: comedi: cb_pcidas: Allow 2-channel commands for AO subdevice staging: octeon: repair "fixed-link" support staging: octeon: Drop on uncorrectable alignment or FCS error Linux 4.19.155 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I18fefb5bfaa4d05772c61c2975340d0f089b8e3e
This commit is contained in:
commit
d1253c75a8
195 changed files with 2267 additions and 1029 deletions
|
@ -5295,6 +5295,14 @@
|
|||
with /sys/devices/system/xen_memory/xen_memory0/scrub_pages.
|
||||
Default value controlled with CONFIG_XEN_SCRUB_PAGES_DEFAULT.
|
||||
|
||||
xen.event_eoi_delay= [XEN]
|
||||
How long to delay EOI handling in case of event
|
||||
storms (jiffies). Default is 10.
|
||||
|
||||
xen.event_loop_timeout= [XEN]
|
||||
After which time (jiffies) the event handling loop
|
||||
should start to delay EOI handling. Default is 2.
|
||||
|
||||
xirc2ps_cs= [NET,PCMCIA]
|
||||
Format:
|
||||
<irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]]
|
||||
|
|
|
@ -29,8 +29,7 @@ whole range, 0-255, dividing the angular value by 1.41. The enum
|
|||
:c:type:`v4l2_hsv_encoding` specifies which encoding is used.
|
||||
|
||||
.. note:: The default R'G'B' quantization is full range for all
|
||||
colorspaces except for BT.2020 which uses limited range R'G'B'
|
||||
quantization.
|
||||
colorspaces. HSV formats are always full range.
|
||||
|
||||
.. tabularcolumns:: |p{6.0cm}|p{11.5cm}|
|
||||
|
||||
|
@ -162,8 +161,8 @@ whole range, 0-255, dividing the angular value by 1.41. The enum
|
|||
- Details
|
||||
* - ``V4L2_QUANTIZATION_DEFAULT``
|
||||
- Use the default quantization encoding as defined by the
|
||||
colorspace. This is always full range for R'G'B' (except for the
|
||||
BT.2020 colorspace) and HSV. It is usually limited range for Y'CbCr.
|
||||
colorspace. This is always full range for R'G'B' and HSV.
|
||||
It is usually limited range for Y'CbCr.
|
||||
* - ``V4L2_QUANTIZATION_FULL_RANGE``
|
||||
- Use the full range quantization encoding. I.e. the range [0…1] is
|
||||
mapped to [0…255] (with possible clipping to [1…254] to avoid the
|
||||
|
@ -173,4 +172,4 @@ whole range, 0-255, dividing the angular value by 1.41. The enum
|
|||
* - ``V4L2_QUANTIZATION_LIM_RANGE``
|
||||
- Use the limited range quantization encoding. I.e. the range [0…1]
|
||||
is mapped to [16…235]. Cb and Cr are mapped from [-0.5…0.5] to
|
||||
[16…240].
|
||||
[16…240]. Limited Range cannot be used with HSV.
|
||||
|
|
|
@ -370,9 +370,8 @@ Colorspace BT.2020 (V4L2_COLORSPACE_BT2020)
|
|||
The :ref:`itu2020` standard defines the colorspace used by Ultra-high
|
||||
definition television (UHDTV). The default transfer function is
|
||||
``V4L2_XFER_FUNC_709``. The default Y'CbCr encoding is
|
||||
``V4L2_YCBCR_ENC_BT2020``. The default R'G'B' quantization is limited
|
||||
range (!), and so is the default Y'CbCr quantization. The chromaticities
|
||||
of the primary colors and the white reference are:
|
||||
``V4L2_YCBCR_ENC_BT2020``. The default Y'CbCr quantization is limited range.
|
||||
The chromaticities of the primary colors and the white reference are:
|
||||
|
||||
|
||||
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 19
|
||||
SUBLEVEL = 154
|
||||
SUBLEVEL = 155
|
||||
EXTRAVERSION =
|
||||
NAME = "People's Front"
|
||||
|
||||
|
|
|
@ -366,6 +366,13 @@ config HAVE_RCU_TABLE_FREE
|
|||
config HAVE_RCU_TABLE_INVALIDATE
|
||||
bool
|
||||
|
||||
config ARCH_WANT_IRQS_OFF_ACTIVATE_MM
|
||||
bool
|
||||
help
|
||||
Temporary select until all architectures can be converted to have
|
||||
irqs disabled over activate_mm. Architectures that do IPI based TLB
|
||||
shootdowns should enable this.
|
||||
|
||||
config ARCH_HAVE_NMI_SAFE_CMPXCHG
|
||||
bool
|
||||
|
||||
|
|
|
@ -592,8 +592,10 @@ config ARCH_S3C24XX
|
|||
select HAVE_S3C2410_WATCHDOG if WATCHDOG
|
||||
select HAVE_S3C_RTC if RTC_CLASS
|
||||
select NEED_MACH_IO_H
|
||||
select S3C2410_WATCHDOG
|
||||
select SAMSUNG_ATAGS
|
||||
select USE_OF
|
||||
select WATCHDOG
|
||||
help
|
||||
Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443
|
||||
and S3C2450 SoCs based systems, such as the Simtec Electronics BAST
|
||||
|
|
|
@ -192,6 +192,7 @@
|
|||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -516,7 +516,7 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
target-module@56000000 {
|
||||
sgx_module: target-module@56000000 {
|
||||
compatible = "ti,sysc-omap4", "ti,sysc";
|
||||
ti,hwmods = "gpu";
|
||||
reg = <0x5601fc00 0x4>,
|
||||
|
|
|
@ -74,3 +74,13 @@
|
|||
};
|
||||
|
||||
/include/ "omap443x-clocks.dtsi"
|
||||
|
||||
/*
|
||||
* Use dpll_per for sgx at 153.6MHz like droid4 stock v3.0.8 Android kernel
|
||||
*/
|
||||
&sgx_module {
|
||||
assigned-clocks = <&l3_gfx_clkctrl OMAP4_GPU_CLKCTRL 24>,
|
||||
<&dpll_per_m7x2_ck>;
|
||||
assigned-clock-rates = <0>, <153600000>;
|
||||
assigned-clock-parents = <&dpll_per_m7x2_ck>;
|
||||
};
|
||||
|
|
|
@ -98,20 +98,17 @@
|
|||
};
|
||||
|
||||
clocks: clock-controller@e0100000 {
|
||||
compatible = "samsung,s5pv210-clock", "simple-bus";
|
||||
compatible = "samsung,s5pv210-clock";
|
||||
reg = <0xe0100000 0x10000>;
|
||||
clock-names = "xxti", "xusbxti";
|
||||
clocks = <&xxti>, <&xusbxti>;
|
||||
#clock-cells = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
};
|
||||
|
||||
pmu_syscon: syscon@e0108000 {
|
||||
compatible = "samsung-s5pv210-pmu", "syscon";
|
||||
reg = <0xe0108000 0x8000>;
|
||||
};
|
||||
};
|
||||
|
||||
pinctrl0: pinctrl@e0200000 {
|
||||
compatible = "samsung,s5pv210-pinctrl";
|
||||
|
@ -126,12 +123,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
amba {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
compatible = "simple-bus";
|
||||
ranges;
|
||||
|
||||
pdma0: dma@e0900000 {
|
||||
compatible = "arm,pl330", "arm,primecell";
|
||||
reg = <0xe0900000 0x1000>;
|
||||
|
@ -155,7 +146,6 @@
|
|||
#dma-channels = <8>;
|
||||
#dma-requests = <32>;
|
||||
};
|
||||
};
|
||||
|
||||
spi0: spi@e1300000 {
|
||||
compatible = "samsung,s5pv210-spi";
|
||||
|
@ -227,12 +217,6 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
audio-subsystem {
|
||||
compatible = "samsung,s5pv210-audss", "simple-bus";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
clk_audss: clock-controller@eee10000 {
|
||||
compatible = "samsung,s5pv210-audss-clock";
|
||||
reg = <0xeee10000 0x1000>;
|
||||
|
@ -264,7 +248,6 @@
|
|||
#sound-dai-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
i2s1: i2s@e2100000 {
|
||||
compatible = "samsung,s3c6410-i2s";
|
||||
|
|
|
@ -688,6 +688,40 @@ static void disable_single_step(struct perf_event *bp)
|
|||
arch_install_hw_breakpoint(bp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Arm32 hardware does not always report a watchpoint hit address that matches
|
||||
* one of the watchpoints set. It can also report an address "near" the
|
||||
* watchpoint if a single instruction access both watched and unwatched
|
||||
* addresses. There is no straight-forward way, short of disassembling the
|
||||
* offending instruction, to map that address back to the watchpoint. This
|
||||
* function computes the distance of the memory access from the watchpoint as a
|
||||
* heuristic for the likelyhood that a given access triggered the watchpoint.
|
||||
*
|
||||
* See this same function in the arm64 platform code, which has the same
|
||||
* problem.
|
||||
*
|
||||
* The function returns the distance of the address from the bytes watched by
|
||||
* the watchpoint. In case of an exact match, it returns 0.
|
||||
*/
|
||||
static u32 get_distance_from_watchpoint(unsigned long addr, u32 val,
|
||||
struct arch_hw_breakpoint_ctrl *ctrl)
|
||||
{
|
||||
u32 wp_low, wp_high;
|
||||
u32 lens, lene;
|
||||
|
||||
lens = __ffs(ctrl->len);
|
||||
lene = __fls(ctrl->len);
|
||||
|
||||
wp_low = val + lens;
|
||||
wp_high = val + lene;
|
||||
if (addr < wp_low)
|
||||
return wp_low - addr;
|
||||
else if (addr > wp_high)
|
||||
return addr - wp_high;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int watchpoint_fault_on_uaccess(struct pt_regs *regs,
|
||||
struct arch_hw_breakpoint *info)
|
||||
{
|
||||
|
@ -697,23 +731,25 @@ static int watchpoint_fault_on_uaccess(struct pt_regs *regs,
|
|||
static void watchpoint_handler(unsigned long addr, unsigned int fsr,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
int i, access;
|
||||
u32 val, ctrl_reg, alignment_mask;
|
||||
int i, access, closest_match = 0;
|
||||
u32 min_dist = -1, dist;
|
||||
u32 val, ctrl_reg;
|
||||
struct perf_event *wp, **slots;
|
||||
struct arch_hw_breakpoint *info;
|
||||
struct arch_hw_breakpoint_ctrl ctrl;
|
||||
|
||||
slots = this_cpu_ptr(wp_on_reg);
|
||||
|
||||
for (i = 0; i < core_num_wrps; ++i) {
|
||||
/*
|
||||
* Find all watchpoints that match the reported address. If no exact
|
||||
* match is found. Attribute the hit to the closest watchpoint.
|
||||
*/
|
||||
rcu_read_lock();
|
||||
|
||||
for (i = 0; i < core_num_wrps; ++i) {
|
||||
wp = slots[i];
|
||||
|
||||
if (wp == NULL)
|
||||
goto unlock;
|
||||
continue;
|
||||
|
||||
info = counter_arch_bp(wp);
|
||||
/*
|
||||
* The DFAR is an unknown value on debug architectures prior
|
||||
* to 7.1. Since we only allow a single watchpoint on these
|
||||
|
@ -722,33 +758,31 @@ static void watchpoint_handler(unsigned long addr, unsigned int fsr,
|
|||
*/
|
||||
if (debug_arch < ARM_DEBUG_ARCH_V7_1) {
|
||||
BUG_ON(i > 0);
|
||||
info = counter_arch_bp(wp);
|
||||
info->trigger = wp->attr.bp_addr;
|
||||
} else {
|
||||
if (info->ctrl.len == ARM_BREAKPOINT_LEN_8)
|
||||
alignment_mask = 0x7;
|
||||
else
|
||||
alignment_mask = 0x3;
|
||||
|
||||
/* Check if the watchpoint value matches. */
|
||||
val = read_wb_reg(ARM_BASE_WVR + i);
|
||||
if (val != (addr & ~alignment_mask))
|
||||
goto unlock;
|
||||
|
||||
/* Possible match, check the byte address select. */
|
||||
ctrl_reg = read_wb_reg(ARM_BASE_WCR + i);
|
||||
decode_ctrl_reg(ctrl_reg, &ctrl);
|
||||
if (!((1 << (addr & alignment_mask)) & ctrl.len))
|
||||
goto unlock;
|
||||
|
||||
/* Check that the access type matches. */
|
||||
if (debug_exception_updates_fsr()) {
|
||||
access = (fsr & ARM_FSR_ACCESS_MASK) ?
|
||||
HW_BREAKPOINT_W : HW_BREAKPOINT_R;
|
||||
if (!(access & hw_breakpoint_type(wp)))
|
||||
goto unlock;
|
||||
continue;
|
||||
}
|
||||
|
||||
val = read_wb_reg(ARM_BASE_WVR + i);
|
||||
ctrl_reg = read_wb_reg(ARM_BASE_WCR + i);
|
||||
decode_ctrl_reg(ctrl_reg, &ctrl);
|
||||
dist = get_distance_from_watchpoint(addr, val, &ctrl);
|
||||
if (dist < min_dist) {
|
||||
min_dist = dist;
|
||||
closest_match = i;
|
||||
}
|
||||
/* Is this an exact match? */
|
||||
if (dist != 0)
|
||||
continue;
|
||||
|
||||
/* We have a winner. */
|
||||
info = counter_arch_bp(wp);
|
||||
info->trigger = addr;
|
||||
}
|
||||
|
||||
|
@ -770,13 +804,23 @@ static void watchpoint_handler(unsigned long addr, unsigned int fsr,
|
|||
* we can single-step over the watchpoint trigger.
|
||||
*/
|
||||
if (!is_default_overflow_handler(wp))
|
||||
goto unlock;
|
||||
|
||||
continue;
|
||||
step:
|
||||
enable_single_step(wp, instruction_pointer(regs));
|
||||
unlock:
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
if (min_dist > 0 && min_dist != -1) {
|
||||
/* No exact match found. */
|
||||
wp = slots[closest_match];
|
||||
info = counter_arch_bp(wp);
|
||||
info->trigger = addr;
|
||||
pr_debug("watchpoint fired: address = 0x%x\n", info->trigger);
|
||||
perf_bp_event(wp, regs);
|
||||
if (is_default_overflow_handler(wp))
|
||||
enable_single_step(wp, instruction_pointer(regs));
|
||||
}
|
||||
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
static void watchpoint_single_step_handler(unsigned long pc)
|
||||
|
|
|
@ -240,6 +240,7 @@ config SAMSUNG_PM_DEBUG
|
|||
bool "Samsung PM Suspend debug"
|
||||
depends on PM && DEBUG_KERNEL
|
||||
depends on DEBUG_EXYNOS_UART || DEBUG_S3C24XX_UART || DEBUG_S3C2410_UART
|
||||
depends on DEBUG_LL && MMU
|
||||
help
|
||||
Say Y here if you want verbose debugging from the PM Suspend and
|
||||
Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>
|
||||
|
|
|
@ -46,6 +46,7 @@ config ARCH_BCM_IPROC
|
|||
config ARCH_BERLIN
|
||||
bool "Marvell Berlin SoC Family"
|
||||
select DW_APB_ICTL
|
||||
select DW_APB_TIMER_OF
|
||||
select GPIOLIB
|
||||
select PINCTRL
|
||||
help
|
||||
|
|
|
@ -430,6 +430,7 @@
|
|||
bus-width = <8>;
|
||||
mmc-hs200-1_8v;
|
||||
non-removable;
|
||||
full-pwr-cycle-in-suspend;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
|
|
@ -192,6 +192,7 @@ enum vcpu_sysreg {
|
|||
#define cp14_DBGWCR0 (DBGWCR0_EL1 * 2)
|
||||
#define cp14_DBGWVR0 (DBGWVR0_EL1 * 2)
|
||||
#define cp14_DBGDCCINT (MDCCINT_EL1 * 2)
|
||||
#define cp14_DBGVCR (DBGVCR32_EL2 * 2)
|
||||
|
||||
#define NR_COPRO_REGS (NR_SYS_REGS * 2)
|
||||
|
||||
|
|
|
@ -25,6 +25,9 @@ const struct cpumask *cpumask_of_node(int node);
|
|||
/* Returns a pointer to the cpumask of CPUs on Node 'node'. */
|
||||
static inline const struct cpumask *cpumask_of_node(int node)
|
||||
{
|
||||
if (node == NUMA_NO_NODE)
|
||||
return cpu_all_mask;
|
||||
|
||||
return node_to_cpumask_map[node];
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -619,6 +619,12 @@ check_branch_predictor(const struct arm64_cpu_capabilities *entry, int scope)
|
|||
return (need_wa > 0);
|
||||
}
|
||||
|
||||
static void
|
||||
cpu_enable_branch_predictor_hardening(const struct arm64_cpu_capabilities *cap)
|
||||
{
|
||||
cap->matches(cap, SCOPE_LOCAL_CPU);
|
||||
}
|
||||
|
||||
static const __maybe_unused struct midr_range tx2_family_cpus[] = {
|
||||
MIDR_ALL_VERSIONS(MIDR_BRCM_VULCAN),
|
||||
MIDR_ALL_VERSIONS(MIDR_CAVIUM_THUNDERX2),
|
||||
|
@ -813,9 +819,11 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
|
|||
},
|
||||
#endif
|
||||
{
|
||||
.desc = "Branch predictor hardening",
|
||||
.capability = ARM64_HARDEN_BRANCH_PREDICTOR,
|
||||
.type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM,
|
||||
.matches = check_branch_predictor,
|
||||
.cpu_enable = cpu_enable_branch_predictor_hardening,
|
||||
},
|
||||
#ifdef CONFIG_HARDEN_EL2_VECTORS
|
||||
{
|
||||
|
|
|
@ -272,21 +272,23 @@ void store_cpu_topology(unsigned int cpuid)
|
|||
if (mpidr & MPIDR_UP_BITMASK)
|
||||
return;
|
||||
|
||||
/* Create cpu topology mapping based on MPIDR. */
|
||||
if (mpidr & MPIDR_MT_BITMASK) {
|
||||
/* Multiprocessor system : Multi-threads per core */
|
||||
cpuid_topo->thread_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
|
||||
cpuid_topo->core_id = MPIDR_AFFINITY_LEVEL(mpidr, 1);
|
||||
cpuid_topo->package_id = MPIDR_AFFINITY_LEVEL(mpidr, 2) |
|
||||
MPIDR_AFFINITY_LEVEL(mpidr, 3) << 8;
|
||||
} else {
|
||||
/* Multiprocessor system : Single-thread per core */
|
||||
/*
|
||||
* This would be the place to create cpu topology based on MPIDR.
|
||||
*
|
||||
* However, it cannot be trusted to depict the actual topology; some
|
||||
* pieces of the architecture enforce an artificial cap on Aff0 values
|
||||
* (e.g. GICv3's ICC_SGI1R_EL1 limits it to 15), leading to an
|
||||
* artificial cycling of Aff1, Aff2 and Aff3 values. IOW, these end up
|
||||
* having absolutely no relationship to the actual underlying system
|
||||
* topology, and cannot be reasonably used as core / package ID.
|
||||
*
|
||||
* If the MT bit is set, Aff0 *could* be used to define a thread ID, but
|
||||
* we still wouldn't be able to obtain a sane core ID. This means we
|
||||
* need to entirely ignore MPIDR for any topology deduction.
|
||||
*/
|
||||
cpuid_topo->thread_id = -1;
|
||||
cpuid_topo->core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
|
||||
cpuid_topo->package_id = MPIDR_AFFINITY_LEVEL(mpidr, 1) |
|
||||
MPIDR_AFFINITY_LEVEL(mpidr, 2) << 8 |
|
||||
MPIDR_AFFINITY_LEVEL(mpidr, 3) << 16;
|
||||
}
|
||||
cpuid_topo->core_id = cpuid;
|
||||
cpuid_topo->package_id = cpu_to_node(cpuid);
|
||||
|
||||
pr_debug("CPU%u: cluster %d core %d thread %d mpidr %#016llx\n",
|
||||
cpuid, cpuid_topo->package_id, cpuid_topo->core_id,
|
||||
|
|
|
@ -1555,9 +1555,9 @@ static const struct sys_reg_desc cp14_regs[] = {
|
|||
{ Op1( 0), CRn( 0), CRm( 1), Op2( 0), trap_raz_wi },
|
||||
DBG_BCR_BVR_WCR_WVR(1),
|
||||
/* DBGDCCINT */
|
||||
{ Op1( 0), CRn( 0), CRm( 2), Op2( 0), trap_debug32 },
|
||||
{ Op1( 0), CRn( 0), CRm( 2), Op2( 0), trap_debug32, NULL, cp14_DBGDCCINT },
|
||||
/* DBGDSCRext */
|
||||
{ Op1( 0), CRn( 0), CRm( 2), Op2( 2), trap_debug32 },
|
||||
{ Op1( 0), CRn( 0), CRm( 2), Op2( 2), trap_debug32, NULL, cp14_DBGDSCRext },
|
||||
DBG_BCR_BVR_WCR_WVR(2),
|
||||
/* DBGDTR[RT]Xint */
|
||||
{ Op1( 0), CRn( 0), CRm( 3), Op2( 0), trap_raz_wi },
|
||||
|
@ -1572,7 +1572,7 @@ static const struct sys_reg_desc cp14_regs[] = {
|
|||
{ Op1( 0), CRn( 0), CRm( 6), Op2( 2), trap_raz_wi },
|
||||
DBG_BCR_BVR_WCR_WVR(6),
|
||||
/* DBGVCR */
|
||||
{ Op1( 0), CRn( 0), CRm( 7), Op2( 0), trap_debug32 },
|
||||
{ Op1( 0), CRn( 0), CRm( 7), Op2( 0), trap_debug32, NULL, cp14_DBGVCR },
|
||||
DBG_BCR_BVR_WCR_WVR(7),
|
||||
DBG_BCR_BVR_WCR_WVR(8),
|
||||
DBG_BCR_BVR_WCR_WVR(9),
|
||||
|
|
|
@ -58,7 +58,11 @@ EXPORT_SYMBOL(node_to_cpumask_map);
|
|||
*/
|
||||
const struct cpumask *cpumask_of_node(int node)
|
||||
{
|
||||
if (WARN_ON(node >= nr_node_ids))
|
||||
|
||||
if (node == NUMA_NO_NODE)
|
||||
return cpu_all_mask;
|
||||
|
||||
if (WARN_ON(node < 0 || node >= nr_node_ids))
|
||||
return cpu_none_mask;
|
||||
|
||||
if (WARN_ON(node_to_cpumask_map[node] == NULL))
|
||||
|
|
|
@ -42,7 +42,7 @@ obj-y += esi_stub.o # must be in kernel proper
|
|||
endif
|
||||
obj-$(CONFIG_INTEL_IOMMU) += pci-dma.o
|
||||
|
||||
obj-$(CONFIG_BINFMT_ELF) += elfcore.o
|
||||
obj-$(CONFIG_ELF_CORE) += elfcore.o
|
||||
|
||||
# fp_emulate() expects f2-f5,f16-f31 to contain the user-level state.
|
||||
CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31
|
||||
|
|
|
@ -409,83 +409,9 @@ static void kretprobe_trampoline(void)
|
|||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* At this point the target function has been tricked into
|
||||
* returning into our trampoline. Lookup the associated instance
|
||||
* and then:
|
||||
* - call the handler function
|
||||
* - cleanup by marking the instance as unused
|
||||
* - long jump back to the original return address
|
||||
*/
|
||||
int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
|
||||
{
|
||||
struct kretprobe_instance *ri = NULL;
|
||||
struct hlist_head *head, empty_rp;
|
||||
struct hlist_node *tmp;
|
||||
unsigned long flags, orig_ret_address = 0;
|
||||
unsigned long trampoline_address =
|
||||
((struct fnptr *)kretprobe_trampoline)->ip;
|
||||
|
||||
INIT_HLIST_HEAD(&empty_rp);
|
||||
kretprobe_hash_lock(current, &head, &flags);
|
||||
|
||||
/*
|
||||
* It is possible to have multiple instances associated with a given
|
||||
* task either because an multiple functions in the call path
|
||||
* have a return probe installed on them, and/or more than one return
|
||||
* return probe was registered for a target function.
|
||||
*
|
||||
* We can handle this because:
|
||||
* - instances are always inserted at the head of the list
|
||||
* - when multiple return probes are registered for the same
|
||||
* function, the first instance's ret_addr will point to the
|
||||
* real return address, and all the rest will point to
|
||||
* kretprobe_trampoline
|
||||
*/
|
||||
hlist_for_each_entry_safe(ri, tmp, head, hlist) {
|
||||
if (ri->task != current)
|
||||
/* another task is sharing our hash bucket */
|
||||
continue;
|
||||
|
||||
orig_ret_address = (unsigned long)ri->ret_addr;
|
||||
if (orig_ret_address != trampoline_address)
|
||||
/*
|
||||
* This is the real return address. Any other
|
||||
* instances associated with this task are for
|
||||
* other calls deeper on the call stack
|
||||
*/
|
||||
break;
|
||||
}
|
||||
|
||||
regs->cr_iip = orig_ret_address;
|
||||
|
||||
hlist_for_each_entry_safe(ri, tmp, head, hlist) {
|
||||
if (ri->task != current)
|
||||
/* another task is sharing our hash bucket */
|
||||
continue;
|
||||
|
||||
if (ri->rp && ri->rp->handler)
|
||||
ri->rp->handler(ri, regs);
|
||||
|
||||
orig_ret_address = (unsigned long)ri->ret_addr;
|
||||
recycle_rp_inst(ri, &empty_rp);
|
||||
|
||||
if (orig_ret_address != trampoline_address)
|
||||
/*
|
||||
* This is the real return address. Any other
|
||||
* instances associated with this task are for
|
||||
* other calls deeper on the call stack
|
||||
*/
|
||||
break;
|
||||
}
|
||||
kretprobe_assert(ri, orig_ret_address, trampoline_address);
|
||||
|
||||
kretprobe_hash_unlock(current, &flags);
|
||||
|
||||
hlist_for_each_entry_safe(ri, tmp, &empty_rp, hlist) {
|
||||
hlist_del(&ri->hlist);
|
||||
kfree(ri);
|
||||
}
|
||||
regs->cr_iip = __kretprobe_trampoline_handler(regs, kretprobe_trampoline, NULL);
|
||||
/*
|
||||
* By returning a non-zero value, we are telling
|
||||
* kprobe_handler() that we don't want the post_handler
|
||||
|
@ -498,6 +424,7 @@ void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
|
|||
struct pt_regs *regs)
|
||||
{
|
||||
ri->ret_addr = (kprobe_opcode_t *)regs->b0;
|
||||
ri->fp = NULL;
|
||||
|
||||
/* Replace the return addr with trampoline addr */
|
||||
regs->b0 = ((struct fnptr *)kretprobe_trampoline)->ip;
|
||||
|
|
|
@ -152,6 +152,7 @@ config PPC
|
|||
select ARCH_USE_BUILTIN_BSWAP
|
||||
select ARCH_USE_CMPXCHG_LOCKREF if PPC64
|
||||
select ARCH_WANT_IPC_PARSE_VERSION
|
||||
select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
|
||||
select ARCH_WEAK_RELEASE_ACQUIRE
|
||||
select BINFMT_ELF
|
||||
select BUILDTIME_EXTABLE_SORT
|
||||
|
@ -1009,6 +1010,19 @@ config FSL_RIO
|
|||
|
||||
source "drivers/rapidio/Kconfig"
|
||||
|
||||
config PPC_RTAS_FILTER
|
||||
bool "Enable filtering of RTAS syscalls"
|
||||
default y
|
||||
depends on PPC_RTAS
|
||||
help
|
||||
The RTAS syscall API has security issues that could be used to
|
||||
compromise system integrity. This option enforces restrictions on the
|
||||
RTAS calls and arguments passed by userspace programs to mitigate
|
||||
these issues.
|
||||
|
||||
Say Y unless you know what you are doing and the filter is causing
|
||||
problems for you.
|
||||
|
||||
endmenu
|
||||
|
||||
config NONSTATIC_KERNEL
|
||||
|
|
|
@ -24,7 +24,7 @@ struct drmem_lmb {
|
|||
struct drmem_lmb_info {
|
||||
struct drmem_lmb *lmbs;
|
||||
int n_lmbs;
|
||||
u32 lmb_size;
|
||||
u64 lmb_size;
|
||||
};
|
||||
|
||||
extern struct drmem_lmb_info *drmem_info;
|
||||
|
@ -83,7 +83,7 @@ struct of_drconf_cell_v2 {
|
|||
#define DRCONF_MEM_AI_INVALID 0x00000040
|
||||
#define DRCONF_MEM_RESERVED 0x00000080
|
||||
|
||||
static inline u32 drmem_lmb_size(void)
|
||||
static inline u64 drmem_lmb_size(void)
|
||||
{
|
||||
return drmem_info->lmb_size;
|
||||
}
|
||||
|
|
|
@ -204,7 +204,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
|
|||
*/
|
||||
static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next)
|
||||
{
|
||||
switch_mm(prev, next, current);
|
||||
switch_mm_irqs_off(prev, next, current);
|
||||
}
|
||||
|
||||
/* We don't currently use enter_lazy_tlb() for anything */
|
||||
|
|
|
@ -1057,6 +1057,147 @@ struct pseries_errorlog *get_pseries_errorlog(struct rtas_error_log *log,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PPC_RTAS_FILTER
|
||||
|
||||
/*
|
||||
* The sys_rtas syscall, as originally designed, allows root to pass
|
||||
* arbitrary physical addresses to RTAS calls. A number of RTAS calls
|
||||
* can be abused to write to arbitrary memory and do other things that
|
||||
* are potentially harmful to system integrity, and thus should only
|
||||
* be used inside the kernel and not exposed to userspace.
|
||||
*
|
||||
* All known legitimate users of the sys_rtas syscall will only ever
|
||||
* pass addresses that fall within the RMO buffer, and use a known
|
||||
* subset of RTAS calls.
|
||||
*
|
||||
* Accordingly, we filter RTAS requests to check that the call is
|
||||
* permitted, and that provided pointers fall within the RMO buffer.
|
||||
* The rtas_filters list contains an entry for each permitted call,
|
||||
* with the indexes of the parameters which are expected to contain
|
||||
* addresses and sizes of buffers allocated inside the RMO buffer.
|
||||
*/
|
||||
struct rtas_filter {
|
||||
const char *name;
|
||||
int token;
|
||||
/* Indexes into the args buffer, -1 if not used */
|
||||
int buf_idx1;
|
||||
int size_idx1;
|
||||
int buf_idx2;
|
||||
int size_idx2;
|
||||
|
||||
int fixed_size;
|
||||
};
|
||||
|
||||
static struct rtas_filter rtas_filters[] __ro_after_init = {
|
||||
{ "ibm,activate-firmware", -1, -1, -1, -1, -1 },
|
||||
{ "ibm,configure-connector", -1, 0, -1, 1, -1, 4096 }, /* Special cased */
|
||||
{ "display-character", -1, -1, -1, -1, -1 },
|
||||
{ "ibm,display-message", -1, 0, -1, -1, -1 },
|
||||
{ "ibm,errinjct", -1, 2, -1, -1, -1, 1024 },
|
||||
{ "ibm,close-errinjct", -1, -1, -1, -1, -1 },
|
||||
{ "ibm,open-errinct", -1, -1, -1, -1, -1 },
|
||||
{ "ibm,get-config-addr-info2", -1, -1, -1, -1, -1 },
|
||||
{ "ibm,get-dynamic-sensor-state", -1, 1, -1, -1, -1 },
|
||||
{ "ibm,get-indices", -1, 2, 3, -1, -1 },
|
||||
{ "get-power-level", -1, -1, -1, -1, -1 },
|
||||
{ "get-sensor-state", -1, -1, -1, -1, -1 },
|
||||
{ "ibm,get-system-parameter", -1, 1, 2, -1, -1 },
|
||||
{ "get-time-of-day", -1, -1, -1, -1, -1 },
|
||||
{ "ibm,get-vpd", -1, 0, -1, 1, 2 },
|
||||
{ "ibm,lpar-perftools", -1, 2, 3, -1, -1 },
|
||||
{ "ibm,platform-dump", -1, 4, 5, -1, -1 },
|
||||
{ "ibm,read-slot-reset-state", -1, -1, -1, -1, -1 },
|
||||
{ "ibm,scan-log-dump", -1, 0, 1, -1, -1 },
|
||||
{ "ibm,set-dynamic-indicator", -1, 2, -1, -1, -1 },
|
||||
{ "ibm,set-eeh-option", -1, -1, -1, -1, -1 },
|
||||
{ "set-indicator", -1, -1, -1, -1, -1 },
|
||||
{ "set-power-level", -1, -1, -1, -1, -1 },
|
||||
{ "set-time-for-power-on", -1, -1, -1, -1, -1 },
|
||||
{ "ibm,set-system-parameter", -1, 1, -1, -1, -1 },
|
||||
{ "set-time-of-day", -1, -1, -1, -1, -1 },
|
||||
{ "ibm,suspend-me", -1, -1, -1, -1, -1 },
|
||||
{ "ibm,update-nodes", -1, 0, -1, -1, -1, 4096 },
|
||||
{ "ibm,update-properties", -1, 0, -1, -1, -1, 4096 },
|
||||
{ "ibm,physical-attestation", -1, 0, 1, -1, -1 },
|
||||
};
|
||||
|
||||
static bool in_rmo_buf(u32 base, u32 end)
|
||||
{
|
||||
return base >= rtas_rmo_buf &&
|
||||
base < (rtas_rmo_buf + RTAS_RMOBUF_MAX) &&
|
||||
base <= end &&
|
||||
end >= rtas_rmo_buf &&
|
||||
end < (rtas_rmo_buf + RTAS_RMOBUF_MAX);
|
||||
}
|
||||
|
||||
static bool block_rtas_call(int token, int nargs,
|
||||
struct rtas_args *args)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(rtas_filters); i++) {
|
||||
struct rtas_filter *f = &rtas_filters[i];
|
||||
u32 base, size, end;
|
||||
|
||||
if (token != f->token)
|
||||
continue;
|
||||
|
||||
if (f->buf_idx1 != -1) {
|
||||
base = be32_to_cpu(args->args[f->buf_idx1]);
|
||||
if (f->size_idx1 != -1)
|
||||
size = be32_to_cpu(args->args[f->size_idx1]);
|
||||
else if (f->fixed_size)
|
||||
size = f->fixed_size;
|
||||
else
|
||||
size = 1;
|
||||
|
||||
end = base + size - 1;
|
||||
if (!in_rmo_buf(base, end))
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (f->buf_idx2 != -1) {
|
||||
base = be32_to_cpu(args->args[f->buf_idx2]);
|
||||
if (f->size_idx2 != -1)
|
||||
size = be32_to_cpu(args->args[f->size_idx2]);
|
||||
else if (f->fixed_size)
|
||||
size = f->fixed_size;
|
||||
else
|
||||
size = 1;
|
||||
end = base + size - 1;
|
||||
|
||||
/*
|
||||
* Special case for ibm,configure-connector where the
|
||||
* address can be 0
|
||||
*/
|
||||
if (!strcmp(f->name, "ibm,configure-connector") &&
|
||||
base == 0)
|
||||
return false;
|
||||
|
||||
if (!in_rmo_buf(base, end))
|
||||
goto err;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
err:
|
||||
pr_err_ratelimited("sys_rtas: RTAS call blocked - exploit attempt?\n");
|
||||
pr_err_ratelimited("sys_rtas: token=0x%x, nargs=%d (called by %s)\n",
|
||||
token, nargs, current->comm);
|
||||
return true;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static bool block_rtas_call(int token, int nargs,
|
||||
struct rtas_args *args)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_PPC_RTAS_FILTER */
|
||||
|
||||
/* We assume to be passed big endian arguments */
|
||||
SYSCALL_DEFINE1(rtas, struct rtas_args __user *, uargs)
|
||||
{
|
||||
|
@ -1094,6 +1235,9 @@ SYSCALL_DEFINE1(rtas, struct rtas_args __user *, uargs)
|
|||
args.rets = &args.args[nargs];
|
||||
memset(args.rets, 0, nret * sizeof(rtas_arg_t));
|
||||
|
||||
if (block_rtas_call(token, nargs, &args))
|
||||
return -EINVAL;
|
||||
|
||||
/* Need to handle ibm,suspend_me call specially */
|
||||
if (token == ibm_suspend_me_token) {
|
||||
|
||||
|
@ -1155,6 +1299,9 @@ void __init rtas_initialize(void)
|
|||
unsigned long rtas_region = RTAS_INSTANTIATE_MAX;
|
||||
u32 base, size, entry;
|
||||
int no_base, no_size, no_entry;
|
||||
#ifdef CONFIG_PPC_RTAS_FILTER
|
||||
int i;
|
||||
#endif
|
||||
|
||||
/* Get RTAS dev node and fill up our "rtas" structure with infos
|
||||
* about it.
|
||||
|
@ -1190,6 +1337,12 @@ void __init rtas_initialize(void)
|
|||
#ifdef CONFIG_RTAS_ERROR_LOGGING
|
||||
rtas_last_error_token = rtas_token("rtas-last-error");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PPC_RTAS_FILTER
|
||||
for (i = 0; i < ARRAY_SIZE(rtas_filters); i++) {
|
||||
rtas_filters[i].token = rtas_token(rtas_filters[i].name);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int __init early_init_dt_scan_rtas(unsigned long node,
|
||||
|
|
|
@ -29,29 +29,27 @@
|
|||
|
||||
static DEFINE_PER_CPU(struct cpu, cpu_devices);
|
||||
|
||||
/*
|
||||
* SMT snooze delay stuff, 64-bit only for now
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_PPC64
|
||||
|
||||
/* Time in microseconds we delay before sleeping in the idle loop */
|
||||
static DEFINE_PER_CPU(long, smt_snooze_delay) = { 100 };
|
||||
/*
|
||||
* Snooze delay has not been hooked up since 3fa8cad82b94 ("powerpc/pseries/cpuidle:
|
||||
* smt-snooze-delay cleanup.") and has been broken even longer. As was foretold in
|
||||
* 2014:
|
||||
*
|
||||
* "ppc64_util currently utilises it. Once we fix ppc64_util, propose to clean
|
||||
* up the kernel code."
|
||||
*
|
||||
* powerpc-utils stopped using it as of 1.3.8. At some point in the future this
|
||||
* code should be removed.
|
||||
*/
|
||||
|
||||
static ssize_t store_smt_snooze_delay(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
const char *buf,
|
||||
size_t count)
|
||||
{
|
||||
struct cpu *cpu = container_of(dev, struct cpu, dev);
|
||||
ssize_t ret;
|
||||
long snooze;
|
||||
|
||||
ret = sscanf(buf, "%ld", &snooze);
|
||||
if (ret != 1)
|
||||
return -EINVAL;
|
||||
|
||||
per_cpu(smt_snooze_delay, cpu->dev.id) = snooze;
|
||||
pr_warn_once("%s (%d) stored to unsupported smt_snooze_delay, which has no effect.\n",
|
||||
current->comm, current->pid);
|
||||
return count;
|
||||
}
|
||||
|
||||
|
@ -59,9 +57,9 @@ static ssize_t show_smt_snooze_delay(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct cpu *cpu = container_of(dev, struct cpu, dev);
|
||||
|
||||
return sprintf(buf, "%ld\n", per_cpu(smt_snooze_delay, cpu->dev.id));
|
||||
pr_warn_once("%s (%d) read from unsupported smt_snooze_delay\n",
|
||||
current->comm, current->pid);
|
||||
return sprintf(buf, "100\n");
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(smt_snooze_delay, 0644, show_smt_snooze_delay,
|
||||
|
@ -69,16 +67,10 @@ static DEVICE_ATTR(smt_snooze_delay, 0644, show_smt_snooze_delay,
|
|||
|
||||
static int __init setup_smt_snooze_delay(char *str)
|
||||
{
|
||||
unsigned int cpu;
|
||||
long snooze;
|
||||
|
||||
if (!cpu_has_feature(CPU_FTR_SMT))
|
||||
return 1;
|
||||
|
||||
snooze = simple_strtol(str, NULL, 10);
|
||||
for_each_possible_cpu(cpu)
|
||||
per_cpu(smt_snooze_delay, cpu) = snooze;
|
||||
|
||||
pr_warn("smt-snooze-delay command line option has no effect\n");
|
||||
return 1;
|
||||
}
|
||||
__setup("smt-snooze-delay=", setup_smt_snooze_delay);
|
||||
|
|
|
@ -794,7 +794,7 @@ static void p9_hmi_special_emu(struct pt_regs *regs)
|
|||
{
|
||||
unsigned int ra, rb, t, i, sel, instr, rc;
|
||||
const void __user *addr;
|
||||
u8 vbuf[16], *vdst;
|
||||
u8 vbuf[16] __aligned(16), *vdst;
|
||||
unsigned long ea, msr, msr_mask;
|
||||
bool swap;
|
||||
|
||||
|
|
|
@ -183,14 +183,14 @@ static ssize_t raw_attr_read(struct file *filep, struct kobject *kobj,
|
|||
return count;
|
||||
}
|
||||
|
||||
static struct elog_obj *create_elog_obj(uint64_t id, size_t size, uint64_t type)
|
||||
static void create_elog_obj(uint64_t id, size_t size, uint64_t type)
|
||||
{
|
||||
struct elog_obj *elog;
|
||||
int rc;
|
||||
|
||||
elog = kzalloc(sizeof(*elog), GFP_KERNEL);
|
||||
if (!elog)
|
||||
return NULL;
|
||||
return;
|
||||
|
||||
elog->kobj.kset = elog_kset;
|
||||
|
||||
|
@ -223,18 +223,37 @@ static struct elog_obj *create_elog_obj(uint64_t id, size_t size, uint64_t type)
|
|||
rc = kobject_add(&elog->kobj, NULL, "0x%llx", id);
|
||||
if (rc) {
|
||||
kobject_put(&elog->kobj);
|
||||
return NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* As soon as the sysfs file for this elog is created/activated there is
|
||||
* a chance the opal_errd daemon (or any userspace) might read and
|
||||
* acknowledge the elog before kobject_uevent() is called. If that
|
||||
* happens then there is a potential race between
|
||||
* elog_ack_store->kobject_put() and kobject_uevent() which leads to a
|
||||
* use-after-free of a kernfs object resulting in a kernel crash.
|
||||
*
|
||||
* To avoid that, we need to take a reference on behalf of the bin file,
|
||||
* so that our reference remains valid while we call kobject_uevent().
|
||||
* We then drop our reference before exiting the function, leaving the
|
||||
* bin file to drop the last reference (if it hasn't already).
|
||||
*/
|
||||
|
||||
/* Take a reference for the bin file */
|
||||
kobject_get(&elog->kobj);
|
||||
rc = sysfs_create_bin_file(&elog->kobj, &elog->raw_attr);
|
||||
if (rc) {
|
||||
if (rc == 0) {
|
||||
kobject_uevent(&elog->kobj, KOBJ_ADD);
|
||||
} else {
|
||||
/* Drop the reference taken for the bin file */
|
||||
kobject_put(&elog->kobj);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
kobject_uevent(&elog->kobj, KOBJ_ADD);
|
||||
/* Drop our reference */
|
||||
kobject_put(&elog->kobj);
|
||||
|
||||
return elog;
|
||||
return;
|
||||
}
|
||||
|
||||
static irqreturn_t elog_event(int irq, void *data)
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#include <asm/udbg.h>
|
||||
#define DBG(fmt...) udbg_printf(fmt)
|
||||
#else
|
||||
#define DBG(fmt...)
|
||||
#define DBG(fmt...) do { } while (0)
|
||||
#endif
|
||||
|
||||
static void pnv_smp_setup_cpu(int cpu)
|
||||
|
|
|
@ -21,4 +21,7 @@
|
|||
/* vDSO location */
|
||||
#define AT_SYSINFO_EHDR 33
|
||||
|
||||
/* entries in ARCH_DLINFO */
|
||||
#define AT_VECTOR_SIZE_ARCH 1
|
||||
|
||||
#endif /* _UAPI_ASM_RISCV_AUXVEC_H */
|
||||
|
|
|
@ -356,6 +356,7 @@ static unsigned long clock_sync_flags;
|
|||
|
||||
#define CLOCK_SYNC_HAS_STP 0
|
||||
#define CLOCK_SYNC_STP 1
|
||||
#define CLOCK_SYNC_STPINFO_VALID 2
|
||||
|
||||
/*
|
||||
* The get_clock function for the physical clock. It will get the current
|
||||
|
@ -592,6 +593,22 @@ void stp_queue_work(void)
|
|||
queue_work(time_sync_wq, &stp_work);
|
||||
}
|
||||
|
||||
static int __store_stpinfo(void)
|
||||
{
|
||||
int rc = chsc_sstpi(stp_page, &stp_info, sizeof(struct stp_sstpi));
|
||||
|
||||
if (rc)
|
||||
clear_bit(CLOCK_SYNC_STPINFO_VALID, &clock_sync_flags);
|
||||
else
|
||||
set_bit(CLOCK_SYNC_STPINFO_VALID, &clock_sync_flags);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int stpinfo_valid(void)
|
||||
{
|
||||
return stp_online && test_bit(CLOCK_SYNC_STPINFO_VALID, &clock_sync_flags);
|
||||
}
|
||||
|
||||
static int stp_sync_clock(void *data)
|
||||
{
|
||||
struct clock_sync_data *sync = data;
|
||||
|
@ -613,8 +630,7 @@ static int stp_sync_clock(void *data)
|
|||
if (rc == 0) {
|
||||
sync->clock_delta = clock_delta;
|
||||
clock_sync_global(clock_delta);
|
||||
rc = chsc_sstpi(stp_page, &stp_info,
|
||||
sizeof(struct stp_sstpi));
|
||||
rc = __store_stpinfo();
|
||||
if (rc == 0 && stp_info.tmd != 2)
|
||||
rc = -EAGAIN;
|
||||
}
|
||||
|
@ -659,7 +675,7 @@ static void stp_work_fn(struct work_struct *work)
|
|||
if (rc)
|
||||
goto out_unlock;
|
||||
|
||||
rc = chsc_sstpi(stp_page, &stp_info, sizeof(struct stp_sstpi));
|
||||
rc = __store_stpinfo();
|
||||
if (rc || stp_info.c == 0)
|
||||
goto out_unlock;
|
||||
|
||||
|
@ -696,10 +712,14 @@ static ssize_t stp_ctn_id_show(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online)
|
||||
return -ENODATA;
|
||||
return sprintf(buf, "%016llx\n",
|
||||
ssize_t ret = -ENODATA;
|
||||
|
||||
mutex_lock(&stp_work_mutex);
|
||||
if (stpinfo_valid())
|
||||
ret = sprintf(buf, "%016llx\n",
|
||||
*(unsigned long long *) stp_info.ctnid);
|
||||
mutex_unlock(&stp_work_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(ctn_id, 0400, stp_ctn_id_show, NULL);
|
||||
|
@ -708,9 +728,13 @@ static ssize_t stp_ctn_type_show(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online)
|
||||
return -ENODATA;
|
||||
return sprintf(buf, "%i\n", stp_info.ctn);
|
||||
ssize_t ret = -ENODATA;
|
||||
|
||||
mutex_lock(&stp_work_mutex);
|
||||
if (stpinfo_valid())
|
||||
ret = sprintf(buf, "%i\n", stp_info.ctn);
|
||||
mutex_unlock(&stp_work_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(ctn_type, 0400, stp_ctn_type_show, NULL);
|
||||
|
@ -719,9 +743,13 @@ static ssize_t stp_dst_offset_show(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online || !(stp_info.vbits & 0x2000))
|
||||
return -ENODATA;
|
||||
return sprintf(buf, "%i\n", (int)(s16) stp_info.dsto);
|
||||
ssize_t ret = -ENODATA;
|
||||
|
||||
mutex_lock(&stp_work_mutex);
|
||||
if (stpinfo_valid() && (stp_info.vbits & 0x2000))
|
||||
ret = sprintf(buf, "%i\n", (int)(s16) stp_info.dsto);
|
||||
mutex_unlock(&stp_work_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(dst_offset, 0400, stp_dst_offset_show, NULL);
|
||||
|
@ -730,9 +758,13 @@ static ssize_t stp_leap_seconds_show(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online || !(stp_info.vbits & 0x8000))
|
||||
return -ENODATA;
|
||||
return sprintf(buf, "%i\n", (int)(s16) stp_info.leaps);
|
||||
ssize_t ret = -ENODATA;
|
||||
|
||||
mutex_lock(&stp_work_mutex);
|
||||
if (stpinfo_valid() && (stp_info.vbits & 0x8000))
|
||||
ret = sprintf(buf, "%i\n", (int)(s16) stp_info.leaps);
|
||||
mutex_unlock(&stp_work_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(leap_seconds, 0400, stp_leap_seconds_show, NULL);
|
||||
|
@ -741,9 +773,13 @@ static ssize_t stp_stratum_show(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online)
|
||||
return -ENODATA;
|
||||
return sprintf(buf, "%i\n", (int)(s16) stp_info.stratum);
|
||||
ssize_t ret = -ENODATA;
|
||||
|
||||
mutex_lock(&stp_work_mutex);
|
||||
if (stpinfo_valid())
|
||||
ret = sprintf(buf, "%i\n", (int)(s16) stp_info.stratum);
|
||||
mutex_unlock(&stp_work_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(stratum, 0400, stp_stratum_show, NULL);
|
||||
|
@ -752,9 +788,13 @@ static ssize_t stp_time_offset_show(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online || !(stp_info.vbits & 0x0800))
|
||||
return -ENODATA;
|
||||
return sprintf(buf, "%i\n", (int) stp_info.tto);
|
||||
ssize_t ret = -ENODATA;
|
||||
|
||||
mutex_lock(&stp_work_mutex);
|
||||
if (stpinfo_valid() && (stp_info.vbits & 0x0800))
|
||||
ret = sprintf(buf, "%i\n", (int) stp_info.tto);
|
||||
mutex_unlock(&stp_work_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(time_offset, 0400, stp_time_offset_show, NULL);
|
||||
|
@ -763,9 +803,13 @@ static ssize_t stp_time_zone_offset_show(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online || !(stp_info.vbits & 0x4000))
|
||||
return -ENODATA;
|
||||
return sprintf(buf, "%i\n", (int)(s16) stp_info.tzo);
|
||||
ssize_t ret = -ENODATA;
|
||||
|
||||
mutex_lock(&stp_work_mutex);
|
||||
if (stpinfo_valid() && (stp_info.vbits & 0x4000))
|
||||
ret = sprintf(buf, "%i\n", (int)(s16) stp_info.tzo);
|
||||
mutex_unlock(&stp_work_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(time_zone_offset, 0400,
|
||||
|
@ -775,9 +819,13 @@ static ssize_t stp_timing_mode_show(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online)
|
||||
return -ENODATA;
|
||||
return sprintf(buf, "%i\n", stp_info.tmd);
|
||||
ssize_t ret = -ENODATA;
|
||||
|
||||
mutex_lock(&stp_work_mutex);
|
||||
if (stpinfo_valid())
|
||||
ret = sprintf(buf, "%i\n", stp_info.tmd);
|
||||
mutex_unlock(&stp_work_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(timing_mode, 0400, stp_timing_mode_show, NULL);
|
||||
|
@ -786,9 +834,13 @@ static ssize_t stp_timing_state_show(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
if (!stp_online)
|
||||
return -ENODATA;
|
||||
return sprintf(buf, "%i\n", stp_info.tst);
|
||||
ssize_t ret = -ENODATA;
|
||||
|
||||
mutex_lock(&stp_work_mutex);
|
||||
if (stpinfo_valid())
|
||||
ret = sprintf(buf, "%i\n", stp_info.tst);
|
||||
mutex_unlock(&stp_work_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(timing_state, 0400, stp_timing_state_show, NULL);
|
||||
|
|
|
@ -1039,38 +1039,9 @@ void smp_fetch_global_pmu(void)
|
|||
* are flush_tlb_*() routines, and these run after flush_cache_*()
|
||||
* which performs the flushw.
|
||||
*
|
||||
* The SMP TLB coherency scheme we use works as follows:
|
||||
*
|
||||
* 1) mm->cpu_vm_mask is a bit mask of which cpus an address
|
||||
* mm->cpu_vm_mask is a bit mask of which cpus an address
|
||||
* space has (potentially) executed on, this is the heuristic
|
||||
* we use to avoid doing cross calls.
|
||||
*
|
||||
* Also, for flushing from kswapd and also for clones, we
|
||||
* use cpu_vm_mask as the list of cpus to make run the TLB.
|
||||
*
|
||||
* 2) TLB context numbers are shared globally across all processors
|
||||
* in the system, this allows us to play several games to avoid
|
||||
* cross calls.
|
||||
*
|
||||
* One invariant is that when a cpu switches to a process, and
|
||||
* that processes tsk->active_mm->cpu_vm_mask does not have the
|
||||
* current cpu's bit set, that tlb context is flushed locally.
|
||||
*
|
||||
* If the address space is non-shared (ie. mm->count == 1) we avoid
|
||||
* cross calls when we want to flush the currently running process's
|
||||
* tlb state. This is done by clearing all cpu bits except the current
|
||||
* processor's in current->mm->cpu_vm_mask and performing the
|
||||
* flush locally only. This will force any subsequent cpus which run
|
||||
* this task to flush the context from the local tlb if the process
|
||||
* migrates to another cpu (again).
|
||||
*
|
||||
* 3) For shared address spaces (threads) and swapping we bite the
|
||||
* bullet for most cases and perform the cross call (but only to
|
||||
* the cpus listed in cpu_vm_mask).
|
||||
*
|
||||
* The performance gain from "optimizing" away the cross call for threads is
|
||||
* questionable (in theory the big win for threads is the massive sharing of
|
||||
* address space state across processors).
|
||||
* we use to limit cross calls.
|
||||
*/
|
||||
|
||||
/* This currently is only used by the hugetlb arch pre-fault
|
||||
|
@ -1080,18 +1051,13 @@ void smp_fetch_global_pmu(void)
|
|||
void smp_flush_tlb_mm(struct mm_struct *mm)
|
||||
{
|
||||
u32 ctx = CTX_HWBITS(mm->context);
|
||||
int cpu = get_cpu();
|
||||
|
||||
if (atomic_read(&mm->mm_users) == 1) {
|
||||
cpumask_copy(mm_cpumask(mm), cpumask_of(cpu));
|
||||
goto local_flush_and_out;
|
||||
}
|
||||
get_cpu();
|
||||
|
||||
smp_cross_call_masked(&xcall_flush_tlb_mm,
|
||||
ctx, 0, 0,
|
||||
mm_cpumask(mm));
|
||||
|
||||
local_flush_and_out:
|
||||
__flush_tlb_mm(ctx, SECONDARY_CONTEXT);
|
||||
|
||||
put_cpu();
|
||||
|
@ -1114,15 +1080,13 @@ void smp_flush_tlb_pending(struct mm_struct *mm, unsigned long nr, unsigned long
|
|||
{
|
||||
u32 ctx = CTX_HWBITS(mm->context);
|
||||
struct tlb_pending_info info;
|
||||
int cpu = get_cpu();
|
||||
|
||||
get_cpu();
|
||||
|
||||
info.ctx = ctx;
|
||||
info.nr = nr;
|
||||
info.vaddrs = vaddrs;
|
||||
|
||||
if (mm == current->mm && atomic_read(&mm->mm_users) == 1)
|
||||
cpumask_copy(mm_cpumask(mm), cpumask_of(cpu));
|
||||
else
|
||||
smp_call_function_many(mm_cpumask(mm), tlb_pending_func,
|
||||
&info, 1);
|
||||
|
||||
|
@ -1134,14 +1098,13 @@ void smp_flush_tlb_pending(struct mm_struct *mm, unsigned long nr, unsigned long
|
|||
void smp_flush_tlb_page(struct mm_struct *mm, unsigned long vaddr)
|
||||
{
|
||||
unsigned long context = CTX_HWBITS(mm->context);
|
||||
int cpu = get_cpu();
|
||||
|
||||
if (mm == current->mm && atomic_read(&mm->mm_users) == 1)
|
||||
cpumask_copy(mm_cpumask(mm), cpumask_of(cpu));
|
||||
else
|
||||
get_cpu();
|
||||
|
||||
smp_cross_call_masked(&xcall_flush_tlb_page,
|
||||
context, vaddr, 0,
|
||||
mm_cpumask(mm));
|
||||
|
||||
__flush_tlb_page(context, vaddr);
|
||||
|
||||
put_cpu();
|
||||
|
|
|
@ -36,14 +36,14 @@ int write_sigio_irq(int fd)
|
|||
}
|
||||
|
||||
/* These are called from os-Linux/sigio.c to protect its pollfds arrays. */
|
||||
static DEFINE_SPINLOCK(sigio_spinlock);
|
||||
static DEFINE_MUTEX(sigio_mutex);
|
||||
|
||||
void sigio_lock(void)
|
||||
{
|
||||
spin_lock(&sigio_spinlock);
|
||||
mutex_lock(&sigio_mutex);
|
||||
}
|
||||
|
||||
void sigio_unlock(void)
|
||||
{
|
||||
spin_unlock(&sigio_spinlock);
|
||||
mutex_unlock(&sigio_mutex);
|
||||
}
|
||||
|
|
|
@ -89,6 +89,7 @@ struct perf_ibs {
|
|||
u64 max_period;
|
||||
unsigned long offset_mask[1];
|
||||
int offset_max;
|
||||
unsigned int fetch_count_reset_broken : 1;
|
||||
struct cpu_perf_ibs __percpu *pcpu;
|
||||
|
||||
struct attribute **format_attrs;
|
||||
|
@ -346,11 +347,15 @@ static u64 get_ibs_op_count(u64 config)
|
|||
{
|
||||
u64 count = 0;
|
||||
|
||||
/*
|
||||
* If the internal 27-bit counter rolled over, the count is MaxCnt
|
||||
* and the lower 7 bits of CurCnt are randomized.
|
||||
* Otherwise CurCnt has the full 27-bit current counter value.
|
||||
*/
|
||||
if (config & IBS_OP_VAL)
|
||||
count += (config & IBS_OP_MAX_CNT) << 4; /* cnt rolled over */
|
||||
|
||||
if (ibs_caps & IBS_CAPS_RDWROPCNT)
|
||||
count += (config & IBS_OP_CUR_CNT) >> 32;
|
||||
count = (config & IBS_OP_MAX_CNT) << 4;
|
||||
else if (ibs_caps & IBS_CAPS_RDWROPCNT)
|
||||
count = (config & IBS_OP_CUR_CNT) >> 32;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
@ -375,7 +380,12 @@ perf_ibs_event_update(struct perf_ibs *perf_ibs, struct perf_event *event,
|
|||
static inline void perf_ibs_enable_event(struct perf_ibs *perf_ibs,
|
||||
struct hw_perf_event *hwc, u64 config)
|
||||
{
|
||||
wrmsrl(hwc->config_base, hwc->config | config | perf_ibs->enable_mask);
|
||||
u64 tmp = hwc->config | config;
|
||||
|
||||
if (perf_ibs->fetch_count_reset_broken)
|
||||
wrmsrl(hwc->config_base, tmp & ~perf_ibs->enable_mask);
|
||||
|
||||
wrmsrl(hwc->config_base, tmp | perf_ibs->enable_mask);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -637,12 +647,13 @@ static int perf_ibs_handle_irq(struct perf_ibs *perf_ibs, struct pt_regs *iregs)
|
|||
perf_ibs->offset_max,
|
||||
offset + 1);
|
||||
} while (offset < offset_max);
|
||||
if (event->attr.sample_type & PERF_SAMPLE_RAW) {
|
||||
/*
|
||||
* Read IbsBrTarget and IbsOpData4 separately
|
||||
* Read IbsBrTarget, IbsOpData4, and IbsExtdCtl separately
|
||||
* depending on their availability.
|
||||
* Can't add to offset_max as they are staggered
|
||||
*/
|
||||
if (event->attr.sample_type & PERF_SAMPLE_RAW) {
|
||||
if (perf_ibs == &perf_ibs_op) {
|
||||
if (ibs_caps & IBS_CAPS_BRNTRGT) {
|
||||
rdmsrl(MSR_AMD64_IBSBRTARGET, *buf++);
|
||||
size++;
|
||||
|
@ -652,6 +663,11 @@ static int perf_ibs_handle_irq(struct perf_ibs *perf_ibs, struct pt_regs *iregs)
|
|||
size++;
|
||||
}
|
||||
}
|
||||
if (perf_ibs == &perf_ibs_fetch && (ibs_caps & IBS_CAPS_FETCHCTLEXTD)) {
|
||||
rdmsrl(MSR_AMD64_ICIBSEXTDCTL, *buf++);
|
||||
size++;
|
||||
}
|
||||
}
|
||||
ibs_data.size = sizeof(u64) * size;
|
||||
|
||||
regs = *iregs;
|
||||
|
@ -744,6 +760,13 @@ static __init void perf_event_ibs_init(void)
|
|||
{
|
||||
struct attribute **attr = ibs_op_format_attrs;
|
||||
|
||||
/*
|
||||
* Some chips fail to reset the fetch count when it is written; instead
|
||||
* they need a 0-1 transition of IbsFetchEn.
|
||||
*/
|
||||
if (boot_cpu_data.x86 >= 0x16 && boot_cpu_data.x86 <= 0x18)
|
||||
perf_ibs_fetch.fetch_count_reset_broken = 1;
|
||||
|
||||
perf_ibs_pmu_init(&perf_ibs_fetch, "ibs_fetch");
|
||||
|
||||
if (ibs_caps & IBS_CAPS_OPCNT) {
|
||||
|
|
|
@ -377,6 +377,7 @@
|
|||
#define MSR_AMD64_IBSOP_REG_MASK ((1UL<<MSR_AMD64_IBSOP_REG_COUNT)-1)
|
||||
#define MSR_AMD64_IBSCTL 0xc001103a
|
||||
#define MSR_AMD64_IBSBRTARGET 0xc001103b
|
||||
#define MSR_AMD64_ICIBSEXTDCTL 0xc001103c
|
||||
#define MSR_AMD64_IBSOPDATA4 0xc001103d
|
||||
#define MSR_AMD64_IBS_REG_COUNT_MAX 8 /* includes MSR_AMD64_IBSBRTARGET */
|
||||
#define MSR_AMD64_SEV 0xc0010131
|
||||
|
|
|
@ -300,19 +300,12 @@ EXPORT_SYMBOL_GPL(unwind_get_return_address);
|
|||
|
||||
unsigned long *unwind_get_return_address_ptr(struct unwind_state *state)
|
||||
{
|
||||
struct task_struct *task = state->task;
|
||||
|
||||
if (unwind_done(state))
|
||||
return NULL;
|
||||
|
||||
if (state->regs)
|
||||
return &state->regs->ip;
|
||||
|
||||
if (task != current && state->sp == task->thread.sp) {
|
||||
struct inactive_task_frame *frame = (void *)task->thread.sp;
|
||||
return &frame->ret_addr;
|
||||
}
|
||||
|
||||
if (state->sp)
|
||||
return (unsigned long *)state->sp - 1;
|
||||
|
||||
|
@ -634,7 +627,7 @@ void __unwind_start(struct unwind_state *state, struct task_struct *task,
|
|||
} else {
|
||||
struct inactive_task_frame *frame = (void *)task->thread.sp;
|
||||
|
||||
state->sp = task->thread.sp;
|
||||
state->sp = task->thread.sp + sizeof(*frame);
|
||||
state->bp = READ_ONCE_NOCHECK(frame->bp);
|
||||
state->ip = READ_ONCE_NOCHECK(frame->ret_addr);
|
||||
state->signal = (void *)state->ip == ret_from_fork;
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <asm/hw_irq.h>
|
||||
#include <asm/io_apic.h>
|
||||
#include <asm/intel-mid.h>
|
||||
#include <asm/acpi.h>
|
||||
|
||||
#define PCIE_CAP_OFFSET 0x100
|
||||
|
||||
|
|
|
@ -1383,6 +1383,15 @@ asmlinkage __visible void __init xen_start_kernel(void)
|
|||
x86_init.mpparse.get_smp_config = x86_init_uint_noop;
|
||||
|
||||
xen_boot_params_init_edd();
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
/*
|
||||
* Disable selecting "Firmware First mode" for correctable
|
||||
* memory errors, as this is the duty of the hypervisor to
|
||||
* decide.
|
||||
*/
|
||||
acpi_disable_cmcff = 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!boot_params.screen_info.orig_video_isVGA)
|
||||
|
|
|
@ -2129,10 +2129,11 @@ static void handle_bad_sector(struct bio *bio, sector_t maxsector)
|
|||
{
|
||||
char b[BDEVNAME_SIZE];
|
||||
|
||||
pr_info_ratelimited("attempt to access beyond end of device\n"
|
||||
"%s: rw=%d, want=%llu, limit=%llu\n",
|
||||
printk(KERN_INFO "attempt to access beyond end of device\n");
|
||||
printk(KERN_INFO "%s: rw=%d, want=%Lu, limit=%Lu\n",
|
||||
bio_devname(bio, b), bio->bi_opf,
|
||||
bio_end_sector(bio), maxsector);
|
||||
(unsigned long long)bio_end_sector(bio),
|
||||
(long long)maxsector);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FAIL_MAKE_REQUEST
|
||||
|
|
|
@ -757,6 +757,9 @@ int __init acpi_aml_init(void)
|
|||
goto err_exit;
|
||||
}
|
||||
|
||||
if (acpi_disabled)
|
||||
return -ENODEV;
|
||||
|
||||
/* Initialize AML IO interface */
|
||||
mutex_init(&acpi_aml_io.lock);
|
||||
init_waitqueue_head(&acpi_aml_io.wait);
|
||||
|
|
|
@ -224,9 +224,9 @@ static int __init extlog_init(void)
|
|||
u64 cap;
|
||||
int rc;
|
||||
|
||||
rdmsrl(MSR_IA32_MCG_CAP, cap);
|
||||
|
||||
if (!(cap & MCG_ELOG_P) || !extlog_get_l1addr())
|
||||
if (rdmsrl_safe(MSR_IA32_MCG_CAP, &cap) ||
|
||||
!(cap & MCG_ELOG_P) ||
|
||||
!extlog_get_l1addr())
|
||||
return -ENODEV;
|
||||
|
||||
if (edac_get_report_status() == EDAC_REPORTING_FORCE) {
|
||||
|
|
|
@ -149,6 +149,7 @@ struct acpi_button {
|
|||
int last_state;
|
||||
ktime_t last_time;
|
||||
bool suspended;
|
||||
bool lid_state_initialized;
|
||||
};
|
||||
|
||||
static BLOCKING_NOTIFIER_HEAD(acpi_lid_notifier);
|
||||
|
@ -404,6 +405,8 @@ static int acpi_lid_update_state(struct acpi_device *device,
|
|||
|
||||
static void acpi_lid_initialize_state(struct acpi_device *device)
|
||||
{
|
||||
struct acpi_button *button = acpi_driver_data(device);
|
||||
|
||||
switch (lid_init_state) {
|
||||
case ACPI_BUTTON_LID_INIT_OPEN:
|
||||
(void)acpi_lid_notify_state(device, 1);
|
||||
|
@ -415,13 +418,14 @@ static void acpi_lid_initialize_state(struct acpi_device *device)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
button->lid_state_initialized = true;
|
||||
}
|
||||
|
||||
static void acpi_button_notify(struct acpi_device *device, u32 event)
|
||||
{
|
||||
struct acpi_button *button = acpi_driver_data(device);
|
||||
struct input_dev *input;
|
||||
int users;
|
||||
|
||||
switch (event) {
|
||||
case ACPI_FIXED_HARDWARE_EVENT:
|
||||
|
@ -430,10 +434,7 @@ static void acpi_button_notify(struct acpi_device *device, u32 event)
|
|||
case ACPI_BUTTON_NOTIFY_STATUS:
|
||||
input = button->input;
|
||||
if (button->type == ACPI_BUTTON_TYPE_LID) {
|
||||
mutex_lock(&button->input->mutex);
|
||||
users = button->input->users;
|
||||
mutex_unlock(&button->input->mutex);
|
||||
if (users)
|
||||
if (button->lid_state_initialized)
|
||||
acpi_lid_update_state(device, true);
|
||||
} else {
|
||||
int keycode;
|
||||
|
@ -478,7 +479,7 @@ static int acpi_button_resume(struct device *dev)
|
|||
struct acpi_button *button = acpi_driver_data(device);
|
||||
|
||||
button->suspended = false;
|
||||
if (button->type == ACPI_BUTTON_TYPE_LID && button->input->users) {
|
||||
if (button->type == ACPI_BUTTON_TYPE_LID) {
|
||||
button->last_state = !!acpi_lid_evaluate_state(device);
|
||||
button->last_time = ktime_get();
|
||||
acpi_lid_initialize_state(device);
|
||||
|
|
|
@ -46,7 +46,7 @@ int acpi_numa __initdata;
|
|||
|
||||
int pxm_to_node(int pxm)
|
||||
{
|
||||
if (pxm < 0)
|
||||
if (pxm < 0 || pxm >= MAX_PXM_DOMAINS || numa_off)
|
||||
return NUMA_NO_NODE;
|
||||
return pxm_to_node_map[pxm];
|
||||
}
|
||||
|
|
|
@ -274,6 +274,15 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
|||
DMI_MATCH(DMI_PRODUCT_NAME, "530U4E/540U4E"),
|
||||
},
|
||||
},
|
||||
/* https://bugs.launchpad.net/bugs/1894667 */
|
||||
{
|
||||
.callback = video_detect_force_video,
|
||||
.ident = "HP 635 Notebook",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "HP 635 Notebook PC"),
|
||||
},
|
||||
},
|
||||
|
||||
/* Non win8 machines which need native backlight nevertheless */
|
||||
{
|
||||
|
|
|
@ -2122,7 +2122,7 @@ static int nv_swncq_sdbfis(struct ata_port *ap)
|
|||
pp->dhfis_bits &= ~done_mask;
|
||||
pp->dmafis_bits &= ~done_mask;
|
||||
pp->sdbfis_bits |= done_mask;
|
||||
ata_qc_complete_multiple(ap, ap->qc_active ^ done_mask);
|
||||
ata_qc_complete_multiple(ap, ata_qc_get_active(ap) ^ done_mask);
|
||||
|
||||
if (!ap->qc_active) {
|
||||
DPRINTK("over\n");
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
/* Descriptor table word 0 bit (when DTA32M = 1) */
|
||||
#define SATA_RCAR_DTEND BIT(0)
|
||||
|
||||
#define SATA_RCAR_DMA_BOUNDARY 0x1FFFFFFEUL
|
||||
#define SATA_RCAR_DMA_BOUNDARY 0x1FFFFFFFUL
|
||||
|
||||
/* Gen2 Physical Layer Control Registers */
|
||||
#define RCAR_GEN2_PHY_CTL1_REG 0x1704
|
||||
|
|
|
@ -3777,6 +3777,7 @@ static inline bool fwnode_is_primary(struct fwnode_handle *fwnode)
|
|||
*/
|
||||
void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode)
|
||||
{
|
||||
struct device *parent = dev->parent;
|
||||
struct fwnode_handle *fn = dev->fwnode;
|
||||
|
||||
if (fwnode) {
|
||||
|
@ -3791,7 +3792,8 @@ void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode)
|
|||
} else {
|
||||
if (fwnode_is_primary(fn)) {
|
||||
dev->fwnode = fn->secondary;
|
||||
fn->secondary = NULL;
|
||||
if (!(parent && fn == parent->fwnode))
|
||||
fn->secondary = ERR_PTR(-ENODEV);
|
||||
} else {
|
||||
dev->fwnode = NULL;
|
||||
}
|
||||
|
|
|
@ -740,9 +740,9 @@ static void recv_work(struct work_struct *work)
|
|||
|
||||
blk_mq_complete_request(blk_mq_rq_from_pdu(cmd));
|
||||
}
|
||||
nbd_config_put(nbd);
|
||||
atomic_dec(&config->recv_threads);
|
||||
wake_up(&config->recv_wq);
|
||||
nbd_config_put(nbd);
|
||||
kfree(args);
|
||||
}
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@ static inline void shrink_free_pagepool(struct xen_blkif_ring *ring, int num)
|
|||
|
||||
#define vaddr(page) ((unsigned long)pfn_to_kaddr(page_to_pfn(page)))
|
||||
|
||||
static int do_block_io_op(struct xen_blkif_ring *ring);
|
||||
static int do_block_io_op(struct xen_blkif_ring *ring, unsigned int *eoi_flags);
|
||||
static int dispatch_rw_block_io(struct xen_blkif_ring *ring,
|
||||
struct blkif_request *req,
|
||||
struct pending_req *pending_req);
|
||||
|
@ -615,6 +615,8 @@ int xen_blkif_schedule(void *arg)
|
|||
struct xen_vbd *vbd = &blkif->vbd;
|
||||
unsigned long timeout;
|
||||
int ret;
|
||||
bool do_eoi;
|
||||
unsigned int eoi_flags = XEN_EOI_FLAG_SPURIOUS;
|
||||
|
||||
set_freezable();
|
||||
while (!kthread_should_stop()) {
|
||||
|
@ -639,16 +641,23 @@ int xen_blkif_schedule(void *arg)
|
|||
if (timeout == 0)
|
||||
goto purge_gnt_list;
|
||||
|
||||
do_eoi = ring->waiting_reqs;
|
||||
|
||||
ring->waiting_reqs = 0;
|
||||
smp_mb(); /* clear flag *before* checking for work */
|
||||
|
||||
ret = do_block_io_op(ring);
|
||||
ret = do_block_io_op(ring, &eoi_flags);
|
||||
if (ret > 0)
|
||||
ring->waiting_reqs = 1;
|
||||
if (ret == -EACCES)
|
||||
wait_event_interruptible(ring->shutdown_wq,
|
||||
kthread_should_stop());
|
||||
|
||||
if (do_eoi && !ring->waiting_reqs) {
|
||||
xen_irq_lateeoi(ring->irq, eoi_flags);
|
||||
eoi_flags |= XEN_EOI_FLAG_SPURIOUS;
|
||||
}
|
||||
|
||||
purge_gnt_list:
|
||||
if (blkif->vbd.feature_gnt_persistent &&
|
||||
time_after(jiffies, ring->next_lru)) {
|
||||
|
@ -1121,7 +1130,7 @@ static void end_block_io_op(struct bio *bio)
|
|||
* and transmute it to the block API to hand it over to the proper block disk.
|
||||
*/
|
||||
static int
|
||||
__do_block_io_op(struct xen_blkif_ring *ring)
|
||||
__do_block_io_op(struct xen_blkif_ring *ring, unsigned int *eoi_flags)
|
||||
{
|
||||
union blkif_back_rings *blk_rings = &ring->blk_rings;
|
||||
struct blkif_request req;
|
||||
|
@ -1144,6 +1153,9 @@ __do_block_io_op(struct xen_blkif_ring *ring)
|
|||
if (RING_REQUEST_CONS_OVERFLOW(&blk_rings->common, rc))
|
||||
break;
|
||||
|
||||
/* We've seen a request, so clear spurious eoi flag. */
|
||||
*eoi_flags &= ~XEN_EOI_FLAG_SPURIOUS;
|
||||
|
||||
if (kthread_should_stop()) {
|
||||
more_to_do = 1;
|
||||
break;
|
||||
|
@ -1202,13 +1214,13 @@ __do_block_io_op(struct xen_blkif_ring *ring)
|
|||
}
|
||||
|
||||
static int
|
||||
do_block_io_op(struct xen_blkif_ring *ring)
|
||||
do_block_io_op(struct xen_blkif_ring *ring, unsigned int *eoi_flags)
|
||||
{
|
||||
union blkif_back_rings *blk_rings = &ring->blk_rings;
|
||||
int more_to_do;
|
||||
|
||||
do {
|
||||
more_to_do = __do_block_io_op(ring);
|
||||
more_to_do = __do_block_io_op(ring, eoi_flags);
|
||||
if (more_to_do)
|
||||
break;
|
||||
|
||||
|
|
|
@ -237,9 +237,8 @@ static int xen_blkif_map(struct xen_blkif_ring *ring, grant_ref_t *gref,
|
|||
BUG();
|
||||
}
|
||||
|
||||
err = bind_interdomain_evtchn_to_irqhandler(blkif->domid, evtchn,
|
||||
xen_blkif_be_int, 0,
|
||||
"blkif-backend", ring);
|
||||
err = bind_interdomain_evtchn_to_irqhandler_lateeoi(blkif->domid,
|
||||
evtchn, xen_blkif_be_int, 0, "blkif-backend", ring);
|
||||
if (err < 0) {
|
||||
xenbus_unmap_ring_vfree(blkif->be->dev, ring->blk_ring);
|
||||
ring->blk_rings.common.sring = NULL;
|
||||
|
|
|
@ -129,7 +129,12 @@ int __must_check fsl_create_mc_io(struct device *dev,
|
|||
*/
|
||||
void fsl_destroy_mc_io(struct fsl_mc_io *mc_io)
|
||||
{
|
||||
struct fsl_mc_device *dpmcp_dev = mc_io->dpmcp_dev;
|
||||
struct fsl_mc_device *dpmcp_dev;
|
||||
|
||||
if (!mc_io)
|
||||
return;
|
||||
|
||||
dpmcp_dev = mc_io->dpmcp_dev;
|
||||
|
||||
if (dpmcp_dev)
|
||||
fsl_mc_io_unset_dpmcp(mc_io);
|
||||
|
|
|
@ -146,10 +146,12 @@ static void __init of_ti_clockdomain_setup(struct device_node *node)
|
|||
if (clk_hw_get_flags(clk_hw) & CLK_IS_BASIC) {
|
||||
pr_warn("can't setup clkdm for basic clk %s\n",
|
||||
__clk_get_name(clk));
|
||||
clk_put(clk);
|
||||
continue;
|
||||
}
|
||||
to_clk_hw_omap(clk_hw)->clkdm_name = clkdm_name;
|
||||
omap2_init_clk_clkdm(clk_hw);
|
||||
clk_put(clk);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -701,7 +701,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
|||
cpumask_copy(policy->cpus, topology_core_cpumask(cpu));
|
||||
}
|
||||
|
||||
if (check_amd_hwpstate_cpu(cpu) && !acpi_pstate_strict) {
|
||||
if (check_amd_hwpstate_cpu(cpu) && boot_cpu_data.x86 < 0x19 &&
|
||||
!acpi_pstate_strict) {
|
||||
cpumask_clear(policy->cpus);
|
||||
cpumask_set_cpu(cpu, policy->cpus);
|
||||
cpumask_copy(data->freqdomain_cpus,
|
||||
|
|
|
@ -144,7 +144,8 @@ static const struct reg_field sti_stih407_dvfs_regfields[DVFS_MAX_REGFIELDS] = {
|
|||
static const struct reg_field *sti_cpufreq_match(void)
|
||||
{
|
||||
if (of_machine_is_compatible("st,stih407") ||
|
||||
of_machine_is_compatible("st,stih410"))
|
||||
of_machine_is_compatible("st,stih410") ||
|
||||
of_machine_is_compatible("st,stih418"))
|
||||
return sti_stih407_dvfs_regfields;
|
||||
|
||||
return NULL;
|
||||
|
@ -261,7 +262,8 @@ static int sti_cpufreq_init(void)
|
|||
int ret;
|
||||
|
||||
if ((!of_machine_is_compatible("st,stih407")) &&
|
||||
(!of_machine_is_compatible("st,stih410")))
|
||||
(!of_machine_is_compatible("st,stih410")) &&
|
||||
(!of_machine_is_compatible("st,stih418")))
|
||||
return -ENODEV;
|
||||
|
||||
ddata.cpu = get_cpu_device(0);
|
||||
|
|
|
@ -696,14 +696,13 @@ static int chtls_pass_open_rpl(struct chtls_dev *cdev, struct sk_buff *skb)
|
|||
if (rpl->status != CPL_ERR_NONE) {
|
||||
pr_info("Unexpected PASS_OPEN_RPL status %u for STID %u\n",
|
||||
rpl->status, stid);
|
||||
return CPL_RET_BUF_DONE;
|
||||
}
|
||||
} else {
|
||||
cxgb4_free_stid(cdev->tids, stid, listen_ctx->lsk->sk_family);
|
||||
sock_put(listen_ctx->lsk);
|
||||
kfree(listen_ctx);
|
||||
module_put(THIS_MODULE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
return CPL_RET_BUF_DONE;
|
||||
}
|
||||
|
||||
static int chtls_close_listsrv_rpl(struct chtls_dev *cdev, struct sk_buff *skb)
|
||||
|
@ -720,15 +719,13 @@ static int chtls_close_listsrv_rpl(struct chtls_dev *cdev, struct sk_buff *skb)
|
|||
if (rpl->status != CPL_ERR_NONE) {
|
||||
pr_info("Unexpected CLOSE_LISTSRV_RPL status %u for STID %u\n",
|
||||
rpl->status, stid);
|
||||
return CPL_RET_BUF_DONE;
|
||||
}
|
||||
|
||||
} else {
|
||||
cxgb4_free_stid(cdev->tids, stid, listen_ctx->lsk->sk_family);
|
||||
sock_put(listen_ctx->lsk);
|
||||
kfree(listen_ctx);
|
||||
module_put(THIS_MODULE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
return CPL_RET_BUF_DONE;
|
||||
}
|
||||
|
||||
static void chtls_purge_wr_queue(struct sock *sk)
|
||||
|
@ -1348,7 +1345,6 @@ static void add_to_reap_list(struct sock *sk)
|
|||
struct chtls_sock *csk = sk->sk_user_data;
|
||||
|
||||
local_bh_disable();
|
||||
bh_lock_sock(sk);
|
||||
release_tcp_port(sk); /* release the port immediately */
|
||||
|
||||
spin_lock(&reap_list_lock);
|
||||
|
@ -1357,7 +1353,6 @@ static void add_to_reap_list(struct sock *sk)
|
|||
if (!csk->passive_reap_next)
|
||||
schedule_work(&reap_task);
|
||||
spin_unlock(&reap_list_lock);
|
||||
bh_unlock_sock(sk);
|
||||
local_bh_enable();
|
||||
}
|
||||
|
||||
|
|
|
@ -1549,6 +1549,7 @@ static int chtls_pt_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
|
|||
tp->urg_data = 0;
|
||||
|
||||
if ((avail + offset) >= skb->len) {
|
||||
struct sk_buff *next_skb;
|
||||
if (ULP_SKB_CB(skb)->flags & ULPCB_FLAG_TLS_HDR) {
|
||||
tp->copied_seq += skb->len;
|
||||
hws->rcvpld = skb->hdr_len;
|
||||
|
@ -1558,8 +1559,10 @@ static int chtls_pt_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
|
|||
chtls_free_skb(sk, skb);
|
||||
buffers_freed++;
|
||||
hws->copied_seq = 0;
|
||||
if (copied >= target &&
|
||||
!skb_peek(&sk->sk_receive_queue))
|
||||
next_skb = skb_peek(&sk->sk_receive_queue);
|
||||
if (copied >= target && !next_skb)
|
||||
break;
|
||||
if (ULP_SKB_CB(next_skb)->flags & ULPCB_FLAG_TLS_HDR)
|
||||
break;
|
||||
}
|
||||
} while (len > 0);
|
||||
|
|
|
@ -574,11 +574,11 @@ static enum dma_status jz4780_dma_tx_status(struct dma_chan *chan,
|
|||
enum dma_status status;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&jzchan->vchan.lock, flags);
|
||||
|
||||
status = dma_cookie_status(chan, cookie, txstate);
|
||||
if ((status == DMA_COMPLETE) || (txstate == NULL))
|
||||
return status;
|
||||
|
||||
spin_lock_irqsave(&jzchan->vchan.lock, flags);
|
||||
goto out_unlock_irqrestore;
|
||||
|
||||
vdesc = vchan_find_desc(&jzchan->vchan, cookie);
|
||||
if (vdesc) {
|
||||
|
@ -595,6 +595,7 @@ static enum dma_status jz4780_dma_tx_status(struct dma_chan *chan,
|
|||
&& jzchan->desc->status & (JZ_DMA_DCS_AR | JZ_DMA_DCS_HLT))
|
||||
status = DMA_ERROR;
|
||||
|
||||
out_unlock_irqrestore:
|
||||
spin_unlock_irqrestore(&jzchan->vchan.lock, flags);
|
||||
return status;
|
||||
}
|
||||
|
|
|
@ -565,6 +565,7 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
|
|||
struct ww_acquire_ctx ticket;
|
||||
struct list_head list, duplicates;
|
||||
uint64_t va_flags;
|
||||
uint64_t vm_size;
|
||||
int r = 0;
|
||||
|
||||
if (args->va_address < AMDGPU_VA_RESERVED_SIZE) {
|
||||
|
@ -585,6 +586,15 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,
|
|||
|
||||
args->va_address &= AMDGPU_VA_HOLE_MASK;
|
||||
|
||||
vm_size = adev->vm_manager.max_pfn * AMDGPU_GPU_PAGE_SIZE;
|
||||
vm_size -= AMDGPU_VA_RESERVED_SIZE;
|
||||
if (args->va_address + args->map_size > vm_size) {
|
||||
dev_dbg(&dev->pdev->dev,
|
||||
"va_address 0x%llx is in top reserved area 0x%llx\n",
|
||||
args->va_address + args->map_size, vm_size);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ((args->flags & ~valid_flags) && (args->flags & ~prt_flags)) {
|
||||
dev_dbg(&dev->pdev->dev, "invalid flags combination 0x%08X\n",
|
||||
args->flags);
|
||||
|
|
|
@ -2009,7 +2009,7 @@ enum dc_status dc_link_validate_mode_timing(
|
|||
/* A hack to avoid failing any modes for EDID override feature on
|
||||
* topology change such as lower quality cable for DP or different dongle
|
||||
*/
|
||||
if (link->remote_sinks[0])
|
||||
if (link->remote_sinks[0] && link->remote_sinks[0]->sink_signal == SIGNAL_TYPE_VIRTUAL)
|
||||
return DC_OK;
|
||||
|
||||
/* Passive Dongle */
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
* general debug capabilities
|
||||
*
|
||||
*/
|
||||
#if defined(CONFIG_HAVE_KGDB) || defined(CONFIG_KGDB)
|
||||
#if defined(CONFIG_DEBUG_KERNEL_DC) && (defined(CONFIG_HAVE_KGDB) || defined(CONFIG_KGDB))
|
||||
#define ASSERT_CRITICAL(expr) do { \
|
||||
if (WARN_ON(!(expr))) { \
|
||||
kgdb_breakpoint(); \
|
||||
|
|
|
@ -306,8 +306,12 @@ static int stdp4028_ge_b850v3_fw_probe(struct i2c_client *stdp4028_i2c,
|
|||
const struct i2c_device_id *id)
|
||||
{
|
||||
struct device *dev = &stdp4028_i2c->dev;
|
||||
int ret;
|
||||
|
||||
ge_b850v3_lvds_init(dev);
|
||||
ret = ge_b850v3_lvds_init(dev);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ge_b850v3_lvds_ptr->stdp4028_i2c = stdp4028_i2c;
|
||||
i2c_set_clientdata(stdp4028_i2c, ge_b850v3_lvds_ptr);
|
||||
|
@ -365,8 +369,12 @@ static int stdp2690_ge_b850v3_fw_probe(struct i2c_client *stdp2690_i2c,
|
|||
const struct i2c_device_id *id)
|
||||
{
|
||||
struct device *dev = &stdp2690_i2c->dev;
|
||||
int ret;
|
||||
|
||||
ge_b850v3_lvds_init(dev);
|
||||
ret = ge_b850v3_lvds_init(dev);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ge_b850v3_lvds_ptr->stdp2690_i2c = stdp2690_i2c;
|
||||
i2c_set_clientdata(stdp2690_i2c, ge_b850v3_lvds_ptr);
|
||||
|
|
|
@ -326,7 +326,6 @@ static void dw_mipi_message_config(struct dw_mipi_dsi *dsi,
|
|||
if (lpm)
|
||||
val |= CMD_MODE_ALL_LP;
|
||||
|
||||
dsi_write(dsi, DSI_LPCLK_CTRL, lpm ? 0 : PHY_TXREQUESTCLKHS);
|
||||
dsi_write(dsi, DSI_CMD_MODE_CFG, val);
|
||||
}
|
||||
|
||||
|
@ -488,16 +487,22 @@ static void dw_mipi_dsi_video_mode_config(struct dw_mipi_dsi *dsi)
|
|||
static void dw_mipi_dsi_set_mode(struct dw_mipi_dsi *dsi,
|
||||
unsigned long mode_flags)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
dsi_write(dsi, DSI_PWR_UP, RESET);
|
||||
|
||||
if (mode_flags & MIPI_DSI_MODE_VIDEO) {
|
||||
dsi_write(dsi, DSI_MODE_CFG, ENABLE_VIDEO_MODE);
|
||||
dw_mipi_dsi_video_mode_config(dsi);
|
||||
dsi_write(dsi, DSI_LPCLK_CTRL, PHY_TXREQUESTCLKHS);
|
||||
} else {
|
||||
dsi_write(dsi, DSI_MODE_CFG, ENABLE_CMD_MODE);
|
||||
}
|
||||
|
||||
val = PHY_TXREQUESTCLKHS;
|
||||
if (dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS)
|
||||
val |= AUTO_CLKLANE_CTRL;
|
||||
dsi_write(dsi, DSI_LPCLK_CTRL, val);
|
||||
|
||||
dsi_write(dsi, DSI_PWR_UP, POWERUP);
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
#include <uapi/drm/i915_drm.h>
|
||||
#include <uapi/drm/drm_fourcc.h>
|
||||
|
||||
#include <asm/hypervisor.h>
|
||||
|
||||
#include <linux/io-mapping.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/i2c-algo-bit.h>
|
||||
|
@ -2683,7 +2685,9 @@ static inline bool intel_vtd_active(void)
|
|||
if (intel_iommu_gfx_mapped)
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
|
||||
/* Running as a guest, we assume the host is enforcing VT'd */
|
||||
return !hypervisor_is_type(X86_HYPER_NATIVE);
|
||||
}
|
||||
|
||||
static inline bool intel_scanout_needs_vtd_wa(struct drm_i915_private *dev_priv)
|
||||
|
|
|
@ -671,7 +671,7 @@ bool ttm_bo_eviction_valuable(struct ttm_buffer_object *bo,
|
|||
/* Don't evict this BO if it's outside of the
|
||||
* requested placement range
|
||||
*/
|
||||
if (place->fpfn >= (bo->mem.start + bo->mem.size) ||
|
||||
if (place->fpfn >= (bo->mem.start + bo->mem.num_pages) ||
|
||||
(place->lpfn && place->lpfn <= bo->mem.start))
|
||||
return false;
|
||||
|
||||
|
|
|
@ -2729,7 +2729,9 @@ static int wacom_wac_collection(struct hid_device *hdev, struct hid_report *repo
|
|||
if (report->type != HID_INPUT_REPORT)
|
||||
return -1;
|
||||
|
||||
if (WACOM_PEN_FIELD(field) && wacom->wacom_wac.pen_input)
|
||||
if (WACOM_PAD_FIELD(field))
|
||||
return 0;
|
||||
else if (WACOM_PEN_FIELD(field) && wacom->wacom_wac.pen_input)
|
||||
wacom_wac_pen_report(hdev, report);
|
||||
else if (WACOM_FINGER_FIELD(field) && wacom->wacom_wac.touch_input)
|
||||
wacom_wac_finger_report(hdev, report);
|
||||
|
|
|
@ -1101,14 +1101,6 @@ static int i2c_imx_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* Request IRQ */
|
||||
ret = devm_request_irq(&pdev->dev, irq, i2c_imx_isr, IRQF_SHARED,
|
||||
pdev->name, i2c_imx);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "can't claim irq %d\n", irq);
|
||||
goto clk_disable;
|
||||
}
|
||||
|
||||
/* Init queue */
|
||||
init_waitqueue_head(&i2c_imx->queue);
|
||||
|
||||
|
@ -1127,6 +1119,14 @@ static int i2c_imx_probe(struct platform_device *pdev)
|
|||
if (ret < 0)
|
||||
goto rpm_disable;
|
||||
|
||||
/* Request IRQ */
|
||||
ret = request_threaded_irq(irq, i2c_imx_isr, NULL, IRQF_SHARED,
|
||||
pdev->name, i2c_imx);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "can't claim irq %d\n", irq);
|
||||
goto rpm_disable;
|
||||
}
|
||||
|
||||
/* Set up clock divider */
|
||||
i2c_imx->bitrate = IMX_I2C_BIT_RATE;
|
||||
ret = of_property_read_u32(pdev->dev.of_node,
|
||||
|
@ -1169,13 +1169,12 @@ static int i2c_imx_probe(struct platform_device *pdev)
|
|||
|
||||
clk_notifier_unregister:
|
||||
clk_notifier_unregister(i2c_imx->clk, &i2c_imx->clk_change_nb);
|
||||
free_irq(irq, i2c_imx);
|
||||
rpm_disable:
|
||||
pm_runtime_put_noidle(&pdev->dev);
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
pm_runtime_set_suspended(&pdev->dev);
|
||||
pm_runtime_dont_use_autosuspend(&pdev->dev);
|
||||
|
||||
clk_disable:
|
||||
clk_disable_unprepare(i2c_imx->clk);
|
||||
return ret;
|
||||
}
|
||||
|
@ -1183,7 +1182,7 @@ static int i2c_imx_probe(struct platform_device *pdev)
|
|||
static int i2c_imx_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct imx_i2c_struct *i2c_imx = platform_get_drvdata(pdev);
|
||||
int ret;
|
||||
int irq, ret;
|
||||
|
||||
ret = pm_runtime_get_sync(&pdev->dev);
|
||||
if (ret < 0)
|
||||
|
@ -1203,6 +1202,9 @@ static int i2c_imx_remove(struct platform_device *pdev)
|
|||
imx_i2c_write_reg(0, i2c_imx, IMX_I2C_I2SR);
|
||||
|
||||
clk_notifier_unregister(i2c_imx->clk, &i2c_imx->clk_change_nb);
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq >= 0)
|
||||
free_irq(irq, i2c_imx);
|
||||
clk_disable_unprepare(i2c_imx->clk);
|
||||
|
||||
pm_runtime_put_noidle(&pdev->dev);
|
||||
|
|
|
@ -31,6 +31,12 @@ struct adc0832 {
|
|||
struct regulator *reg;
|
||||
struct mutex lock;
|
||||
u8 mux_bits;
|
||||
/*
|
||||
* Max size needed: 16x 1 byte ADC data + 8 bytes timestamp
|
||||
* May be shorter if not all channels are enabled subject
|
||||
* to the timestamp remaining 8 byte aligned.
|
||||
*/
|
||||
u8 data[24] __aligned(8);
|
||||
|
||||
u8 tx_buf[2] ____cacheline_aligned;
|
||||
u8 rx_buf[2];
|
||||
|
@ -202,7 +208,6 @@ static irqreturn_t adc0832_trigger_handler(int irq, void *p)
|
|||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct adc0832 *adc = iio_priv(indio_dev);
|
||||
u8 data[24] = { }; /* 16x 1 byte ADC data + 8 bytes timestamp */
|
||||
int scan_index;
|
||||
int i = 0;
|
||||
|
||||
|
@ -220,10 +225,10 @@ static irqreturn_t adc0832_trigger_handler(int irq, void *p)
|
|||
goto out;
|
||||
}
|
||||
|
||||
data[i] = ret;
|
||||
adc->data[i] = ret;
|
||||
i++;
|
||||
}
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, data,
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, adc->data,
|
||||
iio_get_time_ns(indio_dev));
|
||||
out:
|
||||
mutex_unlock(&adc->lock);
|
||||
|
|
|
@ -50,6 +50,12 @@ struct adc12138 {
|
|||
struct completion complete;
|
||||
/* The number of cclk periods for the S/H's acquisition time */
|
||||
unsigned int acquisition_time;
|
||||
/*
|
||||
* Maximum size needed: 16x 2 bytes ADC data + 8 bytes timestamp.
|
||||
* Less may be need if not all channels are enabled, as long as
|
||||
* the 8 byte alignment of the timestamp is maintained.
|
||||
*/
|
||||
__be16 data[20] __aligned(8);
|
||||
|
||||
u8 tx_buf[2] ____cacheline_aligned;
|
||||
u8 rx_buf[2];
|
||||
|
@ -332,7 +338,6 @@ static irqreturn_t adc12138_trigger_handler(int irq, void *p)
|
|||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct adc12138 *adc = iio_priv(indio_dev);
|
||||
__be16 data[20] = { }; /* 16x 2 bytes ADC data + 8 bytes timestamp */
|
||||
__be16 trash;
|
||||
int ret;
|
||||
int scan_index;
|
||||
|
@ -348,7 +353,7 @@ static irqreturn_t adc12138_trigger_handler(int irq, void *p)
|
|||
reinit_completion(&adc->complete);
|
||||
|
||||
ret = adc12138_start_and_read_conv(adc, scan_chan,
|
||||
i ? &data[i - 1] : &trash);
|
||||
i ? &adc->data[i - 1] : &trash);
|
||||
if (ret) {
|
||||
dev_warn(&adc->spi->dev,
|
||||
"failed to start conversion\n");
|
||||
|
@ -365,7 +370,7 @@ static irqreturn_t adc12138_trigger_handler(int irq, void *p)
|
|||
}
|
||||
|
||||
if (i) {
|
||||
ret = adc12138_read_conv_data(adc, &data[i - 1]);
|
||||
ret = adc12138_read_conv_data(adc, &adc->data[i - 1]);
|
||||
if (ret) {
|
||||
dev_warn(&adc->spi->dev,
|
||||
"failed to get conversion data\n");
|
||||
|
@ -373,7 +378,7 @@ static irqreturn_t adc12138_trigger_handler(int irq, void *p)
|
|||
}
|
||||
}
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, data,
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, adc->data,
|
||||
iio_get_time_ns(indio_dev));
|
||||
out:
|
||||
mutex_unlock(&adc->lock);
|
||||
|
|
|
@ -49,13 +49,20 @@ static irqreturn_t itg3200_trigger_handler(int irq, void *p)
|
|||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct itg3200 *st = iio_priv(indio_dev);
|
||||
__be16 buf[ITG3200_SCAN_ELEMENTS + sizeof(s64)/sizeof(u16)];
|
||||
/*
|
||||
* Ensure correct alignment and padding including for the
|
||||
* timestamp that may be inserted.
|
||||
*/
|
||||
struct {
|
||||
__be16 buf[ITG3200_SCAN_ELEMENTS];
|
||||
s64 ts __aligned(8);
|
||||
} scan;
|
||||
|
||||
int ret = itg3200_read_all_channels(st->i2c, buf);
|
||||
int ret = itg3200_read_all_channels(st->i2c, scan.buf);
|
||||
if (ret < 0)
|
||||
goto error_ret;
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, buf, pf->timestamp);
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, &scan, pf->timestamp);
|
||||
|
||||
iio_trigger_notify_done(indio_dev->trig);
|
||||
|
||||
|
|
|
@ -172,6 +172,7 @@ struct si1145_part_info {
|
|||
* @part_info: Part information
|
||||
* @trig: Pointer to iio trigger
|
||||
* @meas_rate: Value of MEAS_RATE register. Only set in HW in auto mode
|
||||
* @buffer: Used to pack data read from sensor.
|
||||
*/
|
||||
struct si1145_data {
|
||||
struct i2c_client *client;
|
||||
|
@ -183,6 +184,14 @@ struct si1145_data {
|
|||
bool autonomous;
|
||||
struct iio_trigger *trig;
|
||||
int meas_rate;
|
||||
/*
|
||||
* Ensure timestamp will be naturally aligned if present.
|
||||
* Maximum buffer size (may be only partly used if not all
|
||||
* channels are enabled):
|
||||
* 6*2 bytes channels data + 4 bytes alignment +
|
||||
* 8 bytes timestamp
|
||||
*/
|
||||
u8 buffer[24] __aligned(8);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -444,12 +453,6 @@ static irqreturn_t si1145_trigger_handler(int irq, void *private)
|
|||
struct iio_poll_func *pf = private;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct si1145_data *data = iio_priv(indio_dev);
|
||||
/*
|
||||
* Maximum buffer size:
|
||||
* 6*2 bytes channels data + 4 bytes alignment +
|
||||
* 8 bytes timestamp
|
||||
*/
|
||||
u8 buffer[24];
|
||||
int i, j = 0;
|
||||
int ret;
|
||||
u8 irq_status = 0;
|
||||
|
@ -482,7 +485,7 @@ static irqreturn_t si1145_trigger_handler(int irq, void *private)
|
|||
|
||||
ret = i2c_smbus_read_i2c_block_data_or_emulated(
|
||||
data->client, indio_dev->channels[i].address,
|
||||
sizeof(u16) * run, &buffer[j]);
|
||||
sizeof(u16) * run, &data->buffer[j]);
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
j += run * sizeof(u16);
|
||||
|
@ -497,7 +500,7 @@ static irqreturn_t si1145_trigger_handler(int irq, void *private)
|
|||
goto done;
|
||||
}
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, buffer,
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
|
||||
iio_get_time_ns(indio_dev));
|
||||
|
||||
done:
|
||||
|
|
|
@ -571,13 +571,12 @@ static void process_one_req(struct work_struct *_work)
|
|||
req->callback = NULL;
|
||||
|
||||
spin_lock_bh(&lock);
|
||||
if (!list_empty(&req->list)) {
|
||||
/*
|
||||
* Although the work will normally have been canceled by the
|
||||
* workqueue, it can still be requeued as long as it is on the
|
||||
* req_list.
|
||||
* Although the work will normally have been canceled by the workqueue,
|
||||
* it can still be requeued as long as it is on the req_list.
|
||||
*/
|
||||
cancel_delayed_work(&req->work);
|
||||
if (!list_empty(&req->list)) {
|
||||
list_del_init(&req->list);
|
||||
kfree(req);
|
||||
}
|
||||
|
|
|
@ -677,6 +677,7 @@ int qedr_iw_destroy_listen(struct iw_cm_id *cm_id)
|
|||
listener->qed_handle);
|
||||
|
||||
cm_id->rem_ref(cm_id);
|
||||
kfree(listener);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ EXPORT_SYMBOL(hil_mlc_unregister);
|
|||
static LIST_HEAD(hil_mlcs);
|
||||
static DEFINE_RWLOCK(hil_mlcs_lock);
|
||||
static struct timer_list hil_mlcs_kicker;
|
||||
static int hil_mlcs_probe;
|
||||
static int hil_mlcs_probe, hil_mlc_stop;
|
||||
|
||||
static void hil_mlcs_process(unsigned long unused);
|
||||
static DECLARE_TASKLET_DISABLED(hil_mlcs_tasklet, hil_mlcs_process, 0);
|
||||
|
@ -702,9 +702,13 @@ static int hilse_donode(hil_mlc *mlc)
|
|||
if (!mlc->ostarted) {
|
||||
mlc->ostarted = 1;
|
||||
mlc->opacket = pack;
|
||||
mlc->out(mlc);
|
||||
rc = mlc->out(mlc);
|
||||
nextidx = HILSEN_DOZE;
|
||||
write_unlock_irqrestore(&mlc->lock, flags);
|
||||
if (rc) {
|
||||
hil_mlc_stop = 1;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
mlc->ostarted = 0;
|
||||
|
@ -715,8 +719,13 @@ static int hilse_donode(hil_mlc *mlc)
|
|||
|
||||
case HILSE_CTS:
|
||||
write_lock_irqsave(&mlc->lock, flags);
|
||||
nextidx = mlc->cts(mlc) ? node->bad : node->good;
|
||||
rc = mlc->cts(mlc);
|
||||
nextidx = rc ? node->bad : node->good;
|
||||
write_unlock_irqrestore(&mlc->lock, flags);
|
||||
if (rc) {
|
||||
hil_mlc_stop = 1;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -780,6 +789,12 @@ static void hil_mlcs_process(unsigned long unused)
|
|||
|
||||
static void hil_mlcs_timer(struct timer_list *unused)
|
||||
{
|
||||
if (hil_mlc_stop) {
|
||||
/* could not send packet - stop immediately. */
|
||||
pr_warn(PREFIX "HIL seems stuck - Disabling HIL MLC.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
hil_mlcs_probe = 1;
|
||||
tasklet_schedule(&hil_mlcs_tasklet);
|
||||
/* Re-insert the periodic task. */
|
||||
|
|
|
@ -210,7 +210,7 @@ static int hp_sdc_mlc_cts(hil_mlc *mlc)
|
|||
priv->tseq[2] = 1;
|
||||
priv->tseq[3] = 0;
|
||||
priv->tseq[4] = 0;
|
||||
__hp_sdc_enqueue_transaction(&priv->trans);
|
||||
return __hp_sdc_enqueue_transaction(&priv->trans);
|
||||
busy:
|
||||
return 1;
|
||||
done:
|
||||
|
@ -219,7 +219,7 @@ static int hp_sdc_mlc_cts(hil_mlc *mlc)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void hp_sdc_mlc_out(hil_mlc *mlc)
|
||||
static int hp_sdc_mlc_out(hil_mlc *mlc)
|
||||
{
|
||||
struct hp_sdc_mlc_priv_s *priv;
|
||||
|
||||
|
@ -234,7 +234,7 @@ static void hp_sdc_mlc_out(hil_mlc *mlc)
|
|||
do_data:
|
||||
if (priv->emtestmode) {
|
||||
up(&mlc->osem);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
/* Shouldn't be sending commands when loop may be busy */
|
||||
BUG_ON(down_trylock(&mlc->csem));
|
||||
|
@ -296,7 +296,7 @@ static void hp_sdc_mlc_out(hil_mlc *mlc)
|
|||
BUG_ON(down_trylock(&mlc->csem));
|
||||
}
|
||||
enqueue:
|
||||
hp_sdc_enqueue_transaction(&priv->trans);
|
||||
return hp_sdc_enqueue_transaction(&priv->trans);
|
||||
}
|
||||
|
||||
static int __init hp_sdc_mlc_init(void)
|
||||
|
|
|
@ -336,7 +336,7 @@ static int bcm6328_led(struct device *dev, struct device_node *nc, u32 reg,
|
|||
led->cdev.brightness_set = bcm6328_led_set;
|
||||
led->cdev.blink_set = bcm6328_blink_set;
|
||||
|
||||
rc = led_classdev_register(dev, &led->cdev);
|
||||
rc = devm_led_classdev_register(dev, &led->cdev);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ static int bcm6358_led(struct device *dev, struct device_node *nc, u32 reg,
|
|||
|
||||
led->cdev.brightness_set = bcm6358_led_set;
|
||||
|
||||
rc = led_classdev_register(dev, &led->cdev);
|
||||
rc = devm_led_classdev_register(dev, &led->cdev);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
|
|
|
@ -1371,7 +1371,7 @@ __acquires(bitmap->lock)
|
|||
if (bitmap->bp[page].hijacked ||
|
||||
bitmap->bp[page].map == NULL)
|
||||
csize = ((sector_t)1) << (bitmap->chunkshift +
|
||||
PAGE_COUNTER_SHIFT - 1);
|
||||
PAGE_COUNTER_SHIFT);
|
||||
else
|
||||
csize = ((sector_t)1) << bitmap->chunkshift;
|
||||
*blocks = csize - (offset & (csize - 1));
|
||||
|
|
|
@ -2417,8 +2417,6 @@ static int resize_stripes(struct r5conf *conf, int newsize)
|
|||
} else
|
||||
err = -ENOMEM;
|
||||
|
||||
mutex_unlock(&conf->cache_size_mutex);
|
||||
|
||||
conf->slab_cache = sc;
|
||||
conf->active_name = 1-conf->active_name;
|
||||
|
||||
|
@ -2441,6 +2439,8 @@ static int resize_stripes(struct r5conf *conf, int newsize)
|
|||
|
||||
if (!err)
|
||||
conf->pool_size = newsize;
|
||||
mutex_unlock(&conf->cache_size_mutex);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -1239,6 +1239,8 @@ static int imx274_s_frame_interval(struct v4l2_subdev *sd,
|
|||
ret = imx274_set_frame_interval(imx274, fi->interval);
|
||||
|
||||
if (!ret) {
|
||||
fi->interval = imx274->frame_interval;
|
||||
|
||||
/*
|
||||
* exposure time range is decided by frame interval
|
||||
* need to update it after frame interval changes
|
||||
|
@ -1760,9 +1762,9 @@ static int imx274_set_frame_interval(struct stimx274 *priv,
|
|||
__func__, frame_interval.numerator,
|
||||
frame_interval.denominator);
|
||||
|
||||
if (frame_interval.numerator == 0) {
|
||||
err = -EINVAL;
|
||||
goto fail;
|
||||
if (frame_interval.numerator == 0 || frame_interval.denominator == 0) {
|
||||
frame_interval.denominator = IMX274_DEF_FRAME_RATE;
|
||||
frame_interval.numerator = 1;
|
||||
}
|
||||
|
||||
req_frame_rate = (u32)(frame_interval.denominator
|
||||
|
|
|
@ -776,6 +776,9 @@ static int tw5864_enum_frameintervals(struct file *file, void *priv,
|
|||
fintv->type = V4L2_FRMIVAL_TYPE_STEPWISE;
|
||||
|
||||
ret = tw5864_frameinterval_get(input, &frameinterval);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
fintv->stepwise.step = frameinterval;
|
||||
fintv->stepwise.min = frameinterval;
|
||||
fintv->stepwise.max = frameinterval;
|
||||
|
@ -794,6 +797,9 @@ static int tw5864_g_parm(struct file *file, void *priv,
|
|||
cp->capability = V4L2_CAP_TIMEPERFRAME;
|
||||
|
||||
ret = tw5864_frameinterval_get(input, &cp->timeperframe);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
cp->timeperframe.numerator *= input->frame_interval;
|
||||
cp->capturemode = 0;
|
||||
cp->readbuffers = 2;
|
||||
|
|
|
@ -579,6 +579,13 @@ static int mtk_jpeg_queue_setup(struct vb2_queue *q,
|
|||
if (!q_data)
|
||||
return -EINVAL;
|
||||
|
||||
if (*num_planes) {
|
||||
for (i = 0; i < *num_planes; i++)
|
||||
if (sizes[i] < q_data->sizeimage[i])
|
||||
return -EINVAL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
*num_planes = q_data->fmt->colplanes;
|
||||
for (i = 0; i < q_data->fmt->colplanes; i++) {
|
||||
sizes[i] = q_data->sizeimage[i];
|
||||
|
|
|
@ -1853,30 +1853,35 @@ int uvc_xu_ctrl_query(struct uvc_video_chain *chain,
|
|||
{
|
||||
struct uvc_entity *entity;
|
||||
struct uvc_control *ctrl;
|
||||
unsigned int i, found = 0;
|
||||
unsigned int i;
|
||||
bool found;
|
||||
u32 reqflags;
|
||||
u16 size;
|
||||
u8 *data = NULL;
|
||||
int ret;
|
||||
|
||||
/* Find the extension unit. */
|
||||
found = false;
|
||||
list_for_each_entry(entity, &chain->entities, chain) {
|
||||
if (UVC_ENTITY_TYPE(entity) == UVC_VC_EXTENSION_UNIT &&
|
||||
entity->id == xqry->unit)
|
||||
entity->id == xqry->unit) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (entity->id != xqry->unit) {
|
||||
if (!found) {
|
||||
uvc_trace(UVC_TRACE_CONTROL, "Extension unit %u not found.\n",
|
||||
xqry->unit);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
/* Find the control and perform delayed initialization if needed. */
|
||||
found = false;
|
||||
for (i = 0; i < entity->ncontrols; ++i) {
|
||||
ctrl = &entity->controls[i];
|
||||
if (ctrl->index == xqry->selector - 1) {
|
||||
found = 1;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2033,13 +2038,6 @@ static int uvc_ctrl_add_info(struct uvc_device *dev, struct uvc_control *ctrl,
|
|||
goto done;
|
||||
}
|
||||
|
||||
/*
|
||||
* Retrieve control flags from the device. Ignore errors and work with
|
||||
* default flag values from the uvc_ctrl array when the device doesn't
|
||||
* properly implement GET_INFO on standard controls.
|
||||
*/
|
||||
uvc_ctrl_get_flags(dev, ctrl, &ctrl->info);
|
||||
|
||||
ctrl->initialized = 1;
|
||||
|
||||
uvc_trace(UVC_TRACE_CONTROL, "Added control %pUl/%u to device %s "
|
||||
|
@ -2262,6 +2260,13 @@ static void uvc_ctrl_init_ctrl(struct uvc_device *dev, struct uvc_control *ctrl)
|
|||
if (uvc_entity_match_guid(ctrl->entity, info->entity) &&
|
||||
ctrl->index == info->index) {
|
||||
uvc_ctrl_add_info(dev, ctrl, info);
|
||||
/*
|
||||
* Retrieve control flags from the device. Ignore errors
|
||||
* and work with default flag values from the uvc_ctrl
|
||||
* array when the device doesn't properly implement
|
||||
* GET_INFO on standard controls.
|
||||
*/
|
||||
uvc_ctrl_get_flags(dev, ctrl, &ctrl->info);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -165,35 +165,12 @@ static const struct file_operations emif_mr4_fops = {
|
|||
|
||||
static int __init_or_module emif_debugfs_init(struct emif_data *emif)
|
||||
{
|
||||
struct dentry *dentry;
|
||||
int ret;
|
||||
|
||||
dentry = debugfs_create_dir(dev_name(emif->dev), NULL);
|
||||
if (!dentry) {
|
||||
ret = -ENOMEM;
|
||||
goto err0;
|
||||
}
|
||||
emif->debugfs_root = dentry;
|
||||
|
||||
dentry = debugfs_create_file("regcache_dump", S_IRUGO,
|
||||
emif->debugfs_root, emif, &emif_regdump_fops);
|
||||
if (!dentry) {
|
||||
ret = -ENOMEM;
|
||||
goto err1;
|
||||
}
|
||||
|
||||
dentry = debugfs_create_file("mr4", S_IRUGO,
|
||||
emif->debugfs_root, emif, &emif_mr4_fops);
|
||||
if (!dentry) {
|
||||
ret = -ENOMEM;
|
||||
goto err1;
|
||||
}
|
||||
|
||||
emif->debugfs_root = debugfs_create_dir(dev_name(emif->dev), NULL);
|
||||
debugfs_create_file("regcache_dump", S_IRUGO, emif->debugfs_root, emif,
|
||||
&emif_regdump_fops);
|
||||
debugfs_create_file("mr4", S_IRUGO, emif->debugfs_root, emif,
|
||||
&emif_mr4_fops);
|
||||
return 0;
|
||||
err1:
|
||||
debugfs_remove_recursive(emif->debugfs_root);
|
||||
err0:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void __exit emif_debugfs_exit(struct emif_data *emif)
|
||||
|
|
|
@ -1174,8 +1174,10 @@ mptscsih_remove(struct pci_dev *pdev)
|
|||
MPT_SCSI_HOST *hd;
|
||||
int sz1;
|
||||
|
||||
if((hd = shost_priv(host)) == NULL)
|
||||
return;
|
||||
if (host == NULL)
|
||||
hd = NULL;
|
||||
else
|
||||
hd = shost_priv(host);
|
||||
|
||||
mptscsih_shutdown(pdev);
|
||||
|
||||
|
@ -1191,14 +1193,15 @@ mptscsih_remove(struct pci_dev *pdev)
|
|||
"Free'd ScsiLookup (%d) memory\n",
|
||||
ioc->name, sz1));
|
||||
|
||||
if (hd)
|
||||
kfree(hd->info_kbuf);
|
||||
|
||||
/* NULL the Scsi_Host pointer
|
||||
*/
|
||||
ioc->sh = NULL;
|
||||
|
||||
if (host)
|
||||
scsi_host_put(host);
|
||||
|
||||
mpt_detach(pdev);
|
||||
|
||||
}
|
||||
|
|
|
@ -397,8 +397,8 @@ int cxl_calc_capp_routing(struct pci_dev *dev, u64 *chipid,
|
|||
*capp_unit_id = get_capp_unit_id(np, *phb_index);
|
||||
of_node_put(np);
|
||||
if (!*capp_unit_id) {
|
||||
pr_err("cxl: invalid capp unit id (phb_index: %d)\n",
|
||||
*phb_index);
|
||||
pr_err("cxl: No capp unit found for PHB[%lld,%d]. Make sure the adapter is on a capi-compatible slot\n",
|
||||
*chipid, *phb_index);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
|
|
@ -546,6 +546,43 @@ static int sdhci_acpi_emmc_amd_probe_slot(struct platform_device *pdev,
|
|||
(host->mmc->caps & MMC_CAP_1_8V_DDR))
|
||||
host->mmc->caps2 = MMC_CAP2_HS400_1_8V;
|
||||
|
||||
/*
|
||||
* There are two types of presets out in the wild:
|
||||
* 1) Default/broken presets.
|
||||
* These presets have two sets of problems:
|
||||
* a) The clock divisor for SDR12, SDR25, and SDR50 is too small.
|
||||
* This results in clock frequencies that are 2x higher than
|
||||
* acceptable. i.e., SDR12 = 25 MHz, SDR25 = 50 MHz, SDR50 =
|
||||
* 100 MHz.x
|
||||
* b) The HS200 and HS400 driver strengths don't match.
|
||||
* By default, the SDR104 preset register has a driver strength of
|
||||
* A, but the (internal) HS400 preset register has a driver
|
||||
* strength of B. As part of initializing HS400, HS200 tuning
|
||||
* needs to be performed. Having different driver strengths
|
||||
* between tuning and operation is wrong. It results in different
|
||||
* rise/fall times that lead to incorrect sampling.
|
||||
* 2) Firmware with properly initialized presets.
|
||||
* These presets have proper clock divisors. i.e., SDR12 => 12MHz,
|
||||
* SDR25 => 25 MHz, SDR50 => 50 MHz. Additionally the HS200 and
|
||||
* HS400 preset driver strengths match.
|
||||
*
|
||||
* Enabling presets for HS400 doesn't work for the following reasons:
|
||||
* 1) sdhci_set_ios has a hard coded list of timings that are used
|
||||
* to determine if presets should be enabled.
|
||||
* 2) sdhci_get_preset_value is using a non-standard register to
|
||||
* read out HS400 presets. The AMD controller doesn't support this
|
||||
* non-standard register. In fact, it doesn't expose the HS400
|
||||
* preset register anywhere in the SDHCI memory map. This results
|
||||
* in reading a garbage value and using the wrong presets.
|
||||
*
|
||||
* Since HS400 and HS200 presets must be identical, we could
|
||||
* instead use the the SDR104 preset register.
|
||||
*
|
||||
* If the above issues are resolved we could remove this quirk for
|
||||
* firmware that that has valid presets (i.e., SDR12 <= 12 MHz).
|
||||
*/
|
||||
host->quirks2 |= SDHCI_QUIRK2_PRESET_VALUE_BROKEN;
|
||||
|
||||
host->mmc_host_ops.select_drive_strength = amd_select_drive_strength;
|
||||
host->mmc_host_ops.set_ios = amd_set_ios;
|
||||
return 0;
|
||||
|
|
|
@ -1273,11 +1273,14 @@ static void via_init_sdc_pm(struct via_crdr_mmc_host *host)
|
|||
static int via_sd_suspend(struct pci_dev *pcidev, pm_message_t state)
|
||||
{
|
||||
struct via_crdr_mmc_host *host;
|
||||
unsigned long flags;
|
||||
|
||||
host = pci_get_drvdata(pcidev);
|
||||
|
||||
spin_lock_irqsave(&host->lock, flags);
|
||||
via_save_pcictrlreg(host);
|
||||
via_save_sdcreg(host);
|
||||
spin_unlock_irqrestore(&host->lock, flags);
|
||||
|
||||
pci_save_state(pcidev);
|
||||
pci_enable_wake(pcidev, pci_choose_state(pcidev, state), 0);
|
||||
|
|
|
@ -1471,6 +1471,19 @@ int ubi_thread(void *u)
|
|||
!ubi->thread_enabled || ubi_dbg_is_bgt_disabled(ubi)) {
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
spin_unlock(&ubi->wl_lock);
|
||||
|
||||
/*
|
||||
* Check kthread_should_stop() after we set the task
|
||||
* state to guarantee that we either see the stop bit
|
||||
* and exit or the task state is reset to runnable such
|
||||
* that it's not scheduled out indefinitely and detects
|
||||
* the stop bit at kthread_should_stop().
|
||||
*/
|
||||
if (kthread_should_stop()) {
|
||||
set_current_state(TASK_RUNNING);
|
||||
break;
|
||||
}
|
||||
|
||||
schedule();
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -6326,6 +6326,11 @@ static void bnxt_report_link(struct bnxt *bp)
|
|||
u16 fec;
|
||||
|
||||
netif_carrier_on(bp->dev);
|
||||
speed = bnxt_fw_to_ethtool_speed(bp->link_info.link_speed);
|
||||
if (speed == SPEED_UNKNOWN) {
|
||||
netdev_info(bp->dev, "NIC Link is Up, speed unknown\n");
|
||||
return;
|
||||
}
|
||||
if (bp->link_info.duplex == BNXT_LINK_DUPLEX_FULL)
|
||||
duplex = "full";
|
||||
else
|
||||
|
@ -6338,7 +6343,6 @@ static void bnxt_report_link(struct bnxt *bp)
|
|||
flow_ctrl = "ON - receive";
|
||||
else
|
||||
flow_ctrl = "none";
|
||||
speed = bnxt_fw_to_ethtool_speed(bp->link_info.link_speed);
|
||||
netdev_info(bp->dev, "NIC Link is Up, %u Mbps %s duplex, Flow control: %s\n",
|
||||
speed, duplex, flow_ctrl);
|
||||
if (bp->flags & BNXT_FLAG_EEE_CAP)
|
||||
|
|
|
@ -145,13 +145,13 @@ static int configure_filter_smac(struct adapter *adap, struct filter_entry *f)
|
|||
int err;
|
||||
|
||||
/* do a set-tcb for smac-sel and CWR bit.. */
|
||||
err = set_tcb_tflag(adap, f, f->tid, TF_CCTRL_CWR_S, 1, 1);
|
||||
if (err)
|
||||
goto smac_err;
|
||||
|
||||
err = set_tcb_field(adap, f, f->tid, TCB_SMAC_SEL_W,
|
||||
TCB_SMAC_SEL_V(TCB_SMAC_SEL_M),
|
||||
TCB_SMAC_SEL_V(f->smt->idx), 1);
|
||||
if (err)
|
||||
goto smac_err;
|
||||
|
||||
err = set_tcb_tflag(adap, f, f->tid, TF_CCTRL_CWR_S, 1, 1);
|
||||
if (!err)
|
||||
return 0;
|
||||
|
||||
|
@ -608,6 +608,7 @@ int set_filter_wr(struct adapter *adapter, int fidx)
|
|||
FW_FILTER_WR_DIRSTEERHASH_V(f->fs.dirsteerhash) |
|
||||
FW_FILTER_WR_LPBK_V(f->fs.action == FILTER_SWITCH) |
|
||||
FW_FILTER_WR_DMAC_V(f->fs.newdmac) |
|
||||
FW_FILTER_WR_SMAC_V(f->fs.newsmac) |
|
||||
FW_FILTER_WR_INSVLAN_V(f->fs.newvlan == VLAN_INSERT ||
|
||||
f->fs.newvlan == VLAN_REWRITE) |
|
||||
FW_FILTER_WR_RMVLAN_V(f->fs.newvlan == VLAN_REMOVE ||
|
||||
|
@ -625,7 +626,7 @@ int set_filter_wr(struct adapter *adapter, int fidx)
|
|||
FW_FILTER_WR_OVLAN_VLD_V(f->fs.val.ovlan_vld) |
|
||||
FW_FILTER_WR_IVLAN_VLDM_V(f->fs.mask.ivlan_vld) |
|
||||
FW_FILTER_WR_OVLAN_VLDM_V(f->fs.mask.ovlan_vld));
|
||||
fwr->smac_sel = 0;
|
||||
fwr->smac_sel = f->smt->idx;
|
||||
fwr->rx_chan_rx_rpl_iq =
|
||||
htons(FW_FILTER_WR_RX_CHAN_V(0) |
|
||||
FW_FILTER_WR_RX_RPL_IQ_V(adapter->sge.fw_evtq.abs_id));
|
||||
|
@ -1019,11 +1020,8 @@ static void mk_act_open_req6(struct filter_entry *f, struct sk_buff *skb,
|
|||
TX_QUEUE_V(f->fs.nat_mode) |
|
||||
T5_OPT_2_VALID_F |
|
||||
RX_CHANNEL_F |
|
||||
CONG_CNTRL_V((f->fs.action == FILTER_DROP) |
|
||||
(f->fs.dirsteer << 1)) |
|
||||
PACE_V((f->fs.maskhash) |
|
||||
((f->fs.dirsteerhash) << 1)) |
|
||||
CCTRL_ECN_V(f->fs.action == FILTER_SWITCH));
|
||||
((f->fs.dirsteerhash) << 1)));
|
||||
}
|
||||
|
||||
static void mk_act_open_req(struct filter_entry *f, struct sk_buff *skb,
|
||||
|
@ -1059,11 +1057,8 @@ static void mk_act_open_req(struct filter_entry *f, struct sk_buff *skb,
|
|||
TX_QUEUE_V(f->fs.nat_mode) |
|
||||
T5_OPT_2_VALID_F |
|
||||
RX_CHANNEL_F |
|
||||
CONG_CNTRL_V((f->fs.action == FILTER_DROP) |
|
||||
(f->fs.dirsteer << 1)) |
|
||||
PACE_V((f->fs.maskhash) |
|
||||
((f->fs.dirsteerhash) << 1)) |
|
||||
CCTRL_ECN_V(f->fs.action == FILTER_SWITCH));
|
||||
((f->fs.dirsteerhash) << 1)));
|
||||
}
|
||||
|
||||
static int cxgb4_set_hash_filter(struct net_device *dev,
|
||||
|
@ -1722,6 +1717,20 @@ void hash_filter_rpl(struct adapter *adap, const struct cpl_act_open_rpl *rpl)
|
|||
}
|
||||
return;
|
||||
}
|
||||
switch (f->fs.action) {
|
||||
case FILTER_PASS:
|
||||
if (f->fs.dirsteer)
|
||||
set_tcb_tflag(adap, f, tid,
|
||||
TF_DIRECT_STEER_S, 1, 1);
|
||||
break;
|
||||
case FILTER_DROP:
|
||||
set_tcb_tflag(adap, f, tid, TF_DROP_S, 1, 1);
|
||||
break;
|
||||
case FILTER_SWITCH:
|
||||
set_tcb_tflag(adap, f, tid, TF_LPBK_S, 1, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1781,23 +1790,12 @@ void filter_rpl(struct adapter *adap, const struct cpl_set_tcb_rpl *rpl)
|
|||
if (ctx)
|
||||
ctx->result = 0;
|
||||
} else if (ret == FW_FILTER_WR_FLT_ADDED) {
|
||||
int err = 0;
|
||||
|
||||
if (f->fs.newsmac)
|
||||
err = configure_filter_smac(adap, f);
|
||||
|
||||
if (!err) {
|
||||
f->pending = 0; /* async setup completed */
|
||||
f->valid = 1;
|
||||
if (ctx) {
|
||||
ctx->result = 0;
|
||||
ctx->tid = idx;
|
||||
}
|
||||
} else {
|
||||
clear_filter(adap, f);
|
||||
if (ctx)
|
||||
ctx->result = err;
|
||||
}
|
||||
} else {
|
||||
/* Something went wrong. Issue a warning about the
|
||||
* problem and clear everything out.
|
||||
|
|
|
@ -42,6 +42,10 @@
|
|||
|
||||
#define TCB_T_FLAGS_W 1
|
||||
|
||||
#define TF_DROP_S 22
|
||||
#define TF_DIRECT_STEER_S 23
|
||||
#define TF_LPBK_S 59
|
||||
|
||||
#define TF_CCTRL_ECE_S 60
|
||||
#define TF_CCTRL_CWR_S 61
|
||||
#define TF_CCTRL_RFR_S 62
|
||||
|
|
|
@ -488,6 +488,9 @@ static void mlxsw_emad_transmit_retry(struct mlxsw_core *mlxsw_core,
|
|||
err = mlxsw_emad_transmit(trans->core, trans);
|
||||
if (err == 0)
|
||||
return;
|
||||
|
||||
if (!atomic_dec_and_test(&trans->active))
|
||||
return;
|
||||
} else {
|
||||
err = -EIO;
|
||||
}
|
||||
|
@ -1111,6 +1114,8 @@ void mlxsw_core_bus_device_unregister(struct mlxsw_core *mlxsw_core,
|
|||
if (!reload)
|
||||
devlink_resources_unregister(devlink, NULL);
|
||||
mlxsw_core->bus->fini(mlxsw_core->bus_priv);
|
||||
if (!reload)
|
||||
devlink_free(devlink);
|
||||
|
||||
return;
|
||||
|
||||
|
|
|
@ -6630,7 +6630,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
|
|||
return IRQ_NONE;
|
||||
|
||||
rtl_irq_disable(tp);
|
||||
napi_schedule_irqoff(&tp->napi);
|
||||
napi_schedule(&tp->napi);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
@ -6886,7 +6886,7 @@ static int rtl_open(struct net_device *dev)
|
|||
rtl_request_firmware(tp);
|
||||
|
||||
retval = request_irq(pci_irq_vector(pdev, 0), rtl8169_interrupt,
|
||||
IRQF_NO_THREAD | IRQF_SHARED, dev->name, tp);
|
||||
IRQF_SHARED, dev->name, tp);
|
||||
if (retval < 0)
|
||||
goto err_release_fw_2;
|
||||
|
||||
|
|
|
@ -1732,12 +1732,16 @@ static int ravb_hwtstamp_get(struct net_device *ndev, struct ifreq *req)
|
|||
config.flags = 0;
|
||||
config.tx_type = priv->tstamp_tx_ctrl ? HWTSTAMP_TX_ON :
|
||||
HWTSTAMP_TX_OFF;
|
||||
if (priv->tstamp_rx_ctrl & RAVB_RXTSTAMP_TYPE_V2_L2_EVENT)
|
||||
switch (priv->tstamp_rx_ctrl & RAVB_RXTSTAMP_TYPE) {
|
||||
case RAVB_RXTSTAMP_TYPE_V2_L2_EVENT:
|
||||
config.rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT;
|
||||
else if (priv->tstamp_rx_ctrl & RAVB_RXTSTAMP_TYPE_ALL)
|
||||
break;
|
||||
case RAVB_RXTSTAMP_TYPE_ALL:
|
||||
config.rx_filter = HWTSTAMP_FILTER_ALL;
|
||||
else
|
||||
break;
|
||||
default:
|
||||
config.rx_filter = HWTSTAMP_FILTER_NONE;
|
||||
}
|
||||
|
||||
return copy_to_user(req->ifr_data, &config, sizeof(config)) ?
|
||||
-EFAULT : 0;
|
||||
|
|
|
@ -667,10 +667,6 @@ static int gtp_newlink(struct net *src_net, struct net_device *dev,
|
|||
|
||||
gtp = netdev_priv(dev);
|
||||
|
||||
err = gtp_encap_enable(gtp, data);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (!data[IFLA_GTP_PDP_HASHSIZE]) {
|
||||
hashsize = 1024;
|
||||
} else {
|
||||
|
@ -681,12 +677,16 @@ static int gtp_newlink(struct net *src_net, struct net_device *dev,
|
|||
|
||||
err = gtp_hashtable_new(gtp, hashsize);
|
||||
if (err < 0)
|
||||
goto out_encap;
|
||||
return err;
|
||||
|
||||
err = gtp_encap_enable(gtp, data);
|
||||
if (err < 0)
|
||||
goto out_hashtable;
|
||||
|
||||
err = register_netdevice(dev);
|
||||
if (err < 0) {
|
||||
netdev_dbg(dev, "failed to register new netdev %d\n", err);
|
||||
goto out_hashtable;
|
||||
goto out_encap;
|
||||
}
|
||||
|
||||
gn = net_generic(dev_net(dev), gtp_net_id);
|
||||
|
@ -697,11 +697,11 @@ static int gtp_newlink(struct net *src_net, struct net_device *dev,
|
|||
|
||||
return 0;
|
||||
|
||||
out_encap:
|
||||
gtp_encap_disable(gtp);
|
||||
out_hashtable:
|
||||
kfree(gtp->addr_hash);
|
||||
kfree(gtp->tid_hash);
|
||||
out_encap:
|
||||
gtp_encap_disable(gtp);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -276,63 +276,69 @@ static inline struct net_device **get_dev_p(struct pvc_device *pvc,
|
|||
|
||||
static int fr_hard_header(struct sk_buff **skb_p, u16 dlci)
|
||||
{
|
||||
u16 head_len;
|
||||
struct sk_buff *skb = *skb_p;
|
||||
|
||||
switch (skb->protocol) {
|
||||
case cpu_to_be16(NLPID_CCITT_ANSI_LMI):
|
||||
head_len = 4;
|
||||
skb_push(skb, head_len);
|
||||
if (!skb->dev) { /* Control packets */
|
||||
switch (dlci) {
|
||||
case LMI_CCITT_ANSI_DLCI:
|
||||
skb_push(skb, 4);
|
||||
skb->data[3] = NLPID_CCITT_ANSI_LMI;
|
||||
break;
|
||||
|
||||
case cpu_to_be16(NLPID_CISCO_LMI):
|
||||
head_len = 4;
|
||||
skb_push(skb, head_len);
|
||||
case LMI_CISCO_DLCI:
|
||||
skb_push(skb, 4);
|
||||
skb->data[3] = NLPID_CISCO_LMI;
|
||||
break;
|
||||
|
||||
case cpu_to_be16(ETH_P_IP):
|
||||
head_len = 4;
|
||||
skb_push(skb, head_len);
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
} else if (skb->dev->type == ARPHRD_DLCI) {
|
||||
switch (skb->protocol) {
|
||||
case htons(ETH_P_IP):
|
||||
skb_push(skb, 4);
|
||||
skb->data[3] = NLPID_IP;
|
||||
break;
|
||||
|
||||
case cpu_to_be16(ETH_P_IPV6):
|
||||
head_len = 4;
|
||||
skb_push(skb, head_len);
|
||||
case htons(ETH_P_IPV6):
|
||||
skb_push(skb, 4);
|
||||
skb->data[3] = NLPID_IPV6;
|
||||
break;
|
||||
|
||||
case cpu_to_be16(ETH_P_802_3):
|
||||
head_len = 10;
|
||||
if (skb_headroom(skb) < head_len) {
|
||||
struct sk_buff *skb2 = skb_realloc_headroom(skb,
|
||||
head_len);
|
||||
default:
|
||||
skb_push(skb, 10);
|
||||
skb->data[3] = FR_PAD;
|
||||
skb->data[4] = NLPID_SNAP;
|
||||
/* OUI 00-00-00 indicates an Ethertype follows */
|
||||
skb->data[5] = 0x00;
|
||||
skb->data[6] = 0x00;
|
||||
skb->data[7] = 0x00;
|
||||
/* This should be an Ethertype: */
|
||||
*(__be16 *)(skb->data + 8) = skb->protocol;
|
||||
}
|
||||
|
||||
} else if (skb->dev->type == ARPHRD_ETHER) {
|
||||
if (skb_headroom(skb) < 10) {
|
||||
struct sk_buff *skb2 = skb_realloc_headroom(skb, 10);
|
||||
if (!skb2)
|
||||
return -ENOBUFS;
|
||||
dev_kfree_skb(skb);
|
||||
skb = *skb_p = skb2;
|
||||
}
|
||||
skb_push(skb, head_len);
|
||||
skb_push(skb, 10);
|
||||
skb->data[3] = FR_PAD;
|
||||
skb->data[4] = NLPID_SNAP;
|
||||
skb->data[5] = FR_PAD;
|
||||
/* OUI 00-80-C2 stands for the 802.1 organization */
|
||||
skb->data[5] = 0x00;
|
||||
skb->data[6] = 0x80;
|
||||
skb->data[7] = 0xC2;
|
||||
/* PID 00-07 stands for Ethernet frames without FCS */
|
||||
skb->data[8] = 0x00;
|
||||
skb->data[9] = 0x07; /* bridged Ethernet frame w/out FCS */
|
||||
break;
|
||||
skb->data[9] = 0x07;
|
||||
|
||||
default:
|
||||
head_len = 10;
|
||||
skb_push(skb, head_len);
|
||||
skb->data[3] = FR_PAD;
|
||||
skb->data[4] = NLPID_SNAP;
|
||||
skb->data[5] = FR_PAD;
|
||||
skb->data[6] = FR_PAD;
|
||||
skb->data[7] = FR_PAD;
|
||||
*(__be16*)(skb->data + 8) = skb->protocol;
|
||||
} else {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dlci_to_q922(skb->data, dlci);
|
||||
|
@ -428,8 +434,8 @@ static netdev_tx_t pvc_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
skb_put(skb, pad);
|
||||
memset(skb->data + len, 0, pad);
|
||||
}
|
||||
skb->protocol = cpu_to_be16(ETH_P_802_3);
|
||||
}
|
||||
skb->dev = dev;
|
||||
if (!fr_hard_header(&skb, pvc->dlci)) {
|
||||
dev->stats.tx_bytes += skb->len;
|
||||
dev->stats.tx_packets++;
|
||||
|
@ -497,10 +503,8 @@ static void fr_lmi_send(struct net_device *dev, int fullrep)
|
|||
memset(skb->data, 0, len);
|
||||
skb_reserve(skb, 4);
|
||||
if (lmi == LMI_CISCO) {
|
||||
skb->protocol = cpu_to_be16(NLPID_CISCO_LMI);
|
||||
fr_hard_header(&skb, LMI_CISCO_DLCI);
|
||||
} else {
|
||||
skb->protocol = cpu_to_be16(NLPID_CCITT_ANSI_LMI);
|
||||
fr_hard_header(&skb, LMI_CCITT_ANSI_DLCI);
|
||||
}
|
||||
data = skb_tail_pointer(skb);
|
||||
|
|
|
@ -767,6 +767,7 @@ static void ath10k_htt_rx_h_rates(struct ath10k *ar,
|
|||
u8 preamble = 0;
|
||||
u8 group_id;
|
||||
u32 info1, info2, info3;
|
||||
u32 stbc, nsts_su;
|
||||
|
||||
info1 = __le32_to_cpu(rxd->ppdu_start.info1);
|
||||
info2 = __le32_to_cpu(rxd->ppdu_start.info2);
|
||||
|
@ -811,11 +812,16 @@ static void ath10k_htt_rx_h_rates(struct ath10k *ar,
|
|||
*/
|
||||
bw = info2 & 3;
|
||||
sgi = info3 & 1;
|
||||
stbc = (info2 >> 3) & 1;
|
||||
group_id = (info2 >> 4) & 0x3F;
|
||||
|
||||
if (GROUP_ID_IS_SU_MIMO(group_id)) {
|
||||
mcs = (info3 >> 4) & 0x0F;
|
||||
nss = ((info2 >> 10) & 0x07) + 1;
|
||||
nsts_su = ((info2 >> 10) & 0x07);
|
||||
if (stbc)
|
||||
nss = (nsts_su >> 2) + 1;
|
||||
else
|
||||
nss = (nsts_su + 1);
|
||||
} else {
|
||||
/* Hardware doesn't decode VHT-SIG-B into Rx descriptor
|
||||
* so it's impossible to decode MCS. Also since
|
||||
|
|
|
@ -561,6 +561,10 @@ static int ath10k_sdio_mbox_rx_alloc(struct ath10k *ar,
|
|||
le16_to_cpu(htc_hdr->len),
|
||||
ATH10K_HTC_MBOX_MAX_PAYLOAD_LENGTH);
|
||||
ret = -ENOMEM;
|
||||
|
||||
queue_work(ar->workqueue, &ar->restart_work);
|
||||
ath10k_warn(ar, "exceeds length, start recovery\n");
|
||||
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
|
|
@ -332,10 +332,12 @@ static void p54p_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
|
|||
struct p54p_desc *desc;
|
||||
dma_addr_t mapping;
|
||||
u32 idx, i;
|
||||
__le32 device_addr;
|
||||
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
idx = le32_to_cpu(ring_control->host_idx[1]);
|
||||
i = idx % ARRAY_SIZE(ring_control->tx_data);
|
||||
device_addr = ((struct p54_hdr *)skb->data)->req_id;
|
||||
|
||||
mapping = pci_map_single(priv->pdev, skb->data, skb->len,
|
||||
PCI_DMA_TODEVICE);
|
||||
|
@ -349,7 +351,7 @@ static void p54p_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
|
|||
|
||||
desc = &ring_control->tx_data[i];
|
||||
desc->host_addr = cpu_to_le32(mapping);
|
||||
desc->device_addr = ((struct p54_hdr *)skb->data)->req_id;
|
||||
desc->device_addr = device_addr;
|
||||
desc->len = cpu_to_le16(skb->len);
|
||||
desc->flags = 0;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue