Merge 4.9.220 into android-4.9-q
Changes in 4.9.220
bus: sunxi-rsb: Return correct data when mixing 16-bit and 8-bit reads
net: vxge: fix wrong __VA_ARGS__ usage
qlcnic: Fix bad kzalloc null test
i2c: st: fix missing struct parameter description
irqchip/versatile-fpga: Handle chained IRQs properly
sched: Avoid scale real weight down to zero
selftests/x86/ptrace_syscall_32: Fix no-vDSO segfault
libata: Remove extra scsi_host_put() in ata_scsi_add_hosts()
gfs2: Don't demote a glock until its revokes are written
x86/boot: Use unsigned comparison for addresses
locking/lockdep: Avoid recursion in lockdep_count_{for,back}ward_deps()
btrfs: remove a BUG_ON() from merge_reloc_roots()
btrfs: track reloc roots based on their commit root bytenr
misc: rtsx: set correct pcr_ops for rts522A
ASoC: fix regwmask
ASoC: dapm: connect virtual mux with default value
ASoC: dpcm: allow start or stop during pause for backend
ASoC: topology: use name_prefix for new kcontrol
usb: gadget: f_fs: Fix use after free issue as part of queue failure
usb: gadget: composite: Inform controller driver of self-powered
ALSA: usb-audio: Add mixer workaround for TRX40 and co
ALSA: hda: Add driver blacklist
ALSA: hda: Fix potential access overflow in beep helper
ALSA: ice1724: Fix invalid access for enumerated ctl items
ALSA: pcm: oss: Fix regression by buffer overflow fix
media: ti-vpe: cal: fix disable_irqs to only the intended target
acpi/x86: ignore unspecified bit positions in the ACPI global lock field
thermal: devfreq_cooling: inline all stubs for CONFIG_DEVFREQ_THERMAL=n
KEYS: reaching the keys quotas correctly
irqchip/versatile-fpga: Apply clear-mask earlier
MIPS: OCTEON: irq: Fix potential NULL pointer dereference
ath9k: Handle txpower changes even when TPC is disabled
signal: Extend exec_id to 64bits
x86/entry/32: Add missing ASM_CLAC to general_protection entry
KVM: s390: vsie: Fix region 1 ASCE sanity shadow address checks
KVM: s390: vsie: Fix delivery of addressing exceptions
KVM: x86: Allocate new rmap and large page tracking when moving memslot
KVM: VMX: Always VMCLEAR in-use VMCSes during crash with kexec support
KVM: VMX: fix crash cleanup when KVM wasn't used
btrfs: drop block from cache on error in relocation
crypto: mxs-dcp - fix scatterlist linearization for hash
ALSA: hda: Initialize power_state field properly
x86/speculation: Remove redundant arch_smt_update() invocation
tools: gpio: Fix out-of-tree build regression
mm: Use fixed constant in page_frag_alloc instead of size + 1
dm verity fec: fix memory leak in verity_fec_dtr
scsi: zfcp: fix missing erp_lock in port recovery trigger for point-to-point
arm64: armv8_deprecated: Fix undef_hook mask for thumb setend
rtc: omap: Use define directive for PIN_CONFIG_ACTIVE_HIGH
ext4: fix a data race at inode->i_blocks
ocfs2: no need try to truncate file beyond i_size
s390/diag: fix display of diagnose call statistics
Input: i8042 - add Acer Aspire 5738z to nomux list
kmod: make request_module() return an error when autoloading is disabled
cpufreq: powernv: Fix use-after-free
hfsplus: fix crash and filesystem corruption when deleting files
libata: Return correct status in sata_pmp_eh_recover_pm() when ATA_DFLAG_DETACH is set
powerpc/64/tm: Don't let userspace set regs->trap via sigreturn
Btrfs: fix crash during unmount due to race with delayed inode workers
drm/dp_mst: Fix clearing payload state on topology disable
drm: Remove PageReserved manipulation from drm_pci_alloc
ipmi: fix hung processes in __get_guid()
powerpc/fsl_booke: Avoid creating duplicate tlb1 entry
misc: echo: Remove unnecessary parentheses and simplify check for zero
mfd: dln2: Fix sanity checking for endpoints
hsr: check protocol version in hsr_newlink()
net: ipv4: devinet: Fix crash when add/del multicast IP with autojoin
net: qrtr: send msgs from local of same id as broadcast
net: ipv6: do not consider routes via gateways for anycast address check
scsi: ufs: Fix ufshcd_hold() caused scheduling while atomic
jbd2: improve comments about freeing data buffers whose page mapping is NULL
ext4: fix incorrect group count in ext4_fill_super error message
ext4: fix incorrect inodes per group in error message
ASoC: Intel: mrfld: fix incorrect check on p->sink
ASoC: Intel: mrfld: return error codes when an error occurs
ALSA: usb-audio: Don't override ignore_ctl_error value from the map
btrfs: check commit root generation in should_ignore_root
mac80211_hwsim: Use kstrndup() in place of kasprintf()
ext4: do not zeroout extents beyond i_disksize
dm flakey: check for null arg_name in parse_features()
kvm: x86: Host feature SSBD doesn't imply guest feature SPEC_CTRL_SSBD
scsi: target: remove boilerplate code
scsi: target: fix hang when multiple threads try to destroy the same iscsi session
tracing: Fix the race between registering 'snapshot' event trigger and triggering 'snapshot' operation
objtool: Fix switch table detection in .text.unlikely
scsi: sg: add sg_remove_request in sg_common_write
ALSA: hda: Don't release card at firmware loading error
video: fbdev: sis: Remove unnecessary parentheses and commented code
drm: NULL pointer dereference [null-pointer-deref] (CWE 476) problem
Revert "gpio: set up initial state from .get_direction()"
wil6210: increase firmware ready timeout
wil6210: fix temperature debugfs
scsi: ufs: make sure all interrupts are processed
scsi: ufs: ufs-qcom: remove broken hci version quirk
wil6210: rate limit wil_rx_refill error
rtc: pm8xxx: Fix issue in RTC write path
wil6210: fix length check in __wmi_send
soc: qcom: smem: Use le32_to_cpu for comparison
of: fix missing kobject init for !SYSFS && OF_DYNAMIC config
arm64: cpu_errata: include required headers
of: unittest: kmemleak in of_unittest_platform_populate()
clk: at91: usb: continue if clk_hw_round_rate() return zero
power: supply: bq27xxx_battery: Silence deferred-probe error
clk: tegra: Fix Tegra PMC clock out parents
NFS: direct.c: Fix memory leak of dreq when nfs_get_lock_context fails
s390/cpuinfo: fix wrong output when CPU0 is offline
powerpc/maple: Fix declaration made after definition
ext4: do not commit super on read-only bdev
percpu_counter: fix a data race at vm_committed_as
compiler.h: fix error in BUILD_BUG_ON() reporting
KVM: s390: vsie: Fix possible race when shadowing region 3 tables
NFS: Fix memory leaks in nfs_pageio_stop_mirroring()
ext2: fix empty body warnings when -Wextra is used
ext2: fix debug reference to ext2_xattr_cache
libnvdimm: Out of bounds read in __nd_ioctl()
iommu/amd: Fix the configuration of GCR3 table root pointer
fbdev: potential information leak in do_fb_ioctl()
tty: evh_bytechan: Fix out of bounds accesses
locktorture: Print ratio of acquisitions, not failures
mtd: lpddr: Fix a double free in probe()
mtd: phram: fix a double free issue in error path
x86/CPU: Add native CPUID variants returning a single datum
x86/microcode/intel: replace sync_core() with native_cpuid_reg(eax)
x86/vdso: Fix lsl operand order
Linux 4.9.220
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I130bead53d151b84c03bac575c0f3760e14538a6
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 219
|
||||
SUBLEVEL = 220
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
||||
@@ -603,7 +603,7 @@ static struct undef_hook setend_hooks[] = {
|
||||
},
|
||||
{
|
||||
/* Thumb mode */
|
||||
.instr_mask = 0x0000fff7,
|
||||
.instr_mask = 0xfffffff7,
|
||||
.instr_val = 0x0000b650,
|
||||
.pstate_mask = (COMPAT_PSR_T_BIT | COMPAT_PSR_MODE_MASK),
|
||||
.pstate_val = (COMPAT_PSR_T_BIT | COMPAT_PSR_MODE_USR),
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <linux/arm-smccc.h>
|
||||
#include <linux/psci.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/cachetype.h>
|
||||
#include <asm/cpu.h>
|
||||
|
||||
@@ -2199,6 +2199,9 @@ static int octeon_irq_cib_map(struct irq_domain *d,
|
||||
}
|
||||
|
||||
cd = kzalloc(sizeof(*cd), GFP_KERNEL);
|
||||
if (!cd)
|
||||
return -ENOMEM;
|
||||
|
||||
cd->host_data = host_data;
|
||||
cd->bit = hw;
|
||||
|
||||
|
||||
@@ -469,8 +469,10 @@ static long restore_tm_sigcontexts(struct task_struct *tsk,
|
||||
err |= __get_user(tsk->thread.ckpt_regs.ccr,
|
||||
&sc->gp_regs[PT_CCR]);
|
||||
|
||||
/* Don't allow userspace to set the trap value */
|
||||
regs->trap = 0;
|
||||
|
||||
/* These regs are not checkpointed; they can go in 'regs'. */
|
||||
err |= __get_user(regs->trap, &sc->gp_regs[PT_TRAP]);
|
||||
err |= __get_user(regs->dar, &sc->gp_regs[PT_DAR]);
|
||||
err |= __get_user(regs->dsisr, &sc->gp_regs[PT_DSISR]);
|
||||
err |= __get_user(regs->result, &sc->gp_regs[PT_RESULT]);
|
||||
|
||||
@@ -400,7 +400,7 @@ _GLOBAL(set_context)
|
||||
* extern void loadcam_entry(unsigned int index)
|
||||
*
|
||||
* Load TLBCAM[index] entry in to the L2 CAM MMU
|
||||
* Must preserve r7, r8, r9, and r10
|
||||
* Must preserve r7, r8, r9, r10 and r11
|
||||
*/
|
||||
_GLOBAL(loadcam_entry)
|
||||
mflr r5
|
||||
@@ -436,6 +436,10 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_BIG_PHYS)
|
||||
*/
|
||||
_GLOBAL(loadcam_multi)
|
||||
mflr r8
|
||||
/* Don't switch to AS=1 if already there */
|
||||
mfmsr r11
|
||||
andi. r11,r11,MSR_IS
|
||||
bne 10f
|
||||
|
||||
/*
|
||||
* Set up temporary TLB entry that is the same as what we're
|
||||
@@ -461,6 +465,7 @@ _GLOBAL(loadcam_multi)
|
||||
mtmsr r6
|
||||
isync
|
||||
|
||||
10:
|
||||
mr r9,r3
|
||||
add r10,r3,r4
|
||||
2: bl loadcam_entry
|
||||
@@ -469,6 +474,10 @@ _GLOBAL(loadcam_multi)
|
||||
mr r3,r9
|
||||
blt 2b
|
||||
|
||||
/* Don't return to AS=0 if we were in AS=1 at function start */
|
||||
andi. r11,r11,MSR_IS
|
||||
bne 3f
|
||||
|
||||
/* Return to AS=0 and clear the temporary entry */
|
||||
mfmsr r6
|
||||
rlwinm. r6,r6,0,~(MSR_IS|MSR_DS)
|
||||
@@ -484,6 +493,7 @@ _GLOBAL(loadcam_multi)
|
||||
tlbwe
|
||||
isync
|
||||
|
||||
3:
|
||||
mtlr r8
|
||||
blr
|
||||
#endif
|
||||
|
||||
@@ -299,23 +299,6 @@ static int __init maple_probe(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
define_machine(maple) {
|
||||
.name = "Maple",
|
||||
.probe = maple_probe,
|
||||
.setup_arch = maple_setup_arch,
|
||||
.init_IRQ = maple_init_IRQ,
|
||||
.pci_irq_fixup = maple_pci_irq_fixup,
|
||||
.pci_get_legacy_ide_irq = maple_pci_get_legacy_ide_irq,
|
||||
.restart = maple_restart,
|
||||
.halt = maple_halt,
|
||||
.get_boot_time = maple_get_boot_time,
|
||||
.set_rtc_time = maple_set_rtc_time,
|
||||
.get_rtc_time = maple_get_rtc_time,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = maple_progress,
|
||||
.power_save = power4_idle,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_EDAC
|
||||
/*
|
||||
* Register a platform device for CPC925 memory controller on
|
||||
@@ -372,3 +355,20 @@ static int __init maple_cpc925_edac_setup(void)
|
||||
}
|
||||
machine_device_initcall(maple, maple_cpc925_edac_setup);
|
||||
#endif
|
||||
|
||||
define_machine(maple) {
|
||||
.name = "Maple",
|
||||
.probe = maple_probe,
|
||||
.setup_arch = maple_setup_arch,
|
||||
.init_IRQ = maple_init_IRQ,
|
||||
.pci_irq_fixup = maple_pci_irq_fixup,
|
||||
.pci_get_legacy_ide_irq = maple_pci_get_legacy_ide_irq,
|
||||
.restart = maple_restart,
|
||||
.halt = maple_halt,
|
||||
.get_boot_time = maple_get_boot_time,
|
||||
.set_rtc_time = maple_set_rtc_time,
|
||||
.get_rtc_time = maple_get_rtc_time,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = maple_progress,
|
||||
.power_save = power4_idle,
|
||||
};
|
||||
|
||||
@@ -76,7 +76,7 @@ static int show_diag_stat(struct seq_file *m, void *v)
|
||||
|
||||
static void *show_diag_stat_start(struct seq_file *m, loff_t *pos)
|
||||
{
|
||||
return *pos <= nr_cpu_ids ? (void *)((unsigned long) *pos + 1) : NULL;
|
||||
return *pos <= NR_DIAG_STAT ? (void *)((unsigned long) *pos + 1) : NULL;
|
||||
}
|
||||
|
||||
static void *show_diag_stat_next(struct seq_file *m, void *v, loff_t *pos)
|
||||
|
||||
@@ -139,8 +139,9 @@ static void show_cpu_mhz(struct seq_file *m, unsigned long n)
|
||||
static int show_cpuinfo(struct seq_file *m, void *v)
|
||||
{
|
||||
unsigned long n = (unsigned long) v - 1;
|
||||
unsigned long first = cpumask_first(cpu_online_mask);
|
||||
|
||||
if (!n)
|
||||
if (n == first)
|
||||
show_cpu_summary(m, v);
|
||||
if (!machine_has_cpu_mhz)
|
||||
return 0;
|
||||
@@ -153,6 +154,8 @@ static inline void *c_update(loff_t *pos)
|
||||
{
|
||||
if (*pos)
|
||||
*pos = cpumask_next(*pos - 1, cpu_online_mask);
|
||||
else
|
||||
*pos = cpumask_first(cpu_online_mask);
|
||||
return *pos < nr_cpu_ids ? (void *)*pos + 1 : NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -947,6 +947,7 @@ static int vsie_run(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
|
||||
scb_s->iprcc = PGM_ADDRESSING;
|
||||
scb_s->pgmilc = 4;
|
||||
scb_s->gpsw.addr = __rewind_psw(scb_s->gpsw, 4);
|
||||
rc = 1;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -759,14 +759,18 @@ static void gmap_call_notifier(struct gmap *gmap, unsigned long start,
|
||||
static inline unsigned long *gmap_table_walk(struct gmap *gmap,
|
||||
unsigned long gaddr, int level)
|
||||
{
|
||||
const int asce_type = gmap->asce & _ASCE_TYPE_MASK;
|
||||
unsigned long *table;
|
||||
|
||||
if ((gmap->asce & _ASCE_TYPE_MASK) + 4 < (level * 4))
|
||||
return NULL;
|
||||
if (gmap_is_shadow(gmap) && gmap->removed)
|
||||
return NULL;
|
||||
if (gaddr & (-1UL << (31 + ((gmap->asce & _ASCE_TYPE_MASK) >> 2)*11)))
|
||||
|
||||
if (asce_type != _ASCE_TYPE_REGION1 &&
|
||||
gaddr & (-1UL << (31 + (asce_type >> 2) * 11)))
|
||||
return NULL;
|
||||
|
||||
table = gmap->table;
|
||||
switch (gmap->asce & _ASCE_TYPE_MASK) {
|
||||
case _ASCE_TYPE_REGION1:
|
||||
@@ -1680,6 +1684,7 @@ int gmap_shadow_r3t(struct gmap *sg, unsigned long saddr, unsigned long r3t,
|
||||
goto out_free;
|
||||
} else if (*table & _REGION_ENTRY_ORIGIN) {
|
||||
rc = -EAGAIN; /* Race with shadow */
|
||||
goto out_free;
|
||||
}
|
||||
crst_table_init(s_r3t, _REGION3_ENTRY_EMPTY);
|
||||
/* mark as invalid as long as the parent table is not protected */
|
||||
|
||||
@@ -170,7 +170,7 @@ preferred_addr:
|
||||
notl %eax
|
||||
andl %eax, %ebx
|
||||
cmpl $LOAD_PHYSICAL_ADDR, %ebx
|
||||
jge 1f
|
||||
jae 1f
|
||||
#endif
|
||||
movl $LOAD_PHYSICAL_ADDR, %ebx
|
||||
1:
|
||||
|
||||
@@ -104,7 +104,7 @@ ENTRY(startup_32)
|
||||
notl %eax
|
||||
andl %eax, %ebx
|
||||
cmpl $LOAD_PHYSICAL_ADDR, %ebx
|
||||
jge 1f
|
||||
jae 1f
|
||||
#endif
|
||||
movl $LOAD_PHYSICAL_ADDR, %ebx
|
||||
1:
|
||||
@@ -339,7 +339,7 @@ preferred_addr:
|
||||
notq %rax
|
||||
andq %rax, %rbp
|
||||
cmpq $LOAD_PHYSICAL_ADDR, %rbp
|
||||
jge 1f
|
||||
jae 1f
|
||||
#endif
|
||||
movq $LOAD_PHYSICAL_ADDR, %rbp
|
||||
1:
|
||||
|
||||
@@ -1195,6 +1195,7 @@ ENTRY(int3)
|
||||
END(int3)
|
||||
|
||||
ENTRY(general_protection)
|
||||
ASM_CLAC
|
||||
pushl $do_general_protection
|
||||
jmp error_code
|
||||
END(general_protection)
|
||||
|
||||
@@ -59,7 +59,7 @@ static inline u32 intel_get_microcode_revision(void)
|
||||
native_wrmsrl(MSR_IA32_UCODE_REV, 0);
|
||||
|
||||
/* As documented in the SDM: Do a CPUID 1 here */
|
||||
sync_core();
|
||||
native_cpuid_eax(1);
|
||||
|
||||
/* get the current revision from MSR 0x8B */
|
||||
native_rdmsr(MSR_IA32_UCODE_REV, dummy, rev);
|
||||
|
||||
@@ -213,6 +213,24 @@ static inline void native_cpuid(unsigned int *eax, unsigned int *ebx,
|
||||
: "memory");
|
||||
}
|
||||
|
||||
#define native_cpuid_reg(reg) \
|
||||
static inline unsigned int native_cpuid_##reg(unsigned int op) \
|
||||
{ \
|
||||
unsigned int eax = op, ebx, ecx = 0, edx; \
|
||||
\
|
||||
native_cpuid(&eax, &ebx, &ecx, &edx); \
|
||||
\
|
||||
return reg; \
|
||||
}
|
||||
|
||||
/*
|
||||
* Native CPUID functions returning a single datum.
|
||||
*/
|
||||
native_cpuid_reg(eax)
|
||||
native_cpuid_reg(ebx)
|
||||
native_cpuid_reg(ecx)
|
||||
native_cpuid_reg(edx)
|
||||
|
||||
static inline void load_cr3(pgd_t *pgdir)
|
||||
{
|
||||
write_cr3(__pa(pgdir));
|
||||
|
||||
@@ -92,7 +92,7 @@ static inline unsigned int __getcpu(void)
|
||||
*
|
||||
* If RDPID is available, use it.
|
||||
*/
|
||||
alternative_io ("lsl %[p],%[seg]",
|
||||
alternative_io ("lsl %[seg],%[p]",
|
||||
".byte 0xf3,0x0f,0xc7,0xf8", /* RDPID %eax/rax */
|
||||
X86_FEATURE_RDPID,
|
||||
[p] "=a" (p), [seg] "r" (__PER_CPU_SEG));
|
||||
|
||||
@@ -1717,7 +1717,7 @@ int __acpi_acquire_global_lock(unsigned int *lock)
|
||||
new = (((old & ~0x3) + 2) + ((old >> 1) & 0x1));
|
||||
val = cmpxchg(lock, old, new);
|
||||
} while (unlikely (val != old));
|
||||
return (new < 3) ? -1 : 0;
|
||||
return ((new & 0x3) < 3) ? -1 : 0;
|
||||
}
|
||||
|
||||
int __acpi_release_global_lock(unsigned int *lock)
|
||||
|
||||
@@ -479,7 +479,8 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
|
||||
entry->edx |= F(SPEC_CTRL);
|
||||
if (boot_cpu_has(X86_FEATURE_STIBP))
|
||||
entry->edx |= F(INTEL_STIBP);
|
||||
if (boot_cpu_has(X86_FEATURE_SSBD))
|
||||
if (boot_cpu_has(X86_FEATURE_SPEC_CTRL_SSBD) ||
|
||||
boot_cpu_has(X86_FEATURE_AMD_SSBD))
|
||||
entry->edx |= F(SPEC_CTRL_SSBD);
|
||||
/*
|
||||
* We emulate ARCH_CAPABILITIES in software even
|
||||
|
||||
@@ -1619,43 +1619,15 @@ static void vmcs_load(struct vmcs *vmcs)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_KEXEC_CORE
|
||||
/*
|
||||
* This bitmap is used to indicate whether the vmclear
|
||||
* operation is enabled on all cpus. All disabled by
|
||||
* default.
|
||||
*/
|
||||
static cpumask_t crash_vmclear_enabled_bitmap = CPU_MASK_NONE;
|
||||
|
||||
static inline void crash_enable_local_vmclear(int cpu)
|
||||
{
|
||||
cpumask_set_cpu(cpu, &crash_vmclear_enabled_bitmap);
|
||||
}
|
||||
|
||||
static inline void crash_disable_local_vmclear(int cpu)
|
||||
{
|
||||
cpumask_clear_cpu(cpu, &crash_vmclear_enabled_bitmap);
|
||||
}
|
||||
|
||||
static inline int crash_local_vmclear_enabled(int cpu)
|
||||
{
|
||||
return cpumask_test_cpu(cpu, &crash_vmclear_enabled_bitmap);
|
||||
}
|
||||
|
||||
static void crash_vmclear_local_loaded_vmcss(void)
|
||||
{
|
||||
int cpu = raw_smp_processor_id();
|
||||
struct loaded_vmcs *v;
|
||||
|
||||
if (!crash_local_vmclear_enabled(cpu))
|
||||
return;
|
||||
|
||||
list_for_each_entry(v, &per_cpu(loaded_vmcss_on_cpu, cpu),
|
||||
loaded_vmcss_on_cpu_link)
|
||||
vmcs_clear(v->vmcs);
|
||||
}
|
||||
#else
|
||||
static inline void crash_enable_local_vmclear(int cpu) { }
|
||||
static inline void crash_disable_local_vmclear(int cpu) { }
|
||||
#endif /* CONFIG_KEXEC_CORE */
|
||||
|
||||
static void __loaded_vmcs_clear(void *arg)
|
||||
@@ -1667,19 +1639,24 @@ static void __loaded_vmcs_clear(void *arg)
|
||||
return; /* vcpu migration can race with cpu offline */
|
||||
if (per_cpu(current_vmcs, cpu) == loaded_vmcs->vmcs)
|
||||
per_cpu(current_vmcs, cpu) = NULL;
|
||||
crash_disable_local_vmclear(cpu);
|
||||
|
||||
vmcs_clear(loaded_vmcs->vmcs);
|
||||
if (loaded_vmcs->shadow_vmcs && loaded_vmcs->launched)
|
||||
vmcs_clear(loaded_vmcs->shadow_vmcs);
|
||||
|
||||
list_del(&loaded_vmcs->loaded_vmcss_on_cpu_link);
|
||||
|
||||
/*
|
||||
* we should ensure updating loaded_vmcs->loaded_vmcss_on_cpu_link
|
||||
* is before setting loaded_vmcs->vcpu to -1 which is done in
|
||||
* loaded_vmcs_init. Otherwise, other cpu can see vcpu = -1 fist
|
||||
* then adds the vmcs into percpu list before it is deleted.
|
||||
* Ensure all writes to loaded_vmcs, including deleting it from its
|
||||
* current percpu list, complete before setting loaded_vmcs->vcpu to
|
||||
* -1, otherwise a different cpu can see vcpu == -1 first and add
|
||||
* loaded_vmcs to its percpu list before it's deleted from this cpu's
|
||||
* list. Pairs with the smp_rmb() in vmx_vcpu_load_vmcs().
|
||||
*/
|
||||
smp_wmb();
|
||||
|
||||
loaded_vmcs_init(loaded_vmcs);
|
||||
crash_enable_local_vmclear(cpu);
|
||||
loaded_vmcs->cpu = -1;
|
||||
loaded_vmcs->launched = 0;
|
||||
}
|
||||
|
||||
static void loaded_vmcs_clear(struct loaded_vmcs *loaded_vmcs)
|
||||
@@ -2471,18 +2448,17 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
|
||||
|
||||
if (!already_loaded) {
|
||||
local_irq_disable();
|
||||
crash_disable_local_vmclear(cpu);
|
||||
|
||||
/*
|
||||
* Read loaded_vmcs->cpu should be before fetching
|
||||
* loaded_vmcs->loaded_vmcss_on_cpu_link.
|
||||
* See the comments in __loaded_vmcs_clear().
|
||||
* Ensure loaded_vmcs->cpu is read before adding loaded_vmcs to
|
||||
* this cpu's percpu list, otherwise it may not yet be deleted
|
||||
* from its previous cpu's percpu list. Pairs with the
|
||||
* smb_wmb() in __loaded_vmcs_clear().
|
||||
*/
|
||||
smp_rmb();
|
||||
|
||||
list_add(&vmx->loaded_vmcs->loaded_vmcss_on_cpu_link,
|
||||
&per_cpu(loaded_vmcss_on_cpu, cpu));
|
||||
crash_enable_local_vmclear(cpu);
|
||||
local_irq_enable();
|
||||
}
|
||||
|
||||
@@ -3506,21 +3482,6 @@ static int hardware_enable(void)
|
||||
if (cr4_read_shadow() & X86_CR4_VMXE)
|
||||
return -EBUSY;
|
||||
|
||||
INIT_LIST_HEAD(&per_cpu(loaded_vmcss_on_cpu, cpu));
|
||||
INIT_LIST_HEAD(&per_cpu(blocked_vcpu_on_cpu, cpu));
|
||||
spin_lock_init(&per_cpu(blocked_vcpu_on_cpu_lock, cpu));
|
||||
|
||||
/*
|
||||
* Now we can enable the vmclear operation in kdump
|
||||
* since the loaded_vmcss_on_cpu list on this cpu
|
||||
* has been initialized.
|
||||
*
|
||||
* Though the cpu is not in VMX operation now, there
|
||||
* is no problem to enable the vmclear operation
|
||||
* for the loaded_vmcss_on_cpu list is empty!
|
||||
*/
|
||||
crash_enable_local_vmclear(cpu);
|
||||
|
||||
rdmsrl(MSR_IA32_FEATURE_CONTROL, old);
|
||||
|
||||
test_bits = FEATURE_CONTROL_LOCKED;
|
||||
@@ -11894,7 +11855,7 @@ module_exit(vmx_exit)
|
||||
|
||||
static int __init vmx_init(void)
|
||||
{
|
||||
int r;
|
||||
int r, cpu;
|
||||
|
||||
r = kvm_init(&vmx_x86_ops, sizeof(struct vcpu_vmx),
|
||||
__alignof__(struct vcpu_vmx), THIS_MODULE);
|
||||
@@ -11916,6 +11877,12 @@ static int __init vmx_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
INIT_LIST_HEAD(&per_cpu(loaded_vmcss_on_cpu, cpu));
|
||||
INIT_LIST_HEAD(&per_cpu(blocked_vcpu_on_cpu, cpu));
|
||||
spin_lock_init(&per_cpu(blocked_vcpu_on_cpu_lock, cpu));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_KEXEC_CORE
|
||||
rcu_assign_pointer(crash_vmclear_loaded_vmcss,
|
||||
crash_vmclear_local_loaded_vmcss);
|
||||
|
||||
@@ -8319,6 +8319,13 @@ int kvm_arch_create_memslot(struct kvm *kvm, struct kvm_memory_slot *slot,
|
||||
{
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Clear out the previous array pointers for the KVM_MR_MOVE case. The
|
||||
* old arrays will be freed by __kvm_set_memory_region() if installing
|
||||
* the new memslot is successful.
|
||||
*/
|
||||
memset(&slot->arch, 0, sizeof(slot->arch));
|
||||
|
||||
for (i = 0; i < KVM_NR_PAGE_SIZES; ++i) {
|
||||
struct kvm_lpage_info *linfo;
|
||||
unsigned long ugfn;
|
||||
@@ -8392,6 +8399,10 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
|
||||
const struct kvm_userspace_memory_region *mem,
|
||||
enum kvm_mr_change change)
|
||||
{
|
||||
if (change == KVM_MR_MOVE)
|
||||
return kvm_arch_create_memslot(kvm, memslot,
|
||||
mem->memory_size >> PAGE_SHIFT);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -764,6 +764,7 @@ static int sata_pmp_eh_recover_pmp(struct ata_port *ap,
|
||||
|
||||
if (dev->flags & ATA_DFLAG_DETACH) {
|
||||
detach = 1;
|
||||
rc = -ENODEV;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
@@ -4444,22 +4444,19 @@ int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht)
|
||||
*/
|
||||
shost->max_host_blocked = 1;
|
||||
|
||||
rc = scsi_add_host_with_dma(ap->scsi_host,
|
||||
&ap->tdev, ap->host->dev);
|
||||
rc = scsi_add_host_with_dma(shost, &ap->tdev, ap->host->dev);
|
||||
if (rc)
|
||||
goto err_add;
|
||||
goto err_alloc;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_add:
|
||||
scsi_host_put(host->ports[i]->scsi_host);
|
||||
err_alloc:
|
||||
while (--i >= 0) {
|
||||
struct Scsi_Host *shost = host->ports[i]->scsi_host;
|
||||
|
||||
/* scsi_host_put() is in ata_devres_release() */
|
||||
scsi_remove_host(shost);
|
||||
scsi_host_put(shost);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ static int sunxi_rsb_read(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr,
|
||||
if (ret)
|
||||
goto unlock;
|
||||
|
||||
*buf = readl(rsb->regs + RSB_DATA);
|
||||
*buf = readl(rsb->regs + RSB_DATA) & GENMASK(len * 8 - 1, 0);
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&rsb->lock);
|
||||
|
||||
@@ -2646,7 +2646,9 @@ get_guid(ipmi_smi_t intf)
|
||||
if (rv)
|
||||
/* Send failed, no GUID available. */
|
||||
intf->bmc->guid_set = 0;
|
||||
wait_event(intf->waitq, intf->bmc->guid_set != 2);
|
||||
else
|
||||
wait_event(intf->waitq, intf->bmc->guid_set != 2);
|
||||
|
||||
intf->null_user_handler = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,6 +78,9 @@ static int at91sam9x5_clk_usb_determine_rate(struct clk_hw *hw,
|
||||
tmp_parent_rate = req->rate * div;
|
||||
tmp_parent_rate = clk_hw_round_rate(parent,
|
||||
tmp_parent_rate);
|
||||
if (!tmp_parent_rate)
|
||||
continue;
|
||||
|
||||
tmp_rate = DIV_ROUND_CLOSEST(tmp_parent_rate, div);
|
||||
if (tmp_rate < req->rate)
|
||||
tmp_diff = req->rate - tmp_rate;
|
||||
|
||||
@@ -60,16 +60,16 @@ struct pmc_clk_init_data {
|
||||
|
||||
static DEFINE_SPINLOCK(clk_out_lock);
|
||||
|
||||
static const char *clk_out1_parents[] = { "clk_m", "clk_m_div2",
|
||||
"clk_m_div4", "extern1",
|
||||
static const char *clk_out1_parents[] = { "osc", "osc_div2",
|
||||
"osc_div4", "extern1",
|
||||
};
|
||||
|
||||
static const char *clk_out2_parents[] = { "clk_m", "clk_m_div2",
|
||||
"clk_m_div4", "extern2",
|
||||
static const char *clk_out2_parents[] = { "osc", "osc_div2",
|
||||
"osc_div4", "extern2",
|
||||
};
|
||||
|
||||
static const char *clk_out3_parents[] = { "clk_m", "clk_m_div2",
|
||||
"clk_m_div4", "extern3",
|
||||
static const char *clk_out3_parents[] = { "osc", "osc_div2",
|
||||
"osc_div4", "extern3",
|
||||
};
|
||||
|
||||
static struct pmc_clk_init_data pmc_clks[] = {
|
||||
|
||||
@@ -955,6 +955,12 @@ static int init_chip_info(void)
|
||||
|
||||
static inline void clean_chip_info(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* flush any pending work items */
|
||||
if (chips)
|
||||
for (i = 0; i < nr_chips; i++)
|
||||
cancel_work_sync(&chips[i].throttle);
|
||||
kfree(chips);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <crypto/sha.h>
|
||||
#include <crypto/internal/hash.h>
|
||||
#include <crypto/internal/skcipher.h>
|
||||
#include <crypto/scatterwalk.h>
|
||||
|
||||
#define DCP_MAX_CHANS 4
|
||||
#define DCP_BUF_SZ PAGE_SIZE
|
||||
@@ -621,49 +622,46 @@ static int dcp_sha_req_to_buf(struct crypto_async_request *arq)
|
||||
struct dcp_async_ctx *actx = crypto_ahash_ctx(tfm);
|
||||
struct dcp_sha_req_ctx *rctx = ahash_request_ctx(req);
|
||||
struct hash_alg_common *halg = crypto_hash_alg_common(tfm);
|
||||
const int nents = sg_nents(req->src);
|
||||
|
||||
uint8_t *in_buf = sdcp->coh->sha_in_buf;
|
||||
uint8_t *out_buf = sdcp->coh->sha_out_buf;
|
||||
|
||||
uint8_t *src_buf;
|
||||
|
||||
struct scatterlist *src;
|
||||
|
||||
unsigned int i, len, clen;
|
||||
unsigned int i, len, clen, oft = 0;
|
||||
int ret;
|
||||
|
||||
int fin = rctx->fini;
|
||||
if (fin)
|
||||
rctx->fini = 0;
|
||||
|
||||
for_each_sg(req->src, src, nents, i) {
|
||||
src_buf = sg_virt(src);
|
||||
len = sg_dma_len(src);
|
||||
src = req->src;
|
||||
len = req->nbytes;
|
||||
|
||||
do {
|
||||
if (actx->fill + len > DCP_BUF_SZ)
|
||||
clen = DCP_BUF_SZ - actx->fill;
|
||||
else
|
||||
clen = len;
|
||||
while (len) {
|
||||
if (actx->fill + len > DCP_BUF_SZ)
|
||||
clen = DCP_BUF_SZ - actx->fill;
|
||||
else
|
||||
clen = len;
|
||||
|
||||
memcpy(in_buf + actx->fill, src_buf, clen);
|
||||
len -= clen;
|
||||
src_buf += clen;
|
||||
actx->fill += clen;
|
||||
scatterwalk_map_and_copy(in_buf + actx->fill, src, oft, clen,
|
||||
0);
|
||||
|
||||
/*
|
||||
* If we filled the buffer and still have some
|
||||
* more data, submit the buffer.
|
||||
*/
|
||||
if (len && actx->fill == DCP_BUF_SZ) {
|
||||
ret = mxs_dcp_run_sha(req);
|
||||
if (ret)
|
||||
return ret;
|
||||
actx->fill = 0;
|
||||
rctx->init = 0;
|
||||
}
|
||||
} while (len);
|
||||
len -= clen;
|
||||
oft += clen;
|
||||
actx->fill += clen;
|
||||
|
||||
/*
|
||||
* If we filled the buffer and still have some
|
||||
* more data, submit the buffer.
|
||||
*/
|
||||
if (len && actx->fill == DCP_BUF_SZ) {
|
||||
ret = mxs_dcp_run_sha(req);
|
||||
if (ret)
|
||||
return ret;
|
||||
actx->fill = 0;
|
||||
rctx->init = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (fin) {
|
||||
|
||||
@@ -1232,31 +1232,14 @@ int gpiochip_add_data(struct gpio_chip *chip, void *data)
|
||||
struct gpio_desc *desc = &gdev->descs[i];
|
||||
|
||||
desc->gdev = gdev;
|
||||
/*
|
||||
* REVISIT: most hardware initializes GPIOs as inputs
|
||||
* (often with pullups enabled) so power usage is
|
||||
* minimized. Linux code should set the gpio direction
|
||||
* first thing; but until it does, and in case
|
||||
* chip->get_direction is not set, we may expose the
|
||||
* wrong direction in sysfs.
|
||||
|
||||
/* REVISIT: most hardware initializes GPIOs as inputs (often
|
||||
* with pullups enabled) so power usage is minimized. Linux
|
||||
* code should set the gpio direction first thing; but until
|
||||
* it does, and in case chip->get_direction is not set, we may
|
||||
* expose the wrong direction in sysfs.
|
||||
*/
|
||||
|
||||
if (chip->get_direction) {
|
||||
/*
|
||||
* If we have .get_direction, set up the initial
|
||||
* direction flag from the hardware.
|
||||
*/
|
||||
int dir = chip->get_direction(chip, i);
|
||||
|
||||
if (!dir)
|
||||
set_bit(FLAG_IS_OUT, &desc->flags);
|
||||
} else if (!chip->direction_input) {
|
||||
/*
|
||||
* If the chip lacks the .direction_input callback
|
||||
* we logically assume all lines are outputs.
|
||||
*/
|
||||
set_bit(FLAG_IS_OUT, &desc->flags);
|
||||
}
|
||||
desc->flags = !chip->direction_input ? (1 << FLAG_IS_OUT) : 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PINCTRL
|
||||
|
||||
@@ -1041,10 +1041,12 @@ static bool drm_dp_port_setup_pdt(struct drm_dp_mst_port *port)
|
||||
lct = drm_dp_calculate_rad(port, rad);
|
||||
|
||||
port->mstb = drm_dp_add_mst_branch_device(lct, rad);
|
||||
port->mstb->mgr = port->mgr;
|
||||
port->mstb->port_parent = port;
|
||||
if (port->mstb) {
|
||||
port->mstb->mgr = port->mgr;
|
||||
port->mstb->port_parent = port;
|
||||
|
||||
send_link = true;
|
||||
send_link = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return send_link;
|
||||
@@ -2034,6 +2036,7 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms
|
||||
int ret = 0;
|
||||
struct drm_dp_mst_branch *mstb = NULL;
|
||||
|
||||
mutex_lock(&mgr->payload_lock);
|
||||
mutex_lock(&mgr->lock);
|
||||
if (mst_state == mgr->mst_state)
|
||||
goto out_unlock;
|
||||
@@ -2096,7 +2099,10 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms
|
||||
/* this can fail if the device is gone */
|
||||
drm_dp_dpcd_writeb(mgr->aux, DP_MSTM_CTRL, 0);
|
||||
ret = 0;
|
||||
memset(mgr->payloads, 0, mgr->max_payloads * sizeof(struct drm_dp_payload));
|
||||
memset(mgr->payloads, 0,
|
||||
mgr->max_payloads * sizeof(mgr->payloads[0]));
|
||||
memset(mgr->proposed_vcpis, 0,
|
||||
mgr->max_payloads * sizeof(mgr->proposed_vcpis[0]));
|
||||
mgr->payload_mask = 0;
|
||||
set_bit(0, &mgr->payload_mask);
|
||||
mgr->vcpi_mask = 0;
|
||||
@@ -2104,6 +2110,7 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms
|
||||
|
||||
out_unlock:
|
||||
mutex_unlock(&mgr->lock);
|
||||
mutex_unlock(&mgr->payload_lock);
|
||||
if (mstb)
|
||||
drm_dp_put_mst_branch_device(mstb);
|
||||
return ret;
|
||||
|
||||
@@ -42,8 +42,6 @@
|
||||
drm_dma_handle_t *drm_pci_alloc(struct drm_device * dev, size_t size, size_t align)
|
||||
{
|
||||
drm_dma_handle_t *dmah;
|
||||
unsigned long addr;
|
||||
size_t sz;
|
||||
|
||||
/* pci_alloc_consistent only guarantees alignment to the smallest
|
||||
* PAGE_SIZE order which is greater than or equal to the requested size.
|
||||
@@ -57,22 +55,13 @@ drm_dma_handle_t *drm_pci_alloc(struct drm_device * dev, size_t size, size_t ali
|
||||
return NULL;
|
||||
|
||||
dmah->size = size;
|
||||
dmah->vaddr = dma_alloc_coherent(&dev->pdev->dev, size, &dmah->busaddr, GFP_KERNEL | __GFP_COMP);
|
||||
dmah->vaddr = dma_alloc_coherent(&dev->pdev->dev, size, &dmah->busaddr, GFP_KERNEL);
|
||||
|
||||
if (dmah->vaddr == NULL) {
|
||||
kfree(dmah);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memset(dmah->vaddr, 0, size);
|
||||
|
||||
/* XXX - Is virt_to_page() legal for consistent mem? */
|
||||
/* Reserve */
|
||||
for (addr = (unsigned long)dmah->vaddr, sz = size;
|
||||
sz > 0; addr += PAGE_SIZE, sz -= PAGE_SIZE) {
|
||||
SetPageReserved(virt_to_page((void *)addr));
|
||||
}
|
||||
|
||||
return dmah;
|
||||
}
|
||||
|
||||
@@ -85,19 +74,9 @@ EXPORT_SYMBOL(drm_pci_alloc);
|
||||
*/
|
||||
void __drm_legacy_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah)
|
||||
{
|
||||
unsigned long addr;
|
||||
size_t sz;
|
||||
|
||||
if (dmah->vaddr) {
|
||||
/* XXX - Is virt_to_page() legal for consistent mem? */
|
||||
/* Unreserve */
|
||||
for (addr = (unsigned long)dmah->vaddr, sz = dmah->size;
|
||||
sz > 0; addr += PAGE_SIZE, sz -= PAGE_SIZE) {
|
||||
ClearPageReserved(virt_to_page((void *)addr));
|
||||
}
|
||||
if (dmah->vaddr)
|
||||
dma_free_coherent(&dev->pdev->dev, dmah->size, dmah->vaddr,
|
||||
dmah->busaddr);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -437,6 +437,7 @@ static void st_i2c_wr_fill_tx_fifo(struct st_i2c_dev *i2c_dev)
|
||||
/**
|
||||
* st_i2c_rd_fill_tx_fifo() - Fill the Tx FIFO in read mode
|
||||
* @i2c_dev: Controller's private data
|
||||
* @max: Maximum amount of data to fill into the Tx FIFO
|
||||
*
|
||||
* This functions fills the Tx FIFO with fixed pattern when
|
||||
* in read mode to trigger clock.
|
||||
|
||||
@@ -534,6 +534,17 @@ static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo LaVie Z"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/*
|
||||
* Acer Aspire 5738z
|
||||
* Touchpad stops working in mux mode when dis- + re-enabled
|
||||
* with the touchpad enable/disable toggle hotkey
|
||||
*/
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5738"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
@@ -329,7 +329,7 @@
|
||||
|
||||
#define DTE_GCR3_VAL_A(x) (((x) >> 12) & 0x00007ULL)
|
||||
#define DTE_GCR3_VAL_B(x) (((x) >> 15) & 0x0ffffULL)
|
||||
#define DTE_GCR3_VAL_C(x) (((x) >> 31) & 0xfffffULL)
|
||||
#define DTE_GCR3_VAL_C(x) (((x) >> 31) & 0x1fffffULL)
|
||||
|
||||
#define DTE_GCR3_INDEX_A 0
|
||||
#define DTE_GCR3_INDEX_B 1
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <linux/irq.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/irqchip.h>
|
||||
#include <linux/irqchip/chained_irq.h>
|
||||
#include <linux/irqchip/versatile-fpga.h>
|
||||
#include <linux/irqdomain.h>
|
||||
#include <linux/module.h>
|
||||
@@ -67,12 +68,16 @@ static void fpga_irq_unmask(struct irq_data *d)
|
||||
|
||||
static void fpga_irq_handle(struct irq_desc *desc)
|
||||
{
|
||||
struct irq_chip *chip = irq_desc_get_chip(desc);
|
||||
struct fpga_irq_data *f = irq_desc_get_handler_data(desc);
|
||||
u32 status = readl(f->base + IRQ_STATUS);
|
||||
u32 status;
|
||||
|
||||
chained_irq_enter(chip, desc);
|
||||
|
||||
status = readl(f->base + IRQ_STATUS);
|
||||
if (status == 0) {
|
||||
do_bad_IRQ(desc);
|
||||
return;
|
||||
goto out;
|
||||
}
|
||||
|
||||
do {
|
||||
@@ -81,6 +86,9 @@ static void fpga_irq_handle(struct irq_desc *desc)
|
||||
status &= ~(1 << irq);
|
||||
generic_handle_irq(irq_find_mapping(f->domain, irq));
|
||||
} while (status);
|
||||
|
||||
out:
|
||||
chained_irq_exit(chip, desc);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -203,6 +211,9 @@ int __init fpga_irq_of_init(struct device_node *node,
|
||||
if (of_property_read_u32(node, "valid-mask", &valid_mask))
|
||||
valid_mask = 0;
|
||||
|
||||
writel(clear_mask, base + IRQ_ENABLE_CLEAR);
|
||||
writel(clear_mask, base + FIQ_ENABLE_CLEAR);
|
||||
|
||||
/* Some chips are cascaded from a parent IRQ */
|
||||
parent_irq = irq_of_parse_and_map(node, 0);
|
||||
if (!parent_irq) {
|
||||
@@ -212,9 +223,6 @@ int __init fpga_irq_of_init(struct device_node *node,
|
||||
|
||||
fpga_irq_init(base, node->name, 0, parent_irq, valid_mask, node);
|
||||
|
||||
writel(clear_mask, base + IRQ_ENABLE_CLEAR);
|
||||
writel(clear_mask, base + FIQ_ENABLE_CLEAR);
|
||||
|
||||
/*
|
||||
* On Versatile AB/PB, some secondary interrupts have a direct
|
||||
* pass-thru to the primary controller for IRQs 20 and 22-31 which need
|
||||
|
||||
@@ -69,6 +69,11 @@ static int parse_features(struct dm_arg_set *as, struct flakey_c *fc,
|
||||
arg_name = dm_shift_arg(as);
|
||||
argc--;
|
||||
|
||||
if (!arg_name) {
|
||||
ti->error = "Insufficient feature arguments";
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* drop_writes
|
||||
*/
|
||||
|
||||
@@ -567,6 +567,7 @@ void verity_fec_dtr(struct dm_verity *v)
|
||||
mempool_destroy(f->rs_pool);
|
||||
mempool_destroy(f->prealloc_pool);
|
||||
mempool_destroy(f->extra_pool);
|
||||
mempool_destroy(f->output_pool);
|
||||
kmem_cache_destroy(f->cache);
|
||||
|
||||
if (f->data_bufio)
|
||||
|
||||
@@ -548,16 +548,16 @@ static void enable_irqs(struct cal_ctx *ctx)
|
||||
|
||||
static void disable_irqs(struct cal_ctx *ctx)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
/* Disable IRQ_WDMA_END 0/1 */
|
||||
reg_write_field(ctx->dev,
|
||||
CAL_HL_IRQENABLE_CLR(2),
|
||||
CAL_HL_IRQ_CLEAR,
|
||||
CAL_HL_IRQ_MASK(ctx->csi2_port));
|
||||
val = 0;
|
||||
set_field(&val, CAL_HL_IRQ_CLEAR, CAL_HL_IRQ_MASK(ctx->csi2_port));
|
||||
reg_write(ctx->dev, CAL_HL_IRQENABLE_CLR(2), val);
|
||||
/* Disable IRQ_WDMA_START 0/1 */
|
||||
reg_write_field(ctx->dev,
|
||||
CAL_HL_IRQENABLE_CLR(3),
|
||||
CAL_HL_IRQ_CLEAR,
|
||||
CAL_HL_IRQ_MASK(ctx->csi2_port));
|
||||
val = 0;
|
||||
set_field(&val, CAL_HL_IRQ_CLEAR, CAL_HL_IRQ_MASK(ctx->csi2_port));
|
||||
reg_write(ctx->dev, CAL_HL_IRQENABLE_CLR(3), val);
|
||||
/* Todo: Add VC_IRQ and CSI2_COMPLEXIO_IRQ handling */
|
||||
reg_write(ctx->dev, CAL_CSI2_VC_IRQENABLE(1), 0);
|
||||
}
|
||||
|
||||
@@ -93,6 +93,11 @@ struct dln2_mod_rx_slots {
|
||||
spinlock_t lock;
|
||||
};
|
||||
|
||||
enum dln2_endpoint {
|
||||
DLN2_EP_OUT = 0,
|
||||
DLN2_EP_IN = 1,
|
||||
};
|
||||
|
||||
struct dln2_dev {
|
||||
struct usb_device *usb_dev;
|
||||
struct usb_interface *interface;
|
||||
@@ -740,10 +745,10 @@ static int dln2_probe(struct usb_interface *interface,
|
||||
hostif->desc.bNumEndpoints < 2)
|
||||
return -ENODEV;
|
||||
|
||||
epin = &hostif->endpoint[0].desc;
|
||||
epout = &hostif->endpoint[1].desc;
|
||||
epout = &hostif->endpoint[DLN2_EP_OUT].desc;
|
||||
if (!usb_endpoint_is_bulk_out(epout))
|
||||
return -ENODEV;
|
||||
epin = &hostif->endpoint[DLN2_EP_IN].desc;
|
||||
if (!usb_endpoint_is_bulk_in(epin))
|
||||
return -ENODEV;
|
||||
|
||||
|
||||
@@ -369,6 +369,7 @@ static const struct pcr_ops rts522a_pcr_ops = {
|
||||
void rts522a_init_params(struct rtsx_pcr *pcr)
|
||||
{
|
||||
rts5227_init_params(pcr);
|
||||
pcr->ops = &rts522a_pcr_ops;
|
||||
|
||||
pcr->reg_pm_ctrl3 = RTS522A_PM_CTRL3;
|
||||
}
|
||||
|
||||
@@ -454,7 +454,7 @@ int16_t oslec_update(struct oslec_state *ec, int16_t tx, int16_t rx)
|
||||
*/
|
||||
ec->factor = 0;
|
||||
ec->shift = 0;
|
||||
if ((ec->nonupdate_dwell == 0)) {
|
||||
if (!ec->nonupdate_dwell) {
|
||||
int p, logp, shift;
|
||||
|
||||
/* Determine:
|
||||
|
||||
@@ -247,22 +247,25 @@ static int phram_setup(const char *val)
|
||||
|
||||
ret = parse_num64(&start, token[1]);
|
||||
if (ret) {
|
||||
kfree(name);
|
||||
parse_err("illegal start address\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
ret = parse_num64(&len, token[2]);
|
||||
if (ret) {
|
||||
kfree(name);
|
||||
parse_err("illegal device length\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
ret = register_device(name, start, len);
|
||||
if (!ret)
|
||||
pr_info("%s device: %#llx at %#llx\n", name, len, start);
|
||||
else
|
||||
kfree(name);
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
pr_info("%s device: %#llx at %#llx\n", name, len, start);
|
||||
return 0;
|
||||
|
||||
error:
|
||||
kfree(name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,6 @@ struct mtd_info *lpddr_cmdset(struct map_info *map)
|
||||
shared = kmalloc(sizeof(struct flchip_shared) * lpddr->numchips,
|
||||
GFP_KERNEL);
|
||||
if (!shared) {
|
||||
kfree(lpddr);
|
||||
kfree(mtd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -2065,7 +2065,7 @@ vxge_hw_vpath_strip_fcs_check(struct __vxge_hw_device *hldev, u64 vpath_mask);
|
||||
if ((level >= VXGE_ERR && VXGE_COMPONENT_LL & VXGE_DEBUG_ERR_MASK) || \
|
||||
(level >= VXGE_TRACE && VXGE_COMPONENT_LL & VXGE_DEBUG_TRACE_MASK))\
|
||||
if ((mask & VXGE_DEBUG_MASK) == mask) \
|
||||
printk(fmt "\n", __VA_ARGS__); \
|
||||
printk(fmt "\n", ##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#else
|
||||
#define vxge_debug_ll(level, mask, fmt, ...)
|
||||
|
||||
@@ -454,49 +454,49 @@ int vxge_fw_upgrade(struct vxgedev *vdev, char *fw_name, int override);
|
||||
|
||||
#if (VXGE_DEBUG_LL_CONFIG & VXGE_DEBUG_MASK)
|
||||
#define vxge_debug_ll_config(level, fmt, ...) \
|
||||
vxge_debug_ll(level, VXGE_DEBUG_LL_CONFIG, fmt, __VA_ARGS__)
|
||||
vxge_debug_ll(level, VXGE_DEBUG_LL_CONFIG, fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define vxge_debug_ll_config(level, fmt, ...)
|
||||
#endif
|
||||
|
||||
#if (VXGE_DEBUG_INIT & VXGE_DEBUG_MASK)
|
||||
#define vxge_debug_init(level, fmt, ...) \
|
||||
vxge_debug_ll(level, VXGE_DEBUG_INIT, fmt, __VA_ARGS__)
|
||||
vxge_debug_ll(level, VXGE_DEBUG_INIT, fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define vxge_debug_init(level, fmt, ...)
|
||||
#endif
|
||||
|
||||
#if (VXGE_DEBUG_TX & VXGE_DEBUG_MASK)
|
||||
#define vxge_debug_tx(level, fmt, ...) \
|
||||
vxge_debug_ll(level, VXGE_DEBUG_TX, fmt, __VA_ARGS__)
|
||||
vxge_debug_ll(level, VXGE_DEBUG_TX, fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define vxge_debug_tx(level, fmt, ...)
|
||||
#endif
|
||||
|
||||
#if (VXGE_DEBUG_RX & VXGE_DEBUG_MASK)
|
||||
#define vxge_debug_rx(level, fmt, ...) \
|
||||
vxge_debug_ll(level, VXGE_DEBUG_RX, fmt, __VA_ARGS__)
|
||||
vxge_debug_ll(level, VXGE_DEBUG_RX, fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define vxge_debug_rx(level, fmt, ...)
|
||||
#endif
|
||||
|
||||
#if (VXGE_DEBUG_MEM & VXGE_DEBUG_MASK)
|
||||
#define vxge_debug_mem(level, fmt, ...) \
|
||||
vxge_debug_ll(level, VXGE_DEBUG_MEM, fmt, __VA_ARGS__)
|
||||
vxge_debug_ll(level, VXGE_DEBUG_MEM, fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define vxge_debug_mem(level, fmt, ...)
|
||||
#endif
|
||||
|
||||
#if (VXGE_DEBUG_ENTRYEXIT & VXGE_DEBUG_MASK)
|
||||
#define vxge_debug_entryexit(level, fmt, ...) \
|
||||
vxge_debug_ll(level, VXGE_DEBUG_ENTRYEXIT, fmt, __VA_ARGS__)
|
||||
vxge_debug_ll(level, VXGE_DEBUG_ENTRYEXIT, fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define vxge_debug_entryexit(level, fmt, ...)
|
||||
#endif
|
||||
|
||||
#if (VXGE_DEBUG_INTR & VXGE_DEBUG_MASK)
|
||||
#define vxge_debug_intr(level, fmt, ...) \
|
||||
vxge_debug_ll(level, VXGE_DEBUG_INTR, fmt, __VA_ARGS__)
|
||||
vxge_debug_ll(level, VXGE_DEBUG_INTR, fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define vxge_debug_intr(level, fmt, ...)
|
||||
#endif
|
||||
|
||||
@@ -1720,7 +1720,7 @@ static int qlcnic_83xx_get_reset_instruction_template(struct qlcnic_adapter *p_d
|
||||
|
||||
ahw->reset.seq_error = 0;
|
||||
ahw->reset.buff = kzalloc(QLC_83XX_RESTART_TEMPLATE_SIZE, GFP_KERNEL);
|
||||
if (p_dev->ahw->reset.buff == NULL)
|
||||
if (ahw->reset.buff == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
p_buff = p_dev->ahw->reset.buff;
|
||||
|
||||
@@ -1455,6 +1455,9 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
|
||||
ath_chanctx_set_channel(sc, ctx, &hw->conf.chandef);
|
||||
}
|
||||
|
||||
if (changed & IEEE80211_CONF_CHANGE_POWER)
|
||||
ath9k_set_txpower(sc, NULL);
|
||||
|
||||
mutex_unlock(&sc->mutex);
|
||||
ath9k_ps_restore(sc);
|
||||
|
||||
|
||||
@@ -1091,7 +1091,7 @@ static const struct file_operations fops_ssid = {
|
||||
};
|
||||
|
||||
/*---------temp------------*/
|
||||
static void print_temp(struct seq_file *s, const char *prefix, u32 t)
|
||||
static void print_temp(struct seq_file *s, const char *prefix, s32 t)
|
||||
{
|
||||
switch (t) {
|
||||
case 0:
|
||||
@@ -1099,7 +1099,8 @@ static void print_temp(struct seq_file *s, const char *prefix, u32 t)
|
||||
seq_printf(s, "%s N/A\n", prefix);
|
||||
break;
|
||||
default:
|
||||
seq_printf(s, "%s %d.%03d\n", prefix, t / 1000, t % 1000);
|
||||
seq_printf(s, "%s %s%d.%03d\n", prefix, (t < 0 ? "-" : ""),
|
||||
abs(t / 1000), abs(t % 1000));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1107,7 +1108,7 @@ static void print_temp(struct seq_file *s, const char *prefix, u32 t)
|
||||
static int wil_temp_debugfs_show(struct seq_file *s, void *data)
|
||||
{
|
||||
struct wil6210_priv *wil = s->private;
|
||||
u32 t_m, t_r;
|
||||
s32 t_m, t_r;
|
||||
int rc = wmi_get_temperature(wil, &t_m, &t_r);
|
||||
|
||||
if (rc) {
|
||||
|
||||
@@ -356,6 +356,25 @@ static void wil_cache_mbox_regs(struct wil6210_priv *wil)
|
||||
wil_mbox_ring_le2cpus(&wil->mbox_ctl.tx);
|
||||
}
|
||||
|
||||
static bool wil_validate_mbox_regs(struct wil6210_priv *wil)
|
||||
{
|
||||
size_t min_size = sizeof(struct wil6210_mbox_hdr) +
|
||||
sizeof(struct wmi_cmd_hdr);
|
||||
|
||||
if (wil->mbox_ctl.rx.entry_size < min_size) {
|
||||
wil_err(wil, "rx mbox entry too small (%d)\n",
|
||||
wil->mbox_ctl.rx.entry_size);
|
||||
return false;
|
||||
}
|
||||
if (wil->mbox_ctl.tx.entry_size < min_size) {
|
||||
wil_err(wil, "tx mbox entry too small (%d)\n",
|
||||
wil->mbox_ctl.tx.entry_size);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static irqreturn_t wil6210_irq_misc(int irq, void *cookie)
|
||||
{
|
||||
struct wil6210_priv *wil = cookie;
|
||||
@@ -391,7 +410,8 @@ static irqreturn_t wil6210_irq_misc(int irq, void *cookie)
|
||||
if (isr & ISR_MISC_FW_READY) {
|
||||
wil_dbg_irq(wil, "IRQ: FW ready\n");
|
||||
wil_cache_mbox_regs(wil);
|
||||
set_bit(wil_status_mbox_ready, wil->status);
|
||||
if (wil_validate_mbox_regs(wil))
|
||||
set_bit(wil_status_mbox_ready, wil->status);
|
||||
/**
|
||||
* Actual FW ready indicated by the
|
||||
* WMI_FW_READY_EVENTID
|
||||
|
||||
@@ -803,7 +803,7 @@ static void wil_bl_crash_info(struct wil6210_priv *wil, bool is_err)
|
||||
|
||||
static int wil_wait_for_fw_ready(struct wil6210_priv *wil)
|
||||
{
|
||||
ulong to = msecs_to_jiffies(1000);
|
||||
ulong to = msecs_to_jiffies(2000);
|
||||
ulong left = wait_for_completion_timeout(&wil->wmi_ready, to);
|
||||
|
||||
if (0 == left) {
|
||||
|
||||
@@ -546,8 +546,8 @@ static int wil_rx_refill(struct wil6210_priv *wil, int count)
|
||||
v->swtail = next_tail) {
|
||||
rc = wil_vring_alloc_skb(wil, v, v->swtail, headroom);
|
||||
if (unlikely(rc)) {
|
||||
wil_err(wil, "Error %d in wil_rx_refill[%d]\n",
|
||||
rc, v->swtail);
|
||||
wil_err_ratelimited(wil, "Error %d in rx refill[%d]\n",
|
||||
rc, v->swtail);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ static int __wmi_send(struct wil6210_priv *wil, u16 cmdid, void *buf, u16 len)
|
||||
uint retry;
|
||||
int rc = 0;
|
||||
|
||||
if (sizeof(cmd) + len > r->entry_size) {
|
||||
if (len > r->entry_size - sizeof(cmd)) {
|
||||
wil_err(wil, "WMI size too large: %d bytes, max is %d\n",
|
||||
(int)(sizeof(cmd) + len), r->entry_size);
|
||||
return -ERANGE;
|
||||
|
||||
@@ -3060,9 +3060,9 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info)
|
||||
param.no_vif = true;
|
||||
|
||||
if (info->attrs[HWSIM_ATTR_RADIO_NAME]) {
|
||||
hwname = kasprintf(GFP_KERNEL, "%.*s",
|
||||
nla_len(info->attrs[HWSIM_ATTR_RADIO_NAME]),
|
||||
(char *)nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME]));
|
||||
hwname = kstrndup((char *)nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME]),
|
||||
nla_len(info->attrs[HWSIM_ATTR_RADIO_NAME]),
|
||||
GFP_KERNEL);
|
||||
if (!hwname)
|
||||
return -ENOMEM;
|
||||
param.hwname = hwname;
|
||||
@@ -3101,9 +3101,9 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info)
|
||||
if (info->attrs[HWSIM_ATTR_RADIO_ID]) {
|
||||
idx = nla_get_u32(info->attrs[HWSIM_ATTR_RADIO_ID]);
|
||||
} else if (info->attrs[HWSIM_ATTR_RADIO_NAME]) {
|
||||
hwname = kasprintf(GFP_KERNEL, "%.*s",
|
||||
nla_len(info->attrs[HWSIM_ATTR_RADIO_NAME]),
|
||||
(char *)nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME]));
|
||||
hwname = kstrndup((char *)nla_data(info->attrs[HWSIM_ATTR_RADIO_NAME]),
|
||||
nla_len(info->attrs[HWSIM_ATTR_RADIO_NAME]),
|
||||
GFP_KERNEL);
|
||||
if (!hwname)
|
||||
return -ENOMEM;
|
||||
} else
|
||||
|
||||
@@ -851,8 +851,10 @@ static int __nd_ioctl(struct nvdimm_bus *nvdimm_bus, struct nvdimm *nvdimm,
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (!desc || (desc->out_num + desc->in_num == 0) ||
|
||||
!test_bit(cmd, &cmd_mask))
|
||||
if (!desc ||
|
||||
(desc->out_num + desc->in_num == 0) ||
|
||||
cmd > ND_CMD_CALL ||
|
||||
!test_bit(cmd, &cmd_mask))
|
||||
return -ENOTTY;
|
||||
|
||||
/* fail write commands (when read-only) */
|
||||
|
||||
@@ -170,9 +170,6 @@ int __of_attach_node_sysfs(struct device_node *np)
|
||||
struct property *pp;
|
||||
int rc;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_SYSFS))
|
||||
return 0;
|
||||
|
||||
if (!of_kset)
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -821,10 +821,13 @@ static void __init of_unittest_platform_populate(void)
|
||||
|
||||
of_platform_populate(np, match, NULL, &test_bus->dev);
|
||||
for_each_child_of_node(np, child) {
|
||||
for_each_child_of_node(child, grandchild)
|
||||
unittest(of_find_device_by_node(grandchild),
|
||||
for_each_child_of_node(child, grandchild) {
|
||||
pdev = of_find_device_by_node(grandchild);
|
||||
unittest(pdev,
|
||||
"Could not create device for node '%s'\n",
|
||||
grandchild->name);
|
||||
of_dev_put(pdev);
|
||||
}
|
||||
}
|
||||
|
||||
of_platform_depopulate(&test_bus->dev);
|
||||
|
||||
@@ -1031,7 +1031,10 @@ int bq27xxx_battery_setup(struct bq27xxx_device_info *di)
|
||||
|
||||
di->bat = power_supply_register_no_ws(di->dev, psy_desc, &psy_cfg);
|
||||
if (IS_ERR(di->bat)) {
|
||||
dev_err(di->dev, "failed to register battery\n");
|
||||
if (PTR_ERR(di->bat) == -EPROBE_DEFER)
|
||||
dev_dbg(di->dev, "failed to register battery, deferring probe\n");
|
||||
else
|
||||
dev_err(di->dev, "failed to register battery\n");
|
||||
return PTR_ERR(di->bat);
|
||||
}
|
||||
|
||||
|
||||
@@ -559,9 +559,7 @@ static const struct pinctrl_ops rtc_pinctrl_ops = {
|
||||
.dt_free_map = pinconf_generic_dt_free_map,
|
||||
};
|
||||
|
||||
enum rtc_pin_config_param {
|
||||
PIN_CONFIG_ACTIVE_HIGH = PIN_CONFIG_END + 1,
|
||||
};
|
||||
#define PIN_CONFIG_ACTIVE_HIGH (PIN_CONFIG_END + 1)
|
||||
|
||||
static const struct pinconf_generic_params rtc_params[] = {
|
||||
{"ti,active-high", PIN_CONFIG_ACTIVE_HIGH, 0},
|
||||
|
||||
@@ -74,16 +74,18 @@ struct pm8xxx_rtc {
|
||||
/*
|
||||
* Steps to write the RTC registers.
|
||||
* 1. Disable alarm if enabled.
|
||||
* 2. Write 0x00 to LSB.
|
||||
* 3. Write Byte[1], Byte[2], Byte[3] then Byte[0].
|
||||
* 4. Enable alarm if disabled in step 1.
|
||||
* 2. Disable rtc if enabled.
|
||||
* 3. Write 0x00 to LSB.
|
||||
* 4. Write Byte[1], Byte[2], Byte[3] then Byte[0].
|
||||
* 5. Enable rtc if disabled in step 2.
|
||||
* 6. Enable alarm if disabled in step 1.
|
||||
*/
|
||||
static int pm8xxx_rtc_set_time(struct device *dev, struct rtc_time *tm)
|
||||
{
|
||||
int rc, i;
|
||||
unsigned long secs, irq_flags;
|
||||
u8 value[NUM_8_BIT_RTC_REGS], alarm_enabled = 0;
|
||||
unsigned int ctrl_reg;
|
||||
u8 value[NUM_8_BIT_RTC_REGS], alarm_enabled = 0, rtc_disabled = 0;
|
||||
unsigned int ctrl_reg, rtc_ctrl_reg;
|
||||
struct pm8xxx_rtc *rtc_dd = dev_get_drvdata(dev);
|
||||
const struct pm8xxx_rtc_regs *regs = rtc_dd->regs;
|
||||
|
||||
@@ -92,23 +94,38 @@ static int pm8xxx_rtc_set_time(struct device *dev, struct rtc_time *tm)
|
||||
|
||||
rtc_tm_to_time(tm, &secs);
|
||||
|
||||
dev_dbg(dev, "Seconds value to be written to RTC = %lu\n", secs);
|
||||
|
||||
for (i = 0; i < NUM_8_BIT_RTC_REGS; i++) {
|
||||
value[i] = secs & 0xFF;
|
||||
secs >>= 8;
|
||||
}
|
||||
|
||||
dev_dbg(dev, "Seconds value to be written to RTC = %lu\n", secs);
|
||||
|
||||
spin_lock_irqsave(&rtc_dd->ctrl_reg_lock, irq_flags);
|
||||
|
||||
rc = regmap_read(rtc_dd->regmap, regs->ctrl, &ctrl_reg);
|
||||
rc = regmap_read(rtc_dd->regmap, regs->alarm_ctrl, &ctrl_reg);
|
||||
if (rc)
|
||||
goto rtc_rw_fail;
|
||||
|
||||
if (ctrl_reg & regs->alarm_en) {
|
||||
alarm_enabled = 1;
|
||||
ctrl_reg &= ~regs->alarm_en;
|
||||
rc = regmap_write(rtc_dd->regmap, regs->ctrl, ctrl_reg);
|
||||
rc = regmap_write(rtc_dd->regmap, regs->alarm_ctrl, ctrl_reg);
|
||||
if (rc) {
|
||||
dev_err(dev, "Write to RTC Alarm control register failed\n");
|
||||
goto rtc_rw_fail;
|
||||
}
|
||||
}
|
||||
|
||||
/* Disable RTC H/w before writing on RTC register */
|
||||
rc = regmap_read(rtc_dd->regmap, regs->ctrl, &rtc_ctrl_reg);
|
||||
if (rc)
|
||||
goto rtc_rw_fail;
|
||||
|
||||
if (rtc_ctrl_reg & PM8xxx_RTC_ENABLE) {
|
||||
rtc_disabled = 1;
|
||||
rtc_ctrl_reg &= ~PM8xxx_RTC_ENABLE;
|
||||
rc = regmap_write(rtc_dd->regmap, regs->ctrl, rtc_ctrl_reg);
|
||||
if (rc) {
|
||||
dev_err(dev, "Write to RTC control register failed\n");
|
||||
goto rtc_rw_fail;
|
||||
@@ -137,15 +154,25 @@ static int pm8xxx_rtc_set_time(struct device *dev, struct rtc_time *tm)
|
||||
goto rtc_rw_fail;
|
||||
}
|
||||
|
||||
if (alarm_enabled) {
|
||||
ctrl_reg |= regs->alarm_en;
|
||||
rc = regmap_write(rtc_dd->regmap, regs->ctrl, ctrl_reg);
|
||||
/* Enable RTC H/w after writing on RTC register */
|
||||
if (rtc_disabled) {
|
||||
rtc_ctrl_reg |= PM8xxx_RTC_ENABLE;
|
||||
rc = regmap_write(rtc_dd->regmap, regs->ctrl, rtc_ctrl_reg);
|
||||
if (rc) {
|
||||
dev_err(dev, "Write to RTC control register failed\n");
|
||||
goto rtc_rw_fail;
|
||||
}
|
||||
}
|
||||
|
||||
if (alarm_enabled) {
|
||||
ctrl_reg |= regs->alarm_en;
|
||||
rc = regmap_write(rtc_dd->regmap, regs->alarm_ctrl, ctrl_reg);
|
||||
if (rc) {
|
||||
dev_err(dev, "Write to RTC Alarm control register failed\n");
|
||||
goto rtc_rw_fail;
|
||||
}
|
||||
}
|
||||
|
||||
rtc_rw_fail:
|
||||
spin_unlock_irqrestore(&rtc_dd->ctrl_reg_lock, irq_flags);
|
||||
|
||||
|
||||
@@ -747,7 +747,7 @@ static void zfcp_erp_enqueue_ptp_port(struct zfcp_adapter *adapter)
|
||||
adapter->peer_d_id);
|
||||
if (IS_ERR(port)) /* error or port already attached */
|
||||
return;
|
||||
_zfcp_erp_port_reopen(port, 0, "ereptp1");
|
||||
zfcp_erp_port_reopen(port, 0, "ereptp1");
|
||||
}
|
||||
|
||||
static int zfcp_erp_adapter_strat_fsf_xconf(struct zfcp_erp_action *erp_action)
|
||||
|
||||
@@ -809,8 +809,10 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp,
|
||||
"sg_common_write: scsi opcode=0x%02x, cmd_size=%d\n",
|
||||
(int) cmnd[0], (int) hp->cmd_len));
|
||||
|
||||
if (hp->dxfer_len >= SZ_256M)
|
||||
if (hp->dxfer_len >= SZ_256M) {
|
||||
sg_remove_request(sfp, srp);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
k = sg_start_req(srp, cmnd);
|
||||
if (k) {
|
||||
|
||||
@@ -1094,7 +1094,7 @@ static void ufs_qcom_advertise_quirks(struct ufs_hba *hba)
|
||||
hba->quirks |= UFSHCD_QUIRK_BROKEN_LCC;
|
||||
}
|
||||
|
||||
if (host->hw_ver.major >= 0x2) {
|
||||
if (host->hw_ver.major == 0x2) {
|
||||
hba->quirks |= UFSHCD_QUIRK_BROKEN_UFS_HCI_VERSION;
|
||||
|
||||
if (!ufs_qcom_cap_qunipro(host))
|
||||
|
||||
@@ -683,6 +683,11 @@ start:
|
||||
*/
|
||||
if (ufshcd_can_hibern8_during_gating(hba) &&
|
||||
ufshcd_is_link_hibern8(hba)) {
|
||||
if (async) {
|
||||
rc = -EAGAIN;
|
||||
hba->clk_gating.active_reqs--;
|
||||
break;
|
||||
}
|
||||
spin_unlock_irqrestore(hba->host->host_lock, flags);
|
||||
flush_work(&hba->clk_gating.ungate_work);
|
||||
spin_lock_irqsave(hba->host->host_lock, flags);
|
||||
@@ -4421,19 +4426,30 @@ static irqreturn_t ufshcd_intr(int irq, void *__hba)
|
||||
u32 intr_status, enabled_intr_status;
|
||||
irqreturn_t retval = IRQ_NONE;
|
||||
struct ufs_hba *hba = __hba;
|
||||
int retries = hba->nutrs;
|
||||
|
||||
spin_lock(hba->host->host_lock);
|
||||
intr_status = ufshcd_readl(hba, REG_INTERRUPT_STATUS);
|
||||
enabled_intr_status =
|
||||
intr_status & ufshcd_readl(hba, REG_INTERRUPT_ENABLE);
|
||||
|
||||
if (intr_status)
|
||||
ufshcd_writel(hba, intr_status, REG_INTERRUPT_STATUS);
|
||||
/*
|
||||
* There could be max of hba->nutrs reqs in flight and in worst case
|
||||
* if the reqs get finished 1 by 1 after the interrupt status is
|
||||
* read, make sure we handle them by checking the interrupt status
|
||||
* again in a loop until we process all of the reqs before returning.
|
||||
*/
|
||||
do {
|
||||
enabled_intr_status =
|
||||
intr_status & ufshcd_readl(hba, REG_INTERRUPT_ENABLE);
|
||||
if (intr_status)
|
||||
ufshcd_writel(hba, intr_status, REG_INTERRUPT_STATUS);
|
||||
if (enabled_intr_status) {
|
||||
ufshcd_sl_intr(hba, enabled_intr_status);
|
||||
retval = IRQ_HANDLED;
|
||||
}
|
||||
|
||||
intr_status = ufshcd_readl(hba, REG_INTERRUPT_STATUS);
|
||||
} while (intr_status && --retries);
|
||||
|
||||
if (enabled_intr_status) {
|
||||
ufshcd_sl_intr(hba, enabled_intr_status);
|
||||
retval = IRQ_HANDLED;
|
||||
}
|
||||
spin_unlock(hba->host->host_lock);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -646,7 +646,7 @@ static int qcom_smem_enumerate_partitions(struct qcom_smem *smem,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (header->size != entry->size) {
|
||||
if (le32_to_cpu(header->size) != le32_to_cpu(entry->size)) {
|
||||
dev_err(smem->dev,
|
||||
"Partition %d has invalid size\n", i);
|
||||
return -EINVAL;
|
||||
|
||||
@@ -4321,30 +4321,37 @@ int iscsit_close_connection(
|
||||
if (!atomic_read(&sess->session_reinstatement) &&
|
||||
atomic_read(&sess->session_fall_back_to_erl0)) {
|
||||
spin_unlock_bh(&sess->conn_lock);
|
||||
complete_all(&sess->session_wait_comp);
|
||||
iscsit_close_session(sess);
|
||||
|
||||
return 0;
|
||||
} else if (atomic_read(&sess->session_logout)) {
|
||||
pr_debug("Moving to TARG_SESS_STATE_FREE.\n");
|
||||
sess->session_state = TARG_SESS_STATE_FREE;
|
||||
spin_unlock_bh(&sess->conn_lock);
|
||||
|
||||
if (atomic_read(&sess->sleep_on_sess_wait_comp))
|
||||
complete(&sess->session_wait_comp);
|
||||
if (atomic_read(&sess->session_close)) {
|
||||
spin_unlock_bh(&sess->conn_lock);
|
||||
complete_all(&sess->session_wait_comp);
|
||||
iscsit_close_session(sess);
|
||||
} else {
|
||||
spin_unlock_bh(&sess->conn_lock);
|
||||
}
|
||||
|
||||
return 0;
|
||||
} else {
|
||||
pr_debug("Moving to TARG_SESS_STATE_FAILED.\n");
|
||||
sess->session_state = TARG_SESS_STATE_FAILED;
|
||||
|
||||
if (!atomic_read(&sess->session_continuation)) {
|
||||
spin_unlock_bh(&sess->conn_lock);
|
||||
if (!atomic_read(&sess->session_continuation))
|
||||
iscsit_start_time2retain_handler(sess);
|
||||
} else
|
||||
spin_unlock_bh(&sess->conn_lock);
|
||||
|
||||
if (atomic_read(&sess->sleep_on_sess_wait_comp))
|
||||
complete(&sess->session_wait_comp);
|
||||
if (atomic_read(&sess->session_close)) {
|
||||
spin_unlock_bh(&sess->conn_lock);
|
||||
complete_all(&sess->session_wait_comp);
|
||||
iscsit_close_session(sess);
|
||||
} else {
|
||||
spin_unlock_bh(&sess->conn_lock);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -4453,9 +4460,9 @@ static void iscsit_logout_post_handler_closesession(
|
||||
complete(&conn->conn_logout_comp);
|
||||
|
||||
iscsit_dec_conn_usage_count(conn);
|
||||
atomic_set(&sess->session_close, 1);
|
||||
iscsit_stop_session(sess, sleep, sleep);
|
||||
iscsit_dec_session_usage_count(sess);
|
||||
iscsit_close_session(sess);
|
||||
}
|
||||
|
||||
static void iscsit_logout_post_handler_samecid(
|
||||
@@ -4590,49 +4597,6 @@ void iscsit_fail_session(struct iscsi_session *sess)
|
||||
sess->session_state = TARG_SESS_STATE_FAILED;
|
||||
}
|
||||
|
||||
int iscsit_free_session(struct iscsi_session *sess)
|
||||
{
|
||||
u16 conn_count = atomic_read(&sess->nconn);
|
||||
struct iscsi_conn *conn, *conn_tmp = NULL;
|
||||
int is_last;
|
||||
|
||||
spin_lock_bh(&sess->conn_lock);
|
||||
atomic_set(&sess->sleep_on_sess_wait_comp, 1);
|
||||
|
||||
list_for_each_entry_safe(conn, conn_tmp, &sess->sess_conn_list,
|
||||
conn_list) {
|
||||
if (conn_count == 0)
|
||||
break;
|
||||
|
||||
if (list_is_last(&conn->conn_list, &sess->sess_conn_list)) {
|
||||
is_last = 1;
|
||||
} else {
|
||||
iscsit_inc_conn_usage_count(conn_tmp);
|
||||
is_last = 0;
|
||||
}
|
||||
iscsit_inc_conn_usage_count(conn);
|
||||
|
||||
spin_unlock_bh(&sess->conn_lock);
|
||||
iscsit_cause_connection_reinstatement(conn, 1);
|
||||
spin_lock_bh(&sess->conn_lock);
|
||||
|
||||
iscsit_dec_conn_usage_count(conn);
|
||||
if (is_last == 0)
|
||||
iscsit_dec_conn_usage_count(conn_tmp);
|
||||
|
||||
conn_count--;
|
||||
}
|
||||
|
||||
if (atomic_read(&sess->nconn)) {
|
||||
spin_unlock_bh(&sess->conn_lock);
|
||||
wait_for_completion(&sess->session_wait_comp);
|
||||
} else
|
||||
spin_unlock_bh(&sess->conn_lock);
|
||||
|
||||
iscsit_close_session(sess);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void iscsit_stop_session(
|
||||
struct iscsi_session *sess,
|
||||
int session_sleep,
|
||||
@@ -4643,8 +4607,6 @@ void iscsit_stop_session(
|
||||
int is_last;
|
||||
|
||||
spin_lock_bh(&sess->conn_lock);
|
||||
if (session_sleep)
|
||||
atomic_set(&sess->sleep_on_sess_wait_comp, 1);
|
||||
|
||||
if (connection_sleep) {
|
||||
list_for_each_entry_safe(conn, conn_tmp, &sess->sess_conn_list,
|
||||
@@ -4702,12 +4664,15 @@ int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *tpg, int force)
|
||||
spin_lock(&sess->conn_lock);
|
||||
if (atomic_read(&sess->session_fall_back_to_erl0) ||
|
||||
atomic_read(&sess->session_logout) ||
|
||||
atomic_read(&sess->session_close) ||
|
||||
(sess->time2retain_timer_flags & ISCSI_TF_EXPIRED)) {
|
||||
spin_unlock(&sess->conn_lock);
|
||||
continue;
|
||||
}
|
||||
iscsit_inc_session_usage_count(sess);
|
||||
atomic_set(&sess->session_reinstatement, 1);
|
||||
atomic_set(&sess->session_fall_back_to_erl0, 1);
|
||||
atomic_set(&sess->session_close, 1);
|
||||
spin_unlock(&sess->conn_lock);
|
||||
|
||||
list_move_tail(&se_sess->sess_list, &free_list);
|
||||
@@ -4717,7 +4682,9 @@ int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *tpg, int force)
|
||||
list_for_each_entry_safe(se_sess, se_sess_tmp, &free_list, sess_list) {
|
||||
sess = (struct iscsi_session *)se_sess->fabric_sess_ptr;
|
||||
|
||||
iscsit_free_session(sess);
|
||||
list_del_init(&se_sess->sess_list);
|
||||
iscsit_stop_session(sess, 1, 1);
|
||||
iscsit_dec_session_usage_count(sess);
|
||||
session_count++;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ extern int iscsi_target_rx_thread(void *);
|
||||
extern int iscsit_close_connection(struct iscsi_conn *);
|
||||
extern int iscsit_close_session(struct iscsi_session *);
|
||||
extern void iscsit_fail_session(struct iscsi_session *);
|
||||
extern int iscsit_free_session(struct iscsi_session *);
|
||||
extern void iscsit_stop_session(struct iscsi_session *, int, int);
|
||||
extern int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *, int);
|
||||
|
||||
|
||||
@@ -1527,20 +1527,23 @@ static void lio_tpg_close_session(struct se_session *se_sess)
|
||||
spin_lock(&sess->conn_lock);
|
||||
if (atomic_read(&sess->session_fall_back_to_erl0) ||
|
||||
atomic_read(&sess->session_logout) ||
|
||||
atomic_read(&sess->session_close) ||
|
||||
(sess->time2retain_timer_flags & ISCSI_TF_EXPIRED)) {
|
||||
spin_unlock(&sess->conn_lock);
|
||||
spin_unlock_bh(&se_tpg->session_lock);
|
||||
return;
|
||||
}
|
||||
iscsit_inc_session_usage_count(sess);
|
||||
atomic_set(&sess->session_reinstatement, 1);
|
||||
atomic_set(&sess->session_fall_back_to_erl0, 1);
|
||||
atomic_set(&sess->session_close, 1);
|
||||
spin_unlock(&sess->conn_lock);
|
||||
|
||||
iscsit_stop_time2retain_timer(sess);
|
||||
spin_unlock_bh(&se_tpg->session_lock);
|
||||
|
||||
iscsit_stop_session(sess, 1, 1);
|
||||
iscsit_close_session(sess);
|
||||
iscsit_dec_session_usage_count(sess);
|
||||
}
|
||||
|
||||
static u32 lio_tpg_get_inst_index(struct se_portal_group *se_tpg)
|
||||
|
||||
@@ -195,6 +195,7 @@ int iscsi_check_for_session_reinstatement(struct iscsi_conn *conn)
|
||||
spin_lock(&sess_p->conn_lock);
|
||||
if (atomic_read(&sess_p->session_fall_back_to_erl0) ||
|
||||
atomic_read(&sess_p->session_logout) ||
|
||||
atomic_read(&sess_p->session_close) ||
|
||||
(sess_p->time2retain_timer_flags & ISCSI_TF_EXPIRED)) {
|
||||
spin_unlock(&sess_p->conn_lock);
|
||||
continue;
|
||||
@@ -205,6 +206,7 @@ int iscsi_check_for_session_reinstatement(struct iscsi_conn *conn)
|
||||
(sess_p->sess_ops->SessionType == sessiontype))) {
|
||||
atomic_set(&sess_p->session_reinstatement, 1);
|
||||
atomic_set(&sess_p->session_fall_back_to_erl0, 1);
|
||||
atomic_set(&sess_p->session_close, 1);
|
||||
spin_unlock(&sess_p->conn_lock);
|
||||
iscsit_inc_session_usage_count(sess_p);
|
||||
iscsit_stop_time2retain_timer(sess_p);
|
||||
@@ -229,7 +231,6 @@ int iscsi_check_for_session_reinstatement(struct iscsi_conn *conn)
|
||||
if (sess->session_state == TARG_SESS_STATE_FAILED) {
|
||||
spin_unlock_bh(&sess->conn_lock);
|
||||
iscsit_dec_session_usage_count(sess);
|
||||
iscsit_close_session(sess);
|
||||
return 0;
|
||||
}
|
||||
spin_unlock_bh(&sess->conn_lock);
|
||||
@@ -237,7 +238,6 @@ int iscsi_check_for_session_reinstatement(struct iscsi_conn *conn)
|
||||
iscsit_stop_session(sess, 1, 1);
|
||||
iscsit_dec_session_usage_count(sess);
|
||||
|
||||
iscsit_close_session(sess);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -525,6 +525,7 @@ static int iscsi_login_non_zero_tsih_s2(
|
||||
sess_p = (struct iscsi_session *)se_sess->fabric_sess_ptr;
|
||||
if (atomic_read(&sess_p->session_fall_back_to_erl0) ||
|
||||
atomic_read(&sess_p->session_logout) ||
|
||||
atomic_read(&sess_p->session_close) ||
|
||||
(sess_p->time2retain_timer_flags & ISCSI_TF_EXPIRED))
|
||||
continue;
|
||||
if (!memcmp(sess_p->isid, pdu->isid, 6) &&
|
||||
|
||||
@@ -139,6 +139,21 @@ static int find_console_handle(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static unsigned int local_ev_byte_channel_send(unsigned int handle,
|
||||
unsigned int *count,
|
||||
const char *p)
|
||||
{
|
||||
char buffer[EV_BYTE_CHANNEL_MAX_BYTES];
|
||||
unsigned int c = *count;
|
||||
|
||||
if (c < sizeof(buffer)) {
|
||||
memcpy(buffer, p, c);
|
||||
memset(&buffer[c], 0, sizeof(buffer) - c);
|
||||
p = buffer;
|
||||
}
|
||||
return ev_byte_channel_send(handle, count, p);
|
||||
}
|
||||
|
||||
/*************************** EARLY CONSOLE DRIVER ***************************/
|
||||
|
||||
#ifdef CONFIG_PPC_EARLY_DEBUG_EHV_BC
|
||||
@@ -157,7 +172,7 @@ static void byte_channel_spin_send(const char data)
|
||||
|
||||
do {
|
||||
count = 1;
|
||||
ret = ev_byte_channel_send(CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE,
|
||||
ret = local_ev_byte_channel_send(CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE,
|
||||
&count, &data);
|
||||
} while (ret == EV_EAGAIN);
|
||||
}
|
||||
@@ -224,7 +239,7 @@ static int ehv_bc_console_byte_channel_send(unsigned int handle, const char *s,
|
||||
while (count) {
|
||||
len = min_t(unsigned int, count, EV_BYTE_CHANNEL_MAX_BYTES);
|
||||
do {
|
||||
ret = ev_byte_channel_send(handle, &len, s);
|
||||
ret = local_ev_byte_channel_send(handle, &len, s);
|
||||
} while (ret == EV_EAGAIN);
|
||||
count -= len;
|
||||
s += len;
|
||||
@@ -404,7 +419,7 @@ static void ehv_bc_tx_dequeue(struct ehv_bc_data *bc)
|
||||
CIRC_CNT_TO_END(bc->head, bc->tail, BUF_SIZE),
|
||||
EV_BYTE_CHANNEL_MAX_BYTES);
|
||||
|
||||
ret = ev_byte_channel_send(bc->handle, &len, bc->buf + bc->tail);
|
||||
ret = local_ev_byte_channel_send(bc->handle, &len, bc->buf + bc->tail);
|
||||
|
||||
/* 'len' is valid only if the return code is 0 or EV_EAGAIN */
|
||||
if (!ret || (ret == EV_EAGAIN))
|
||||
|
||||
@@ -842,6 +842,11 @@ static int set_config(struct usb_composite_dev *cdev,
|
||||
else
|
||||
power = min(power, 900U);
|
||||
done:
|
||||
if (power <= USB_SELF_POWER_VBUS_MAX_DRAW)
|
||||
usb_gadget_set_selfpowered(gadget);
|
||||
else
|
||||
usb_gadget_clear_selfpowered(gadget);
|
||||
|
||||
usb_gadget_vbus_draw(gadget, power);
|
||||
if (result >= 0 && cdev->delayed_status)
|
||||
result = USB_GADGET_DELAYED_STATUS;
|
||||
@@ -2279,6 +2284,7 @@ void composite_suspend(struct usb_gadget *gadget)
|
||||
|
||||
cdev->suspended = 1;
|
||||
|
||||
usb_gadget_set_selfpowered(gadget);
|
||||
usb_gadget_vbus_draw(gadget, 2);
|
||||
}
|
||||
|
||||
@@ -2307,6 +2313,9 @@ void composite_resume(struct usb_gadget *gadget)
|
||||
else
|
||||
maxpower = min(maxpower, 900U);
|
||||
|
||||
if (maxpower > USB_SELF_POWER_VBUS_MAX_DRAW)
|
||||
usb_gadget_clear_selfpowered(gadget);
|
||||
|
||||
usb_gadget_vbus_draw(gadget, maxpower);
|
||||
}
|
||||
|
||||
|
||||
@@ -1036,6 +1036,7 @@ static ssize_t ffs_epfile_io(struct file *file, struct ffs_io_data *io_data)
|
||||
|
||||
ret = usb_ep_queue(ep->ep, req, GFP_ATOMIC);
|
||||
if (unlikely(ret)) {
|
||||
io_data->req = NULL;
|
||||
usb_ep_free_request(ep->ep, req);
|
||||
goto error_lock;
|
||||
}
|
||||
|
||||
@@ -1132,7 +1132,7 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
|
||||
case FBIOGET_FSCREENINFO:
|
||||
if (!lock_fb_info(info))
|
||||
return -ENODEV;
|
||||
fix = info->fix;
|
||||
memcpy(&fix, &info->fix, sizeof(fix));
|
||||
unlock_fb_info(info);
|
||||
|
||||
ret = copy_to_user(argp, &fix, sizeof(fix)) ? -EFAULT : 0;
|
||||
|
||||
@@ -522,9 +522,7 @@ SiS_PanelDelay(struct SiS_Private *SiS_Pr, unsigned short DelayTime)
|
||||
SiS_DDC2Delay(SiS_Pr, 0x4000);
|
||||
}
|
||||
|
||||
} else if((SiS_Pr->SiS_IF_DEF_LVDS == 1) /* ||
|
||||
(SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) ||
|
||||
(SiS_Pr->SiS_CustomT == CUT_CLEVO1400) */ ) { /* 315 series, LVDS; Special */
|
||||
} else if (SiS_Pr->SiS_IF_DEF_LVDS == 1) { /* 315 series, LVDS; Special */
|
||||
|
||||
if(SiS_Pr->SiS_IF_DEF_CH70xx == 0) {
|
||||
PanelID = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36);
|
||||
|
||||
@@ -447,3 +447,11 @@ void btrfs_set_work_high_priority(struct btrfs_work *work)
|
||||
{
|
||||
set_bit(WORK_HIGH_PRIO_BIT, &work->flags);
|
||||
}
|
||||
|
||||
void btrfs_flush_workqueue(struct btrfs_workqueue *wq)
|
||||
{
|
||||
if (wq->high)
|
||||
flush_workqueue(wq->high->normal_wq);
|
||||
|
||||
flush_workqueue(wq->normal->normal_wq);
|
||||
}
|
||||
|
||||
@@ -85,4 +85,6 @@ void btrfs_set_work_high_priority(struct btrfs_work *work);
|
||||
struct btrfs_fs_info *btrfs_work_owner(struct btrfs_work *work);
|
||||
struct btrfs_fs_info *btrfs_workqueue_owner(struct __btrfs_workqueue *wq);
|
||||
bool btrfs_workqueue_normal_congested(struct btrfs_workqueue *wq);
|
||||
void btrfs_flush_workqueue(struct btrfs_workqueue *wq);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3825,6 +3825,19 @@ void close_ctree(struct btrfs_root *root)
|
||||
*/
|
||||
btrfs_delete_unused_bgs(root->fs_info);
|
||||
|
||||
/*
|
||||
* There might be existing delayed inode workers still running
|
||||
* and holding an empty delayed inode item. We must wait for
|
||||
* them to complete first because they can create a transaction.
|
||||
* This happens when someone calls btrfs_balance_delayed_items()
|
||||
* and then a transaction commit runs the same delayed nodes
|
||||
* before any delayed worker has done something with the nodes.
|
||||
* We must wait for any worker here and not at transaction
|
||||
* commit time since that could cause a deadlock.
|
||||
* This is a very rare case.
|
||||
*/
|
||||
btrfs_flush_workqueue(fs_info->delayed_workers);
|
||||
|
||||
ret = btrfs_commit_super(root);
|
||||
if (ret)
|
||||
btrfs_err(fs_info, "commit super ret %d", ret);
|
||||
|
||||
@@ -537,8 +537,8 @@ static int should_ignore_root(struct btrfs_root *root)
|
||||
if (!reloc_root)
|
||||
return 0;
|
||||
|
||||
if (btrfs_root_last_snapshot(&reloc_root->root_item) ==
|
||||
root->fs_info->running_transaction->transid - 1)
|
||||
if (btrfs_header_generation(reloc_root->commit_root) ==
|
||||
root->fs_info->running_transaction->transid)
|
||||
return 0;
|
||||
/*
|
||||
* if there is reloc tree and it was created in previous
|
||||
@@ -1185,7 +1185,7 @@ out:
|
||||
free_backref_node(cache, lower);
|
||||
}
|
||||
|
||||
free_backref_node(cache, node);
|
||||
remove_backref_node(cache, node);
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
ASSERT(!node || !node->detached);
|
||||
@@ -1296,7 +1296,7 @@ static int __must_check __add_reloc_root(struct btrfs_root *root)
|
||||
if (!node)
|
||||
return -ENOMEM;
|
||||
|
||||
node->bytenr = root->node->start;
|
||||
node->bytenr = root->commit_root->start;
|
||||
node->data = root;
|
||||
|
||||
spin_lock(&rc->reloc_root_tree.lock);
|
||||
@@ -1328,10 +1328,11 @@ static void __del_reloc_root(struct btrfs_root *root)
|
||||
if (rc && root->node) {
|
||||
spin_lock(&rc->reloc_root_tree.lock);
|
||||
rb_node = tree_search(&rc->reloc_root_tree.rb_root,
|
||||
root->node->start);
|
||||
root->commit_root->start);
|
||||
if (rb_node) {
|
||||
node = rb_entry(rb_node, struct mapping_node, rb_node);
|
||||
rb_erase(&node->rb_node, &rc->reloc_root_tree.rb_root);
|
||||
RB_CLEAR_NODE(&node->rb_node);
|
||||
}
|
||||
spin_unlock(&rc->reloc_root_tree.lock);
|
||||
if (!node)
|
||||
@@ -1349,7 +1350,7 @@ static void __del_reloc_root(struct btrfs_root *root)
|
||||
* helper to update the 'address of tree root -> reloc tree'
|
||||
* mapping
|
||||
*/
|
||||
static int __update_reloc_root(struct btrfs_root *root, u64 new_bytenr)
|
||||
static int __update_reloc_root(struct btrfs_root *root)
|
||||
{
|
||||
struct rb_node *rb_node;
|
||||
struct mapping_node *node = NULL;
|
||||
@@ -1357,7 +1358,7 @@ static int __update_reloc_root(struct btrfs_root *root, u64 new_bytenr)
|
||||
|
||||
spin_lock(&rc->reloc_root_tree.lock);
|
||||
rb_node = tree_search(&rc->reloc_root_tree.rb_root,
|
||||
root->node->start);
|
||||
root->commit_root->start);
|
||||
if (rb_node) {
|
||||
node = rb_entry(rb_node, struct mapping_node, rb_node);
|
||||
rb_erase(&node->rb_node, &rc->reloc_root_tree.rb_root);
|
||||
@@ -1369,7 +1370,7 @@ static int __update_reloc_root(struct btrfs_root *root, u64 new_bytenr)
|
||||
BUG_ON((struct btrfs_root *)node->data != root);
|
||||
|
||||
spin_lock(&rc->reloc_root_tree.lock);
|
||||
node->bytenr = new_bytenr;
|
||||
node->bytenr = root->node->start;
|
||||
rb_node = tree_insert(&rc->reloc_root_tree.rb_root,
|
||||
node->bytenr, &node->rb_node);
|
||||
spin_unlock(&rc->reloc_root_tree.lock);
|
||||
@@ -1519,6 +1520,7 @@ int btrfs_update_reloc_root(struct btrfs_trans_handle *trans,
|
||||
}
|
||||
|
||||
if (reloc_root->commit_root != reloc_root->node) {
|
||||
__update_reloc_root(reloc_root);
|
||||
btrfs_set_root_node(root_item, reloc_root->node);
|
||||
free_extent_buffer(reloc_root->commit_root);
|
||||
reloc_root->commit_root = btrfs_root_node(reloc_root);
|
||||
@@ -2457,7 +2459,21 @@ out:
|
||||
free_reloc_roots(&reloc_roots);
|
||||
}
|
||||
|
||||
BUG_ON(!RB_EMPTY_ROOT(&rc->reloc_root_tree.rb_root));
|
||||
/*
|
||||
* We used to have
|
||||
*
|
||||
* BUG_ON(!RB_EMPTY_ROOT(&rc->reloc_root_tree.rb_root));
|
||||
*
|
||||
* here, but it's wrong. If we fail to start the transaction in
|
||||
* prepare_to_merge() we will have only 0 ref reloc roots, none of which
|
||||
* have actually been removed from the reloc_root_tree rb tree. This is
|
||||
* fine because we're bailing here, and we hold a reference on the root
|
||||
* for the list that holds it, so these roots will be cleaned up when we
|
||||
* do the reloc_dirty_list afterwards. Meanwhile the root->reloc_root
|
||||
* will be cleaned up on unmount.
|
||||
*
|
||||
* The remaining nodes will be cleaned up by free_reloc_control.
|
||||
*/
|
||||
}
|
||||
|
||||
static void free_block_list(struct rb_root *blocks)
|
||||
@@ -4703,11 +4719,6 @@ int btrfs_reloc_cow_block(struct btrfs_trans_handle *trans,
|
||||
BUG_ON(rc->stage == UPDATE_DATA_PTRS &&
|
||||
root->root_key.objectid == BTRFS_DATA_RELOC_TREE_OBJECTID);
|
||||
|
||||
if (root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID) {
|
||||
if (buf == root->node)
|
||||
__update_reloc_root(root, cow->start);
|
||||
}
|
||||
|
||||
level = btrfs_header_level(buf);
|
||||
if (btrfs_header_generation(buf) <=
|
||||
btrfs_root_last_snapshot(&root->root_item))
|
||||
|
||||
@@ -1353,7 +1353,7 @@ void setup_new_exec(struct linux_binprm * bprm)
|
||||
|
||||
/* An exec changes our domain. We are no longer part of the thread
|
||||
group */
|
||||
current->self_exec_id++;
|
||||
WRITE_ONCE(current->self_exec_id, current->self_exec_id + 1);
|
||||
flush_signal_handlers(current, 0);
|
||||
}
|
||||
EXPORT_SYMBOL(setup_new_exec);
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/printk.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/mbcache.h>
|
||||
#include <linux/quotaops.h>
|
||||
@@ -83,8 +84,8 @@
|
||||
printk("\n"); \
|
||||
} while (0)
|
||||
#else
|
||||
# define ea_idebug(f...)
|
||||
# define ea_bdebug(f...)
|
||||
# define ea_idebug(inode, f...) no_printk(f)
|
||||
# define ea_bdebug(bh, f...) no_printk(f)
|
||||
#endif
|
||||
|
||||
static int ext2_xattr_set2(struct inode *, struct buffer_head *,
|
||||
@@ -835,8 +836,7 @@ ext2_xattr_cache_insert(struct mb_cache *cache, struct buffer_head *bh)
|
||||
error = mb_cache_entry_create(cache, GFP_NOFS, hash, bh->b_blocknr, 1);
|
||||
if (error) {
|
||||
if (error == -EBUSY) {
|
||||
ea_bdebug(bh, "already in cache (%d cache entries)",
|
||||
atomic_read(&ext2_xattr_cache->c_entry_count));
|
||||
ea_bdebug(bh, "already in cache");
|
||||
error = 0;
|
||||
}
|
||||
} else
|
||||
|
||||
@@ -3445,8 +3445,8 @@ static int ext4_ext_convert_to_initialized(handle_t *handle,
|
||||
(unsigned long long)map->m_lblk, map_len);
|
||||
|
||||
sbi = EXT4_SB(inode->i_sb);
|
||||
eof_block = (inode->i_size + inode->i_sb->s_blocksize - 1) >>
|
||||
inode->i_sb->s_blocksize_bits;
|
||||
eof_block = (EXT4_I(inode)->i_disksize + inode->i_sb->s_blocksize - 1)
|
||||
>> inode->i_sb->s_blocksize_bits;
|
||||
if (eof_block < map->m_lblk + map_len)
|
||||
eof_block = map->m_lblk + map_len;
|
||||
|
||||
@@ -3701,8 +3701,8 @@ static int ext4_split_convert_extents(handle_t *handle,
|
||||
__func__, inode->i_ino,
|
||||
(unsigned long long)map->m_lblk, map->m_len);
|
||||
|
||||
eof_block = (inode->i_size + inode->i_sb->s_blocksize - 1) >>
|
||||
inode->i_sb->s_blocksize_bits;
|
||||
eof_block = (EXT4_I(inode)->i_disksize + inode->i_sb->s_blocksize - 1)
|
||||
>> inode->i_sb->s_blocksize_bits;
|
||||
if (eof_block < map->m_lblk + map->m_len)
|
||||
eof_block = map->m_lblk + map->m_len;
|
||||
/*
|
||||
|
||||
@@ -4804,7 +4804,7 @@ static int ext4_inode_blocks_set(handle_t *handle,
|
||||
struct ext4_inode_info *ei)
|
||||
{
|
||||
struct inode *inode = &(ei->vfs_inode);
|
||||
u64 i_blocks = inode->i_blocks;
|
||||
u64 i_blocks = READ_ONCE(inode->i_blocks);
|
||||
struct super_block *sb = inode->i_sb;
|
||||
|
||||
if (i_blocks <= ~0U) {
|
||||
|
||||
@@ -344,7 +344,8 @@ static void save_error_info(struct super_block *sb, const char *func,
|
||||
unsigned int line)
|
||||
{
|
||||
__save_error_info(sb, func, line);
|
||||
ext4_commit_super(sb, 1);
|
||||
if (!bdev_read_only(sb->s_bdev))
|
||||
ext4_commit_super(sb, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3824,7 +3825,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
|
||||
if (sbi->s_inodes_per_group < sbi->s_inodes_per_block ||
|
||||
sbi->s_inodes_per_group > blocksize * 8) {
|
||||
ext4_msg(sb, KERN_ERR, "invalid inodes per group: %lu\n",
|
||||
sbi->s_blocks_per_group);
|
||||
sbi->s_inodes_per_group);
|
||||
goto failed_mount;
|
||||
}
|
||||
sbi->s_itb_per_group = sbi->s_inodes_per_group /
|
||||
@@ -3955,9 +3956,9 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
|
||||
EXT4_BLOCKS_PER_GROUP(sb) - 1);
|
||||
do_div(blocks_count, EXT4_BLOCKS_PER_GROUP(sb));
|
||||
if (blocks_count > ((uint64_t)1<<32) - EXT4_DESC_PER_BLOCK(sb)) {
|
||||
ext4_msg(sb, KERN_WARNING, "groups count too large: %u "
|
||||
ext4_msg(sb, KERN_WARNING, "groups count too large: %llu "
|
||||
"(block count %llu, first data block %u, "
|
||||
"blocks per group %lu)", sbi->s_groups_count,
|
||||
"blocks per group %lu)", blocks_count,
|
||||
ext4_blocks_count(es),
|
||||
le32_to_cpu(es->s_first_data_block),
|
||||
EXT4_BLOCKS_PER_GROUP(sb));
|
||||
|
||||
@@ -548,6 +548,9 @@ __acquires(&gl->gl_lockref.lock)
|
||||
goto out_unlock;
|
||||
if (nonblock)
|
||||
goto out_sched;
|
||||
smp_mb();
|
||||
if (atomic_read(&gl->gl_revokes) != 0)
|
||||
goto out_sched;
|
||||
set_bit(GLF_DEMOTE_IN_PROGRESS, &gl->gl_flags);
|
||||
GLOCK_BUG_ON(gl, gl->gl_demote_state == LM_ST_EXCLUSIVE);
|
||||
gl->gl_target = gl->gl_demote_state;
|
||||
|
||||
@@ -291,6 +291,10 @@ static int __hfsplus_delete_attr(struct inode *inode, u32 cnid,
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
/* Avoid btree corruption */
|
||||
hfs_bnode_read(fd->bnode, fd->search_key,
|
||||
fd->keyoffset, fd->keylength);
|
||||
|
||||
err = hfs_brec_remove(fd);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -990,9 +990,10 @@ restart_loop:
|
||||
* journalled data) we need to unmap buffer and clear
|
||||
* more bits. We also need to be careful about the check
|
||||
* because the data page mapping can get cleared under
|
||||
* out hands, which alse need not to clear more bits
|
||||
* because the page and buffers will be freed and can
|
||||
* never be reused once we are done with them.
|
||||
* our hands. Note that if mapping == NULL, we don't
|
||||
* need to make buffer unmapped because the page is
|
||||
* already detached from the mapping and buffers cannot
|
||||
* get reused.
|
||||
*/
|
||||
mapping = READ_ONCE(bh->b_page->mapping);
|
||||
if (mapping && !sb_is_blkdev_sb(mapping->host->i_sb)) {
|
||||
|
||||
@@ -595,6 +595,7 @@ ssize_t nfs_file_direct_read(struct kiocb *iocb, struct iov_iter *iter)
|
||||
l_ctx = nfs_get_lock_context(dreq->ctx);
|
||||
if (IS_ERR(l_ctx)) {
|
||||
result = PTR_ERR(l_ctx);
|
||||
nfs_direct_req_release(dreq);
|
||||
goto out_release;
|
||||
}
|
||||
dreq->l_ctx = l_ctx;
|
||||
@@ -1019,6 +1020,7 @@ ssize_t nfs_file_direct_write(struct kiocb *iocb, struct iov_iter *iter)
|
||||
l_ctx = nfs_get_lock_context(dreq->ctx);
|
||||
if (IS_ERR(l_ctx)) {
|
||||
result = PTR_ERR(l_ctx);
|
||||
nfs_direct_req_release(dreq);
|
||||
goto out_release;
|
||||
}
|
||||
dreq->l_ctx = l_ctx;
|
||||
|
||||
@@ -851,15 +851,6 @@ static int nfs_pageio_setup_mirroring(struct nfs_pageio_descriptor *pgio,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* nfs_pageio_stop_mirroring - stop using mirroring (set mirror count to 1)
|
||||
*/
|
||||
void nfs_pageio_stop_mirroring(struct nfs_pageio_descriptor *pgio)
|
||||
{
|
||||
pgio->pg_mirror_count = 1;
|
||||
pgio->pg_mirror_idx = 0;
|
||||
}
|
||||
|
||||
static void nfs_pageio_cleanup_mirroring(struct nfs_pageio_descriptor *pgio)
|
||||
{
|
||||
pgio->pg_mirror_count = 1;
|
||||
@@ -1285,6 +1276,14 @@ void nfs_pageio_cond_complete(struct nfs_pageio_descriptor *desc, pgoff_t index)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* nfs_pageio_stop_mirroring - stop using mirroring (set mirror count to 1)
|
||||
*/
|
||||
void nfs_pageio_stop_mirroring(struct nfs_pageio_descriptor *pgio)
|
||||
{
|
||||
nfs_pageio_complete(pgio);
|
||||
}
|
||||
|
||||
int __init nfs_init_nfspagecache(void)
|
||||
{
|
||||
nfs_page_cachep = kmem_cache_create("nfs_page",
|
||||
|
||||
@@ -7246,6 +7246,10 @@ int ocfs2_truncate_inline(struct inode *inode, struct buffer_head *di_bh,
|
||||
struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data;
|
||||
struct ocfs2_inline_data *idata = &di->id2.i_data;
|
||||
|
||||
/* No need to punch hole beyond i_size. */
|
||||
if (start >= i_size_read(inode))
|
||||
return 0;
|
||||
|
||||
if (end > i_size_read(inode))
|
||||
end = i_size_read(inode);
|
||||
|
||||
|
||||
@@ -554,7 +554,7 @@ unsigned long read_word_at_a_time(const void *addr)
|
||||
* compiler has support to do so.
|
||||
*/
|
||||
#define compiletime_assert(condition, msg) \
|
||||
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
|
||||
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
|
||||
|
||||
#define compiletime_assert_atomic_type(t) \
|
||||
compiletime_assert(__native_word(t), \
|
||||
|
||||
@@ -53,7 +53,7 @@ void devfreq_cooling_unregister(struct thermal_cooling_device *dfc);
|
||||
|
||||
#else /* !CONFIG_DEVFREQ_THERMAL */
|
||||
|
||||
struct thermal_cooling_device *
|
||||
static inline struct thermal_cooling_device *
|
||||
of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df,
|
||||
struct devfreq_cooling_power *dfc_power)
|
||||
{
|
||||
|
||||
@@ -76,9 +76,9 @@ static inline s64 percpu_counter_read(struct percpu_counter *fbc)
|
||||
*/
|
||||
static inline s64 percpu_counter_read_positive(struct percpu_counter *fbc)
|
||||
{
|
||||
s64 ret = fbc->count;
|
||||
/* Prevent reloads of fbc->count */
|
||||
s64 ret = READ_ONCE(fbc->count);
|
||||
|
||||
barrier(); /* Prevent reloads of fbc->count */
|
||||
if (ret >= 0)
|
||||
return ret;
|
||||
return 0;
|
||||
|
||||
@@ -1817,8 +1817,8 @@ struct task_struct {
|
||||
struct seccomp seccomp;
|
||||
|
||||
/* Thread group tracking */
|
||||
u32 parent_exec_id;
|
||||
u32 self_exec_id;
|
||||
u64 parent_exec_id;
|
||||
u64 self_exec_id;
|
||||
/* Protection of (de-)allocation: mm, files, fs, tty, keyrings, mems_allowed,
|
||||
* mempolicy */
|
||||
spinlock_t alloc_lock;
|
||||
|
||||
@@ -196,6 +196,7 @@ static inline bool ipv6_anycast_destination(const struct dst_entry *dst,
|
||||
|
||||
return rt->rt6i_flags & RTF_ANYCAST ||
|
||||
(rt->rt6i_dst.plen != 128 &&
|
||||
!(rt->rt6i_flags & (RTF_GATEWAY | RTF_NONEXTHOP)) &&
|
||||
ipv6_addr_equal(&rt->rt6i_dst.addr, daddr));
|
||||
}
|
||||
|
||||
|
||||
@@ -671,7 +671,7 @@ struct iscsi_session {
|
||||
atomic_t session_logout;
|
||||
atomic_t session_reinstatement;
|
||||
atomic_t session_stop_active;
|
||||
atomic_t sleep_on_sess_wait_comp;
|
||||
atomic_t session_close;
|
||||
/* connection list */
|
||||
struct list_head sess_conn_list;
|
||||
struct list_head cr_active_list;
|
||||
|
||||
@@ -2034,10 +2034,8 @@ int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval)
|
||||
*/
|
||||
cpuhp_offline_cpu_device(cpu);
|
||||
}
|
||||
if (!ret) {
|
||||
if (!ret)
|
||||
cpu_smt_control = ctrlval;
|
||||
arch_smt_update();
|
||||
}
|
||||
cpu_maps_update_done();
|
||||
return ret;
|
||||
}
|
||||
@@ -2048,7 +2046,6 @@ int cpuhp_smt_enable(void)
|
||||
|
||||
cpu_maps_update_begin();
|
||||
cpu_smt_control = CPU_SMT_ENABLED;
|
||||
arch_smt_update();
|
||||
for_each_present_cpu(cpu) {
|
||||
/* Skip online CPUs and CPUs on offline nodes */
|
||||
if (cpu_online(cpu) || !node_online(cpu_to_node(cpu)))
|
||||
|
||||
@@ -119,7 +119,7 @@ out:
|
||||
* invoke it.
|
||||
*
|
||||
* If module auto-loading support is disabled then this function
|
||||
* becomes a no-operation.
|
||||
* simply returns -ENOENT.
|
||||
*/
|
||||
int __request_module(bool wait, const char *fmt, ...)
|
||||
{
|
||||
@@ -140,7 +140,7 @@ int __request_module(bool wait, const char *fmt, ...)
|
||||
WARN_ON_ONCE(wait && current_is_async());
|
||||
|
||||
if (!modprobe_path[0])
|
||||
return 0;
|
||||
return -ENOENT;
|
||||
|
||||
va_start(args, fmt);
|
||||
ret = vsnprintf(module_name, MODULE_NAME_LEN, fmt, args);
|
||||
|
||||
@@ -1241,9 +1241,11 @@ unsigned long lockdep_count_forward_deps(struct lock_class *class)
|
||||
this.class = class;
|
||||
|
||||
raw_local_irq_save(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
arch_spin_lock(&lockdep_lock);
|
||||
ret = __lockdep_count_forward_deps(&this);
|
||||
arch_spin_unlock(&lockdep_lock);
|
||||
current->lockdep_recursion = 0;
|
||||
raw_local_irq_restore(flags);
|
||||
|
||||
return ret;
|
||||
@@ -1268,9 +1270,11 @@ unsigned long lockdep_count_backward_deps(struct lock_class *class)
|
||||
this.class = class;
|
||||
|
||||
raw_local_irq_save(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
arch_spin_lock(&lockdep_lock);
|
||||
ret = __lockdep_count_backward_deps(&this);
|
||||
arch_spin_unlock(&lockdep_lock);
|
||||
current->lockdep_recursion = 0;
|
||||
raw_local_irq_restore(flags);
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -649,10 +649,10 @@ static void __torture_print_stats(char *page,
|
||||
if (statp[i].n_lock_fail)
|
||||
fail = true;
|
||||
sum += statp[i].n_lock_acquired;
|
||||
if (max < statp[i].n_lock_fail)
|
||||
max = statp[i].n_lock_fail;
|
||||
if (min > statp[i].n_lock_fail)
|
||||
min = statp[i].n_lock_fail;
|
||||
if (max < statp[i].n_lock_acquired)
|
||||
max = statp[i].n_lock_acquired;
|
||||
if (min > statp[i].n_lock_acquired)
|
||||
min = statp[i].n_lock_acquired;
|
||||
}
|
||||
page += sprintf(page,
|
||||
"%s: Total: %lld Max/Min: %ld/%ld %s Fail: %d %s\n",
|
||||
|
||||
@@ -76,7 +76,13 @@ static inline void update_idle_core(struct rq *rq) { }
|
||||
#ifdef CONFIG_64BIT
|
||||
# define NICE_0_LOAD_SHIFT (SCHED_FIXEDPOINT_SHIFT + SCHED_FIXEDPOINT_SHIFT)
|
||||
# define scale_load(w) ((w) << SCHED_FIXEDPOINT_SHIFT)
|
||||
# define scale_load_down(w) ((w) >> SCHED_FIXEDPOINT_SHIFT)
|
||||
# define scale_load_down(w) \
|
||||
({ \
|
||||
unsigned long __w = (w); \
|
||||
if (__w) \
|
||||
__w = max(2UL, __w >> SCHED_FIXEDPOINT_SHIFT); \
|
||||
__w; \
|
||||
})
|
||||
#else
|
||||
# define NICE_0_LOAD_SHIFT (SCHED_FIXEDPOINT_SHIFT)
|
||||
# define scale_load(w) (w)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user