This is the 4.4.179 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlzEBesACgkQONu9yGCS aT4KhA//fTPDn1cwSHYX7vCK1gWVfAC+d7SnWcdlyjiCzuUNOHeGtwYl2xIi2pmH 7cnxCpzKRbxgPCuawj/T4MrZoKtc2fH8sduQGQtiIgtz4rew9vqYcQTIxO0AF8cI KcqZefj7L6M04RxSq+F0O2MpXtPCIfDnoYej44Espa5tCt1tWJLxQvaEV4waHmA1 +6/Sh9ZlWzMF/vcyTJS0RpCSNrHDVjaoQjgQuaDNGaGhPhaWqvPavd4eSzLrOQ4U r54X+T3vqQuF3gjSVywGgSvRkpFX+ZTsgPtg9mkm3oJTNoLUa9nnCRl1p6ig+moI +7ZPFbk0Duhi+N34GpSL2MXbFkMz49Cvon+kDlQrO0LvETWha39VyEG/GcHSCm+o ISNWwEY//rsYl8JF3rZIzfbw973/x0QKZeNQySs184ls4pwnIo3To3fL2Wv9ArA1 jCIHT3lFwBkNZUMfK9hz8e7fC93QZPIgDLGx/HWBDPRE05D5O29kRSuj6cQ10GFk PChQiV3WLiwgwEhq3/tIso3052MheAVaNsz76wYbpakTrupjkapNeN64bOOZO2FD BzdLkpSjOIe5kaSMzzVCTt9A25M0t8iz/rj7/6OEPYtaT8T49t1ZtTxjrAzqL2nc oyB0U20t67uMoaloZUQF6kYmMirvnYYVwDWSHXQ568bU5wXhI0U= =pJ1x -----END PGP SIGNATURE----- Merge 4.4.179 into android-4.4 Changes in 4.4.179 arm64: debug: Don't propagate UNKNOWN FAR into si_code for debug signals arm64: debug: Ensure debug handlers check triggering exception level ext4: cleanup bh release code in ext4_ind_remove_space() lib/int_sqrt: optimize initial value compute tty/serial: atmel: Add is_half_duplex helper mm: mempolicy: make mbind() return -EIO when MPOL_MF_STRICT is specified i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA Bluetooth: Fix decrementing reference count twice in releasing socket tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped CIFS: fix POSIX lock leak and invalid ptr deref h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- tracing: kdb: Fix ftdump to not sleep gpio: gpio-omap: fix level interrupt idling sysctl: handle overflow for file-max enic: fix build warning without CONFIG_CPUMASK_OFFSTACK mm/cma.c: cma_declare_contiguous: correct err handling mm/page_ext.c: fix an imbalance with kmemleak mm/vmalloc.c: fix kernel BUG at mm/vmalloc.c:512! mm/slab.c: kmemleak no scan alien caches ocfs2: fix a panic problem caused by o2cb_ctl f2fs: do not use mutex lock in atomic context fs/file.c: initialize init_files.resize_wait cifs: use correct format characters dm thin: add sanity checks to thin-pool and external snapshot creation cifs: Fix NULL pointer dereference of devname fs: fix guard_bio_eod to check for real EOD errors tools lib traceevent: Fix buffer overflow in arg_eval usb: chipidea: Grab the (legacy) USB PHY by phandle first scsi: core: replace GFP_ATOMIC with GFP_KERNEL in scsi_scan.c coresight: etm4x: Add support to enable ETMv4.2 ARM: 8840/1: use a raw_spinlock_t in unwind mmc: omap: fix the maximum timeout setting e1000e: Fix -Wformat-truncation warnings IB/mlx4: Increase the timeout for CM cache scsi: megaraid_sas: return error when create DMA pool failed perf test: Fix failure of 'evsel-tp-sched' test on s390 SoC: imx-sgtl5000: add missing put_device() media: sh_veu: Correct return type for mem2mem buffer helpers media: s5p-jpeg: Correct return type for mem2mem buffer helpers media: s5p-g2d: Correct return type for mem2mem buffer helpers media: mx2_emmaprp: Correct return type for mem2mem buffer helpers leds: lp55xx: fix null deref on firmware load failure kprobes: Prohibit probing on bsearch() ARM: 8833/1: Ensure that NEON code always compiles with Clang ALSA: PCM: check if ops are defined before suspending PCM bcache: fix input overflow to cache set sysfs file io_error_halflife bcache: fix input overflow to sequential_cutoff bcache: improve sysfs_strtoul_clamp() fbdev: fbmem: fix memory access if logo is bigger than the screen cdrom: Fix race condition in cdrom_sysctl_register ASoC: fsl-asoc-card: fix object reference leaks in fsl_asoc_card_probe soc: qcom: gsbi: Fix error handling in gsbi_probe() mt7601u: bump supported EEPROM version ARM: avoid Cortex-A9 livelock on tight dmb loops tty: increase the default flip buffer limit to 2*640K media: mt9m111: set initial frame size other than 0x0 hwrng: virtio - Avoid repeated init of completion soc/tegra: fuse: Fix illegal free of IO base address hpet: Fix missing '=' character in the __setup() code of hpet_mmap_enable dmaengine: imx-dma: fix warning comparison of distinct pointer types netfilter: physdev: relax br_netfilter dependency media: s5p-jpeg: Check for fmt_ver_flag when doing fmt enumeration regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting wlcore: Fix memory leak in case wl12xx_fetch_firmware failure x86/build: Mark per-CPU symbols as absolute explicitly for LLD dmaengine: tegra: avoid overflow of byte tracking drm/dp/mst: Configure no_stop_bit correctly for remote i2c xfers binfmt_elf: switch to new creds when switching to new mm kbuild: clang: choose GCC_TOOLCHAIN_DIR not on LD x86/build: Specify elf_i386 linker emulation explicitly for i386 objects x86: vdso: Use $LD instead of $CC to link x86/vdso: Drop implicit common-page-size linker flag lib/string.c: implement a basic bcmp tty: mark Siemens R3964 line discipline as BROKEN tty: ldisc: add sysctl to prevent autoloading of ldiscs ipv6: Fix dangling pointer when ipv6 fragment ipv6: sit: reset ip header pointer in ipip6_rcv net: rds: force to destroy connection if t_sock is NULL in rds_tcp_kill_sock(). openvswitch: fix flow actions reallocation qmi_wwan: add Olicard 600 sctp: initialize _pad of sockaddr_in before copying to user memory tcp: Ensure DCTCP reacts to losses netns: provide pure entropy for net_hash_mix() net: ethtool: not call vzalloc for zero sized memory request ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type ALSA: seq: Fix OOB-reads from strlcpy include/linux/bitrev.h: fix constant bitrev ASoC: fsl_esai: fix channel swap issue when stream starts block: do not leak memory in bio_copy_user_iov() genirq: Respect IRQCHIP_SKIP_SET_WAKE in irq_chip_set_wake_parent() ARM: dts: at91: Fix typo in ISC_D0 on PC9 arm64: futex: Fix FUTEX_WAKE_OP atomic ops with non-zero result value xen: Prevent buffer overflow in privcmd ioctl sched/fair: Do not re-read ->h_load_next during hierarchical load calculation xtensa: fix return_address PCI: Add function 1 DMA alias quirk for Marvell 9170 SATA controller perf/core: Restore mmap record type correctly ext4: add missing brelse() in add_new_gdb_meta_bg() ext4: report real fs size after failed resize ALSA: echoaudio: add a check for ioremap_nocache ALSA: sb8: add a check for request_region IB/mlx4: Fix race condition between catas error reset and aliasguid flows mmc: davinci: remove extraneous __init annotation ALSA: opl3: fix mismatch between snd_opl3_drum_switch definition and declaration thermal/int340x_thermal: Add additional UUIDs thermal/int340x_thermal: fix mode setting tools/power turbostat: return the exit status of a command perf top: Fix error handling in cmd_top() perf evsel: Free evsel->counts in perf_evsel__exit() perf tests: Fix a memory leak of cpu_map object in the openat_syscall_event_on_all_cpus test perf tests: Fix a memory leak in test__perf_evsel__tp_sched_test() x86/hpet: Prevent potential NULL pointer dereference x86/cpu/cyrix: Use correct macros for Cyrix calls on Geode processors iommu/vt-d: Check capability before disabling protected memory x86/hw_breakpoints: Make default case in hw_breakpoint_arch_parse() return an error fix incorrect error code mapping for OBJECTID_NOT_FOUND ext4: prohibit fstrim in norecovery mode rsi: improve kernel thread handling to fix kernel panic 9p: do not trust pdu content for stat item size 9p locks: add mount option for lock retry interval f2fs: fix to do sanity check with current segment number serial: uartps: console_setup() can't be placed to init section ARM: samsung: Limit SAMSUNG_PM_CHECK config option to non-Exynos platforms ACPI / SBS: Fix GPE storm on recent MacBookPro's cifs: fallback to older infolevels on findfirst queryinfo retry crypto: sha256/arm - fix crash bug in Thumb2 build crypto: sha512/arm - fix crash bug in Thumb2 build iommu/dmar: Fix buffer overflow during PCI bus notification ARM: 8839/1: kprobe: make patch_lock a raw_spinlock_t appletalk: Fix use-after-free in atalk_proc_exit lib/div64.c: off by one in shift include/linux/swap.h: use offsetof() instead of custom __swapoffset macro tpm/tpm_crb: Avoid unaligned reads in crb_recv() ovl: fix uid/gid when creating over whiteout appletalk: Fix compile regression bonding: fix event handling for stacked bonds net: atm: Fix potential Spectre v1 vulnerabilities net: bridge: multicast: use rcu to access port list from br_multicast_start_querier net: fou: do not use guehdr after iptunnel_pull_offloads in gue_udp_recv tcp: tcp_grow_window() needs to respect tcp_space() ipv4: recompile ip options in ipv4_link_failure ipv4: ensure rcu_read_lock() in ipv4_link_failure() crypto: crypto4xx - properly set IV after de- and encrypt modpost: file2alias: go back to simple devtable lookup modpost: file2alias: check prototype of handler tpm/tpm_i2c_atmel: Return -E2BIG when the transfer is incomplete KVM: x86: Don't clear EFER during SMM transitions for 32-bit vCPU iio/gyro/bmg160: Use millidegrees for temperature scale iio: ad_sigma_delta: select channel when reading register iio: adc: at91: disable adc channel interrupt in timeout case io: accel: kxcjk1013: restore the range after resume. staging: comedi: vmk80xx: Fix use of uninitialized semaphore staging: comedi: vmk80xx: Fix possible double-free of ->usb_rx_buf staging: comedi: ni_usb6501: Fix use of uninitialized mutex staging: comedi: ni_usb6501: Fix possible double-free of ->usb_rx_buf ALSA: core: Fix card races between register and disconnect crypto: x86/poly1305 - fix overflow during partial reduction arm64: futex: Restore oldval initialization to work around buggy compilers x86/kprobes: Verify stack frame on kretprobe kprobes: Mark ftrace mcount handler functions nokprobe kprobes: Fix error check when reusing optimized probes mac80211: do not call driver wake_tx_queue op during reconfig Revert "kbuild: use -Oz instead of -Os when using clang" sched/fair: Limit sched_cfs_period_timer() loop to avoid hard lockup device_cgroup: fix RCU imbalance in error case mm/vmstat.c: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n ALSA: info: Fix racy addition/deletion of nodes Revert "locking/lockdep: Add debug_locks check in __lock_downgrade()" kernel/sysctl.c: fix out-of-bounds access when setting file-max Linux 4.4.179 Change-Id: Ib81a248d73ba7504649be93bd6882b290e548882 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
aab9adb4b8
182 changed files with 1155 additions and 582 deletions
|
@ -6,7 +6,7 @@ TL;DR summary
|
|||
* Use only NEON instructions, or VFP instructions that don't rely on support
|
||||
code
|
||||
* Isolate your NEON code in a separate compilation unit, and compile it with
|
||||
'-mfpu=neon -mfloat-abi=softfp'
|
||||
'-march=armv7-a -mfpu=neon -mfloat-abi=softfp'
|
||||
* Put kernel_neon_begin() and kernel_neon_end() calls around the calls into your
|
||||
NEON code
|
||||
* Don't sleep in your NEON code, and be aware that it will be executed with
|
||||
|
@ -87,7 +87,7 @@ instructions appearing in unexpected places if no special care is taken.
|
|||
Therefore, the recommended and only supported way of using NEON/VFP in the
|
||||
kernel is by adhering to the following rules:
|
||||
* isolate the NEON code in a separate compilation unit and compile it with
|
||||
'-mfpu=neon -mfloat-abi=softfp';
|
||||
'-march=armv7-a -mfpu=neon -mfloat-abi=softfp';
|
||||
* issue the calls to kernel_neon_begin(), kernel_neon_end() as well as the calls
|
||||
into the unit containing the NEON code from a compilation unit which is *not*
|
||||
built with the GCC flag '-mfpu=neon' set.
|
||||
|
|
6
Makefile
6
Makefile
|
@ -1,6 +1,6 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 178
|
||||
SUBLEVEL = 179
|
||||
EXTRAVERSION =
|
||||
NAME = Blurry Fish Butt
|
||||
|
||||
|
@ -616,7 +616,7 @@ CLANG_TARGET := --target=$(notdir $(CLANG_TRIPLE:%-=%))
|
|||
ifeq ($(shell $(srctree)/scripts/clang-android.sh $(CC) $(CLANG_TARGET)), y)
|
||||
$(error "Clang with Android --target detected. Did you specify CLANG_TRIPLE?")
|
||||
endif
|
||||
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD)))
|
||||
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit))
|
||||
CLANG_PREFIX := --prefix=$(GCC_TOOLCHAIN_DIR)
|
||||
GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
|
||||
endif
|
||||
|
@ -645,7 +645,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context)
|
|||
KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias)
|
||||
|
||||
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
|
||||
KBUILD_CFLAGS += $(call cc-option,-Oz,-Os)
|
||||
KBUILD_CFLAGS += -Os
|
||||
else
|
||||
ifdef CONFIG_PROFILE_ALL_BRANCHES
|
||||
KBUILD_CFLAGS += -O2
|
||||
|
|
|
@ -517,7 +517,7 @@
|
|||
#define PIN_PC9__GPIO PINMUX_PIN(PIN_PC9, 0, 0)
|
||||
#define PIN_PC9__FIQ PINMUX_PIN(PIN_PC9, 1, 3)
|
||||
#define PIN_PC9__GTSUCOMP PINMUX_PIN(PIN_PC9, 2, 1)
|
||||
#define PIN_PC9__ISC_D0 PINMUX_PIN(PIN_PC9, 2, 1)
|
||||
#define PIN_PC9__ISC_D0 PINMUX_PIN(PIN_PC9, 3, 1)
|
||||
#define PIN_PC9__TIOA4 PINMUX_PIN(PIN_PC9, 4, 2)
|
||||
#define PIN_PC10 74
|
||||
#define PIN_PC10__GPIO PINMUX_PIN(PIN_PC10, 0, 0)
|
||||
|
|
|
@ -205,10 +205,11 @@ K256:
|
|||
.global sha256_block_data_order
|
||||
.type sha256_block_data_order,%function
|
||||
sha256_block_data_order:
|
||||
.Lsha256_block_data_order:
|
||||
#if __ARM_ARCH__<7
|
||||
sub r3,pc,#8 @ sha256_block_data_order
|
||||
#else
|
||||
adr r3,sha256_block_data_order
|
||||
adr r3,.Lsha256_block_data_order
|
||||
#endif
|
||||
#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
|
||||
ldr r12,.LOPENSSL_armcap
|
||||
|
|
|
@ -86,10 +86,11 @@ K256:
|
|||
.global sha256_block_data_order
|
||||
.type sha256_block_data_order,%function
|
||||
sha256_block_data_order:
|
||||
.Lsha256_block_data_order:
|
||||
#if __ARM_ARCH__<7
|
||||
sub r3,pc,#8 @ sha256_block_data_order
|
||||
#else
|
||||
adr r3,sha256_block_data_order
|
||||
adr r3,.Lsha256_block_data_order
|
||||
#endif
|
||||
#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
|
||||
ldr r12,.LOPENSSL_armcap
|
||||
|
|
|
@ -267,10 +267,11 @@ WORD64(0x5fcb6fab,0x3ad6faec, 0x6c44198c,0x4a475817)
|
|||
.global sha512_block_data_order
|
||||
.type sha512_block_data_order,%function
|
||||
sha512_block_data_order:
|
||||
.Lsha512_block_data_order:
|
||||
#if __ARM_ARCH__<7
|
||||
sub r3,pc,#8 @ sha512_block_data_order
|
||||
#else
|
||||
adr r3,sha512_block_data_order
|
||||
adr r3,.Lsha512_block_data_order
|
||||
#endif
|
||||
#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
|
||||
ldr r12,.LOPENSSL_armcap
|
||||
|
|
|
@ -134,10 +134,11 @@ WORD64(0x5fcb6fab,0x3ad6faec, 0x6c44198c,0x4a475817)
|
|||
.global sha512_block_data_order
|
||||
.type sha512_block_data_order,%function
|
||||
sha512_block_data_order:
|
||||
.Lsha512_block_data_order:
|
||||
#if __ARM_ARCH__<7
|
||||
sub r3,pc,#8 @ sha512_block_data_order
|
||||
#else
|
||||
adr r3,sha512_block_data_order
|
||||
adr r3,.Lsha512_block_data_order
|
||||
#endif
|
||||
#if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__)
|
||||
ldr r12,.LOPENSSL_armcap
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
#define sev() __asm__ __volatile__ ("sev" : : : "memory")
|
||||
#define wfe() __asm__ __volatile__ ("wfe" : : : "memory")
|
||||
#define wfi() __asm__ __volatile__ ("wfi" : : : "memory")
|
||||
#else
|
||||
#define wfe() do { } while (0)
|
||||
#endif
|
||||
|
||||
#if __LINUX_ARM_ARCH__ >= 7
|
||||
|
|
|
@ -77,7 +77,11 @@ extern void release_thread(struct task_struct *);
|
|||
unsigned long get_wchan(struct task_struct *p);
|
||||
|
||||
#if __LINUX_ARM_ARCH__ == 6 || defined(CONFIG_ARM_ERRATA_754327)
|
||||
#define cpu_relax() smp_mb()
|
||||
#define cpu_relax() \
|
||||
do { \
|
||||
smp_mb(); \
|
||||
__asm__ __volatile__("nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"); \
|
||||
} while (0)
|
||||
#else
|
||||
#define cpu_relax() barrier()
|
||||
#endif
|
||||
|
|
|
@ -87,8 +87,11 @@ void machine_crash_nonpanic_core(void *unused)
|
|||
|
||||
set_cpu_online(smp_processor_id(), false);
|
||||
atomic_dec(&waiting_for_crash_ipi);
|
||||
while (1)
|
||||
|
||||
while (1) {
|
||||
cpu_relax();
|
||||
wfe();
|
||||
}
|
||||
}
|
||||
|
||||
static void machine_kexec_mask_interrupts(void)
|
||||
|
|
|
@ -15,7 +15,7 @@ struct patch {
|
|||
unsigned int insn;
|
||||
};
|
||||
|
||||
static DEFINE_SPINLOCK(patch_lock);
|
||||
static DEFINE_RAW_SPINLOCK(patch_lock);
|
||||
|
||||
static void __kprobes *patch_map(void *addr, int fixmap, unsigned long *flags)
|
||||
__acquires(&patch_lock)
|
||||
|
@ -32,7 +32,7 @@ static void __kprobes *patch_map(void *addr, int fixmap, unsigned long *flags)
|
|||
return addr;
|
||||
|
||||
if (flags)
|
||||
spin_lock_irqsave(&patch_lock, *flags);
|
||||
raw_spin_lock_irqsave(&patch_lock, *flags);
|
||||
else
|
||||
__acquire(&patch_lock);
|
||||
|
||||
|
@ -47,7 +47,7 @@ static void __kprobes patch_unmap(int fixmap, unsigned long *flags)
|
|||
clear_fixmap(fixmap);
|
||||
|
||||
if (flags)
|
||||
spin_unlock_irqrestore(&patch_lock, *flags);
|
||||
raw_spin_unlock_irqrestore(&patch_lock, *flags);
|
||||
else
|
||||
__release(&patch_lock);
|
||||
}
|
||||
|
|
|
@ -563,8 +563,10 @@ static void ipi_cpu_stop(unsigned int cpu)
|
|||
local_fiq_disable();
|
||||
local_irq_disable();
|
||||
|
||||
while (1)
|
||||
while (1) {
|
||||
cpu_relax();
|
||||
wfe();
|
||||
}
|
||||
}
|
||||
|
||||
static DEFINE_PER_CPU(struct completion *, cpu_completion);
|
||||
|
|
|
@ -93,7 +93,7 @@ extern const struct unwind_idx __start_unwind_idx[];
|
|||
static const struct unwind_idx *__origin_unwind_idx;
|
||||
extern const struct unwind_idx __stop_unwind_idx[];
|
||||
|
||||
static DEFINE_SPINLOCK(unwind_lock);
|
||||
static DEFINE_RAW_SPINLOCK(unwind_lock);
|
||||
static LIST_HEAD(unwind_tables);
|
||||
|
||||
/* Convert a prel31 symbol to an absolute address */
|
||||
|
@ -201,7 +201,7 @@ static const struct unwind_idx *unwind_find_idx(unsigned long addr)
|
|||
/* module unwind tables */
|
||||
struct unwind_table *table;
|
||||
|
||||
spin_lock_irqsave(&unwind_lock, flags);
|
||||
raw_spin_lock_irqsave(&unwind_lock, flags);
|
||||
list_for_each_entry(table, &unwind_tables, list) {
|
||||
if (addr >= table->begin_addr &&
|
||||
addr < table->end_addr) {
|
||||
|
@ -213,7 +213,7 @@ static const struct unwind_idx *unwind_find_idx(unsigned long addr)
|
|||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&unwind_lock, flags);
|
||||
raw_spin_unlock_irqrestore(&unwind_lock, flags);
|
||||
}
|
||||
|
||||
pr_debug("%s: idx = %p\n", __func__, idx);
|
||||
|
@ -529,9 +529,9 @@ struct unwind_table *unwind_table_add(unsigned long start, unsigned long size,
|
|||
tab->begin_addr = text_addr;
|
||||
tab->end_addr = text_addr + text_size;
|
||||
|
||||
spin_lock_irqsave(&unwind_lock, flags);
|
||||
raw_spin_lock_irqsave(&unwind_lock, flags);
|
||||
list_add_tail(&tab->list, &unwind_tables);
|
||||
spin_unlock_irqrestore(&unwind_lock, flags);
|
||||
raw_spin_unlock_irqrestore(&unwind_lock, flags);
|
||||
|
||||
return tab;
|
||||
}
|
||||
|
@ -543,9 +543,9 @@ void unwind_table_del(struct unwind_table *tab)
|
|||
if (!tab)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&unwind_lock, flags);
|
||||
raw_spin_lock_irqsave(&unwind_lock, flags);
|
||||
list_del(&tab->list);
|
||||
spin_unlock_irqrestore(&unwind_lock, flags);
|
||||
raw_spin_unlock_irqrestore(&unwind_lock, flags);
|
||||
|
||||
kfree(tab);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ $(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S
|
|||
$(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S
|
||||
|
||||
ifeq ($(CONFIG_KERNEL_MODE_NEON),y)
|
||||
NEON_FLAGS := -mfloat-abi=softfp -mfpu=neon
|
||||
NEON_FLAGS := -march=armv7-a -mfloat-abi=softfp -mfpu=neon
|
||||
CFLAGS_xor-neon.o += $(NEON_FLAGS)
|
||||
obj-$(CONFIG_XOR_BLOCKS) += xor-neon.o
|
||||
endif
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
MODULE_LICENSE("GPL");
|
||||
|
||||
#ifndef __ARM_NEON__
|
||||
#error You should compile this file with '-mfloat-abi=softfp -mfpu=neon'
|
||||
#error You should compile this file with '-march=armv7-a -mfloat-abi=softfp -mfpu=neon'
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -533,8 +533,10 @@ void omap_prm_reset_system(void)
|
|||
|
||||
prm_ll_data->reset_system();
|
||||
|
||||
while (1)
|
||||
while (1) {
|
||||
cpu_relax();
|
||||
wfe();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -255,7 +255,7 @@ config S3C_PM_DEBUG_LED_SMDK
|
|||
|
||||
config SAMSUNG_PM_CHECK
|
||||
bool "S3C2410 PM Suspend Memory CRC"
|
||||
depends on PM
|
||||
depends on PM && (PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210)
|
||||
select CRC32
|
||||
help
|
||||
Enable the PM code's memory area checksum over sleep. This option
|
||||
|
|
|
@ -30,8 +30,8 @@ do { \
|
|||
" prfm pstl1strm, %2\n" \
|
||||
"1: ldxr %w1, %2\n" \
|
||||
insn "\n" \
|
||||
"2: stlxr %w3, %w0, %2\n" \
|
||||
" cbnz %w3, 1b\n" \
|
||||
"2: stlxr %w0, %w3, %2\n" \
|
||||
" cbnz %w0, 1b\n" \
|
||||
" dmb ish\n" \
|
||||
"3:\n" \
|
||||
" .pushsection .fixup,\"ax\"\n" \
|
||||
|
@ -56,23 +56,23 @@ arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr)
|
|||
|
||||
switch (op) {
|
||||
case FUTEX_OP_SET:
|
||||
__futex_atomic_op("mov %w0, %w4",
|
||||
__futex_atomic_op("mov %w3, %w4",
|
||||
ret, oldval, uaddr, tmp, oparg);
|
||||
break;
|
||||
case FUTEX_OP_ADD:
|
||||
__futex_atomic_op("add %w0, %w1, %w4",
|
||||
__futex_atomic_op("add %w3, %w1, %w4",
|
||||
ret, oldval, uaddr, tmp, oparg);
|
||||
break;
|
||||
case FUTEX_OP_OR:
|
||||
__futex_atomic_op("orr %w0, %w1, %w4",
|
||||
__futex_atomic_op("orr %w3, %w1, %w4",
|
||||
ret, oldval, uaddr, tmp, oparg);
|
||||
break;
|
||||
case FUTEX_OP_ANDN:
|
||||
__futex_atomic_op("and %w0, %w1, %w4",
|
||||
__futex_atomic_op("and %w3, %w1, %w4",
|
||||
ret, oldval, uaddr, tmp, ~oparg);
|
||||
break;
|
||||
case FUTEX_OP_XOR:
|
||||
__futex_atomic_op("eor %w0, %w1, %w4",
|
||||
__futex_atomic_op("eor %w3, %w1, %w4",
|
||||
ret, oldval, uaddr, tmp, oparg);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -215,22 +215,31 @@ int kgdb_arch_handle_exception(int exception_vector, int signo,
|
|||
|
||||
static int kgdb_brk_fn(struct pt_regs *regs, unsigned int esr)
|
||||
{
|
||||
if (user_mode(regs))
|
||||
return DBG_HOOK_ERROR;
|
||||
|
||||
kgdb_handle_exception(1, SIGTRAP, 0, regs);
|
||||
return 0;
|
||||
return DBG_HOOK_HANDLED;
|
||||
}
|
||||
|
||||
static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int esr)
|
||||
{
|
||||
if (user_mode(regs))
|
||||
return DBG_HOOK_ERROR;
|
||||
|
||||
compiled_break = 1;
|
||||
kgdb_handle_exception(1, SIGTRAP, 0, regs);
|
||||
|
||||
return 0;
|
||||
return DBG_HOOK_HANDLED;
|
||||
}
|
||||
|
||||
static int kgdb_step_brk_fn(struct pt_regs *regs, unsigned int esr)
|
||||
{
|
||||
if (user_mode(regs))
|
||||
return DBG_HOOK_ERROR;
|
||||
|
||||
kgdb_handle_exception(1, SIGTRAP, 0, regs);
|
||||
return 0;
|
||||
return DBG_HOOK_HANDLED;
|
||||
}
|
||||
|
||||
static struct break_hook kgdb_brkpt_hook = {
|
||||
|
|
|
@ -618,11 +618,12 @@ void __init hook_debug_fault_code(int nr,
|
|||
debug_fault_info[nr].name = name;
|
||||
}
|
||||
|
||||
asmlinkage int __exception do_debug_exception(unsigned long addr,
|
||||
asmlinkage int __exception do_debug_exception(unsigned long addr_if_watchpoint,
|
||||
unsigned int esr,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
const struct fault_info *inf = debug_fault_info + DBG_ESR_EVT(esr);
|
||||
unsigned long pc = instruction_pointer(regs);
|
||||
struct siginfo info;
|
||||
int rv;
|
||||
|
||||
|
@ -633,16 +634,16 @@ asmlinkage int __exception do_debug_exception(unsigned long addr,
|
|||
if (interrupts_enabled(regs))
|
||||
trace_hardirqs_off();
|
||||
|
||||
if (!inf->fn(addr, esr, regs)) {
|
||||
if (!inf->fn(addr_if_watchpoint, esr, regs)) {
|
||||
rv = 1;
|
||||
} else {
|
||||
pr_alert("Unhandled debug exception: %s (0x%08x) at 0x%016lx\n",
|
||||
inf->name, esr, addr);
|
||||
inf->name, esr, pc);
|
||||
|
||||
info.si_signo = inf->sig;
|
||||
info.si_errno = 0;
|
||||
info.si_code = inf->code;
|
||||
info.si_addr = (void __user *)addr;
|
||||
info.si_addr = (void __user *)pc;
|
||||
arm64_notify_die("", regs, &info, 0);
|
||||
rv = 0;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ KBUILD_AFLAGS += $(aflags-y)
|
|||
LDFLAGS += $(ldflags-y)
|
||||
|
||||
ifeq ($(CROSS_COMPILE),)
|
||||
CROSS_COMPILE := h8300-unknown-linux-
|
||||
CROSS_COMPILE := $(call cc-cross-prefix, h8300-unknown-linux- h8300-linux-)
|
||||
endif
|
||||
|
||||
core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
|
||||
|
|
|
@ -107,7 +107,7 @@ $(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE
|
|||
AFLAGS_header.o += -I$(obj)
|
||||
$(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h
|
||||
|
||||
LDFLAGS_setup.elf := -T
|
||||
LDFLAGS_setup.elf := -m elf_i386 -T
|
||||
$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
|
||||
$(call if_changed,ld)
|
||||
|
||||
|
|
|
@ -321,6 +321,12 @@ ENTRY(poly1305_4block_avx2)
|
|||
vpaddq t2,t1,t1
|
||||
vmovq t1x,d4
|
||||
|
||||
# Now do a partial reduction mod (2^130)-5, carrying h0 -> h1 -> h2 ->
|
||||
# h3 -> h4 -> h0 -> h1 to get h0,h2,h3,h4 < 2^26 and h1 < 2^26 + a small
|
||||
# amount. Careful: we must not assume the carry bits 'd0 >> 26',
|
||||
# 'd1 >> 26', 'd2 >> 26', 'd3 >> 26', and '(d4 >> 26) * 5' fit in 32-bit
|
||||
# integers. It's true in a single-block implementation, but not here.
|
||||
|
||||
# d1 += d0 >> 26
|
||||
mov d0,%rax
|
||||
shr $26,%rax
|
||||
|
@ -359,16 +365,16 @@ ENTRY(poly1305_4block_avx2)
|
|||
# h0 += (d4 >> 26) * 5
|
||||
mov d4,%rax
|
||||
shr $26,%rax
|
||||
lea (%eax,%eax,4),%eax
|
||||
add %eax,%ebx
|
||||
lea (%rax,%rax,4),%rax
|
||||
add %rax,%rbx
|
||||
# h4 = d4 & 0x3ffffff
|
||||
mov d4,%rax
|
||||
and $0x3ffffff,%eax
|
||||
mov %eax,h4
|
||||
|
||||
# h1 += h0 >> 26
|
||||
mov %ebx,%eax
|
||||
shr $26,%eax
|
||||
mov %rbx,%rax
|
||||
shr $26,%rax
|
||||
add %eax,h1
|
||||
# h0 = h0 & 0x3ffffff
|
||||
andl $0x3ffffff,%ebx
|
||||
|
|
|
@ -251,16 +251,16 @@ ENTRY(poly1305_block_sse2)
|
|||
# h0 += (d4 >> 26) * 5
|
||||
mov d4,%rax
|
||||
shr $26,%rax
|
||||
lea (%eax,%eax,4),%eax
|
||||
add %eax,%ebx
|
||||
lea (%rax,%rax,4),%rax
|
||||
add %rax,%rbx
|
||||
# h4 = d4 & 0x3ffffff
|
||||
mov d4,%rax
|
||||
and $0x3ffffff,%eax
|
||||
mov %eax,h4
|
||||
|
||||
# h1 += h0 >> 26
|
||||
mov %ebx,%eax
|
||||
shr $26,%eax
|
||||
mov %rbx,%rax
|
||||
shr $26,%rax
|
||||
add %eax,h1
|
||||
# h0 = h0 & 0x3ffffff
|
||||
andl $0x3ffffff,%ebx
|
||||
|
@ -518,6 +518,12 @@ ENTRY(poly1305_2block_sse2)
|
|||
paddq t2,t1
|
||||
movq t1,d4
|
||||
|
||||
# Now do a partial reduction mod (2^130)-5, carrying h0 -> h1 -> h2 ->
|
||||
# h3 -> h4 -> h0 -> h1 to get h0,h2,h3,h4 < 2^26 and h1 < 2^26 + a small
|
||||
# amount. Careful: we must not assume the carry bits 'd0 >> 26',
|
||||
# 'd1 >> 26', 'd2 >> 26', 'd3 >> 26', and '(d4 >> 26) * 5' fit in 32-bit
|
||||
# integers. It's true in a single-block implementation, but not here.
|
||||
|
||||
# d1 += d0 >> 26
|
||||
mov d0,%rax
|
||||
shr $26,%rax
|
||||
|
@ -556,16 +562,16 @@ ENTRY(poly1305_2block_sse2)
|
|||
# h0 += (d4 >> 26) * 5
|
||||
mov d4,%rax
|
||||
shr $26,%rax
|
||||
lea (%eax,%eax,4),%eax
|
||||
add %eax,%ebx
|
||||
lea (%rax,%rax,4),%rax
|
||||
add %rax,%rbx
|
||||
# h4 = d4 & 0x3ffffff
|
||||
mov d4,%rax
|
||||
and $0x3ffffff,%eax
|
||||
mov %eax,h4
|
||||
|
||||
# h1 += h0 >> 26
|
||||
mov %ebx,%eax
|
||||
shr $26,%eax
|
||||
mov %rbx,%rax
|
||||
shr $26,%rax
|
||||
add %eax,h1
|
||||
# h0 = h0 & 0x3ffffff
|
||||
andl $0x3ffffff,%ebx
|
||||
|
|
|
@ -44,10 +44,8 @@ targets += $(vdso_img_sodbg)
|
|||
|
||||
export CPPFLAGS_vdso.lds += -P -C
|
||||
|
||||
VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \
|
||||
-Wl,--no-undefined \
|
||||
-Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 \
|
||||
$(DISABLE_LTO)
|
||||
VDSO_LDFLAGS_vdso.lds = -m elf_x86_64 -soname linux-vdso.so.1 --no-undefined \
|
||||
-z max-page-size=4096
|
||||
|
||||
$(obj)/vdso64.so.dbg: $(src)/vdso.lds $(vobjs) FORCE
|
||||
$(call if_changed,vdso)
|
||||
|
@ -93,10 +91,8 @@ CFLAGS_REMOVE_vvar.o = -pg
|
|||
#
|
||||
|
||||
CPPFLAGS_vdsox32.lds = $(CPPFLAGS_vdso.lds)
|
||||
VDSO_LDFLAGS_vdsox32.lds = -Wl,-m,elf32_x86_64 \
|
||||
-Wl,-soname=linux-vdso.so.1 \
|
||||
-Wl,-z,max-page-size=4096 \
|
||||
-Wl,-z,common-page-size=4096
|
||||
VDSO_LDFLAGS_vdsox32.lds = -m elf32_x86_64 -soname linux-vdso.so.1 \
|
||||
-z max-page-size=4096
|
||||
|
||||
# 64-bit objects to re-brand as x32
|
||||
vobjs64-for-x32 := $(filter-out $(vobjs-nox32),$(vobjs-y))
|
||||
|
@ -124,7 +120,7 @@ $(obj)/vdsox32.so.dbg: $(src)/vdsox32.lds $(vobjx32s) FORCE
|
|||
$(call if_changed,vdso)
|
||||
|
||||
CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
|
||||
VDSO_LDFLAGS_vdso32.lds = -m32 -Wl,-m,elf_i386 -Wl,-soname=linux-gate.so.1
|
||||
VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -soname linux-gate.so.1
|
||||
|
||||
# This makes sure the $(obj) subdirectory exists even though vdso32/
|
||||
# is not a kbuild sub-make subdirectory.
|
||||
|
@ -160,14 +156,13 @@ $(obj)/vdso32.so.dbg: FORCE \
|
|||
# The DSO images are built using a special linker script.
|
||||
#
|
||||
quiet_cmd_vdso = VDSO $@
|
||||
cmd_vdso = $(CC) -nostdlib -o $@ \
|
||||
cmd_vdso = $(LD) -nostdlib -o $@ \
|
||||
$(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \
|
||||
-Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \
|
||||
-T $(filter %.lds,$^) $(filter %.o,$^) && \
|
||||
sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@'
|
||||
|
||||
VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=both) \
|
||||
$(call cc-ldoption, -Wl$(comma)--build-id) -Wl,-Bsymbolic $(LTO_CFLAGS) \
|
||||
$(filter --target=% --gcc-toolchain=%,$(KBUILD_CFLAGS))
|
||||
VDSO_LDFLAGS = -shared $(call ld-option, --hash-style=both) \
|
||||
$(call ld-option, --build-id) -Bsymbolic
|
||||
GCOV_PROFILE := n
|
||||
|
||||
#
|
||||
|
|
|
@ -215,6 +215,9 @@ privcmd_call(unsigned call,
|
|||
__HYPERCALL_DECLS;
|
||||
__HYPERCALL_5ARG(a1, a2, a3, a4, a5);
|
||||
|
||||
if (call >= PAGE_SIZE / sizeof(hypercall_page[0]))
|
||||
return -EINVAL;
|
||||
|
||||
stac();
|
||||
asm volatile(CALL_NOSPEC
|
||||
: __HYPERCALL_5PARAM
|
||||
|
|
|
@ -121,7 +121,7 @@ static void set_cx86_reorder(void)
|
|||
setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
|
||||
|
||||
/* Load/Store Serialize to mem access disable (=reorder it) */
|
||||
setCx86_old(CX86_PCR0, getCx86_old(CX86_PCR0) & ~0x80);
|
||||
setCx86(CX86_PCR0, getCx86(CX86_PCR0) & ~0x80);
|
||||
/* set load/store serialize from 1GB to 4GB */
|
||||
ccr3 |= 0xe0;
|
||||
setCx86(CX86_CCR3, ccr3);
|
||||
|
@ -132,11 +132,11 @@ static void set_cx86_memwb(void)
|
|||
printk(KERN_INFO "Enable Memory-Write-back mode on Cyrix/NSC processor.\n");
|
||||
|
||||
/* CCR2 bit 2: unlock NW bit */
|
||||
setCx86_old(CX86_CCR2, getCx86_old(CX86_CCR2) & ~0x04);
|
||||
setCx86(CX86_CCR2, getCx86(CX86_CCR2) & ~0x04);
|
||||
/* set 'Not Write-through' */
|
||||
write_cr0(read_cr0() | X86_CR0_NW);
|
||||
/* CCR2 bit 2: lock NW bit and set WT1 */
|
||||
setCx86_old(CX86_CCR2, getCx86_old(CX86_CCR2) | 0x14);
|
||||
setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x14);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -150,14 +150,14 @@ static void geode_configure(void)
|
|||
local_irq_save(flags);
|
||||
|
||||
/* Suspend on halt power saving and enable #SUSP pin */
|
||||
setCx86_old(CX86_CCR2, getCx86_old(CX86_CCR2) | 0x88);
|
||||
setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
|
||||
|
||||
ccr3 = getCx86(CX86_CCR3);
|
||||
setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */
|
||||
|
||||
|
||||
/* FPU fast, DTE cache, Mem bypass */
|
||||
setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x38);
|
||||
setCx86(CX86_CCR4, getCx86(CX86_CCR4) | 0x38);
|
||||
setCx86(CX86_CCR3, ccr3); /* disable MAPEN */
|
||||
|
||||
set_cx86_memwb();
|
||||
|
@ -292,7 +292,7 @@ static void init_cyrix(struct cpuinfo_x86 *c)
|
|||
/* GXm supports extended cpuid levels 'ala' AMD */
|
||||
if (c->cpuid_level == 2) {
|
||||
/* Enable cxMMX extensions (GX1 Datasheet 54) */
|
||||
setCx86_old(CX86_CCR7, getCx86_old(CX86_CCR7) | 1);
|
||||
setCx86(CX86_CCR7, getCx86(CX86_CCR7) | 1);
|
||||
|
||||
/*
|
||||
* GXm : 0x30 ... 0x5f GXm datasheet 51
|
||||
|
@ -315,7 +315,7 @@ static void init_cyrix(struct cpuinfo_x86 *c)
|
|||
if (dir1 > 7) {
|
||||
dir0_msn++; /* M II */
|
||||
/* Enable MMX extensions (App note 108) */
|
||||
setCx86_old(CX86_CCR7, getCx86_old(CX86_CCR7)|1);
|
||||
setCx86(CX86_CCR7, getCx86(CX86_CCR7)|1);
|
||||
} else {
|
||||
/* A 6x86MX - it has the bug. */
|
||||
set_cpu_bug(c, X86_BUG_COMA);
|
||||
|
|
|
@ -825,6 +825,8 @@ int __init hpet_enable(void)
|
|||
return 0;
|
||||
|
||||
hpet_set_mapping();
|
||||
if (!hpet_virt_address)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Read the period and check for a sane value:
|
||||
|
|
|
@ -351,6 +351,7 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp)
|
|||
#endif
|
||||
default:
|
||||
WARN_ON_ONCE(1);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -542,6 +542,7 @@ void arch_prepare_kretprobe(struct kretprobe_instance *ri, struct pt_regs *regs)
|
|||
unsigned long *sara = stack_addr(regs);
|
||||
|
||||
ri->ret_addr = (kprobe_opcode_t *) *sara;
|
||||
ri->fp = sara;
|
||||
|
||||
/* Replace the return addr with trampoline addr */
|
||||
*sara = (unsigned long) &kretprobe_trampoline;
|
||||
|
@ -743,15 +744,21 @@ __visible __used void *trampoline_handler(struct pt_regs *regs)
|
|||
unsigned long flags, orig_ret_address = 0;
|
||||
unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline;
|
||||
kprobe_opcode_t *correct_ret_addr = NULL;
|
||||
void *frame_pointer;
|
||||
bool skipped = false;
|
||||
|
||||
INIT_HLIST_HEAD(&empty_rp);
|
||||
kretprobe_hash_lock(current, &head, &flags);
|
||||
/* fixup registers */
|
||||
#ifdef CONFIG_X86_64
|
||||
regs->cs = __KERNEL_CS;
|
||||
/* On x86-64, we use pt_regs->sp for return address holder. */
|
||||
frame_pointer = ®s->sp;
|
||||
#else
|
||||
regs->cs = __KERNEL_CS | get_kernel_rpl();
|
||||
regs->gs = 0;
|
||||
/* On x86-32, we use pt_regs->flags for return address holder. */
|
||||
frame_pointer = ®s->flags;
|
||||
#endif
|
||||
regs->ip = trampoline_address;
|
||||
regs->orig_ax = ~0UL;
|
||||
|
@ -773,8 +780,25 @@ __visible __used void *trampoline_handler(struct pt_regs *regs)
|
|||
if (ri->task != current)
|
||||
/* another task is sharing our hash bucket */
|
||||
continue;
|
||||
/*
|
||||
* Return probes must be pushed on this hash list correct
|
||||
* order (same as return order) so that it can be poped
|
||||
* correctly. However, if we find it is pushed it incorrect
|
||||
* order, this means we find a function which should not be
|
||||
* probed, because the wrong order entry is pushed on the
|
||||
* path of processing other kretprobe itself.
|
||||
*/
|
||||
if (ri->fp != frame_pointer) {
|
||||
if (!skipped)
|
||||
pr_warn("kretprobe is stacked incorrectly. Trying to fixup.\n");
|
||||
skipped = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
orig_ret_address = (unsigned long)ri->ret_addr;
|
||||
if (skipped)
|
||||
pr_warn("%ps must be blacklisted because of incorrect kretprobe order\n",
|
||||
ri->rp->kp.addr);
|
||||
|
||||
if (orig_ret_address != trampoline_address)
|
||||
/*
|
||||
|
@ -792,6 +816,8 @@ __visible __used void *trampoline_handler(struct pt_regs *regs)
|
|||
if (ri->task != current)
|
||||
/* another task is sharing our hash bucket */
|
||||
continue;
|
||||
if (ri->fp != frame_pointer)
|
||||
continue;
|
||||
|
||||
orig_ret_address = (unsigned long)ri->ret_addr;
|
||||
if (ri->rp && ri->rp->handler) {
|
||||
|
|
|
@ -363,7 +363,7 @@ SECTIONS
|
|||
* Per-cpu symbols which need to be offset from __per_cpu_load
|
||||
* for the boot processor.
|
||||
*/
|
||||
#define INIT_PER_CPU(x) init_per_cpu__##x = x + __per_cpu_load
|
||||
#define INIT_PER_CPU(x) init_per_cpu__##x = ABSOLUTE(x) + __per_cpu_load
|
||||
INIT_PER_CPU(gdt_page);
|
||||
INIT_PER_CPU(irq_stack_union);
|
||||
|
||||
|
|
|
@ -2567,15 +2567,13 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
|
|||
* CR0/CR3/CR4/EFER. It's all a bit more complicated if the vCPU
|
||||
* supports long mode.
|
||||
*/
|
||||
cr4 = ctxt->ops->get_cr(ctxt, 4);
|
||||
if (emulator_has_longmode(ctxt)) {
|
||||
struct desc_struct cs_desc;
|
||||
|
||||
/* Zero CR4.PCIDE before CR0.PG. */
|
||||
if (cr4 & X86_CR4_PCIDE) {
|
||||
cr4 = ctxt->ops->get_cr(ctxt, 4);
|
||||
if (cr4 & X86_CR4_PCIDE)
|
||||
ctxt->ops->set_cr(ctxt, 4, cr4 & ~X86_CR4_PCIDE);
|
||||
cr4 &= ~X86_CR4_PCIDE;
|
||||
}
|
||||
|
||||
/* A 32-bit code segment is required to clear EFER.LMA. */
|
||||
memset(&cs_desc, 0, sizeof(cs_desc));
|
||||
|
@ -2589,13 +2587,16 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)
|
|||
if (cr0 & X86_CR0_PE)
|
||||
ctxt->ops->set_cr(ctxt, 0, cr0 & ~(X86_CR0_PG | X86_CR0_PE));
|
||||
|
||||
/* Now clear CR4.PAE (which must be done before clearing EFER.LME). */
|
||||
if (cr4 & X86_CR4_PAE)
|
||||
ctxt->ops->set_cr(ctxt, 4, cr4 & ~X86_CR4_PAE);
|
||||
if (emulator_has_longmode(ctxt)) {
|
||||
/* Clear CR4.PAE before clearing EFER.LME. */
|
||||
cr4 = ctxt->ops->get_cr(ctxt, 4);
|
||||
if (cr4 & X86_CR4_PAE)
|
||||
ctxt->ops->set_cr(ctxt, 4, cr4 & ~X86_CR4_PAE);
|
||||
|
||||
/* And finally go back to 32-bit mode. */
|
||||
efer = 0;
|
||||
ctxt->ops->set_msr(ctxt, MSR_EFER, efer);
|
||||
/* And finally go back to 32-bit mode. */
|
||||
efer = 0;
|
||||
ctxt->ops->set_msr(ctxt, MSR_EFER, efer);
|
||||
}
|
||||
|
||||
smbase = ctxt->ops->get_smbase(ctxt);
|
||||
if (emulator_has_longmode(ctxt))
|
||||
|
|
|
@ -46,7 +46,7 @@ $(obj)/pasyms.h: $(REALMODE_OBJS) FORCE
|
|||
targets += realmode.lds
|
||||
$(obj)/realmode.lds: $(obj)/pasyms.h
|
||||
|
||||
LDFLAGS_realmode.elf := --emit-relocs -T
|
||||
LDFLAGS_realmode.elf := -m elf_i386 --emit-relocs -T
|
||||
CPPFLAGS_realmode.lds += -P -C -I$(obj)
|
||||
|
||||
targets += realmode.elf
|
||||
|
|
|
@ -272,10 +272,14 @@ static int return_address_cb(struct stackframe *frame, void *data)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* level == 0 is for the return address from the caller of this function,
|
||||
* not from this function itself.
|
||||
*/
|
||||
unsigned long return_address(unsigned level)
|
||||
{
|
||||
struct return_addr_data r = {
|
||||
.skip = level + 1,
|
||||
.skip = level,
|
||||
};
|
||||
walk_stackframe(stack_pointer(NULL), return_address_cb, &r);
|
||||
return r.addr;
|
||||
|
|
|
@ -1216,8 +1216,11 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
|
|||
}
|
||||
}
|
||||
|
||||
if (bio_add_pc_page(q, bio, page, bytes, offset) < bytes)
|
||||
if (bio_add_pc_page(q, bio, page, bytes, offset) < bytes) {
|
||||
if (!map_data)
|
||||
__free_page(page);
|
||||
break;
|
||||
}
|
||||
|
||||
len -= bytes;
|
||||
offset = 0;
|
||||
|
|
|
@ -3494,7 +3494,49 @@ static struct hash_testvec poly1305_tv_template[] = {
|
|||
.psize = 80,
|
||||
.digest = "\x13\x00\x00\x00\x00\x00\x00\x00"
|
||||
"\x00\x00\x00\x00\x00\x00\x00\x00",
|
||||
},
|
||||
}, { /* Regression test for overflow in AVX2 implementation */
|
||||
.plaintext = "\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||
"\xff\xff\xff\xff",
|
||||
.psize = 300,
|
||||
.digest = "\xfb\x5e\x96\xd8\x61\xd5\xc7\xc8"
|
||||
"\x78\xe5\x87\xcc\x2d\x5a\x22\xe1",
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -443,9 +443,13 @@ static int acpi_ac_get_present(struct acpi_sbs *sbs)
|
|||
|
||||
/*
|
||||
* The spec requires that bit 4 always be 1. If it's not set, assume
|
||||
* that the implementation doesn't support an SBS charger
|
||||
* that the implementation doesn't support an SBS charger.
|
||||
*
|
||||
* And on some MacBooks a status of 0xffff is always returned, no
|
||||
* matter whether the charger is plugged in or not, which is also
|
||||
* wrong, so ignore the SBS charger for those too.
|
||||
*/
|
||||
if (!((status >> 4) & 0x1))
|
||||
if (!((status >> 4) & 0x1) || status == 0xffff)
|
||||
return -ENODEV;
|
||||
|
||||
sbs->charger_present = (status >> 15) & 0x1;
|
||||
|
|
|
@ -265,6 +265,7 @@
|
|||
/* #define ERRLOGMASK (CD_WARNING|CD_OPEN|CD_COUNT_TRACKS|CD_CLOSE) */
|
||||
/* #define ERRLOGMASK (CD_WARNING|CD_REG_UNREG|CD_DO_IOCTL|CD_OPEN|CD_CLOSE|CD_COUNT_TRACKS) */
|
||||
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/major.h>
|
||||
|
@ -3677,9 +3678,9 @@ static struct ctl_table_header *cdrom_sysctl_header;
|
|||
|
||||
static void cdrom_sysctl_register(void)
|
||||
{
|
||||
static int initialized;
|
||||
static atomic_t initialized = ATOMIC_INIT(0);
|
||||
|
||||
if (initialized == 1)
|
||||
if (!atomic_add_unless(&initialized, 1, 1))
|
||||
return;
|
||||
|
||||
cdrom_sysctl_header = register_sysctl_table(cdrom_root_table);
|
||||
|
@ -3690,8 +3691,6 @@ static void cdrom_sysctl_register(void)
|
|||
cdrom_sysctl_settings.debug = debug;
|
||||
cdrom_sysctl_settings.lock = lockdoor;
|
||||
cdrom_sysctl_settings.check = check_media_type;
|
||||
|
||||
initialized = 1;
|
||||
}
|
||||
|
||||
static void cdrom_sysctl_unregister(void)
|
||||
|
|
|
@ -389,7 +389,7 @@ config XILINX_HWICAP
|
|||
|
||||
config R3964
|
||||
tristate "Siemens R3964 line discipline"
|
||||
depends on TTY
|
||||
depends on TTY && BROKEN
|
||||
---help---
|
||||
This driver allows synchronous communication with devices using the
|
||||
Siemens R3964 packet protocol. Unless you are dealing with special
|
||||
|
|
|
@ -376,7 +376,7 @@ static __init int hpet_mmap_enable(char *str)
|
|||
pr_info("HPET mmap %s\n", hpet_mmap_enabled ? "enabled" : "disabled");
|
||||
return 1;
|
||||
}
|
||||
__setup("hpet_mmap", hpet_mmap_enable);
|
||||
__setup("hpet_mmap=", hpet_mmap_enable);
|
||||
|
||||
static int hpet_mmap(struct file *file, struct vm_area_struct *vma)
|
||||
{
|
||||
|
|
|
@ -73,7 +73,7 @@ static int virtio_read(struct hwrng *rng, void *buf, size_t size, bool wait)
|
|||
|
||||
if (!vi->busy) {
|
||||
vi->busy = true;
|
||||
init_completion(&vi->have_data);
|
||||
reinit_completion(&vi->have_data);
|
||||
register_buffer(vi, buf, size);
|
||||
}
|
||||
|
||||
|
|
|
@ -109,19 +109,29 @@ static int crb_recv(struct tpm_chip *chip, u8 *buf, size_t count)
|
|||
struct crb_priv *priv = chip->vendor.priv;
|
||||
unsigned int expected;
|
||||
|
||||
/* sanity check */
|
||||
if (count < 6)
|
||||
/* A sanity check that the upper layer wants to get at least the header
|
||||
* as that is the minimum size for any TPM response.
|
||||
*/
|
||||
if (count < TPM_HEADER_SIZE)
|
||||
return -EIO;
|
||||
|
||||
/* If this bit is set, according to the spec, the TPM is in
|
||||
* unrecoverable condition.
|
||||
*/
|
||||
if (le32_to_cpu(ioread32(&priv->cca->sts)) & CRB_CA_STS_ERROR)
|
||||
return -EIO;
|
||||
|
||||
memcpy_fromio(buf, priv->rsp, 6);
|
||||
expected = be32_to_cpup((__be32 *) &buf[2]);
|
||||
if (expected > count || expected < 6)
|
||||
/* Read the first 8 bytes in order to get the length of the response.
|
||||
* We read exactly a quad word in order to make sure that the remaining
|
||||
* reads will be aligned.
|
||||
*/
|
||||
memcpy_fromio(buf, priv->rsp, 8);
|
||||
|
||||
expected = be32_to_cpup((__be32 *)&buf[2]);
|
||||
if (expected > count || expected < TPM_HEADER_SIZE)
|
||||
return -EIO;
|
||||
|
||||
memcpy_fromio(&buf[6], &priv->rsp[6], expected - 6);
|
||||
memcpy_fromio(&buf[8], &priv->rsp[8], expected - 8);
|
||||
|
||||
return expected;
|
||||
}
|
||||
|
|
|
@ -65,7 +65,15 @@ static int i2c_atmel_send(struct tpm_chip *chip, u8 *buf, size_t len)
|
|||
dev_dbg(&chip->dev,
|
||||
"%s(buf=%*ph len=%0zx) -> sts=%d\n", __func__,
|
||||
(int)min_t(size_t, 64, len), buf, len, status);
|
||||
return status;
|
||||
|
||||
if (status < 0)
|
||||
return status;
|
||||
|
||||
/* The upper layer does not support incomplete sends. */
|
||||
if (status != len)
|
||||
return -E2BIG;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int i2c_atmel_recv(struct tpm_chip *chip, u8 *buf, size_t count)
|
||||
|
|
|
@ -138,7 +138,8 @@ static int crypto4xx_setkey_aes(struct crypto_ablkcipher *cipher,
|
|||
sa = (struct dynamic_sa_ctl *) ctx->sa_in;
|
||||
ctx->hash_final = 0;
|
||||
|
||||
set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, SA_NOT_SAVE_IV,
|
||||
set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, (cm == CRYPTO_MODE_CBC ?
|
||||
SA_SAVE_IV : SA_NOT_SAVE_IV),
|
||||
SA_LOAD_HASH_FROM_SA, SA_LOAD_IV_FROM_STATE,
|
||||
SA_NO_HEADER_PROC, SA_HASH_ALG_NULL,
|
||||
SA_CIPHER_ALG_AES, SA_PAD_TYPE_ZERO,
|
||||
|
|
|
@ -645,6 +645,15 @@ static u32 crypto4xx_ablkcipher_done(struct crypto4xx_device *dev,
|
|||
addr = dma_map_page(dev->core_dev->device, sg_page(dst),
|
||||
dst->offset, dst->length, DMA_FROM_DEVICE);
|
||||
}
|
||||
|
||||
if (pd_uinfo->sa_va->sa_command_0.bf.save_iv == SA_SAVE_IV) {
|
||||
struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req);
|
||||
|
||||
crypto4xx_memcpy_from_le32((u32 *)req->iv,
|
||||
pd_uinfo->sr_va->save_iv,
|
||||
crypto_skcipher_ivsize(skcipher));
|
||||
}
|
||||
|
||||
crypto4xx_ret_sg_desc(dev, pd_uinfo);
|
||||
if (ablk_req->base.complete != NULL)
|
||||
ablk_req->base.complete(&ablk_req->base, 0);
|
||||
|
|
|
@ -286,7 +286,7 @@ static inline int imxdma_sg_next(struct imxdma_desc *d)
|
|||
struct scatterlist *sg = d->sg;
|
||||
unsigned long now;
|
||||
|
||||
now = min(d->len, sg_dma_len(sg));
|
||||
now = min_t(size_t, d->len, sg_dma_len(sg));
|
||||
if (d->len != IMX_DMA_LENGTH_LOOP)
|
||||
d->len -= now;
|
||||
|
||||
|
|
|
@ -632,7 +632,10 @@ static void handle_cont_sngl_cycle_dma_done(struct tegra_dma_channel *tdc,
|
|||
|
||||
sgreq = list_first_entry(&tdc->pending_sg_req, typeof(*sgreq), node);
|
||||
dma_desc = sgreq->dma_desc;
|
||||
dma_desc->bytes_transferred += sgreq->req_len;
|
||||
/* if we dma for long enough the transfer count will wrap */
|
||||
dma_desc->bytes_transferred =
|
||||
(dma_desc->bytes_transferred + sgreq->req_len) %
|
||||
dma_desc->bytes_requested;
|
||||
|
||||
/* Callback need to be call */
|
||||
if (!dma_desc->cb_count)
|
||||
|
|
|
@ -872,14 +872,16 @@ static void omap_gpio_unmask_irq(struct irq_data *d)
|
|||
if (trigger)
|
||||
omap_set_gpio_triggering(bank, offset, trigger);
|
||||
|
||||
/* For level-triggered GPIOs, the clearing must be done after
|
||||
* the HW source is cleared, thus after the handler has run */
|
||||
if (bank->level_mask & BIT(offset)) {
|
||||
omap_set_gpio_irqenable(bank, offset, 0);
|
||||
omap_clear_gpio_irqstatus(bank, offset);
|
||||
}
|
||||
|
||||
omap_set_gpio_irqenable(bank, offset, 1);
|
||||
|
||||
/*
|
||||
* For level-triggered GPIOs, clearing must be done after the source
|
||||
* is cleared, thus after the handler has run. OMAP4 needs this done
|
||||
* after enabing the interrupt to clear the wakeup status.
|
||||
*/
|
||||
if (bank->level_mask & BIT(offset))
|
||||
omap_clear_gpio_irqstatus(bank, offset);
|
||||
|
||||
raw_spin_unlock_irqrestore(&bank->lock, flags);
|
||||
}
|
||||
|
||||
|
|
|
@ -3019,6 +3019,7 @@ static int drm_dp_mst_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs
|
|||
msg.u.i2c_read.transactions[i].i2c_dev_id = msgs[i].addr;
|
||||
msg.u.i2c_read.transactions[i].num_bytes = msgs[i].len;
|
||||
msg.u.i2c_read.transactions[i].bytes = msgs[i].buf;
|
||||
msg.u.i2c_read.transactions[i].no_stop_bit = !(msgs[i].flags & I2C_M_STOP);
|
||||
}
|
||||
msg.u.i2c_read.read_i2c_device_id = msgs[num - 1].addr;
|
||||
msg.u.i2c_read.num_bytes_read = msgs[num - 1].len;
|
||||
|
|
|
@ -54,7 +54,8 @@ static void etm4_os_unlock(void *info)
|
|||
|
||||
static bool etm4_arch_supported(u8 arch)
|
||||
{
|
||||
switch (arch) {
|
||||
/* Mask out the minor version number */
|
||||
switch (arch & 0xf0) {
|
||||
case ETM_ARCH_V4:
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -2936,16 +2936,16 @@ static s32 i2c_smbus_xfer_emulated(struct i2c_adapter *adapter, u16 addr,
|
|||
the underlying bus driver */
|
||||
break;
|
||||
case I2C_SMBUS_I2C_BLOCK_DATA:
|
||||
if (data->block[0] > I2C_SMBUS_BLOCK_MAX) {
|
||||
dev_err(&adapter->dev, "Invalid block %s size %d\n",
|
||||
read_write == I2C_SMBUS_READ ? "read" : "write",
|
||||
data->block[0]);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (read_write == I2C_SMBUS_READ) {
|
||||
msg[1].len = data->block[0];
|
||||
} else {
|
||||
msg[0].len = data->block[0] + 1;
|
||||
if (msg[0].len > I2C_SMBUS_BLOCK_MAX + 1) {
|
||||
dev_err(&adapter->dev,
|
||||
"Invalid block write size %d\n",
|
||||
data->block[0]);
|
||||
return -EINVAL;
|
||||
}
|
||||
for (i = 1; i <= data->block[0]; i++)
|
||||
msgbuf0[i] = data->block[i];
|
||||
}
|
||||
|
|
|
@ -1343,6 +1343,8 @@ static int kxcjk1013_resume(struct device *dev)
|
|||
|
||||
mutex_lock(&data->mutex);
|
||||
ret = kxcjk1013_set_mode(data, OPERATION);
|
||||
if (ret == 0)
|
||||
ret = kxcjk1013_set_range(data, data->range);
|
||||
mutex_unlock(&data->mutex);
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -121,6 +121,7 @@ static int ad_sd_read_reg_raw(struct ad_sigma_delta *sigma_delta,
|
|||
if (sigma_delta->info->has_registers) {
|
||||
data[0] = reg << sigma_delta->info->addr_shift;
|
||||
data[0] |= sigma_delta->info->read_mask;
|
||||
data[0] |= sigma_delta->comm;
|
||||
spi_message_add_tail(&t[0], &m);
|
||||
}
|
||||
spi_message_add_tail(&t[1], &m);
|
||||
|
|
|
@ -702,23 +702,29 @@ static int at91_adc_read_raw(struct iio_dev *idev,
|
|||
ret = wait_event_interruptible_timeout(st->wq_data_avail,
|
||||
st->done,
|
||||
msecs_to_jiffies(1000));
|
||||
if (ret == 0)
|
||||
ret = -ETIMEDOUT;
|
||||
if (ret < 0) {
|
||||
mutex_unlock(&st->lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
*val = st->last_value;
|
||||
|
||||
/* Disable interrupts, regardless if adc conversion was
|
||||
* successful or not
|
||||
*/
|
||||
at91_adc_writel(st, AT91_ADC_CHDR,
|
||||
AT91_ADC_CH(chan->channel));
|
||||
at91_adc_writel(st, AT91_ADC_IDR, BIT(chan->channel));
|
||||
|
||||
st->last_value = 0;
|
||||
st->done = false;
|
||||
if (ret > 0) {
|
||||
/* a valid conversion took place */
|
||||
*val = st->last_value;
|
||||
st->last_value = 0;
|
||||
st->done = false;
|
||||
ret = IIO_VAL_INT;
|
||||
} else if (ret == 0) {
|
||||
/* conversion timeout */
|
||||
dev_err(&idev->dev, "ADC Channel %d timeout.\n",
|
||||
chan->channel);
|
||||
ret = -ETIMEDOUT;
|
||||
}
|
||||
|
||||
mutex_unlock(&st->lock);
|
||||
return IIO_VAL_INT;
|
||||
return ret;
|
||||
|
||||
case IIO_CHAN_INFO_SCALE:
|
||||
*val = st->vref_mv;
|
||||
|
|
|
@ -519,11 +519,10 @@ static int bmg160_read_raw(struct iio_dev *indio_dev,
|
|||
} else
|
||||
return -EINVAL;
|
||||
case IIO_CHAN_INFO_SCALE:
|
||||
*val = 0;
|
||||
switch (chan->type) {
|
||||
case IIO_TEMP:
|
||||
*val2 = 500000;
|
||||
return IIO_VAL_INT_PLUS_MICRO;
|
||||
*val = 500;
|
||||
return IIO_VAL_INT;
|
||||
case IIO_ANGL_VEL:
|
||||
{
|
||||
int i;
|
||||
|
@ -531,6 +530,7 @@ static int bmg160_read_raw(struct iio_dev *indio_dev,
|
|||
for (i = 0; i < ARRAY_SIZE(bmg160_scale_table); ++i) {
|
||||
if (bmg160_scale_table[i].dps_range ==
|
||||
data->dps_range) {
|
||||
*val = 0;
|
||||
*val2 = bmg160_scale_table[i].scale;
|
||||
return IIO_VAL_INT_PLUS_MICRO;
|
||||
}
|
||||
|
|
|
@ -805,8 +805,8 @@ void mlx4_ib_destroy_alias_guid_service(struct mlx4_ib_dev *dev)
|
|||
unsigned long flags;
|
||||
|
||||
for (i = 0 ; i < dev->num_ports; i++) {
|
||||
cancel_delayed_work(&dev->sriov.alias_guid.ports_guid[i].alias_guid_work);
|
||||
det = &sriov->alias_guid.ports_guid[i];
|
||||
cancel_delayed_work_sync(&det->alias_guid_work);
|
||||
spin_lock_irqsave(&sriov->alias_guid.ag_work_lock, flags);
|
||||
while (!list_empty(&det->cb_list)) {
|
||||
cb_ctx = list_entry(det->cb_list.next,
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include "mlx4_ib.h"
|
||||
|
||||
#define CM_CLEANUP_CACHE_TIMEOUT (5 * HZ)
|
||||
#define CM_CLEANUP_CACHE_TIMEOUT (30 * HZ)
|
||||
|
||||
struct id_map_entry {
|
||||
struct rb_node node;
|
||||
|
|
|
@ -143,7 +143,7 @@ dmar_alloc_pci_notify_info(struct pci_dev *dev, unsigned long event)
|
|||
for (tmp = dev; tmp; tmp = tmp->bus->self)
|
||||
level++;
|
||||
|
||||
size = sizeof(*info) + level * sizeof(struct acpi_dmar_pci_path);
|
||||
size = sizeof(*info) + level * sizeof(info->path[0]);
|
||||
if (size <= sizeof(dmar_pci_notify_info_buf)) {
|
||||
info = (struct dmar_pci_notify_info *)dmar_pci_notify_info_buf;
|
||||
} else {
|
||||
|
|
|
@ -1598,6 +1598,9 @@ static void iommu_disable_protect_mem_regions(struct intel_iommu *iommu)
|
|||
u32 pmen;
|
||||
unsigned long flags;
|
||||
|
||||
if (!cap_plmr(iommu->cap) && !cap_phmr(iommu->cap))
|
||||
return;
|
||||
|
||||
raw_spin_lock_irqsave(&iommu->register_lock, flags);
|
||||
pmen = readl(iommu->reg + DMAR_PMEN_REG);
|
||||
pmen &= ~DMA_PMEN_EPM;
|
||||
|
|
|
@ -200,7 +200,7 @@ static void lp55xx_firmware_loaded(const struct firmware *fw, void *context)
|
|||
|
||||
if (!fw) {
|
||||
dev_err(dev, "firmware request failed\n");
|
||||
goto out;
|
||||
return;
|
||||
}
|
||||
|
||||
/* handling firmware data is chip dependent */
|
||||
|
@ -213,9 +213,9 @@ static void lp55xx_firmware_loaded(const struct firmware *fw, void *context)
|
|||
|
||||
mutex_unlock(&chip->lock);
|
||||
|
||||
out:
|
||||
/* firmware should be released for other channel use */
|
||||
release_firmware(chip->fw);
|
||||
chip->fw = NULL;
|
||||
}
|
||||
|
||||
static int lp55xx_request_firmware(struct lp55xx_chip *chip)
|
||||
|
|
|
@ -215,7 +215,9 @@ STORE(__cached_dev)
|
|||
d_strtoul(writeback_rate_d_term);
|
||||
d_strtoul_nonzero(writeback_rate_p_term_inverse);
|
||||
|
||||
d_strtoi_h(sequential_cutoff);
|
||||
sysfs_strtoul_clamp(sequential_cutoff,
|
||||
dc->sequential_cutoff,
|
||||
0, UINT_MAX);
|
||||
d_strtoi_h(readahead);
|
||||
|
||||
if (attr == &sysfs_clear_stats)
|
||||
|
@ -645,8 +647,17 @@ STORE(__bch_cache_set)
|
|||
c->error_limit = strtoul_or_return(buf) << IO_ERROR_SHIFT;
|
||||
|
||||
/* See count_io_errors() for why 88 */
|
||||
if (attr == &sysfs_io_error_halflife)
|
||||
c->error_decay = strtoul_or_return(buf) / 88;
|
||||
if (attr == &sysfs_io_error_halflife) {
|
||||
unsigned long v = 0;
|
||||
ssize_t ret;
|
||||
|
||||
ret = strtoul_safe_clamp(buf, v, 0, UINT_MAX);
|
||||
if (!ret) {
|
||||
c->error_decay = v / 88;
|
||||
return size;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
sysfs_strtoul(journal_delay_ms, c->journal_delay_ms);
|
||||
sysfs_strtoul(verify, c->verify);
|
||||
|
|
|
@ -80,9 +80,16 @@ do { \
|
|||
|
||||
#define sysfs_strtoul_clamp(file, var, min, max) \
|
||||
do { \
|
||||
if (attr == &sysfs_ ## file) \
|
||||
return strtoul_safe_clamp(buf, var, min, max) \
|
||||
?: (ssize_t) size; \
|
||||
if (attr == &sysfs_ ## file) { \
|
||||
unsigned long v = 0; \
|
||||
ssize_t ret; \
|
||||
ret = strtoul_safe_clamp(buf, v, min, max); \
|
||||
if (!ret) { \
|
||||
var = v; \
|
||||
return size; \
|
||||
} \
|
||||
return ret; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define strtoul_or_return(cp) \
|
||||
|
|
|
@ -3210,6 +3210,13 @@ static int pool_ctr(struct dm_target *ti, unsigned argc, char **argv)
|
|||
as.argc = argc;
|
||||
as.argv = argv;
|
||||
|
||||
/* make sure metadata and data are different devices */
|
||||
if (!strcmp(argv[0], argv[1])) {
|
||||
ti->error = "Error setting metadata or data device";
|
||||
r = -EINVAL;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set default pool features.
|
||||
*/
|
||||
|
@ -4092,6 +4099,12 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv)
|
|||
tc->sort_bio_list = RB_ROOT;
|
||||
|
||||
if (argc == 3) {
|
||||
if (!strcmp(argv[0], argv[2])) {
|
||||
ti->error = "Error setting origin device";
|
||||
r = -EINVAL;
|
||||
goto bad_origin_dev;
|
||||
}
|
||||
|
||||
r = dm_get_device(ti, argv[2], FMODE_READ, &origin_dev);
|
||||
if (r) {
|
||||
ti->error = "Error opening origin device";
|
||||
|
|
|
@ -988,6 +988,8 @@ static int mt9m111_probe(struct i2c_client *client,
|
|||
mt9m111->rect.top = MT9M111_MIN_DARK_ROWS;
|
||||
mt9m111->rect.width = MT9M111_MAX_WIDTH;
|
||||
mt9m111->rect.height = MT9M111_MAX_HEIGHT;
|
||||
mt9m111->width = mt9m111->rect.width;
|
||||
mt9m111->height = mt9m111->rect.height;
|
||||
mt9m111->fmt = &mt9m111_colour_fmts[0];
|
||||
mt9m111->lastpage = -1;
|
||||
mutex_init(&mt9m111->power_lock);
|
||||
|
|
|
@ -289,7 +289,7 @@ static void emmaprp_device_run(void *priv)
|
|||
{
|
||||
struct emmaprp_ctx *ctx = priv;
|
||||
struct emmaprp_q_data *s_q_data, *d_q_data;
|
||||
struct vb2_buffer *src_buf, *dst_buf;
|
||||
struct vb2_v4l2_buffer *src_buf, *dst_buf;
|
||||
struct emmaprp_dev *pcdev = ctx->dev;
|
||||
unsigned int s_width, s_height;
|
||||
unsigned int d_width, d_height;
|
||||
|
@ -309,8 +309,8 @@ static void emmaprp_device_run(void *priv)
|
|||
d_height = d_q_data->height;
|
||||
d_size = d_width * d_height;
|
||||
|
||||
p_in = vb2_dma_contig_plane_dma_addr(src_buf, 0);
|
||||
p_out = vb2_dma_contig_plane_dma_addr(dst_buf, 0);
|
||||
p_in = vb2_dma_contig_plane_dma_addr(&src_buf->vb2_buf, 0);
|
||||
p_out = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf, 0);
|
||||
if (!p_in || !p_out) {
|
||||
v4l2_err(&pcdev->v4l2_dev,
|
||||
"Acquiring kernel pointers to buffers failed\n");
|
||||
|
|
|
@ -497,7 +497,7 @@ static void device_run(void *prv)
|
|||
{
|
||||
struct g2d_ctx *ctx = prv;
|
||||
struct g2d_dev *dev = ctx->dev;
|
||||
struct vb2_buffer *src, *dst;
|
||||
struct vb2_v4l2_buffer *src, *dst;
|
||||
unsigned long flags;
|
||||
u32 cmd = 0;
|
||||
|
||||
|
@ -512,10 +512,10 @@ static void device_run(void *prv)
|
|||
spin_lock_irqsave(&dev->ctrl_lock, flags);
|
||||
|
||||
g2d_set_src_size(dev, &ctx->in);
|
||||
g2d_set_src_addr(dev, vb2_dma_contig_plane_dma_addr(src, 0));
|
||||
g2d_set_src_addr(dev, vb2_dma_contig_plane_dma_addr(&src->vb2_buf, 0));
|
||||
|
||||
g2d_set_dst_size(dev, &ctx->out);
|
||||
g2d_set_dst_addr(dev, vb2_dma_contig_plane_dma_addr(dst, 0));
|
||||
g2d_set_dst_addr(dev, vb2_dma_contig_plane_dma_addr(&dst->vb2_buf, 0));
|
||||
|
||||
g2d_set_rop4(dev, ctx->rop);
|
||||
g2d_set_flip(dev, ctx->flip);
|
||||
|
|
|
@ -788,14 +788,14 @@ static void skip(struct s5p_jpeg_buffer *buf, long len);
|
|||
static void exynos4_jpeg_parse_decode_h_tbl(struct s5p_jpeg_ctx *ctx)
|
||||
{
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct vb2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
struct vb2_v4l2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
struct s5p_jpeg_buffer jpeg_buffer;
|
||||
unsigned int word;
|
||||
int c, x, components;
|
||||
|
||||
jpeg_buffer.size = 2; /* Ls */
|
||||
jpeg_buffer.data =
|
||||
(unsigned long)vb2_plane_vaddr(vb, 0) + ctx->out_q.sos + 2;
|
||||
(unsigned long)vb2_plane_vaddr(&vb->vb2_buf, 0) + ctx->out_q.sos + 2;
|
||||
jpeg_buffer.curr = 0;
|
||||
|
||||
word = 0;
|
||||
|
@ -825,14 +825,14 @@ static void exynos4_jpeg_parse_decode_h_tbl(struct s5p_jpeg_ctx *ctx)
|
|||
static void exynos4_jpeg_parse_huff_tbl(struct s5p_jpeg_ctx *ctx)
|
||||
{
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct vb2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
struct vb2_v4l2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
struct s5p_jpeg_buffer jpeg_buffer;
|
||||
unsigned int word;
|
||||
int c, i, n, j;
|
||||
|
||||
for (j = 0; j < ctx->out_q.dht.n; ++j) {
|
||||
jpeg_buffer.size = ctx->out_q.dht.len[j];
|
||||
jpeg_buffer.data = (unsigned long)vb2_plane_vaddr(vb, 0) +
|
||||
jpeg_buffer.data = (unsigned long)vb2_plane_vaddr(&vb->vb2_buf, 0) +
|
||||
ctx->out_q.dht.marker[j];
|
||||
jpeg_buffer.curr = 0;
|
||||
|
||||
|
@ -884,13 +884,13 @@ static void exynos4_jpeg_parse_huff_tbl(struct s5p_jpeg_ctx *ctx)
|
|||
static void exynos4_jpeg_parse_decode_q_tbl(struct s5p_jpeg_ctx *ctx)
|
||||
{
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct vb2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
struct vb2_v4l2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
struct s5p_jpeg_buffer jpeg_buffer;
|
||||
int c, x, components;
|
||||
|
||||
jpeg_buffer.size = ctx->out_q.sof_len;
|
||||
jpeg_buffer.data =
|
||||
(unsigned long)vb2_plane_vaddr(vb, 0) + ctx->out_q.sof;
|
||||
(unsigned long)vb2_plane_vaddr(&vb->vb2_buf, 0) + ctx->out_q.sof;
|
||||
jpeg_buffer.curr = 0;
|
||||
|
||||
skip(&jpeg_buffer, 5); /* P, Y, X */
|
||||
|
@ -915,14 +915,14 @@ static void exynos4_jpeg_parse_decode_q_tbl(struct s5p_jpeg_ctx *ctx)
|
|||
static void exynos4_jpeg_parse_q_tbl(struct s5p_jpeg_ctx *ctx)
|
||||
{
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct vb2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
struct vb2_v4l2_buffer *vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
struct s5p_jpeg_buffer jpeg_buffer;
|
||||
unsigned int word;
|
||||
int c, i, j;
|
||||
|
||||
for (j = 0; j < ctx->out_q.dqt.n; ++j) {
|
||||
jpeg_buffer.size = ctx->out_q.dqt.len[j];
|
||||
jpeg_buffer.data = (unsigned long)vb2_plane_vaddr(vb, 0) +
|
||||
jpeg_buffer.data = (unsigned long)vb2_plane_vaddr(&vb->vb2_buf, 0) +
|
||||
ctx->out_q.dqt.marker[j];
|
||||
jpeg_buffer.curr = 0;
|
||||
|
||||
|
@ -1262,13 +1262,16 @@ static int s5p_jpeg_querycap(struct file *file, void *priv,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int enum_fmt(struct s5p_jpeg_fmt *sjpeg_formats, int n,
|
||||
static int enum_fmt(struct s5p_jpeg_ctx *ctx,
|
||||
struct s5p_jpeg_fmt *sjpeg_formats, int n,
|
||||
struct v4l2_fmtdesc *f, u32 type)
|
||||
{
|
||||
int i, num = 0;
|
||||
unsigned int fmt_ver_flag = ctx->jpeg->variant->fmt_ver_flag;
|
||||
|
||||
for (i = 0; i < n; ++i) {
|
||||
if (sjpeg_formats[i].flags & type) {
|
||||
if (sjpeg_formats[i].flags & type &&
|
||||
sjpeg_formats[i].flags & fmt_ver_flag) {
|
||||
/* index-th format of type type found ? */
|
||||
if (num == f->index)
|
||||
break;
|
||||
|
@ -1294,11 +1297,11 @@ static int s5p_jpeg_enum_fmt_vid_cap(struct file *file, void *priv,
|
|||
struct s5p_jpeg_ctx *ctx = fh_to_ctx(priv);
|
||||
|
||||
if (ctx->mode == S5P_JPEG_ENCODE)
|
||||
return enum_fmt(sjpeg_formats, SJPEG_NUM_FORMATS, f,
|
||||
return enum_fmt(ctx, sjpeg_formats, SJPEG_NUM_FORMATS, f,
|
||||
SJPEG_FMT_FLAG_ENC_CAPTURE);
|
||||
|
||||
return enum_fmt(sjpeg_formats, SJPEG_NUM_FORMATS, f,
|
||||
SJPEG_FMT_FLAG_DEC_CAPTURE);
|
||||
return enum_fmt(ctx, sjpeg_formats, SJPEG_NUM_FORMATS, f,
|
||||
SJPEG_FMT_FLAG_DEC_CAPTURE);
|
||||
}
|
||||
|
||||
static int s5p_jpeg_enum_fmt_vid_out(struct file *file, void *priv,
|
||||
|
@ -1307,11 +1310,11 @@ static int s5p_jpeg_enum_fmt_vid_out(struct file *file, void *priv,
|
|||
struct s5p_jpeg_ctx *ctx = fh_to_ctx(priv);
|
||||
|
||||
if (ctx->mode == S5P_JPEG_ENCODE)
|
||||
return enum_fmt(sjpeg_formats, SJPEG_NUM_FORMATS, f,
|
||||
return enum_fmt(ctx, sjpeg_formats, SJPEG_NUM_FORMATS, f,
|
||||
SJPEG_FMT_FLAG_ENC_OUTPUT);
|
||||
|
||||
return enum_fmt(sjpeg_formats, SJPEG_NUM_FORMATS, f,
|
||||
SJPEG_FMT_FLAG_DEC_OUTPUT);
|
||||
return enum_fmt(ctx, sjpeg_formats, SJPEG_NUM_FORMATS, f,
|
||||
SJPEG_FMT_FLAG_DEC_OUTPUT);
|
||||
}
|
||||
|
||||
static struct s5p_jpeg_q_data *get_q_data(struct s5p_jpeg_ctx *ctx,
|
||||
|
@ -2016,15 +2019,15 @@ static void s5p_jpeg_device_run(void *priv)
|
|||
{
|
||||
struct s5p_jpeg_ctx *ctx = priv;
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct vb2_buffer *src_buf, *dst_buf;
|
||||
struct vb2_v4l2_buffer *src_buf, *dst_buf;
|
||||
unsigned long src_addr, dst_addr, flags;
|
||||
|
||||
spin_lock_irqsave(&ctx->jpeg->slock, flags);
|
||||
|
||||
src_buf = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
dst_buf = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
|
||||
src_addr = vb2_dma_contig_plane_dma_addr(src_buf, 0);
|
||||
dst_addr = vb2_dma_contig_plane_dma_addr(dst_buf, 0);
|
||||
src_addr = vb2_dma_contig_plane_dma_addr(&src_buf->vb2_buf, 0);
|
||||
dst_addr = vb2_dma_contig_plane_dma_addr(&dst_buf->vb2_buf, 0);
|
||||
|
||||
s5p_jpeg_reset(jpeg->regs);
|
||||
s5p_jpeg_poweron(jpeg->regs);
|
||||
|
@ -2097,7 +2100,7 @@ static void exynos4_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx)
|
|||
{
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct s5p_jpeg_fmt *fmt;
|
||||
struct vb2_buffer *vb;
|
||||
struct vb2_v4l2_buffer *vb;
|
||||
struct s5p_jpeg_addr jpeg_addr = {};
|
||||
u32 pix_size, padding_bytes = 0;
|
||||
|
||||
|
@ -2116,7 +2119,7 @@ static void exynos4_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx)
|
|||
vb = v4l2_m2m_next_dst_buf(ctx->fh.m2m_ctx);
|
||||
}
|
||||
|
||||
jpeg_addr.y = vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||
jpeg_addr.y = vb2_dma_contig_plane_dma_addr(&vb->vb2_buf, 0);
|
||||
|
||||
if (fmt->colplanes == 2) {
|
||||
jpeg_addr.cb = jpeg_addr.y + pix_size - padding_bytes;
|
||||
|
@ -2134,7 +2137,7 @@ static void exynos4_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx)
|
|||
static void exynos4_jpeg_set_jpeg_addr(struct s5p_jpeg_ctx *ctx)
|
||||
{
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct vb2_buffer *vb;
|
||||
struct vb2_v4l2_buffer *vb;
|
||||
unsigned int jpeg_addr = 0;
|
||||
|
||||
if (ctx->mode == S5P_JPEG_ENCODE)
|
||||
|
@ -2142,7 +2145,7 @@ static void exynos4_jpeg_set_jpeg_addr(struct s5p_jpeg_ctx *ctx)
|
|||
else
|
||||
vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
|
||||
jpeg_addr = vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||
jpeg_addr = vb2_dma_contig_plane_dma_addr(&vb->vb2_buf, 0);
|
||||
if (jpeg->variant->version == SJPEG_EXYNOS5433 &&
|
||||
ctx->mode == S5P_JPEG_DECODE)
|
||||
jpeg_addr += ctx->out_q.sos;
|
||||
|
@ -2257,7 +2260,7 @@ static void exynos3250_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx)
|
|||
{
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct s5p_jpeg_fmt *fmt;
|
||||
struct vb2_buffer *vb;
|
||||
struct vb2_v4l2_buffer *vb;
|
||||
struct s5p_jpeg_addr jpeg_addr = {};
|
||||
u32 pix_size;
|
||||
|
||||
|
@ -2271,7 +2274,7 @@ static void exynos3250_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx)
|
|||
fmt = ctx->cap_q.fmt;
|
||||
}
|
||||
|
||||
jpeg_addr.y = vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||
jpeg_addr.y = vb2_dma_contig_plane_dma_addr(&vb->vb2_buf, 0);
|
||||
|
||||
if (fmt->colplanes == 2) {
|
||||
jpeg_addr.cb = jpeg_addr.y + pix_size;
|
||||
|
@ -2289,7 +2292,7 @@ static void exynos3250_jpeg_set_img_addr(struct s5p_jpeg_ctx *ctx)
|
|||
static void exynos3250_jpeg_set_jpeg_addr(struct s5p_jpeg_ctx *ctx)
|
||||
{
|
||||
struct s5p_jpeg *jpeg = ctx->jpeg;
|
||||
struct vb2_buffer *vb;
|
||||
struct vb2_v4l2_buffer *vb;
|
||||
unsigned int jpeg_addr = 0;
|
||||
|
||||
if (ctx->mode == S5P_JPEG_ENCODE)
|
||||
|
@ -2297,7 +2300,7 @@ static void exynos3250_jpeg_set_jpeg_addr(struct s5p_jpeg_ctx *ctx)
|
|||
else
|
||||
vb = v4l2_m2m_next_src_buf(ctx->fh.m2m_ctx);
|
||||
|
||||
jpeg_addr = vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||
jpeg_addr = vb2_dma_contig_plane_dma_addr(&vb->vb2_buf, 0);
|
||||
exynos3250_jpeg_jpgadr(jpeg->regs, jpeg_addr);
|
||||
}
|
||||
|
||||
|
|
|
@ -277,13 +277,13 @@ static void sh_veu_process(struct sh_veu_dev *veu,
|
|||
static void sh_veu_device_run(void *priv)
|
||||
{
|
||||
struct sh_veu_dev *veu = priv;
|
||||
struct vb2_buffer *src_buf, *dst_buf;
|
||||
struct vb2_v4l2_buffer *src_buf, *dst_buf;
|
||||
|
||||
src_buf = v4l2_m2m_next_src_buf(veu->m2m_ctx);
|
||||
dst_buf = v4l2_m2m_next_dst_buf(veu->m2m_ctx);
|
||||
|
||||
if (src_buf && dst_buf)
|
||||
sh_veu_process(veu, src_buf, dst_buf);
|
||||
sh_veu_process(veu, &src_buf->vb2_buf, &dst_buf->vb2_buf);
|
||||
}
|
||||
|
||||
/* ========== video ioctls ========== */
|
||||
|
|
|
@ -1147,7 +1147,7 @@ static inline void mmc_davinci_cpufreq_deregister(struct mmc_davinci_host *host)
|
|||
{
|
||||
}
|
||||
#endif
|
||||
static void __init init_mmcsd_host(struct mmc_davinci_host *host)
|
||||
static void init_mmcsd_host(struct mmc_davinci_host *host)
|
||||
{
|
||||
|
||||
mmc_davinci_reset_ctrl(host, 1);
|
||||
|
|
|
@ -921,7 +921,7 @@ static inline void set_cmd_timeout(struct mmc_omap_host *host, struct mmc_reques
|
|||
reg &= ~(1 << 5);
|
||||
OMAP_MMC_WRITE(host, SDIO, reg);
|
||||
/* Set maximum timeout */
|
||||
OMAP_MMC_WRITE(host, CTO, 0xff);
|
||||
OMAP_MMC_WRITE(host, CTO, 0xfd);
|
||||
}
|
||||
|
||||
static inline void set_data_timeout(struct mmc_omap_host *host, struct mmc_request *req)
|
||||
|
|
|
@ -3067,8 +3067,12 @@ static int bond_netdev_event(struct notifier_block *this,
|
|||
return NOTIFY_DONE;
|
||||
|
||||
if (event_dev->flags & IFF_MASTER) {
|
||||
int ret;
|
||||
|
||||
netdev_dbg(event_dev, "IFF_MASTER\n");
|
||||
return bond_master_netdev_event(event, event_dev);
|
||||
ret = bond_master_netdev_event(event, event_dev);
|
||||
if (ret != NOTIFY_DONE)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (event_dev->flags & IFF_SLAVE) {
|
||||
|
|
|
@ -120,7 +120,7 @@ static void enic_init_affinity_hint(struct enic *enic)
|
|||
|
||||
for (i = 0; i < enic->intr_count; i++) {
|
||||
if (enic_is_err_intr(enic, i) || enic_is_notify_intr(enic, i) ||
|
||||
(enic->msix[i].affinity_mask &&
|
||||
(cpumask_available(enic->msix[i].affinity_mask) &&
|
||||
!cpumask_empty(enic->msix[i].affinity_mask)))
|
||||
continue;
|
||||
if (zalloc_cpumask_var(&enic->msix[i].affinity_mask,
|
||||
|
@ -149,7 +149,7 @@ static void enic_set_affinity_hint(struct enic *enic)
|
|||
for (i = 0; i < enic->intr_count; i++) {
|
||||
if (enic_is_err_intr(enic, i) ||
|
||||
enic_is_notify_intr(enic, i) ||
|
||||
!enic->msix[i].affinity_mask ||
|
||||
!cpumask_available(enic->msix[i].affinity_mask) ||
|
||||
cpumask_empty(enic->msix[i].affinity_mask))
|
||||
continue;
|
||||
err = irq_set_affinity_hint(enic->msix_entry[i].vector,
|
||||
|
@ -162,7 +162,7 @@ static void enic_set_affinity_hint(struct enic *enic)
|
|||
for (i = 0; i < enic->wq_count; i++) {
|
||||
int wq_intr = enic_msix_wq_intr(enic, i);
|
||||
|
||||
if (enic->msix[wq_intr].affinity_mask &&
|
||||
if (cpumask_available(enic->msix[wq_intr].affinity_mask) &&
|
||||
!cpumask_empty(enic->msix[wq_intr].affinity_mask))
|
||||
netif_set_xps_queue(enic->netdev,
|
||||
enic->msix[wq_intr].affinity_mask,
|
||||
|
|
|
@ -2131,7 +2131,7 @@ static int e1000_request_msix(struct e1000_adapter *adapter)
|
|||
if (strlen(netdev->name) < (IFNAMSIZ - 5))
|
||||
snprintf(adapter->rx_ring->name,
|
||||
sizeof(adapter->rx_ring->name) - 1,
|
||||
"%s-rx-0", netdev->name);
|
||||
"%.14s-rx-0", netdev->name);
|
||||
else
|
||||
memcpy(adapter->rx_ring->name, netdev->name, IFNAMSIZ);
|
||||
err = request_irq(adapter->msix_entries[vector].vector,
|
||||
|
@ -2147,7 +2147,7 @@ static int e1000_request_msix(struct e1000_adapter *adapter)
|
|||
if (strlen(netdev->name) < (IFNAMSIZ - 5))
|
||||
snprintf(adapter->tx_ring->name,
|
||||
sizeof(adapter->tx_ring->name) - 1,
|
||||
"%s-tx-0", netdev->name);
|
||||
"%.14s-tx-0", netdev->name);
|
||||
else
|
||||
memcpy(adapter->tx_ring->name, netdev->name, IFNAMSIZ);
|
||||
err = request_irq(adapter->msix_entries[vector].vector,
|
||||
|
|
|
@ -717,6 +717,7 @@ static const struct usb_device_id products[] = {
|
|||
{QMI_FIXED_INTF(0x19d2, 0x2002, 4)}, /* ZTE (Vodafone) K3765-Z */
|
||||
{QMI_FIXED_INTF(0x2001, 0x7e19, 4)}, /* D-Link DWM-221 B1 */
|
||||
{QMI_FIXED_INTF(0x2001, 0x7e35, 4)}, /* D-Link DWM-222 */
|
||||
{QMI_FIXED_INTF(0x2020, 0x2031, 4)}, /* Olicard 600 */
|
||||
{QMI_FIXED_INTF(0x2020, 0x2033, 4)}, /* BroadMobi BM806U */
|
||||
{QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)}, /* Sierra Wireless MC7700 */
|
||||
{QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
struct mt7601u_dev;
|
||||
|
||||
#define MT7601U_EE_MAX_VER 0x0c
|
||||
#define MT7601U_EE_MAX_VER 0x0d
|
||||
#define MT7601U_EEPROM_SIZE 256
|
||||
|
||||
#define MT7601U_DEFAULT_TX_POWER 6
|
||||
|
|
|
@ -75,7 +75,6 @@ static inline int rsi_kill_thread(struct rsi_thread *handle)
|
|||
atomic_inc(&handle->thread_done);
|
||||
rsi_set_event(&handle->event);
|
||||
|
||||
wait_for_completion(&handle->completion);
|
||||
return kthread_stop(handle->task);
|
||||
}
|
||||
|
||||
|
|
|
@ -1123,8 +1123,11 @@ static int wl12xx_chip_wakeup(struct wl1271 *wl, bool plt)
|
|||
goto out;
|
||||
|
||||
ret = wl12xx_fetch_firmware(wl, plt);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
if (ret < 0) {
|
||||
kfree(wl->fw_status);
|
||||
kfree(wl->raw_fw_status);
|
||||
kfree(wl->tx_res_if);
|
||||
}
|
||||
|
||||
out:
|
||||
return ret;
|
||||
|
|
|
@ -3623,6 +3623,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL_EXT, 0x9128,
|
|||
/* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c14 */
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL_EXT, 0x9130,
|
||||
quirk_dma_func1_alias);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL_EXT, 0x9170,
|
||||
quirk_dma_func1_alias);
|
||||
/* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c47 + c57 */
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL_EXT, 0x9172,
|
||||
quirk_dma_func1_alias);
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
* ACT8865 voltage number
|
||||
*/
|
||||
#define ACT8865_VOLTAGE_NUM 64
|
||||
#define ACT8600_SUDCDC_VOLTAGE_NUM 255
|
||||
#define ACT8600_SUDCDC_VOLTAGE_NUM 256
|
||||
|
||||
struct act8865 {
|
||||
struct regmap *regmap;
|
||||
|
@ -154,7 +154,8 @@ static const struct regulator_linear_range act8600_sudcdc_voltage_ranges[] = {
|
|||
REGULATOR_LINEAR_RANGE(3000000, 0, 63, 0),
|
||||
REGULATOR_LINEAR_RANGE(3000000, 64, 159, 100000),
|
||||
REGULATOR_LINEAR_RANGE(12600000, 160, 191, 200000),
|
||||
REGULATOR_LINEAR_RANGE(19000000, 191, 255, 400000),
|
||||
REGULATOR_LINEAR_RANGE(19000000, 192, 247, 400000),
|
||||
REGULATOR_LINEAR_RANGE(41400000, 248, 255, 0),
|
||||
};
|
||||
|
||||
static struct regulator_ops act8865_ops = {
|
||||
|
|
|
@ -3847,6 +3847,7 @@ int megasas_alloc_cmds(struct megasas_instance *instance)
|
|||
if (megasas_create_frame_pool(instance)) {
|
||||
dev_printk(KERN_DEBUG, &instance->pdev->dev, "Error creating frame DMA pool\n");
|
||||
megasas_free_cmds(instance);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -217,7 +217,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,
|
|||
extern void scsi_requeue_run_queue(struct work_struct *work);
|
||||
|
||||
sdev = kzalloc(sizeof(*sdev) + shost->transportt->device_size,
|
||||
GFP_ATOMIC);
|
||||
GFP_KERNEL);
|
||||
if (!sdev)
|
||||
goto out;
|
||||
|
||||
|
@ -791,7 +791,7 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
|
|||
*/
|
||||
sdev->inquiry = kmemdup(inq_result,
|
||||
max_t(size_t, sdev->inquiry_len, 36),
|
||||
GFP_ATOMIC);
|
||||
GFP_KERNEL);
|
||||
if (sdev->inquiry == NULL)
|
||||
return SCSI_SCAN_NO_RESPONSE;
|
||||
|
||||
|
@ -1085,7 +1085,7 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget,
|
|||
if (!sdev)
|
||||
goto out;
|
||||
|
||||
result = kmalloc(result_len, GFP_ATOMIC |
|
||||
result = kmalloc(result_len, GFP_KERNEL |
|
||||
((shost->unchecked_isa_dma) ? __GFP_DMA : 0));
|
||||
if (!result)
|
||||
goto out_free_sdev;
|
||||
|
|
|
@ -138,7 +138,7 @@ static int gsbi_probe(struct platform_device *pdev)
|
|||
struct resource *res;
|
||||
void __iomem *base;
|
||||
struct gsbi_info *gsbi;
|
||||
int i;
|
||||
int i, ret;
|
||||
u32 mask, gsbi_num;
|
||||
const struct crci_config *config = NULL;
|
||||
|
||||
|
@ -221,7 +221,10 @@ static int gsbi_probe(struct platform_device *pdev)
|
|||
|
||||
platform_set_drvdata(pdev, gsbi);
|
||||
|
||||
return of_platform_populate(node, NULL, NULL, &pdev->dev);
|
||||
ret = of_platform_populate(node, NULL, NULL, &pdev->dev);
|
||||
if (ret)
|
||||
clk_disable_unprepare(gsbi->hclk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int gsbi_remove(struct platform_device *pdev)
|
||||
|
|
|
@ -131,13 +131,17 @@ static int tegra_fuse_probe(struct platform_device *pdev)
|
|||
/* take over the memory region from the early initialization */
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
fuse->base = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(fuse->base))
|
||||
return PTR_ERR(fuse->base);
|
||||
if (IS_ERR(fuse->base)) {
|
||||
err = PTR_ERR(fuse->base);
|
||||
fuse->base = base;
|
||||
return err;
|
||||
}
|
||||
|
||||
fuse->clk = devm_clk_get(&pdev->dev, "fuse");
|
||||
if (IS_ERR(fuse->clk)) {
|
||||
dev_err(&pdev->dev, "failed to get FUSE clock: %ld",
|
||||
PTR_ERR(fuse->clk));
|
||||
fuse->base = base;
|
||||
return PTR_ERR(fuse->clk);
|
||||
}
|
||||
|
||||
|
@ -146,8 +150,10 @@ static int tegra_fuse_probe(struct platform_device *pdev)
|
|||
|
||||
if (fuse->soc->probe) {
|
||||
err = fuse->soc->probe(fuse);
|
||||
if (err < 0)
|
||||
if (err < 0) {
|
||||
fuse->base = base;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
if (tegra_fuse_create_sysfs(&pdev->dev, fuse->soc->info->size,
|
||||
|
|
|
@ -472,10 +472,8 @@ static int ni6501_alloc_usb_buffers(struct comedi_device *dev)
|
|||
|
||||
size = le16_to_cpu(devpriv->ep_tx->wMaxPacketSize);
|
||||
devpriv->usb_tx_buf = kzalloc(size, GFP_KERNEL);
|
||||
if (!devpriv->usb_tx_buf) {
|
||||
kfree(devpriv->usb_rx_buf);
|
||||
if (!devpriv->usb_tx_buf)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -527,6 +525,9 @@ static int ni6501_auto_attach(struct comedi_device *dev,
|
|||
if (!devpriv)
|
||||
return -ENOMEM;
|
||||
|
||||
mutex_init(&devpriv->mut);
|
||||
usb_set_intfdata(intf, devpriv);
|
||||
|
||||
ret = ni6501_find_endpoints(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
@ -535,9 +536,6 @@ static int ni6501_auto_attach(struct comedi_device *dev,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
mutex_init(&devpriv->mut);
|
||||
usb_set_intfdata(intf, devpriv);
|
||||
|
||||
ret = comedi_alloc_subdevices(dev, 2);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
|
@ -691,10 +691,8 @@ static int vmk80xx_alloc_usb_buffers(struct comedi_device *dev)
|
|||
|
||||
size = le16_to_cpu(devpriv->ep_tx->wMaxPacketSize);
|
||||
devpriv->usb_tx_buf = kzalloc(size, GFP_KERNEL);
|
||||
if (!devpriv->usb_tx_buf) {
|
||||
kfree(devpriv->usb_rx_buf);
|
||||
if (!devpriv->usb_tx_buf)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -809,6 +807,8 @@ static int vmk80xx_auto_attach(struct comedi_device *dev,
|
|||
|
||||
devpriv->model = board->model;
|
||||
|
||||
sema_init(&devpriv->limit_sem, 8);
|
||||
|
||||
ret = vmk80xx_find_usb_endpoints(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
@ -817,8 +817,6 @@ static int vmk80xx_auto_attach(struct comedi_device *dev,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
sema_init(&devpriv->limit_sem, 8);
|
||||
|
||||
usb_set_intfdata(intf, devpriv);
|
||||
|
||||
if (devpriv->model == VMK8055_MODEL)
|
||||
|
|
|
@ -20,6 +20,13 @@ enum int3400_thermal_uuid {
|
|||
INT3400_THERMAL_PASSIVE_1,
|
||||
INT3400_THERMAL_ACTIVE,
|
||||
INT3400_THERMAL_CRITICAL,
|
||||
INT3400_THERMAL_ADAPTIVE_PERFORMANCE,
|
||||
INT3400_THERMAL_EMERGENCY_CALL_MODE,
|
||||
INT3400_THERMAL_PASSIVE_2,
|
||||
INT3400_THERMAL_POWER_BOSS,
|
||||
INT3400_THERMAL_VIRTUAL_SENSOR,
|
||||
INT3400_THERMAL_COOLING_MODE,
|
||||
INT3400_THERMAL_HARDWARE_DUTY_CYCLING,
|
||||
INT3400_THERMAL_MAXIMUM_UUID,
|
||||
};
|
||||
|
||||
|
@ -27,6 +34,13 @@ static u8 *int3400_thermal_uuids[INT3400_THERMAL_MAXIMUM_UUID] = {
|
|||
"42A441D6-AE6A-462b-A84B-4A8CE79027D3",
|
||||
"3A95C389-E4B8-4629-A526-C52C88626BAE",
|
||||
"97C68AE7-15FA-499c-B8C9-5DA81D606E0A",
|
||||
"63BE270F-1C11-48FD-A6F7-3AF253FF3E2D",
|
||||
"5349962F-71E6-431D-9AE8-0A635B710AEE",
|
||||
"9E04115A-AE87-4D1C-9500-0F3E340BFE75",
|
||||
"F5A35014-C209-46A4-993A-EB56DE7530A1",
|
||||
"6ED722A7-9240-48A5-B479-31EEF723D7CF",
|
||||
"16CAF1B7-DD38-40ED-B1C1-1B8A1913D531",
|
||||
"BE84BABF-C4D4-403D-B495-3128FD44dAC1",
|
||||
};
|
||||
|
||||
struct int3400_thermal_priv {
|
||||
|
@ -271,10 +285,9 @@ static int int3400_thermal_probe(struct platform_device *pdev)
|
|||
|
||||
platform_set_drvdata(pdev, priv);
|
||||
|
||||
if (priv->uuid_bitmap & 1 << INT3400_THERMAL_PASSIVE_1) {
|
||||
int3400_thermal_ops.get_mode = int3400_thermal_get_mode;
|
||||
int3400_thermal_ops.set_mode = int3400_thermal_set_mode;
|
||||
}
|
||||
int3400_thermal_ops.get_mode = int3400_thermal_get_mode;
|
||||
int3400_thermal_ops.set_mode = int3400_thermal_set_mode;
|
||||
|
||||
priv->thermal = thermal_zone_device_register("INT3400 Thermal", 0, 0,
|
||||
priv, &int3400_thermal_ops,
|
||||
&int3400_thermal_params, 0, 0);
|
||||
|
|
|
@ -473,4 +473,27 @@ config MIPS_EJTAG_FDC_KGDB_CHAN
|
|||
help
|
||||
FDC channel number to use for KGDB.
|
||||
|
||||
config LDISC_AUTOLOAD
|
||||
bool "Automatically load TTY Line Disciplines"
|
||||
default y
|
||||
help
|
||||
Historically the kernel has always automatically loaded any
|
||||
line discipline that is in a kernel module when a user asks
|
||||
for it to be loaded with the TIOCSETD ioctl, or through other
|
||||
means. This is not always the best thing to do on systems
|
||||
where you know you will not be using some of the more
|
||||
"ancient" line disciplines, so prevent the kernel from doing
|
||||
this unless the request is coming from a process with the
|
||||
CAP_SYS_MODULE permissions.
|
||||
|
||||
Say 'Y' here if you trust your userspace users to do the right
|
||||
thing, or if you have only provided the line disciplines that
|
||||
you know you will be using, or if you wish to continue to use
|
||||
the traditional method of on-demand loading of these modules
|
||||
by any user.
|
||||
|
||||
This functionality can be changed at runtime with the
|
||||
dev.tty.ldisc_autoload sysctl, this configuration option will
|
||||
only set the default value of this functionality.
|
||||
|
||||
endif # TTY
|
||||
|
|
|
@ -169,6 +169,8 @@ struct atmel_uart_port {
|
|||
unsigned int pending_status;
|
||||
spinlock_t lock_suspended;
|
||||
|
||||
bool hd_start_rx; /* can start RX during half-duplex operation */
|
||||
|
||||
int (*prepare_rx)(struct uart_port *port);
|
||||
int (*prepare_tx)(struct uart_port *port);
|
||||
void (*schedule_rx)(struct uart_port *port);
|
||||
|
@ -237,6 +239,12 @@ static inline void atmel_uart_write_char(struct uart_port *port, u8 value)
|
|||
|
||||
#endif
|
||||
|
||||
static inline int atmel_uart_is_half_duplex(struct uart_port *port)
|
||||
{
|
||||
return (port->rs485.flags & SER_RS485_ENABLED) &&
|
||||
!(port->rs485.flags & SER_RS485_RX_DURING_TX);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SERIAL_ATMEL_PDC
|
||||
static bool atmel_use_pdc_rx(struct uart_port *port)
|
||||
{
|
||||
|
@ -481,9 +489,9 @@ static void atmel_stop_tx(struct uart_port *port)
|
|||
/* Disable interrupts */
|
||||
atmel_uart_writel(port, ATMEL_US_IDR, atmel_port->tx_done_mask);
|
||||
|
||||
if ((port->rs485.flags & SER_RS485_ENABLED) &&
|
||||
!(port->rs485.flags & SER_RS485_RX_DURING_TX))
|
||||
if (atmel_uart_is_half_duplex(port))
|
||||
atmel_start_rx(port);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -500,8 +508,7 @@ static void atmel_start_tx(struct uart_port *port)
|
|||
return;
|
||||
|
||||
if (atmel_use_pdc_tx(port) || atmel_use_dma_tx(port))
|
||||
if ((port->rs485.flags & SER_RS485_ENABLED) &&
|
||||
!(port->rs485.flags & SER_RS485_RX_DURING_TX))
|
||||
if (atmel_uart_is_half_duplex(port))
|
||||
atmel_stop_rx(port);
|
||||
|
||||
if (atmel_use_pdc_tx(port))
|
||||
|
@ -810,10 +817,14 @@ static void atmel_complete_tx_dma(void *arg)
|
|||
*/
|
||||
if (!uart_circ_empty(xmit))
|
||||
tasklet_schedule(&atmel_port->tasklet);
|
||||
else if ((port->rs485.flags & SER_RS485_ENABLED) &&
|
||||
!(port->rs485.flags & SER_RS485_RX_DURING_TX)) {
|
||||
/* DMA done, stop TX, start RX for RS485 */
|
||||
atmel_start_rx(port);
|
||||
else if (atmel_uart_is_half_duplex(port)) {
|
||||
/*
|
||||
* DMA done, re-enable TXEMPTY and signal that we can stop
|
||||
* TX and start RX for RS485
|
||||
*/
|
||||
atmel_port->hd_start_rx = true;
|
||||
atmel_uart_writel(port, ATMEL_US_IER,
|
||||
atmel_port->tx_done_mask);
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&port->lock, flags);
|
||||
|
@ -1253,9 +1264,20 @@ atmel_handle_transmit(struct uart_port *port, unsigned int pending)
|
|||
struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
|
||||
|
||||
if (pending & atmel_port->tx_done_mask) {
|
||||
/* Either PDC or interrupt transmission */
|
||||
atmel_uart_writel(port, ATMEL_US_IDR,
|
||||
atmel_port->tx_done_mask);
|
||||
|
||||
/* Start RX if flag was set and FIFO is empty */
|
||||
if (atmel_port->hd_start_rx) {
|
||||
if (!(atmel_uart_readl(port, ATMEL_US_CSR)
|
||||
& ATMEL_US_TXEMPTY))
|
||||
dev_warn(port->dev, "Should start RX, but TX fifo is not empty\n");
|
||||
|
||||
atmel_port->hd_start_rx = false;
|
||||
atmel_start_rx(port);
|
||||
return;
|
||||
}
|
||||
|
||||
tasklet_schedule(&atmel_port->tasklet);
|
||||
}
|
||||
}
|
||||
|
@ -1388,8 +1410,7 @@ static void atmel_tx_pdc(struct uart_port *port)
|
|||
atmel_uart_writel(port, ATMEL_US_IER,
|
||||
atmel_port->tx_done_mask);
|
||||
} else {
|
||||
if ((port->rs485.flags & SER_RS485_ENABLED) &&
|
||||
!(port->rs485.flags & SER_RS485_RX_DURING_TX)) {
|
||||
if (atmel_uart_is_half_duplex(port)) {
|
||||
/* DMA done, stop TX, start RX for RS485 */
|
||||
atmel_start_rx(port);
|
||||
}
|
||||
|
|
|
@ -1145,7 +1145,7 @@ static void cdns_uart_console_write(struct console *co, const char *s,
|
|||
*
|
||||
* Return: 0 on success, negative errno otherwise.
|
||||
*/
|
||||
static int __init cdns_uart_console_setup(struct console *co, char *options)
|
||||
static int cdns_uart_console_setup(struct console *co, char *options)
|
||||
{
|
||||
struct uart_port *port = &cdns_uart_port[co->index];
|
||||
int baud = 9600;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* Byte threshold to limit memory consumption for flip buffers.
|
||||
* The actual memory limit is > 2x this amount.
|
||||
*/
|
||||
#define TTYB_DEFAULT_MEM_LIMIT 65536
|
||||
#define TTYB_DEFAULT_MEM_LIMIT (640 * 1024UL)
|
||||
|
||||
/*
|
||||
* We default to dicing tty buffer allocations to this many characters
|
||||
|
|
|
@ -513,6 +513,8 @@ void proc_clear_tty(struct task_struct *p)
|
|||
tty_kref_put(tty);
|
||||
}
|
||||
|
||||
extern void tty_sysctl_init(void);
|
||||
|
||||
/**
|
||||
* proc_set_tty - set the controlling terminal
|
||||
*
|
||||
|
@ -3689,6 +3691,7 @@ void console_sysfs_notify(void)
|
|||
*/
|
||||
int __init tty_init(void)
|
||||
{
|
||||
tty_sysctl_init();
|
||||
cdev_init(&tty_cdev, &tty_fops);
|
||||
if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) ||
|
||||
register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0)
|
||||
|
|
|
@ -148,6 +148,13 @@ static void put_ldops(struct tty_ldisc_ops *ldops)
|
|||
* takes tty_ldiscs_lock to guard against ldisc races
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_LDISC_AUTOLOAD)
|
||||
#define INITIAL_AUTOLOAD_STATE 1
|
||||
#else
|
||||
#define INITIAL_AUTOLOAD_STATE 0
|
||||
#endif
|
||||
static int tty_ldisc_autoload = INITIAL_AUTOLOAD_STATE;
|
||||
|
||||
static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc)
|
||||
{
|
||||
struct tty_ldisc *ld;
|
||||
|
@ -162,6 +169,8 @@ static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc)
|
|||
*/
|
||||
ldops = get_ldops(disc);
|
||||
if (IS_ERR(ldops)) {
|
||||
if (!capable(CAP_SYS_MODULE) && !tty_ldisc_autoload)
|
||||
return ERR_PTR(-EPERM);
|
||||
request_module("tty-ldisc-%d", disc);
|
||||
ldops = get_ldops(disc);
|
||||
if (IS_ERR(ldops))
|
||||
|
@ -830,3 +839,41 @@ void tty_ldisc_begin(void)
|
|||
/* Setup the default TTY line discipline. */
|
||||
(void) tty_register_ldisc(N_TTY, &tty_ldisc_N_TTY);
|
||||
}
|
||||
|
||||
static int zero;
|
||||
static int one = 1;
|
||||
static struct ctl_table tty_table[] = {
|
||||
{
|
||||
.procname = "ldisc_autoload",
|
||||
.data = &tty_ldisc_autoload,
|
||||
.maxlen = sizeof(tty_ldisc_autoload),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec,
|
||||
.extra1 = &zero,
|
||||
.extra2 = &one,
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct ctl_table tty_dir_table[] = {
|
||||
{
|
||||
.procname = "tty",
|
||||
.mode = 0555,
|
||||
.child = tty_table,
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct ctl_table tty_root_table[] = {
|
||||
{
|
||||
.procname = "dev",
|
||||
.mode = 0555,
|
||||
.child = tty_dir_table,
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
void tty_sysctl_init(void)
|
||||
{
|
||||
register_sysctl_table(tty_root_table);
|
||||
}
|
||||
|
|
|
@ -913,8 +913,15 @@ static int ci_hdrc_probe(struct platform_device *pdev)
|
|||
} else if (ci->platdata->usb_phy) {
|
||||
ci->usb_phy = ci->platdata->usb_phy;
|
||||
} else {
|
||||
ci->usb_phy = devm_usb_get_phy_by_phandle(dev->parent, "phys",
|
||||
0);
|
||||
ci->phy = devm_phy_get(dev->parent, "usb-phy");
|
||||
ci->usb_phy = devm_usb_get_phy(dev->parent, USB_PHY_TYPE_USB2);
|
||||
|
||||
/* Fallback to grabbing any registered USB2 PHY */
|
||||
if (IS_ERR(ci->usb_phy) &&
|
||||
PTR_ERR(ci->usb_phy) != -EPROBE_DEFER)
|
||||
ci->usb_phy = devm_usb_get_phy(dev->parent,
|
||||
USB_PHY_TYPE_USB2);
|
||||
|
||||
/* if both generic PHY and USB PHY layers aren't enabled */
|
||||
if (PTR_ERR(ci->phy) == -ENOSYS &&
|
||||
|
|
|
@ -425,6 +425,9 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image,
|
|||
{
|
||||
unsigned int x;
|
||||
|
||||
if (image->width > info->var.xres || image->height > info->var.yres)
|
||||
return;
|
||||
|
||||
if (rotate == FB_ROTATE_UR) {
|
||||
for (x = 0;
|
||||
x < num && image->dx + image->width <= info->var.xres;
|
||||
|
|
21
fs/9p/v9fs.c
21
fs/9p/v9fs.c
|
@ -59,6 +59,8 @@ enum {
|
|||
Opt_cache_loose, Opt_fscache, Opt_mmap,
|
||||
/* Access options */
|
||||
Opt_access, Opt_posixacl,
|
||||
/* Lock timeout option */
|
||||
Opt_locktimeout,
|
||||
/* Error token */
|
||||
Opt_err
|
||||
};
|
||||
|
@ -78,6 +80,7 @@ static const match_table_t tokens = {
|
|||
{Opt_cachetag, "cachetag=%s"},
|
||||
{Opt_access, "access=%s"},
|
||||
{Opt_posixacl, "posixacl"},
|
||||
{Opt_locktimeout, "locktimeout=%u"},
|
||||
{Opt_err, NULL}
|
||||
};
|
||||
|
||||
|
@ -126,6 +129,7 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
|
|||
#ifdef CONFIG_9P_FSCACHE
|
||||
v9ses->cachetag = NULL;
|
||||
#endif
|
||||
v9ses->session_lock_timeout = P9_LOCK_TIMEOUT;
|
||||
|
||||
if (!opts)
|
||||
return 0;
|
||||
|
@ -298,6 +302,23 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
|
|||
#endif
|
||||
break;
|
||||
|
||||
case Opt_locktimeout:
|
||||
r = match_int(&args[0], &option);
|
||||
if (r < 0) {
|
||||
p9_debug(P9_DEBUG_ERROR,
|
||||
"integer field, but no integer?\n");
|
||||
ret = r;
|
||||
continue;
|
||||
}
|
||||
if (option < 1) {
|
||||
p9_debug(P9_DEBUG_ERROR,
|
||||
"locktimeout must be a greater than zero integer.\n");
|
||||
ret = -EINVAL;
|
||||
continue;
|
||||
}
|
||||
v9ses->session_lock_timeout = (long)option * HZ;
|
||||
break;
|
||||
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -116,6 +116,7 @@ struct v9fs_session_info {
|
|||
struct list_head slist; /* list of sessions registered with v9fs */
|
||||
struct backing_dev_info bdi;
|
||||
struct rw_semaphore rename_sem;
|
||||
long session_lock_timeout; /* retry interval for blocking locks */
|
||||
};
|
||||
|
||||
/* cache_validity flags */
|
||||
|
|
|
@ -105,7 +105,6 @@ static int v9fs_dir_readdir(struct file *file, struct dir_context *ctx)
|
|||
int err = 0;
|
||||
struct p9_fid *fid;
|
||||
int buflen;
|
||||
int reclen = 0;
|
||||
struct p9_rdir *rdir;
|
||||
struct kvec kvec;
|
||||
|
||||
|
@ -138,11 +137,10 @@ static int v9fs_dir_readdir(struct file *file, struct dir_context *ctx)
|
|||
while (rdir->head < rdir->tail) {
|
||||
err = p9stat_read(fid->clnt, rdir->buf + rdir->head,
|
||||
rdir->tail - rdir->head, &st);
|
||||
if (err) {
|
||||
if (err <= 0) {
|
||||
p9_debug(P9_DEBUG_VFS, "returned %d\n", err);
|
||||
return -EIO;
|
||||
}
|
||||
reclen = st.size+2;
|
||||
|
||||
over = !dir_emit(ctx, st.name, strlen(st.name),
|
||||
v9fs_qid2ino(&st.qid), dt_type(&st));
|
||||
|
@ -150,8 +148,8 @@ static int v9fs_dir_readdir(struct file *file, struct dir_context *ctx)
|
|||
if (over)
|
||||
return 0;
|
||||
|
||||
rdir->head += reclen;
|
||||
ctx->pos += reclen;
|
||||
rdir->head += err;
|
||||
ctx->pos += err;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -154,6 +154,7 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)
|
|||
uint8_t status = P9_LOCK_ERROR;
|
||||
int res = 0;
|
||||
unsigned char fl_type;
|
||||
struct v9fs_session_info *v9ses;
|
||||
|
||||
fid = filp->private_data;
|
||||
BUG_ON(fid == NULL);
|
||||
|
@ -189,6 +190,8 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)
|
|||
if (IS_SETLKW(cmd))
|
||||
flock.flags = P9_LOCK_FLAGS_BLOCK;
|
||||
|
||||
v9ses = v9fs_inode2v9ses(file_inode(filp));
|
||||
|
||||
/*
|
||||
* if its a blocked request and we get P9_LOCK_BLOCKED as the status
|
||||
* for lock request, keep on trying
|
||||
|
@ -202,7 +205,8 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)
|
|||
break;
|
||||
if (status == P9_LOCK_BLOCKED && !IS_SETLKW(cmd))
|
||||
break;
|
||||
if (schedule_timeout_interruptible(P9_LOCK_TIMEOUT) != 0)
|
||||
if (schedule_timeout_interruptible(v9ses->session_lock_timeout)
|
||||
!= 0)
|
||||
break;
|
||||
/*
|
||||
* p9_client_lock_dotl overwrites flock.client_id with the
|
||||
|
|
|
@ -854,6 +854,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
|
|||
current->flags |= PF_RANDOMIZE;
|
||||
|
||||
setup_new_exec(bprm);
|
||||
install_exec_creds(bprm);
|
||||
|
||||
/* Do this so that we can load the interpreter, if need be. We will
|
||||
change some of these later */
|
||||
|
@ -1088,7 +1089,6 @@ static int load_elf_binary(struct linux_binprm *bprm)
|
|||
goto out;
|
||||
#endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */
|
||||
|
||||
install_exec_creds(bprm);
|
||||
retval = create_elf_tables(bprm, &loc->elf_ex,
|
||||
load_addr, interp_load_addr);
|
||||
if (retval < 0)
|
||||
|
|
|
@ -2985,6 +2985,13 @@ void guard_bio_eod(int rw, struct bio *bio)
|
|||
/* Uhhuh. We've got a bio that straddles the device size! */
|
||||
truncated_bytes = bio->bi_iter.bi_size - (maxsector << 9);
|
||||
|
||||
/*
|
||||
* The bio contains more than one segment which spans EOD, just return
|
||||
* and let IO layer turn it into an EIO
|
||||
*/
|
||||
if (truncated_bytes > bvec->bv_len)
|
||||
return;
|
||||
|
||||
/* Truncate the bio.. */
|
||||
bio->bi_iter.bi_size -= truncated_bytes;
|
||||
bvec->bv_len -= truncated_bytes;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue