mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
Merge branch 'android-4.9' into amlogic-4.9-dev
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 42
|
||||
SUBLEVEL = 46
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
||||
@@ -89,7 +89,9 @@ extern unsigned long perip_base, perip_end;
|
||||
#define ARC_REG_SLC_FLUSH 0x904
|
||||
#define ARC_REG_SLC_INVALIDATE 0x905
|
||||
#define ARC_REG_SLC_RGN_START 0x914
|
||||
#define ARC_REG_SLC_RGN_START1 0x915
|
||||
#define ARC_REG_SLC_RGN_END 0x916
|
||||
#define ARC_REG_SLC_RGN_END1 0x917
|
||||
|
||||
/* Bit val in SLC_CONTROL */
|
||||
#define SLC_CTRL_IM 0x040
|
||||
|
||||
@@ -562,6 +562,7 @@ noinline void slc_op(phys_addr_t paddr, unsigned long sz, const int op)
|
||||
static DEFINE_SPINLOCK(lock);
|
||||
unsigned long flags;
|
||||
unsigned int ctrl;
|
||||
phys_addr_t end;
|
||||
|
||||
spin_lock_irqsave(&lock, flags);
|
||||
|
||||
@@ -591,8 +592,16 @@ noinline void slc_op(phys_addr_t paddr, unsigned long sz, const int op)
|
||||
* END needs to be setup before START (latter triggers the operation)
|
||||
* END can't be same as START, so add (l2_line_sz - 1) to sz
|
||||
*/
|
||||
write_aux_reg(ARC_REG_SLC_RGN_END, (paddr + sz + l2_line_sz - 1));
|
||||
write_aux_reg(ARC_REG_SLC_RGN_START, paddr);
|
||||
end = paddr + sz + l2_line_sz - 1;
|
||||
if (is_pae40_enabled())
|
||||
write_aux_reg(ARC_REG_SLC_RGN_END1, upper_32_bits(end));
|
||||
|
||||
write_aux_reg(ARC_REG_SLC_RGN_END, lower_32_bits(end));
|
||||
|
||||
if (is_pae40_enabled())
|
||||
write_aux_reg(ARC_REG_SLC_RGN_START1, upper_32_bits(paddr));
|
||||
|
||||
write_aux_reg(ARC_REG_SLC_RGN_START, lower_32_bits(paddr));
|
||||
|
||||
while (read_aux_reg(ARC_REG_SLC_CTRL) & SLC_CTRL_BUSY);
|
||||
|
||||
|
||||
@@ -820,7 +820,6 @@ dtb-$(CONFIG_MACH_SUN8I) += \
|
||||
sun8i-a83t-allwinner-h8homlet-v2.dtb \
|
||||
sun8i-a83t-cubietruck-plus.dtb \
|
||||
sun8i-h3-bananapi-m2-plus.dtb \
|
||||
sun8i-h3-nanopi-m1.dtb \
|
||||
sun8i-h3-nanopi-neo.dtb \
|
||||
sun8i-h3-orangepi-2.dtb \
|
||||
sun8i-h3-orangepi-lite.dtb \
|
||||
|
||||
@@ -1664,12 +1664,16 @@ static int kvm_test_age_hva_handler(struct kvm *kvm, gpa_t gpa, void *data)
|
||||
|
||||
int kvm_age_hva(struct kvm *kvm, unsigned long start, unsigned long end)
|
||||
{
|
||||
if (!kvm->arch.pgd)
|
||||
return 0;
|
||||
trace_kvm_age_hva(start, end);
|
||||
return handle_hva_to_gpa(kvm, start, end, kvm_age_hva_handler, NULL);
|
||||
}
|
||||
|
||||
int kvm_test_age_hva(struct kvm *kvm, unsigned long hva)
|
||||
{
|
||||
if (!kvm->arch.pgd)
|
||||
return 0;
|
||||
trace_kvm_test_age_hva(hva);
|
||||
return handle_hva_to_gpa(kvm, hva, hva, kvm_test_age_hva_handler, NULL);
|
||||
}
|
||||
|
||||
@@ -114,10 +114,10 @@
|
||||
|
||||
/*
|
||||
* This is the base location for PIE (ET_DYN with INTERP) loads. On
|
||||
* 64-bit, this is raised to 4GB to leave the entire 32-bit address
|
||||
* 64-bit, this is above 4GB to leave the entire 32-bit address
|
||||
* space open for things that want to use the area for 32-bit pointers.
|
||||
*/
|
||||
#define ELF_ET_DYN_BASE 0x100000000UL
|
||||
#define ELF_ET_DYN_BASE (2 * TASK_SIZE_64 / 3)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
||||
@@ -147,23 +147,12 @@
|
||||
* Find irq with highest priority
|
||||
*/
|
||||
# open coded PTR_LA t1, cpu_mask_nr_tbl
|
||||
#if (_MIPS_SZPTR == 32)
|
||||
#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32)
|
||||
# open coded la t1, cpu_mask_nr_tbl
|
||||
lui t1, %hi(cpu_mask_nr_tbl)
|
||||
addiu t1, %lo(cpu_mask_nr_tbl)
|
||||
|
||||
#endif
|
||||
#if (_MIPS_SZPTR == 64)
|
||||
# open coded dla t1, cpu_mask_nr_tbl
|
||||
.set push
|
||||
.set noat
|
||||
lui t1, %highest(cpu_mask_nr_tbl)
|
||||
lui AT, %hi(cpu_mask_nr_tbl)
|
||||
daddiu t1, t1, %higher(cpu_mask_nr_tbl)
|
||||
daddiu AT, AT, %lo(cpu_mask_nr_tbl)
|
||||
dsll t1, 32
|
||||
daddu t1, t1, AT
|
||||
.set pop
|
||||
#else
|
||||
#error GCC `-msym32' option required for 64-bit DECstation builds
|
||||
#endif
|
||||
1: lw t2,(t1)
|
||||
nop
|
||||
@@ -214,23 +203,12 @@
|
||||
* Find irq with highest priority
|
||||
*/
|
||||
# open coded PTR_LA t1,asic_mask_nr_tbl
|
||||
#if (_MIPS_SZPTR == 32)
|
||||
#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32)
|
||||
# open coded la t1, asic_mask_nr_tbl
|
||||
lui t1, %hi(asic_mask_nr_tbl)
|
||||
addiu t1, %lo(asic_mask_nr_tbl)
|
||||
|
||||
#endif
|
||||
#if (_MIPS_SZPTR == 64)
|
||||
# open coded dla t1, asic_mask_nr_tbl
|
||||
.set push
|
||||
.set noat
|
||||
lui t1, %highest(asic_mask_nr_tbl)
|
||||
lui AT, %hi(asic_mask_nr_tbl)
|
||||
daddiu t1, t1, %higher(asic_mask_nr_tbl)
|
||||
daddiu AT, AT, %lo(asic_mask_nr_tbl)
|
||||
dsll t1, 32
|
||||
daddu t1, t1, AT
|
||||
.set pop
|
||||
#else
|
||||
#error GCC `-msym32' option required for 64-bit DECstation builds
|
||||
#endif
|
||||
2: lw t2,(t1)
|
||||
nop
|
||||
|
||||
@@ -75,9 +75,27 @@ static inline void switch_mm_irqs_off(struct mm_struct *prev,
|
||||
struct task_struct *tsk)
|
||||
{
|
||||
/* Mark this context has been used on the new CPU */
|
||||
if (!cpumask_test_cpu(smp_processor_id(), mm_cpumask(next)))
|
||||
if (!cpumask_test_cpu(smp_processor_id(), mm_cpumask(next))) {
|
||||
cpumask_set_cpu(smp_processor_id(), mm_cpumask(next));
|
||||
|
||||
/*
|
||||
* This full barrier orders the store to the cpumask above vs
|
||||
* a subsequent operation which allows this CPU to begin loading
|
||||
* translations for next.
|
||||
*
|
||||
* When using the radix MMU that operation is the load of the
|
||||
* MMU context id, which is then moved to SPRN_PID.
|
||||
*
|
||||
* For the hash MMU it is either the first load from slb_cache
|
||||
* in switch_slb(), and/or the store of paca->mm_ctx_id in
|
||||
* copy_mm_to_paca().
|
||||
*
|
||||
* On the read side the barrier is in pte_xchg(), which orders
|
||||
* the store to the PTE vs the load of mm_cpumask.
|
||||
*/
|
||||
smp_mb();
|
||||
}
|
||||
|
||||
/* 32-bit keeps track of the current PGDIR in the thread struct */
|
||||
#ifdef CONFIG_PPC32
|
||||
tsk->thread.pgdir = next->pgd;
|
||||
|
||||
@@ -87,6 +87,7 @@ static inline bool pte_xchg(pte_t *ptep, pte_t old, pte_t new)
|
||||
unsigned long *p = (unsigned long *)ptep;
|
||||
__be64 prev;
|
||||
|
||||
/* See comment in switch_mm_irqs_off() */
|
||||
prev = (__force __be64)__cmpxchg_u64(p, (__force unsigned long)pte_raw(old),
|
||||
(__force unsigned long)pte_raw(new));
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ static inline bool pte_xchg(pte_t *ptep, pte_t old, pte_t new)
|
||||
{
|
||||
unsigned long *p = (unsigned long *)ptep;
|
||||
|
||||
/* See comment in switch_mm_irqs_off() */
|
||||
return pte_val(old) == __cmpxchg_u64(p, pte_val(old), pte_val(new));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -359,7 +359,8 @@ void enable_kernel_vsx(void)
|
||||
|
||||
cpumsr = msr_check_and_set(MSR_FP|MSR_VEC|MSR_VSX);
|
||||
|
||||
if (current->thread.regs && (current->thread.regs->msr & MSR_VSX)) {
|
||||
if (current->thread.regs &&
|
||||
(current->thread.regs->msr & (MSR_VSX|MSR_VEC|MSR_FP))) {
|
||||
check_if_tm_restore_required(current);
|
||||
/*
|
||||
* If a thread has already been reclaimed then the
|
||||
@@ -383,7 +384,7 @@ void flush_vsx_to_thread(struct task_struct *tsk)
|
||||
{
|
||||
if (tsk->thread.regs) {
|
||||
preempt_disable();
|
||||
if (tsk->thread.regs->msr & MSR_VSX) {
|
||||
if (tsk->thread.regs->msr & (MSR_VSX|MSR_VEC|MSR_FP)) {
|
||||
BUG_ON(tsk != current);
|
||||
giveup_vsx(tsk);
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ static int sthyi(u64 vaddr)
|
||||
"srl %[cc],28\n"
|
||||
: [cc] "=d" (cc)
|
||||
: [code] "d" (code), [addr] "a" (addr)
|
||||
: "memory", "cc");
|
||||
: "3", "memory", "cc");
|
||||
return cc;
|
||||
}
|
||||
|
||||
@@ -422,7 +422,7 @@ int handle_sthyi(struct kvm_vcpu *vcpu)
|
||||
VCPU_EVENT(vcpu, 3, "STHYI: fc: %llu addr: 0x%016llx", code, addr);
|
||||
trace_kvm_s390_handle_sthyi(vcpu, code, addr);
|
||||
|
||||
if (reg1 == reg2 || reg1 & 1 || reg2 & 1 || addr & ~PAGE_MASK)
|
||||
if (reg1 == reg2 || reg1 & 1 || reg2 & 1)
|
||||
return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
|
||||
|
||||
if (code & 0xffff) {
|
||||
@@ -430,6 +430,9 @@ int handle_sthyi(struct kvm_vcpu *vcpu)
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (addr & ~PAGE_MASK)
|
||||
return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
|
||||
|
||||
/*
|
||||
* If the page has not yet been faulted in, we want to do that
|
||||
* now and not after all the expensive calculations.
|
||||
|
||||
@@ -1252,7 +1252,8 @@ static int bpf_jit_prog(struct bpf_jit *jit, struct bpf_prog *fp)
|
||||
insn_count = bpf_jit_insn(jit, fp, i);
|
||||
if (insn_count < 0)
|
||||
return -1;
|
||||
jit->addrs[i + 1] = jit->prg; /* Next instruction address */
|
||||
/* Next instruction address */
|
||||
jit->addrs[i + insn_count] = jit->prg;
|
||||
}
|
||||
bpf_jit_epilogue(jit);
|
||||
|
||||
|
||||
@@ -25,9 +25,11 @@ void destroy_context(struct mm_struct *mm);
|
||||
void __tsb_context_switch(unsigned long pgd_pa,
|
||||
struct tsb_config *tsb_base,
|
||||
struct tsb_config *tsb_huge,
|
||||
unsigned long tsb_descr_pa);
|
||||
unsigned long tsb_descr_pa,
|
||||
unsigned long secondary_ctx);
|
||||
|
||||
static inline void tsb_context_switch(struct mm_struct *mm)
|
||||
static inline void tsb_context_switch_ctx(struct mm_struct *mm,
|
||||
unsigned long ctx)
|
||||
{
|
||||
__tsb_context_switch(__pa(mm->pgd),
|
||||
&mm->context.tsb_block[0],
|
||||
@@ -38,9 +40,12 @@ static inline void tsb_context_switch(struct mm_struct *mm)
|
||||
#else
|
||||
NULL
|
||||
#endif
|
||||
, __pa(&mm->context.tsb_descr[0]));
|
||||
, __pa(&mm->context.tsb_descr[0]),
|
||||
ctx);
|
||||
}
|
||||
|
||||
#define tsb_context_switch(X) tsb_context_switch_ctx(X, 0)
|
||||
|
||||
void tsb_grow(struct mm_struct *mm,
|
||||
unsigned long tsb_index,
|
||||
unsigned long mm_rss);
|
||||
@@ -110,8 +115,7 @@ static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, str
|
||||
* cpu0 to update it's TSB because at that point the cpu_vm_mask
|
||||
* only had cpu1 set in it.
|
||||
*/
|
||||
load_secondary_context(mm);
|
||||
tsb_context_switch(mm);
|
||||
tsb_context_switch_ctx(mm, CTX_HWBITS(mm->context));
|
||||
|
||||
/* Any time a processor runs a context on an address space
|
||||
* for the first time, we must flush that context out of the
|
||||
|
||||
@@ -1240,8 +1240,6 @@ static int pci_sun4v_probe(struct platform_device *op)
|
||||
* ATU group, but ATU hcalls won't be available.
|
||||
*/
|
||||
hv_atu = false;
|
||||
pr_err(PFX "Could not register hvapi ATU err=%d\n",
|
||||
err);
|
||||
} else {
|
||||
pr_info(PFX "Registered hvapi ATU major[%lu] minor[%lu]\n",
|
||||
vatu_major, vatu_minor);
|
||||
|
||||
@@ -375,6 +375,7 @@ tsb_flush:
|
||||
* %o1: TSB base config pointer
|
||||
* %o2: TSB huge config pointer, or NULL if none
|
||||
* %o3: Hypervisor TSB descriptor physical address
|
||||
* %o4: Secondary context to load, if non-zero
|
||||
*
|
||||
* We have to run this whole thing with interrupts
|
||||
* disabled so that the current cpu doesn't change
|
||||
@@ -387,6 +388,17 @@ __tsb_context_switch:
|
||||
rdpr %pstate, %g1
|
||||
wrpr %g1, PSTATE_IE, %pstate
|
||||
|
||||
brz,pn %o4, 1f
|
||||
mov SECONDARY_CONTEXT, %o5
|
||||
|
||||
661: stxa %o4, [%o5] ASI_DMMU
|
||||
.section .sun4v_1insn_patch, "ax"
|
||||
.word 661b
|
||||
stxa %o4, [%o5] ASI_MMU
|
||||
.previous
|
||||
flush %g6
|
||||
|
||||
1:
|
||||
TRAP_LOAD_TRAP_BLOCK(%g2, %g3)
|
||||
|
||||
stx %o0, [%g2 + TRAP_PER_CPU_PGD_PADDR]
|
||||
|
||||
@@ -35,6 +35,5 @@ void restore_processor_state(void)
|
||||
{
|
||||
struct mm_struct *mm = current->active_mm;
|
||||
|
||||
load_secondary_context(mm);
|
||||
tsb_context_switch(mm);
|
||||
tsb_context_switch_ctx(mm, CTX_HWBITS(mm->context));
|
||||
}
|
||||
|
||||
@@ -117,11 +117,10 @@
|
||||
.set T1, REG_T1
|
||||
.endm
|
||||
|
||||
#define K_BASE %r8
|
||||
#define HASH_PTR %r9
|
||||
#define BLOCKS_CTR %r8
|
||||
#define BUFFER_PTR %r10
|
||||
#define BUFFER_PTR2 %r13
|
||||
#define BUFFER_END %r11
|
||||
|
||||
#define PRECALC_BUF %r14
|
||||
#define WK_BUF %r15
|
||||
@@ -205,14 +204,14 @@
|
||||
* blended AVX2 and ALU instruction scheduling
|
||||
* 1 vector iteration per 8 rounds
|
||||
*/
|
||||
vmovdqu ((i * 2) + PRECALC_OFFSET)(BUFFER_PTR), W_TMP
|
||||
vmovdqu (i * 2)(BUFFER_PTR), W_TMP
|
||||
.elseif ((i & 7) == 1)
|
||||
vinsertf128 $1, (((i-1) * 2)+PRECALC_OFFSET)(BUFFER_PTR2),\
|
||||
vinsertf128 $1, ((i-1) * 2)(BUFFER_PTR2),\
|
||||
WY_TMP, WY_TMP
|
||||
.elseif ((i & 7) == 2)
|
||||
vpshufb YMM_SHUFB_BSWAP, WY_TMP, WY
|
||||
.elseif ((i & 7) == 4)
|
||||
vpaddd K_XMM(K_BASE), WY, WY_TMP
|
||||
vpaddd K_XMM + K_XMM_AR(%rip), WY, WY_TMP
|
||||
.elseif ((i & 7) == 7)
|
||||
vmovdqu WY_TMP, PRECALC_WK(i&~7)
|
||||
|
||||
@@ -255,7 +254,7 @@
|
||||
vpxor WY, WY_TMP, WY_TMP
|
||||
.elseif ((i & 7) == 7)
|
||||
vpxor WY_TMP2, WY_TMP, WY
|
||||
vpaddd K_XMM(K_BASE), WY, WY_TMP
|
||||
vpaddd K_XMM + K_XMM_AR(%rip), WY, WY_TMP
|
||||
vmovdqu WY_TMP, PRECALC_WK(i&~7)
|
||||
|
||||
PRECALC_ROTATE_WY
|
||||
@@ -291,7 +290,7 @@
|
||||
vpsrld $30, WY, WY
|
||||
vpor WY, WY_TMP, WY
|
||||
.elseif ((i & 7) == 7)
|
||||
vpaddd K_XMM(K_BASE), WY, WY_TMP
|
||||
vpaddd K_XMM + K_XMM_AR(%rip), WY, WY_TMP
|
||||
vmovdqu WY_TMP, PRECALC_WK(i&~7)
|
||||
|
||||
PRECALC_ROTATE_WY
|
||||
@@ -446,6 +445,16 @@
|
||||
|
||||
.endm
|
||||
|
||||
/* Add constant only if (%2 > %3) condition met (uses RTA as temp)
|
||||
* %1 + %2 >= %3 ? %4 : 0
|
||||
*/
|
||||
.macro ADD_IF_GE a, b, c, d
|
||||
mov \a, RTA
|
||||
add $\d, RTA
|
||||
cmp $\c, \b
|
||||
cmovge RTA, \a
|
||||
.endm
|
||||
|
||||
/*
|
||||
* macro implements 80 rounds of SHA-1, for multiple blocks with s/w pipelining
|
||||
*/
|
||||
@@ -463,13 +472,16 @@
|
||||
lea (2*4*80+32)(%rsp), WK_BUF
|
||||
|
||||
# Precalc WK for first 2 blocks
|
||||
PRECALC_OFFSET = 0
|
||||
ADD_IF_GE BUFFER_PTR2, BLOCKS_CTR, 2, 64
|
||||
.set i, 0
|
||||
.rept 160
|
||||
PRECALC i
|
||||
.set i, i + 1
|
||||
.endr
|
||||
PRECALC_OFFSET = 128
|
||||
|
||||
/* Go to next block if needed */
|
||||
ADD_IF_GE BUFFER_PTR, BLOCKS_CTR, 3, 128
|
||||
ADD_IF_GE BUFFER_PTR2, BLOCKS_CTR, 4, 128
|
||||
xchg WK_BUF, PRECALC_BUF
|
||||
|
||||
.align 32
|
||||
@@ -479,8 +491,8 @@ _loop:
|
||||
* we use K_BASE value as a signal of a last block,
|
||||
* it is set below by: cmovae BUFFER_PTR, K_BASE
|
||||
*/
|
||||
cmp K_BASE, BUFFER_PTR
|
||||
jne _begin
|
||||
test BLOCKS_CTR, BLOCKS_CTR
|
||||
jnz _begin
|
||||
.align 32
|
||||
jmp _end
|
||||
.align 32
|
||||
@@ -512,10 +524,10 @@ _loop0:
|
||||
.set j, j+2
|
||||
.endr
|
||||
|
||||
add $(2*64), BUFFER_PTR /* move to next odd-64-byte block */
|
||||
cmp BUFFER_END, BUFFER_PTR /* is current block the last one? */
|
||||
cmovae K_BASE, BUFFER_PTR /* signal the last iteration smartly */
|
||||
|
||||
/* Update Counter */
|
||||
sub $1, BLOCKS_CTR
|
||||
/* Move to the next block only if needed*/
|
||||
ADD_IF_GE BUFFER_PTR, BLOCKS_CTR, 4, 128
|
||||
/*
|
||||
* rounds
|
||||
* 60,62,64,66,68
|
||||
@@ -532,8 +544,8 @@ _loop0:
|
||||
UPDATE_HASH 12(HASH_PTR), D
|
||||
UPDATE_HASH 16(HASH_PTR), E
|
||||
|
||||
cmp K_BASE, BUFFER_PTR /* is current block the last one? */
|
||||
je _loop
|
||||
test BLOCKS_CTR, BLOCKS_CTR
|
||||
jz _loop
|
||||
|
||||
mov TB, B
|
||||
|
||||
@@ -575,10 +587,10 @@ _loop2:
|
||||
.set j, j+2
|
||||
.endr
|
||||
|
||||
add $(2*64), BUFFER_PTR2 /* move to next even-64-byte block */
|
||||
|
||||
cmp BUFFER_END, BUFFER_PTR2 /* is current block the last one */
|
||||
cmovae K_BASE, BUFFER_PTR /* signal the last iteration smartly */
|
||||
/* update counter */
|
||||
sub $1, BLOCKS_CTR
|
||||
/* Move to the next block only if needed*/
|
||||
ADD_IF_GE BUFFER_PTR2, BLOCKS_CTR, 4, 128
|
||||
|
||||
jmp _loop3
|
||||
_loop3:
|
||||
@@ -641,19 +653,12 @@ _loop3:
|
||||
|
||||
avx2_zeroupper
|
||||
|
||||
lea K_XMM_AR(%rip), K_BASE
|
||||
|
||||
/* Setup initial values */
|
||||
mov CTX, HASH_PTR
|
||||
mov BUF, BUFFER_PTR
|
||||
lea 64(BUF), BUFFER_PTR2
|
||||
|
||||
shl $6, CNT /* mul by 64 */
|
||||
add BUF, CNT
|
||||
add $64, CNT
|
||||
mov CNT, BUFFER_END
|
||||
|
||||
cmp BUFFER_END, BUFFER_PTR2
|
||||
cmovae K_BASE, BUFFER_PTR2
|
||||
mov BUF, BUFFER_PTR2
|
||||
mov CNT, BLOCKS_CTR
|
||||
|
||||
xmm_mov BSWAP_SHUFB_CTL(%rip), YMM_SHUFB_BSWAP
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ asmlinkage void sha1_transform_avx2(u32 *digest, const char *data,
|
||||
|
||||
static bool avx2_usable(void)
|
||||
{
|
||||
if (false && avx_usable() && boot_cpu_has(X86_FEATURE_AVX2)
|
||||
if (avx_usable() && boot_cpu_has(X86_FEATURE_AVX2)
|
||||
&& boot_cpu_has(X86_FEATURE_BMI1)
|
||||
&& boot_cpu_has(X86_FEATURE_BMI2))
|
||||
return true;
|
||||
|
||||
@@ -1215,6 +1215,8 @@ ENTRY(nmi)
|
||||
* other IST entries.
|
||||
*/
|
||||
|
||||
ASM_CLAC
|
||||
|
||||
/* Use %rdx as our temp variable throughout */
|
||||
pushq %rdx
|
||||
|
||||
|
||||
@@ -161,7 +161,13 @@ static u64 rapl_timer_ms;
|
||||
|
||||
static inline struct rapl_pmu *cpu_to_rapl_pmu(unsigned int cpu)
|
||||
{
|
||||
return rapl_pmus->pmus[topology_logical_package_id(cpu)];
|
||||
unsigned int pkgid = topology_logical_package_id(cpu);
|
||||
|
||||
/*
|
||||
* The unsigned check also catches the '-1' return value for non
|
||||
* existent mappings in the topology map.
|
||||
*/
|
||||
return pkgid < rapl_pmus->maxpkg ? rapl_pmus->pmus[pkgid] : NULL;
|
||||
}
|
||||
|
||||
static inline u64 rapl_read_counter(struct perf_event *event)
|
||||
@@ -402,6 +408,8 @@ static int rapl_pmu_event_init(struct perf_event *event)
|
||||
|
||||
/* must be done before validate_group */
|
||||
pmu = cpu_to_rapl_pmu(event->cpu);
|
||||
if (!pmu)
|
||||
return -EINVAL;
|
||||
event->cpu = pmu->cpu;
|
||||
event->pmu_private = pmu;
|
||||
event->hw.event_base = msr;
|
||||
@@ -585,6 +593,19 @@ static int rapl_cpu_online(unsigned int cpu)
|
||||
struct rapl_pmu *pmu = cpu_to_rapl_pmu(cpu);
|
||||
int target;
|
||||
|
||||
if (!pmu) {
|
||||
pmu = kzalloc_node(sizeof(*pmu), GFP_KERNEL, cpu_to_node(cpu));
|
||||
if (!pmu)
|
||||
return -ENOMEM;
|
||||
|
||||
raw_spin_lock_init(&pmu->lock);
|
||||
INIT_LIST_HEAD(&pmu->active_list);
|
||||
pmu->pmu = &rapl_pmus->pmu;
|
||||
pmu->timer_interval = ms_to_ktime(rapl_timer_ms);
|
||||
rapl_hrtimer_init(pmu);
|
||||
|
||||
rapl_pmus->pmus[topology_logical_package_id(cpu)] = pmu;
|
||||
}
|
||||
/*
|
||||
* Check if there is an online cpu in the package which collects rapl
|
||||
* events already.
|
||||
@@ -598,27 +619,6 @@ static int rapl_cpu_online(unsigned int cpu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rapl_cpu_prepare(unsigned int cpu)
|
||||
{
|
||||
struct rapl_pmu *pmu = cpu_to_rapl_pmu(cpu);
|
||||
|
||||
if (pmu)
|
||||
return 0;
|
||||
|
||||
pmu = kzalloc_node(sizeof(*pmu), GFP_KERNEL, cpu_to_node(cpu));
|
||||
if (!pmu)
|
||||
return -ENOMEM;
|
||||
|
||||
raw_spin_lock_init(&pmu->lock);
|
||||
INIT_LIST_HEAD(&pmu->active_list);
|
||||
pmu->pmu = &rapl_pmus->pmu;
|
||||
pmu->timer_interval = ms_to_ktime(rapl_timer_ms);
|
||||
pmu->cpu = -1;
|
||||
rapl_hrtimer_init(pmu);
|
||||
rapl_pmus->pmus[topology_logical_package_id(cpu)] = pmu;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int rapl_check_hw_unit(bool apply_quirk)
|
||||
{
|
||||
u64 msr_rapl_power_unit_bits;
|
||||
@@ -804,28 +804,21 @@ static int __init rapl_pmu_init(void)
|
||||
* Install callbacks. Core will call them for each online cpu.
|
||||
*/
|
||||
|
||||
ret = cpuhp_setup_state(CPUHP_PERF_X86_RAPL_PREP, "PERF_X86_RAPL_PREP",
|
||||
rapl_cpu_prepare, NULL);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
ret = cpuhp_setup_state(CPUHP_AP_PERF_X86_RAPL_ONLINE,
|
||||
"AP_PERF_X86_RAPL_ONLINE",
|
||||
rapl_cpu_online, rapl_cpu_offline);
|
||||
if (ret)
|
||||
goto out1;
|
||||
goto out;
|
||||
|
||||
ret = perf_pmu_register(&rapl_pmus->pmu, "power", -1);
|
||||
if (ret)
|
||||
goto out2;
|
||||
goto out1;
|
||||
|
||||
rapl_advertise();
|
||||
return 0;
|
||||
|
||||
out2:
|
||||
cpuhp_remove_state(CPUHP_AP_PERF_X86_RAPL_ONLINE);
|
||||
out1:
|
||||
cpuhp_remove_state(CPUHP_PERF_X86_RAPL_PREP);
|
||||
cpuhp_remove_state(CPUHP_AP_PERF_X86_RAPL_ONLINE);
|
||||
out:
|
||||
pr_warn("Initialization failed (%d), disabled\n", ret);
|
||||
cleanup_rapl_pmus();
|
||||
@@ -836,7 +829,6 @@ module_init(rapl_pmu_init);
|
||||
static void __exit intel_rapl_exit(void)
|
||||
{
|
||||
cpuhp_remove_state_nocalls(CPUHP_AP_PERF_X86_RAPL_ONLINE);
|
||||
cpuhp_remove_state_nocalls(CPUHP_PERF_X86_RAPL_PREP);
|
||||
perf_pmu_unregister(&rapl_pmus->pmu);
|
||||
cleanup_rapl_pmus();
|
||||
}
|
||||
|
||||
@@ -247,11 +247,11 @@ extern int force_personality32;
|
||||
|
||||
/*
|
||||
* This is the base location for PIE (ET_DYN with INTERP) loads. On
|
||||
* 64-bit, this is raised to 4GB to leave the entire 32-bit address
|
||||
* 64-bit, this is above 4GB to leave the entire 32-bit address
|
||||
* space open for things that want to use the area for 32-bit pointers.
|
||||
*/
|
||||
#define ELF_ET_DYN_BASE (mmap_is_ia32() ? 0x000400000UL : \
|
||||
0x100000000UL)
|
||||
(TASK_SIZE / 3 * 2))
|
||||
|
||||
/* This yields a mask that user programs can use to figure out what
|
||||
instruction set this CPU supports. This could be done in user space,
|
||||
|
||||
@@ -116,9 +116,7 @@ static inline int init_new_context(struct task_struct *tsk,
|
||||
mm->context.execute_only_pkey = -1;
|
||||
}
|
||||
#endif
|
||||
init_new_context_ldt(tsk, mm);
|
||||
|
||||
return 0;
|
||||
return init_new_context_ldt(tsk, mm);
|
||||
}
|
||||
static inline void destroy_context(struct mm_struct *mm)
|
||||
{
|
||||
|
||||
@@ -456,7 +456,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
|
||||
entry->ecx &= kvm_cpuid_7_0_ecx_x86_features;
|
||||
cpuid_mask(&entry->ecx, CPUID_7_ECX);
|
||||
/* PKU is not yet implemented for shadow paging. */
|
||||
if (!tdp_enabled)
|
||||
if (!tdp_enabled || !boot_cpu_has(X86_FEATURE_OSPKE))
|
||||
entry->ecx &= ~F(PKU);
|
||||
} else {
|
||||
entry->ebx = 0;
|
||||
|
||||
@@ -94,13 +94,11 @@ unsigned long __sync_fetch_and_or_4(unsigned long *p, unsigned long v)
|
||||
}
|
||||
EXPORT_SYMBOL(__sync_fetch_and_or_4);
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
/*
|
||||
* Networking support
|
||||
*/
|
||||
EXPORT_SYMBOL(csum_partial);
|
||||
EXPORT_SYMBOL(csum_partial_copy_generic);
|
||||
#endif /* CONFIG_NET */
|
||||
|
||||
/*
|
||||
* Architecture-specific symbols
|
||||
|
||||
@@ -103,6 +103,7 @@ void clear_user_highpage(struct page *page, unsigned long vaddr)
|
||||
clear_page_alias(kvaddr, paddr);
|
||||
preempt_enable();
|
||||
}
|
||||
EXPORT_SYMBOL(clear_user_highpage);
|
||||
|
||||
void copy_user_highpage(struct page *dst, struct page *src,
|
||||
unsigned long vaddr, struct vm_area_struct *vma)
|
||||
@@ -119,10 +120,7 @@ void copy_user_highpage(struct page *dst, struct page *src,
|
||||
copy_page_alias(dst_vaddr, src_vaddr, dst_paddr, src_paddr);
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
#endif /* DCACHE_WAY_SIZE > PAGE_SIZE */
|
||||
|
||||
#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
|
||||
EXPORT_SYMBOL(copy_user_highpage);
|
||||
|
||||
/*
|
||||
* Any time the kernel writes to a user page cache page, or it is about to
|
||||
@@ -176,7 +174,7 @@ void flush_dcache_page(struct page *page)
|
||||
|
||||
/* There shouldn't be an entry in the cache for this page anymore. */
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(flush_dcache_page);
|
||||
|
||||
/*
|
||||
* For now, flush the whole cache. FIXME??
|
||||
@@ -188,6 +186,7 @@ void local_flush_cache_range(struct vm_area_struct *vma,
|
||||
__flush_invalidate_dcache_all();
|
||||
__invalidate_icache_all();
|
||||
}
|
||||
EXPORT_SYMBOL(local_flush_cache_range);
|
||||
|
||||
/*
|
||||
* Remove any entry in the cache for this page.
|
||||
@@ -207,8 +206,9 @@ void local_flush_cache_page(struct vm_area_struct *vma, unsigned long address,
|
||||
__flush_invalidate_dcache_page_alias(virt, phys);
|
||||
__invalidate_icache_page_alias(virt, phys);
|
||||
}
|
||||
EXPORT_SYMBOL(local_flush_cache_page);
|
||||
|
||||
#endif
|
||||
#endif /* DCACHE_WAY_SIZE > PAGE_SIZE */
|
||||
|
||||
void
|
||||
update_mmu_cache(struct vm_area_struct * vma, unsigned long addr, pte_t *ptep)
|
||||
@@ -225,7 +225,7 @@ update_mmu_cache(struct vm_area_struct * vma, unsigned long addr, pte_t *ptep)
|
||||
|
||||
flush_tlb_page(vma, addr);
|
||||
|
||||
#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
|
||||
#if (DCACHE_WAY_SIZE > PAGE_SIZE)
|
||||
|
||||
if (!PageReserved(page) && test_bit(PG_arch_1, &page->flags)) {
|
||||
unsigned long phys = page_to_phys(page);
|
||||
@@ -256,7 +256,7 @@ update_mmu_cache(struct vm_area_struct * vma, unsigned long addr, pte_t *ptep)
|
||||
* flush_dcache_page() on the page.
|
||||
*/
|
||||
|
||||
#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
|
||||
#if (DCACHE_WAY_SIZE > PAGE_SIZE)
|
||||
|
||||
void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
|
||||
unsigned long vaddr, void *dst, const void *src,
|
||||
|
||||
@@ -36,12 +36,18 @@ int blk_mq_pci_map_queues(struct blk_mq_tag_set *set, struct pci_dev *pdev)
|
||||
for (queue = 0; queue < set->nr_hw_queues; queue++) {
|
||||
mask = pci_irq_get_affinity(pdev, queue);
|
||||
if (!mask)
|
||||
return -EINVAL;
|
||||
goto fallback;
|
||||
|
||||
for_each_cpu(cpu, mask)
|
||||
set->mq_map[cpu] = queue;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
fallback:
|
||||
WARN_ON_ONCE(set->nr_hw_queues > 1);
|
||||
for_each_possible_cpu(cpu)
|
||||
set->mq_map[cpu] = 0;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(blk_mq_pci_map_queues);
|
||||
|
||||
@@ -1072,6 +1072,7 @@ static int ghes_remove(struct platform_device *ghes_dev)
|
||||
if (list_empty(&ghes_sci))
|
||||
unregister_acpi_hed_notifier(&ghes_notifier_sci);
|
||||
mutex_unlock(&ghes_list_mutex);
|
||||
synchronize_rcu();
|
||||
break;
|
||||
case ACPI_HEST_NOTIFY_NMI:
|
||||
ghes_nmi_remove(ghes);
|
||||
|
||||
@@ -1728,7 +1728,7 @@ error:
|
||||
* functioning ECDT EC first in order to handle the events.
|
||||
* https://bugzilla.kernel.org/show_bug.cgi?id=115021
|
||||
*/
|
||||
int __init acpi_ec_ecdt_start(void)
|
||||
static int __init acpi_ec_ecdt_start(void)
|
||||
{
|
||||
acpi_handle handle;
|
||||
|
||||
@@ -1959,20 +1959,17 @@ static inline void acpi_ec_query_exit(void)
|
||||
int __init acpi_ec_init(void)
|
||||
{
|
||||
int result;
|
||||
int ecdt_fail, dsdt_fail;
|
||||
|
||||
/* register workqueue for _Qxx evaluations */
|
||||
result = acpi_ec_query_init();
|
||||
if (result)
|
||||
goto err_exit;
|
||||
/* Now register the driver for the EC */
|
||||
result = acpi_bus_register_driver(&acpi_ec_driver);
|
||||
if (result)
|
||||
goto err_exit;
|
||||
return result;
|
||||
|
||||
err_exit:
|
||||
if (result)
|
||||
acpi_ec_query_exit();
|
||||
return result;
|
||||
/* Drivers must be started after acpi_ec_query_init() */
|
||||
ecdt_fail = acpi_ec_ecdt_start();
|
||||
dsdt_fail = acpi_bus_register_driver(&acpi_ec_driver);
|
||||
return ecdt_fail && dsdt_fail ? -ENODEV : 0;
|
||||
}
|
||||
|
||||
/* EC driver currently not unloadable */
|
||||
|
||||
@@ -185,7 +185,6 @@ typedef int (*acpi_ec_query_func) (void *data);
|
||||
int acpi_ec_init(void);
|
||||
int acpi_ec_ecdt_probe(void);
|
||||
int acpi_ec_dsdt_probe(void);
|
||||
int acpi_ec_ecdt_start(void);
|
||||
void acpi_ec_block_transactions(void);
|
||||
void acpi_ec_unblock_transactions(void);
|
||||
int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit,
|
||||
|
||||
@@ -45,6 +45,12 @@ static acpi_status setup_res(struct acpi_resource *acpi_res, void *data)
|
||||
struct resource *res = data;
|
||||
struct resource_win win;
|
||||
|
||||
/*
|
||||
* We might assign this to 'res' later, make sure all pointers are
|
||||
* cleared before the resource is added to the global list
|
||||
*/
|
||||
memset(&win, 0, sizeof(win));
|
||||
|
||||
res->flags = 0;
|
||||
if (acpi_dev_filter_resource_type(acpi_res, IORESOURCE_MEM))
|
||||
return AE_OK;
|
||||
|
||||
@@ -2051,7 +2051,6 @@ int __init acpi_scan_init(void)
|
||||
|
||||
acpi_gpe_apply_masked_gpes();
|
||||
acpi_update_all_gpes();
|
||||
acpi_ec_ecdt_start();
|
||||
|
||||
acpi_scan_initialized = true;
|
||||
|
||||
|
||||
@@ -2112,9 +2112,9 @@ static int blkfront_resume(struct xenbus_device *dev)
|
||||
/*
|
||||
* Get the bios in the request so we can re-queue them.
|
||||
*/
|
||||
if (req_op(shadow[i].request) == REQ_OP_FLUSH ||
|
||||
req_op(shadow[i].request) == REQ_OP_DISCARD ||
|
||||
req_op(shadow[i].request) == REQ_OP_SECURE_ERASE ||
|
||||
if (req_op(shadow[j].request) == REQ_OP_FLUSH ||
|
||||
req_op(shadow[j].request) == REQ_OP_DISCARD ||
|
||||
req_op(shadow[j].request) == REQ_OP_SECURE_ERASE ||
|
||||
shadow[j].request->cmd_flags & REQ_FUA) {
|
||||
/*
|
||||
* Flush operations don't contain bios, so
|
||||
|
||||
@@ -1074,7 +1074,7 @@ static int aead_perform(struct aead_request *req, int encrypt,
|
||||
req_ctx->hmac_virt = dma_pool_alloc(buffer_pool, flags,
|
||||
&crypt->icv_rev_aes);
|
||||
if (unlikely(!req_ctx->hmac_virt))
|
||||
goto free_buf_src;
|
||||
goto free_buf_dst;
|
||||
if (!encrypt) {
|
||||
scatterwalk_map_and_copy(req_ctx->hmac_virt,
|
||||
req->src, cryptlen, authsize, 0);
|
||||
@@ -1089,10 +1089,10 @@ static int aead_perform(struct aead_request *req, int encrypt,
|
||||
BUG_ON(qmgr_stat_overflow(SEND_QID));
|
||||
return -EINPROGRESS;
|
||||
|
||||
free_buf_src:
|
||||
free_buf_chain(dev, req_ctx->src, crypt->src_buf);
|
||||
free_buf_dst:
|
||||
free_buf_chain(dev, req_ctx->dst, crypt->dst_buf);
|
||||
free_buf_src:
|
||||
free_buf_chain(dev, req_ctx->src, crypt->src_buf);
|
||||
crypt->ctl_flags = CTL_FLAG_UNUSED;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -1459,6 +1459,9 @@ int drm_atomic_check_only(struct drm_atomic_state *state)
|
||||
if (config->funcs->atomic_check)
|
||||
ret = config->funcs->atomic_check(state->dev, state);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!state->allow_modeset) {
|
||||
for_each_crtc_in_state(state, crtc, crtc_state, i) {
|
||||
if (drm_atomic_crtc_needs_modeset(crtc_state)) {
|
||||
@@ -1469,7 +1472,7 @@ int drm_atomic_check_only(struct drm_atomic_state *state)
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(drm_atomic_check_only);
|
||||
|
||||
|
||||
@@ -255,13 +255,13 @@ drm_gem_object_release_handle(int id, void *ptr, void *data)
|
||||
struct drm_gem_object *obj = ptr;
|
||||
struct drm_device *dev = obj->dev;
|
||||
|
||||
if (dev->driver->gem_close_object)
|
||||
dev->driver->gem_close_object(obj, file_priv);
|
||||
|
||||
if (drm_core_check_feature(dev, DRIVER_PRIME))
|
||||
drm_gem_remove_prime_handles(obj, file_priv);
|
||||
drm_vma_node_revoke(&obj->vma_node, file_priv);
|
||||
|
||||
if (dev->driver->gem_close_object)
|
||||
dev->driver->gem_close_object(obj, file_priv);
|
||||
|
||||
drm_gem_object_handle_unreference_unlocked(obj);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -264,8 +264,8 @@ static int submit_reloc(struct etnaviv_gem_submit *submit, void *stream,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (r->reloc_offset >= bo->obj->base.size - sizeof(*ptr)) {
|
||||
DRM_ERROR("relocation %u outside object", i);
|
||||
if (r->reloc_offset > bo->obj->base.size - sizeof(*ptr)) {
|
||||
DRM_ERROR("relocation %u outside object\n", i);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
@@ -394,6 +394,7 @@ static void broadwell_load_luts(struct drm_crtc_state *state)
|
||||
}
|
||||
|
||||
/* Program the max register to clamp values > 1.0. */
|
||||
i = lut_size - 1;
|
||||
I915_WRITE(PREC_PAL_GC_MAX(pipe, 0),
|
||||
drm_color_lut_extract(lut[i].red, 16));
|
||||
I915_WRITE(PREC_PAL_GC_MAX(pipe, 1),
|
||||
|
||||
@@ -149,8 +149,8 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc)
|
||||
rcar_du_group_write(rcrtc->group, rcrtc->index % 2 ? OTAR2 : OTAR, 0);
|
||||
|
||||
/* Signal polarities */
|
||||
value = ((mode->flags & DRM_MODE_FLAG_PVSYNC) ? 0 : DSMR_VSL)
|
||||
| ((mode->flags & DRM_MODE_FLAG_PHSYNC) ? 0 : DSMR_HSL)
|
||||
value = ((mode->flags & DRM_MODE_FLAG_PVSYNC) ? DSMR_VSL : 0)
|
||||
| ((mode->flags & DRM_MODE_FLAG_PHSYNC) ? DSMR_HSL : 0)
|
||||
| DSMR_DIPM_DISP | DSMR_CSPM;
|
||||
rcar_du_crtc_write(rcrtc, DSMR, value);
|
||||
|
||||
@@ -172,7 +172,7 @@ static void rcar_du_crtc_set_display_timing(struct rcar_du_crtc *rcrtc)
|
||||
mode->crtc_vsync_start - 1);
|
||||
rcar_du_crtc_write(rcrtc, VCR, mode->crtc_vtotal - 1);
|
||||
|
||||
rcar_du_crtc_write(rcrtc, DESR, mode->htotal - mode->hsync_start);
|
||||
rcar_du_crtc_write(rcrtc, DESR, mode->htotal - mode->hsync_start - 1);
|
||||
rcar_du_crtc_write(rcrtc, DEWR, mode->hdisplay);
|
||||
}
|
||||
|
||||
|
||||
@@ -453,13 +453,13 @@ static int rcar_du_encoders_init_one(struct rcar_du_device *rcdu,
|
||||
}
|
||||
|
||||
ret = rcar_du_encoder_init(rcdu, enc_type, output, encoder, connector);
|
||||
of_node_put(encoder);
|
||||
of_node_put(connector);
|
||||
|
||||
if (ret && ret != -EPROBE_DEFER)
|
||||
dev_warn(rcdu->dev,
|
||||
"failed to initialize encoder %s (%d), skipping\n",
|
||||
encoder->full_name, ret);
|
||||
"failed to initialize encoder %s on output %u (%d), skipping\n",
|
||||
of_node_full_name(encoder), output, ret);
|
||||
|
||||
of_node_put(encoder);
|
||||
of_node_put(connector);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ static void dw_i2c_plat_complete(struct device *dev)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int dw_i2c_plat_suspend(struct device *dev)
|
||||
static int dw_i2c_plat_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct dw_i2c_dev *i_dev = platform_get_drvdata(pdev);
|
||||
@@ -343,11 +343,21 @@ static int dw_i2c_plat_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int dw_i2c_plat_suspend(struct device *dev)
|
||||
{
|
||||
pm_runtime_resume(dev);
|
||||
return dw_i2c_plat_runtime_suspend(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct dev_pm_ops dw_i2c_dev_pm_ops = {
|
||||
.prepare = dw_i2c_plat_prepare,
|
||||
.complete = dw_i2c_plat_complete,
|
||||
SET_SYSTEM_SLEEP_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume)
|
||||
SET_RUNTIME_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume, NULL)
|
||||
SET_RUNTIME_PM_OPS(dw_i2c_plat_runtime_suspend,
|
||||
dw_i2c_plat_resume,
|
||||
NULL)
|
||||
};
|
||||
|
||||
#define DW_I2C_DEV_PMOPS (&dw_i2c_dev_pm_ops)
|
||||
|
||||
@@ -193,7 +193,6 @@ struct bmc150_accel_data {
|
||||
struct regmap *regmap;
|
||||
int irq;
|
||||
struct bmc150_accel_interrupt interrupts[BMC150_ACCEL_INTERRUPTS];
|
||||
atomic_t active_intr;
|
||||
struct bmc150_accel_trigger triggers[BMC150_ACCEL_TRIGGERS];
|
||||
struct mutex mutex;
|
||||
u8 fifo_mode, watermark;
|
||||
@@ -493,11 +492,6 @@ static int bmc150_accel_set_interrupt(struct bmc150_accel_data *data, int i,
|
||||
goto out_fix_power_state;
|
||||
}
|
||||
|
||||
if (state)
|
||||
atomic_inc(&data->active_intr);
|
||||
else
|
||||
atomic_dec(&data->active_intr);
|
||||
|
||||
return 0;
|
||||
|
||||
out_fix_power_state:
|
||||
@@ -1709,8 +1703,7 @@ static int bmc150_accel_resume(struct device *dev)
|
||||
struct bmc150_accel_data *data = iio_priv(indio_dev);
|
||||
|
||||
mutex_lock(&data->mutex);
|
||||
if (atomic_read(&data->active_intr))
|
||||
bmc150_accel_set_mode(data, BMC150_ACCEL_SLEEP_MODE_NORMAL, 0);
|
||||
bmc150_accel_set_mode(data, BMC150_ACCEL_SLEEP_MODE_NORMAL, 0);
|
||||
bmc150_accel_fifo_set_mode(data);
|
||||
mutex_unlock(&data->mutex);
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
#define VF610_ADC_ADSTS_MASK 0x300
|
||||
#define VF610_ADC_ADLPC_EN 0x80
|
||||
#define VF610_ADC_ADHSC_EN 0x400
|
||||
#define VF610_ADC_REFSEL_VALT 0x100
|
||||
#define VF610_ADC_REFSEL_VALT 0x800
|
||||
#define VF610_ADC_REFSEL_VBG 0x1000
|
||||
#define VF610_ADC_ADTRG_HARD 0x2000
|
||||
#define VF610_ADC_AVGS_8 0x4000
|
||||
|
||||
@@ -36,8 +36,6 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state)
|
||||
s32 poll_value = 0;
|
||||
|
||||
if (state) {
|
||||
if (!atomic_read(&st->user_requested_state))
|
||||
return 0;
|
||||
if (sensor_hub_device_open(st->hsdev))
|
||||
return -EIO;
|
||||
|
||||
@@ -86,6 +84,9 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state)
|
||||
&report_val);
|
||||
}
|
||||
|
||||
pr_debug("HID_SENSOR %s set power_state %d report_state %d\n",
|
||||
st->pdev->name, state_val, report_val);
|
||||
|
||||
sensor_hub_get_feature(st->hsdev, st->power_state.report_id,
|
||||
st->power_state.index,
|
||||
sizeof(state_val), &state_val);
|
||||
@@ -107,6 +108,7 @@ int hid_sensor_power_state(struct hid_sensor_common *st, bool state)
|
||||
ret = pm_runtime_get_sync(&st->pdev->dev);
|
||||
else {
|
||||
pm_runtime_mark_last_busy(&st->pdev->dev);
|
||||
pm_runtime_use_autosuspend(&st->pdev->dev);
|
||||
ret = pm_runtime_put_autosuspend(&st->pdev->dev);
|
||||
}
|
||||
if (ret < 0) {
|
||||
@@ -201,8 +203,6 @@ int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name,
|
||||
/* Default to 3 seconds, but can be changed from sysfs */
|
||||
pm_runtime_set_autosuspend_delay(&attrb->pdev->dev,
|
||||
3000);
|
||||
pm_runtime_use_autosuspend(&attrb->pdev->dev);
|
||||
|
||||
return ret;
|
||||
error_unreg_trigger:
|
||||
iio_trigger_unregister(trig);
|
||||
|
||||
@@ -696,7 +696,7 @@ static const struct adis16480_chip_info adis16480_chip_info[] = {
|
||||
.gyro_max_val = IIO_RAD_TO_DEGREE(22500),
|
||||
.gyro_max_scale = 450,
|
||||
.accel_max_val = IIO_M_S_2_TO_G(12500),
|
||||
.accel_max_scale = 5,
|
||||
.accel_max_scale = 10,
|
||||
},
|
||||
[ADIS16485] = {
|
||||
.channels = adis16485_channels,
|
||||
|
||||
@@ -626,7 +626,7 @@ static irqreturn_t tsl2563_event_handler(int irq, void *private)
|
||||
struct tsl2563_chip *chip = iio_priv(dev_info);
|
||||
|
||||
iio_push_event(dev_info,
|
||||
IIO_UNMOD_EVENT_CODE(IIO_LIGHT,
|
||||
IIO_UNMOD_EVENT_CODE(IIO_INTENSITY,
|
||||
0,
|
||||
IIO_EV_TYPE_THRESH,
|
||||
IIO_EV_DIR_EITHER),
|
||||
|
||||
@@ -1212,14 +1212,24 @@ static int alps_decode_ss4_v2(struct alps_fields *f,
|
||||
|
||||
case SS4_PACKET_ID_TWO:
|
||||
if (priv->flags & ALPS_BUTTONPAD) {
|
||||
f->mt[0].x = SS4_BTL_MF_X_V2(p, 0);
|
||||
if (IS_SS4PLUS_DEV(priv->dev_id)) {
|
||||
f->mt[0].x = SS4_PLUS_BTL_MF_X_V2(p, 0);
|
||||
f->mt[1].x = SS4_PLUS_BTL_MF_X_V2(p, 1);
|
||||
} else {
|
||||
f->mt[0].x = SS4_BTL_MF_X_V2(p, 0);
|
||||
f->mt[1].x = SS4_BTL_MF_X_V2(p, 1);
|
||||
}
|
||||
f->mt[0].y = SS4_BTL_MF_Y_V2(p, 0);
|
||||
f->mt[1].x = SS4_BTL_MF_X_V2(p, 1);
|
||||
f->mt[1].y = SS4_BTL_MF_Y_V2(p, 1);
|
||||
} else {
|
||||
f->mt[0].x = SS4_STD_MF_X_V2(p, 0);
|
||||
if (IS_SS4PLUS_DEV(priv->dev_id)) {
|
||||
f->mt[0].x = SS4_PLUS_STD_MF_X_V2(p, 0);
|
||||
f->mt[1].x = SS4_PLUS_STD_MF_X_V2(p, 1);
|
||||
} else {
|
||||
f->mt[0].x = SS4_STD_MF_X_V2(p, 0);
|
||||
f->mt[1].x = SS4_STD_MF_X_V2(p, 1);
|
||||
}
|
||||
f->mt[0].y = SS4_STD_MF_Y_V2(p, 0);
|
||||
f->mt[1].x = SS4_STD_MF_X_V2(p, 1);
|
||||
f->mt[1].y = SS4_STD_MF_Y_V2(p, 1);
|
||||
}
|
||||
f->pressure = SS4_MF_Z_V2(p, 0) ? 0x30 : 0;
|
||||
@@ -1236,16 +1246,27 @@ static int alps_decode_ss4_v2(struct alps_fields *f,
|
||||
|
||||
case SS4_PACKET_ID_MULTI:
|
||||
if (priv->flags & ALPS_BUTTONPAD) {
|
||||
f->mt[2].x = SS4_BTL_MF_X_V2(p, 0);
|
||||
if (IS_SS4PLUS_DEV(priv->dev_id)) {
|
||||
f->mt[0].x = SS4_PLUS_BTL_MF_X_V2(p, 0);
|
||||
f->mt[1].x = SS4_PLUS_BTL_MF_X_V2(p, 1);
|
||||
} else {
|
||||
f->mt[2].x = SS4_BTL_MF_X_V2(p, 0);
|
||||
f->mt[3].x = SS4_BTL_MF_X_V2(p, 1);
|
||||
}
|
||||
|
||||
f->mt[2].y = SS4_BTL_MF_Y_V2(p, 0);
|
||||
f->mt[3].x = SS4_BTL_MF_X_V2(p, 1);
|
||||
f->mt[3].y = SS4_BTL_MF_Y_V2(p, 1);
|
||||
no_data_x = SS4_MFPACKET_NO_AX_BL;
|
||||
no_data_y = SS4_MFPACKET_NO_AY_BL;
|
||||
} else {
|
||||
f->mt[2].x = SS4_STD_MF_X_V2(p, 0);
|
||||
if (IS_SS4PLUS_DEV(priv->dev_id)) {
|
||||
f->mt[0].x = SS4_PLUS_STD_MF_X_V2(p, 0);
|
||||
f->mt[1].x = SS4_PLUS_STD_MF_X_V2(p, 1);
|
||||
} else {
|
||||
f->mt[0].x = SS4_STD_MF_X_V2(p, 0);
|
||||
f->mt[1].x = SS4_STD_MF_X_V2(p, 1);
|
||||
}
|
||||
f->mt[2].y = SS4_STD_MF_Y_V2(p, 0);
|
||||
f->mt[3].x = SS4_STD_MF_X_V2(p, 1);
|
||||
f->mt[3].y = SS4_STD_MF_Y_V2(p, 1);
|
||||
no_data_x = SS4_MFPACKET_NO_AX;
|
||||
no_data_y = SS4_MFPACKET_NO_AY;
|
||||
@@ -2535,8 +2556,8 @@ static int alps_set_defaults_ss4_v2(struct psmouse *psmouse,
|
||||
|
||||
memset(otp, 0, sizeof(otp));
|
||||
|
||||
if (alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]) ||
|
||||
alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]))
|
||||
if (alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]) ||
|
||||
alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]))
|
||||
return -1;
|
||||
|
||||
alps_update_device_area_ss4_v2(otp, priv);
|
||||
|
||||
@@ -91,6 +91,10 @@ enum SS4_PACKET_ID {
|
||||
((_b[1 + _i * 3] << 5) & 0x1F00) \
|
||||
)
|
||||
|
||||
#define SS4_PLUS_STD_MF_X_V2(_b, _i) (((_b[0 + (_i) * 3] << 4) & 0x0070) | \
|
||||
((_b[1 + (_i) * 3] << 4) & 0x0F80) \
|
||||
)
|
||||
|
||||
#define SS4_STD_MF_Y_V2(_b, _i) (((_b[1 + (_i) * 3] << 3) & 0x0010) | \
|
||||
((_b[2 + (_i) * 3] << 5) & 0x01E0) | \
|
||||
((_b[2 + (_i) * 3] << 4) & 0x0E00) \
|
||||
@@ -100,6 +104,10 @@ enum SS4_PACKET_ID {
|
||||
((_b[0 + (_i) * 3] >> 3) & 0x0010) \
|
||||
)
|
||||
|
||||
#define SS4_PLUS_BTL_MF_X_V2(_b, _i) (SS4_PLUS_STD_MF_X_V2(_b, _i) | \
|
||||
((_b[0 + (_i) * 3] >> 4) & 0x0008) \
|
||||
)
|
||||
|
||||
#define SS4_BTL_MF_Y_V2(_b, _i) (SS4_STD_MF_Y_V2(_b, _i) | \
|
||||
((_b[0 + (_i) * 3] >> 3) & 0x0008) \
|
||||
)
|
||||
|
||||
@@ -1234,7 +1234,12 @@ static const struct acpi_device_id elan_acpi_id[] = {
|
||||
{ "ELAN0000", 0 },
|
||||
{ "ELAN0100", 0 },
|
||||
{ "ELAN0600", 0 },
|
||||
{ "ELAN0602", 0 },
|
||||
{ "ELAN0605", 0 },
|
||||
{ "ELAN0608", 0 },
|
||||
{ "ELAN0605", 0 },
|
||||
{ "ELAN0609", 0 },
|
||||
{ "ELAN060B", 0 },
|
||||
{ "ELAN1000", 0 },
|
||||
{ }
|
||||
};
|
||||
|
||||
@@ -265,7 +265,8 @@ static int trackpoint_start_protocol(struct psmouse *psmouse, unsigned char *fir
|
||||
if (ps2_command(&psmouse->ps2dev, param, MAKE_PS2_CMD(0, 2, TP_READ_ID)))
|
||||
return -1;
|
||||
|
||||
if (param[0] != TP_MAGIC_IDENT)
|
||||
/* add new TP ID. */
|
||||
if (!(param[0] & TP_MAGIC_IDENT))
|
||||
return -1;
|
||||
|
||||
if (firmware_id)
|
||||
|
||||
@@ -21,8 +21,9 @@
|
||||
#define TP_COMMAND 0xE2 /* Commands start with this */
|
||||
|
||||
#define TP_READ_ID 0xE1 /* Sent for device identification */
|
||||
#define TP_MAGIC_IDENT 0x01 /* Sent after a TP_READ_ID followed */
|
||||
#define TP_MAGIC_IDENT 0x03 /* Sent after a TP_READ_ID followed */
|
||||
/* by the firmware ID */
|
||||
/* Firmware ID includes 0x1, 0x2, 0x3 */
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -142,9 +142,9 @@ void __init aic_common_rtc_irq_fixup(struct device_node *root)
|
||||
struct device_node *np;
|
||||
void __iomem *regs;
|
||||
|
||||
np = of_find_compatible_node(root, NULL, "atmel,at91rm9200-rtc");
|
||||
np = of_find_compatible_node(NULL, NULL, "atmel,at91rm9200-rtc");
|
||||
if (!np)
|
||||
np = of_find_compatible_node(root, NULL,
|
||||
np = of_find_compatible_node(NULL, NULL,
|
||||
"atmel,at91sam9x5-rtc");
|
||||
|
||||
if (!np)
|
||||
@@ -196,7 +196,6 @@ static void __init aic_common_irq_fixup(const struct of_device_id *matches)
|
||||
return;
|
||||
|
||||
match = of_match_node(matches, root);
|
||||
of_node_put(root);
|
||||
|
||||
if (match) {
|
||||
void (*fixup)(struct device_node *) = match->data;
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/suspend.h>
|
||||
#include "../leds.h"
|
||||
|
||||
static int panic_heartbeats;
|
||||
@@ -155,30 +154,6 @@ static struct led_trigger heartbeat_led_trigger = {
|
||||
.deactivate = heartbeat_trig_deactivate,
|
||||
};
|
||||
|
||||
static int heartbeat_pm_notifier(struct notifier_block *nb,
|
||||
unsigned long pm_event, void *unused)
|
||||
{
|
||||
int rc;
|
||||
|
||||
switch (pm_event) {
|
||||
case PM_SUSPEND_PREPARE:
|
||||
case PM_HIBERNATION_PREPARE:
|
||||
case PM_RESTORE_PREPARE:
|
||||
led_trigger_unregister(&heartbeat_led_trigger);
|
||||
break;
|
||||
case PM_POST_SUSPEND:
|
||||
case PM_POST_HIBERNATION:
|
||||
case PM_POST_RESTORE:
|
||||
rc = led_trigger_register(&heartbeat_led_trigger);
|
||||
if (rc)
|
||||
pr_err("could not re-register heartbeat trigger\n");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
static int heartbeat_reboot_notifier(struct notifier_block *nb,
|
||||
unsigned long code, void *unused)
|
||||
{
|
||||
@@ -193,10 +168,6 @@ static int heartbeat_panic_notifier(struct notifier_block *nb,
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
static struct notifier_block heartbeat_pm_nb = {
|
||||
.notifier_call = heartbeat_pm_notifier,
|
||||
};
|
||||
|
||||
static struct notifier_block heartbeat_reboot_nb = {
|
||||
.notifier_call = heartbeat_reboot_notifier,
|
||||
};
|
||||
@@ -213,14 +184,12 @@ static int __init heartbeat_trig_init(void)
|
||||
atomic_notifier_chain_register(&panic_notifier_list,
|
||||
&heartbeat_panic_nb);
|
||||
register_reboot_notifier(&heartbeat_reboot_nb);
|
||||
register_pm_notifier(&heartbeat_pm_nb);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void __exit heartbeat_trig_exit(void)
|
||||
{
|
||||
unregister_pm_notifier(&heartbeat_pm_nb);
|
||||
unregister_reboot_notifier(&heartbeat_reboot_nb);
|
||||
atomic_notifier_chain_unregister(&panic_notifier_list,
|
||||
&heartbeat_panic_nb);
|
||||
|
||||
@@ -774,6 +774,13 @@ config UID_SYS_STATS
|
||||
Per UID based io statistics exported to /proc/uid_io
|
||||
Per UID based procstat control in /proc/uid_procstat
|
||||
|
||||
config UID_SYS_STATS_DEBUG
|
||||
bool "Per-TASK statistics"
|
||||
depends on UID_SYS_STATS
|
||||
default n
|
||||
help
|
||||
Per TASK based io statistics exported to /proc/uid_io
|
||||
|
||||
config MEMORY_STATE_TIME
|
||||
tristate "Memory freq/bandwidth time statistics"
|
||||
depends on PROFILING
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/profile.h>
|
||||
#include <linux/rtmutex.h>
|
||||
@@ -53,6 +54,15 @@ struct io_stats {
|
||||
#define UID_STATE_DEAD_TASKS 4
|
||||
#define UID_STATE_SIZE 5
|
||||
|
||||
#define MAX_TASK_COMM_LEN 256
|
||||
|
||||
struct task_entry {
|
||||
char comm[MAX_TASK_COMM_LEN];
|
||||
pid_t pid;
|
||||
struct io_stats io[UID_STATE_SIZE];
|
||||
struct hlist_node hash;
|
||||
};
|
||||
|
||||
struct uid_entry {
|
||||
uid_t uid;
|
||||
cputime_t utime;
|
||||
@@ -62,8 +72,231 @@ struct uid_entry {
|
||||
int state;
|
||||
struct io_stats io[UID_STATE_SIZE];
|
||||
struct hlist_node hash;
|
||||
#ifdef CONFIG_UID_SYS_STATS_DEBUG
|
||||
DECLARE_HASHTABLE(task_entries, UID_HASH_BITS);
|
||||
#endif
|
||||
};
|
||||
|
||||
static u64 compute_write_bytes(struct task_struct *task)
|
||||
{
|
||||
if (task->ioac.write_bytes <= task->ioac.cancelled_write_bytes)
|
||||
return 0;
|
||||
|
||||
return task->ioac.write_bytes - task->ioac.cancelled_write_bytes;
|
||||
}
|
||||
|
||||
static void compute_io_bucket_stats(struct io_stats *io_bucket,
|
||||
struct io_stats *io_curr,
|
||||
struct io_stats *io_last,
|
||||
struct io_stats *io_dead)
|
||||
{
|
||||
/* tasks could switch to another uid group, but its io_last in the
|
||||
* previous uid group could still be positive.
|
||||
* therefore before each update, do an overflow check first
|
||||
*/
|
||||
int64_t delta;
|
||||
|
||||
delta = io_curr->read_bytes + io_dead->read_bytes -
|
||||
io_last->read_bytes;
|
||||
io_bucket->read_bytes += delta > 0 ? delta : 0;
|
||||
delta = io_curr->write_bytes + io_dead->write_bytes -
|
||||
io_last->write_bytes;
|
||||
io_bucket->write_bytes += delta > 0 ? delta : 0;
|
||||
delta = io_curr->rchar + io_dead->rchar - io_last->rchar;
|
||||
io_bucket->rchar += delta > 0 ? delta : 0;
|
||||
delta = io_curr->wchar + io_dead->wchar - io_last->wchar;
|
||||
io_bucket->wchar += delta > 0 ? delta : 0;
|
||||
delta = io_curr->fsync + io_dead->fsync - io_last->fsync;
|
||||
io_bucket->fsync += delta > 0 ? delta : 0;
|
||||
|
||||
io_last->read_bytes = io_curr->read_bytes;
|
||||
io_last->write_bytes = io_curr->write_bytes;
|
||||
io_last->rchar = io_curr->rchar;
|
||||
io_last->wchar = io_curr->wchar;
|
||||
io_last->fsync = io_curr->fsync;
|
||||
|
||||
memset(io_dead, 0, sizeof(struct io_stats));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_UID_SYS_STATS_DEBUG
|
||||
static void get_full_task_comm(struct task_entry *task_entry,
|
||||
struct task_struct *task)
|
||||
{
|
||||
int i = 0, offset = 0, len = 0;
|
||||
/* save one byte for terminating null character */
|
||||
int unused_len = MAX_TASK_COMM_LEN - TASK_COMM_LEN - 1;
|
||||
char buf[unused_len];
|
||||
struct mm_struct *mm = task->mm;
|
||||
|
||||
/* fill the first TASK_COMM_LEN bytes with thread name */
|
||||
get_task_comm(task_entry->comm, task);
|
||||
i = strlen(task_entry->comm);
|
||||
while (i < TASK_COMM_LEN)
|
||||
task_entry->comm[i++] = ' ';
|
||||
|
||||
/* next the executable file name */
|
||||
if (mm) {
|
||||
down_read(&mm->mmap_sem);
|
||||
if (mm->exe_file) {
|
||||
char *pathname = d_path(&mm->exe_file->f_path, buf,
|
||||
unused_len);
|
||||
|
||||
if (!IS_ERR(pathname)) {
|
||||
len = strlcpy(task_entry->comm + i, pathname,
|
||||
unused_len);
|
||||
i += len;
|
||||
task_entry->comm[i++] = ' ';
|
||||
unused_len--;
|
||||
}
|
||||
}
|
||||
up_read(&mm->mmap_sem);
|
||||
}
|
||||
unused_len -= len;
|
||||
|
||||
/* fill the rest with command line argument
|
||||
* replace each null or new line character
|
||||
* between args in argv with whitespace */
|
||||
len = get_cmdline(task, buf, unused_len);
|
||||
while (offset < len) {
|
||||
if (buf[offset] != '\0' && buf[offset] != '\n')
|
||||
task_entry->comm[i++] = buf[offset];
|
||||
else
|
||||
task_entry->comm[i++] = ' ';
|
||||
offset++;
|
||||
}
|
||||
|
||||
/* get rid of trailing whitespaces in case when arg is memset to
|
||||
* zero before being reset in userspace
|
||||
*/
|
||||
while (task_entry->comm[i-1] == ' ')
|
||||
i--;
|
||||
task_entry->comm[i] = '\0';
|
||||
}
|
||||
|
||||
static struct task_entry *find_task_entry(struct uid_entry *uid_entry,
|
||||
struct task_struct *task)
|
||||
{
|
||||
struct task_entry *task_entry;
|
||||
|
||||
hash_for_each_possible(uid_entry->task_entries, task_entry, hash,
|
||||
task->pid) {
|
||||
if (task->pid == task_entry->pid) {
|
||||
/* if thread name changed, update the entire command */
|
||||
int len = strnchr(task_entry->comm, ' ', TASK_COMM_LEN)
|
||||
- task_entry->comm;
|
||||
|
||||
if (strncmp(task_entry->comm, task->comm, len))
|
||||
get_full_task_comm(task_entry, task);
|
||||
return task_entry;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct task_entry *find_or_register_task(struct uid_entry *uid_entry,
|
||||
struct task_struct *task)
|
||||
{
|
||||
struct task_entry *task_entry;
|
||||
pid_t pid = task->pid;
|
||||
|
||||
task_entry = find_task_entry(uid_entry, task);
|
||||
if (task_entry)
|
||||
return task_entry;
|
||||
|
||||
task_entry = kzalloc(sizeof(struct task_entry), GFP_ATOMIC);
|
||||
if (!task_entry)
|
||||
return NULL;
|
||||
|
||||
get_full_task_comm(task_entry, task);
|
||||
|
||||
task_entry->pid = pid;
|
||||
hash_add(uid_entry->task_entries, &task_entry->hash, (unsigned int)pid);
|
||||
|
||||
return task_entry;
|
||||
}
|
||||
|
||||
static void remove_uid_tasks(struct uid_entry *uid_entry)
|
||||
{
|
||||
struct task_entry *task_entry;
|
||||
unsigned long bkt_task;
|
||||
struct hlist_node *tmp_task;
|
||||
|
||||
hash_for_each_safe(uid_entry->task_entries, bkt_task,
|
||||
tmp_task, task_entry, hash) {
|
||||
hash_del(&task_entry->hash);
|
||||
kfree(task_entry);
|
||||
}
|
||||
}
|
||||
|
||||
static void set_io_uid_tasks_zero(struct uid_entry *uid_entry)
|
||||
{
|
||||
struct task_entry *task_entry;
|
||||
unsigned long bkt_task;
|
||||
|
||||
hash_for_each(uid_entry->task_entries, bkt_task, task_entry, hash) {
|
||||
memset(&task_entry->io[UID_STATE_TOTAL_CURR], 0,
|
||||
sizeof(struct io_stats));
|
||||
}
|
||||
}
|
||||
|
||||
static void add_uid_tasks_io_stats(struct uid_entry *uid_entry,
|
||||
struct task_struct *task, int slot)
|
||||
{
|
||||
struct task_entry *task_entry = find_or_register_task(uid_entry, task);
|
||||
struct io_stats *task_io_slot = &task_entry->io[slot];
|
||||
|
||||
task_io_slot->read_bytes += task->ioac.read_bytes;
|
||||
task_io_slot->write_bytes += compute_write_bytes(task);
|
||||
task_io_slot->rchar += task->ioac.rchar;
|
||||
task_io_slot->wchar += task->ioac.wchar;
|
||||
task_io_slot->fsync += task->ioac.syscfs;
|
||||
}
|
||||
|
||||
static void compute_io_uid_tasks(struct uid_entry *uid_entry)
|
||||
{
|
||||
struct task_entry *task_entry;
|
||||
unsigned long bkt_task;
|
||||
|
||||
hash_for_each(uid_entry->task_entries, bkt_task, task_entry, hash) {
|
||||
compute_io_bucket_stats(&task_entry->io[uid_entry->state],
|
||||
&task_entry->io[UID_STATE_TOTAL_CURR],
|
||||
&task_entry->io[UID_STATE_TOTAL_LAST],
|
||||
&task_entry->io[UID_STATE_DEAD_TASKS]);
|
||||
}
|
||||
}
|
||||
|
||||
static void show_io_uid_tasks(struct seq_file *m, struct uid_entry *uid_entry)
|
||||
{
|
||||
struct task_entry *task_entry;
|
||||
unsigned long bkt_task;
|
||||
|
||||
hash_for_each(uid_entry->task_entries, bkt_task, task_entry, hash) {
|
||||
/* Separated by comma because space exists in task comm */
|
||||
seq_printf(m, "task,%s,%lu,%llu,%llu,%llu,%llu,%llu,%llu,%llu,%llu,%llu,%llu\n",
|
||||
task_entry->comm,
|
||||
(unsigned long)task_entry->pid,
|
||||
task_entry->io[UID_STATE_FOREGROUND].rchar,
|
||||
task_entry->io[UID_STATE_FOREGROUND].wchar,
|
||||
task_entry->io[UID_STATE_FOREGROUND].read_bytes,
|
||||
task_entry->io[UID_STATE_FOREGROUND].write_bytes,
|
||||
task_entry->io[UID_STATE_BACKGROUND].rchar,
|
||||
task_entry->io[UID_STATE_BACKGROUND].wchar,
|
||||
task_entry->io[UID_STATE_BACKGROUND].read_bytes,
|
||||
task_entry->io[UID_STATE_BACKGROUND].write_bytes,
|
||||
task_entry->io[UID_STATE_FOREGROUND].fsync,
|
||||
task_entry->io[UID_STATE_BACKGROUND].fsync);
|
||||
}
|
||||
}
|
||||
#else
|
||||
static void remove_uid_tasks(struct uid_entry *uid_entry) {};
|
||||
static void set_io_uid_tasks_zero(struct uid_entry *uid_entry) {};
|
||||
static void add_uid_tasks_io_stats(struct uid_entry *uid_entry,
|
||||
struct task_struct *task, int slot) {};
|
||||
static void compute_io_uid_tasks(struct uid_entry *uid_entry) {};
|
||||
static void show_io_uid_tasks(struct seq_file *m,
|
||||
struct uid_entry *uid_entry) {}
|
||||
#endif
|
||||
|
||||
static struct uid_entry *find_uid_entry(uid_t uid)
|
||||
{
|
||||
struct uid_entry *uid_entry;
|
||||
@@ -87,7 +320,9 @@ static struct uid_entry *find_or_register_uid(uid_t uid)
|
||||
return NULL;
|
||||
|
||||
uid_entry->uid = uid;
|
||||
|
||||
#ifdef CONFIG_UID_SYS_STATS_DEBUG
|
||||
hash_init(uid_entry->task_entries);
|
||||
#endif
|
||||
hash_add(hash_table, &uid_entry->hash, uid);
|
||||
|
||||
return uid_entry;
|
||||
@@ -193,6 +428,7 @@ static ssize_t uid_remove_write(struct file *file,
|
||||
hash_for_each_possible_safe(hash_table, uid_entry, tmp,
|
||||
hash, (uid_t)uid_start) {
|
||||
if (uid_start == uid_entry->uid) {
|
||||
remove_uid_tasks(uid_entry);
|
||||
hash_del(&uid_entry->hash);
|
||||
kfree(uid_entry);
|
||||
}
|
||||
@@ -209,13 +445,6 @@ static const struct file_operations uid_remove_fops = {
|
||||
.write = uid_remove_write,
|
||||
};
|
||||
|
||||
static u64 compute_write_bytes(struct task_struct *task)
|
||||
{
|
||||
if (task->ioac.write_bytes <= task->ioac.cancelled_write_bytes)
|
||||
return 0;
|
||||
|
||||
return task->ioac.write_bytes - task->ioac.cancelled_write_bytes;
|
||||
}
|
||||
|
||||
static void add_uid_io_stats(struct uid_entry *uid_entry,
|
||||
struct task_struct *task, int slot)
|
||||
@@ -227,28 +456,8 @@ static void add_uid_io_stats(struct uid_entry *uid_entry,
|
||||
io_slot->rchar += task->ioac.rchar;
|
||||
io_slot->wchar += task->ioac.wchar;
|
||||
io_slot->fsync += task->ioac.syscfs;
|
||||
}
|
||||
|
||||
static void compute_uid_io_bucket_stats(struct io_stats *io_bucket,
|
||||
struct io_stats *io_curr,
|
||||
struct io_stats *io_last,
|
||||
struct io_stats *io_dead)
|
||||
{
|
||||
io_bucket->read_bytes += io_curr->read_bytes + io_dead->read_bytes -
|
||||
io_last->read_bytes;
|
||||
io_bucket->write_bytes += io_curr->write_bytes + io_dead->write_bytes -
|
||||
io_last->write_bytes;
|
||||
io_bucket->rchar += io_curr->rchar + io_dead->rchar - io_last->rchar;
|
||||
io_bucket->wchar += io_curr->wchar + io_dead->wchar - io_last->wchar;
|
||||
io_bucket->fsync += io_curr->fsync + io_dead->fsync - io_last->fsync;
|
||||
|
||||
io_last->read_bytes = io_curr->read_bytes;
|
||||
io_last->write_bytes = io_curr->write_bytes;
|
||||
io_last->rchar = io_curr->rchar;
|
||||
io_last->wchar = io_curr->wchar;
|
||||
io_last->fsync = io_curr->fsync;
|
||||
|
||||
memset(io_dead, 0, sizeof(struct io_stats));
|
||||
add_uid_tasks_io_stats(uid_entry, task, slot);
|
||||
}
|
||||
|
||||
static void update_io_stats_all_locked(void)
|
||||
@@ -259,9 +468,11 @@ static void update_io_stats_all_locked(void)
|
||||
unsigned long bkt;
|
||||
uid_t uid;
|
||||
|
||||
hash_for_each(hash_table, bkt, uid_entry, hash)
|
||||
hash_for_each(hash_table, bkt, uid_entry, hash) {
|
||||
memset(&uid_entry->io[UID_STATE_TOTAL_CURR], 0,
|
||||
sizeof(struct io_stats));
|
||||
set_io_uid_tasks_zero(uid_entry);
|
||||
}
|
||||
|
||||
rcu_read_lock();
|
||||
do_each_thread(temp, task) {
|
||||
@@ -275,10 +486,11 @@ static void update_io_stats_all_locked(void)
|
||||
rcu_read_unlock();
|
||||
|
||||
hash_for_each(hash_table, bkt, uid_entry, hash) {
|
||||
compute_uid_io_bucket_stats(&uid_entry->io[uid_entry->state],
|
||||
compute_io_bucket_stats(&uid_entry->io[uid_entry->state],
|
||||
&uid_entry->io[UID_STATE_TOTAL_CURR],
|
||||
&uid_entry->io[UID_STATE_TOTAL_LAST],
|
||||
&uid_entry->io[UID_STATE_DEAD_TASKS]);
|
||||
compute_io_uid_tasks(uid_entry);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,6 +501,7 @@ static void update_io_stats_uid_locked(struct uid_entry *uid_entry)
|
||||
|
||||
memset(&uid_entry->io[UID_STATE_TOTAL_CURR], 0,
|
||||
sizeof(struct io_stats));
|
||||
set_io_uid_tasks_zero(uid_entry);
|
||||
|
||||
rcu_read_lock();
|
||||
do_each_thread(temp, task) {
|
||||
@@ -298,12 +511,14 @@ static void update_io_stats_uid_locked(struct uid_entry *uid_entry)
|
||||
} while_each_thread(temp, task);
|
||||
rcu_read_unlock();
|
||||
|
||||
compute_uid_io_bucket_stats(&uid_entry->io[uid_entry->state],
|
||||
compute_io_bucket_stats(&uid_entry->io[uid_entry->state],
|
||||
&uid_entry->io[UID_STATE_TOTAL_CURR],
|
||||
&uid_entry->io[UID_STATE_TOTAL_LAST],
|
||||
&uid_entry->io[UID_STATE_DEAD_TASKS]);
|
||||
compute_io_uid_tasks(uid_entry);
|
||||
}
|
||||
|
||||
|
||||
static int uid_io_show(struct seq_file *m, void *v)
|
||||
{
|
||||
struct uid_entry *uid_entry;
|
||||
@@ -315,21 +530,22 @@ static int uid_io_show(struct seq_file *m, void *v)
|
||||
|
||||
hash_for_each(hash_table, bkt, uid_entry, hash) {
|
||||
seq_printf(m, "%d %llu %llu %llu %llu %llu %llu %llu %llu %llu %llu\n",
|
||||
uid_entry->uid,
|
||||
uid_entry->io[UID_STATE_FOREGROUND].rchar,
|
||||
uid_entry->io[UID_STATE_FOREGROUND].wchar,
|
||||
uid_entry->io[UID_STATE_FOREGROUND].read_bytes,
|
||||
uid_entry->io[UID_STATE_FOREGROUND].write_bytes,
|
||||
uid_entry->io[UID_STATE_BACKGROUND].rchar,
|
||||
uid_entry->io[UID_STATE_BACKGROUND].wchar,
|
||||
uid_entry->io[UID_STATE_BACKGROUND].read_bytes,
|
||||
uid_entry->io[UID_STATE_BACKGROUND].write_bytes,
|
||||
uid_entry->io[UID_STATE_FOREGROUND].fsync,
|
||||
uid_entry->io[UID_STATE_BACKGROUND].fsync);
|
||||
uid_entry->uid,
|
||||
uid_entry->io[UID_STATE_FOREGROUND].rchar,
|
||||
uid_entry->io[UID_STATE_FOREGROUND].wchar,
|
||||
uid_entry->io[UID_STATE_FOREGROUND].read_bytes,
|
||||
uid_entry->io[UID_STATE_FOREGROUND].write_bytes,
|
||||
uid_entry->io[UID_STATE_BACKGROUND].rchar,
|
||||
uid_entry->io[UID_STATE_BACKGROUND].wchar,
|
||||
uid_entry->io[UID_STATE_BACKGROUND].read_bytes,
|
||||
uid_entry->io[UID_STATE_BACKGROUND].write_bytes,
|
||||
uid_entry->io[UID_STATE_FOREGROUND].fsync,
|
||||
uid_entry->io[UID_STATE_BACKGROUND].fsync);
|
||||
|
||||
show_io_uid_tasks(m, uid_entry);
|
||||
}
|
||||
|
||||
rt_mutex_unlock(&uid_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1294,7 +1294,7 @@ out_err:
|
||||
static int mmc_select_hs400es(struct mmc_card *card)
|
||||
{
|
||||
struct mmc_host *host = card->host;
|
||||
int err = 0;
|
||||
int err = -EINVAL;
|
||||
u8 val;
|
||||
|
||||
if (!(host->caps & MMC_CAP_8_BIT_DATA)) {
|
||||
|
||||
@@ -64,8 +64,14 @@ static int nand_ooblayout_ecc_sp(struct mtd_info *mtd, int section,
|
||||
|
||||
if (!section) {
|
||||
oobregion->offset = 0;
|
||||
oobregion->length = 4;
|
||||
if (mtd->oobsize == 16)
|
||||
oobregion->length = 4;
|
||||
else
|
||||
oobregion->length = 3;
|
||||
} else {
|
||||
if (mtd->oobsize == 8)
|
||||
return -ERANGE;
|
||||
|
||||
oobregion->offset = 6;
|
||||
oobregion->length = ecc->total - 4;
|
||||
}
|
||||
@@ -1081,7 +1087,9 @@ static int nand_setup_data_interface(struct nand_chip *chip)
|
||||
* Ensure the timing mode has been changed on the chip side
|
||||
* before changing timings on the controller side.
|
||||
*/
|
||||
if (chip->onfi_version) {
|
||||
if (chip->onfi_version &&
|
||||
(le16_to_cpu(chip->onfi_params.opt_cmd) &
|
||||
ONFI_OPT_CMD_SET_GET_FEATURES)) {
|
||||
u8 tmode_param[ONFI_SUBFEATURE_PARAM_LEN] = {
|
||||
chip->onfi_timing_mode_default,
|
||||
};
|
||||
|
||||
@@ -724,16 +724,21 @@ static inline __wsum get_fixed_vlan_csum(__wsum hw_checksum,
|
||||
* header, the HW adds it. To address that, we are subtracting the pseudo
|
||||
* header checksum from the checksum value provided by the HW.
|
||||
*/
|
||||
static void get_fixed_ipv4_csum(__wsum hw_checksum, struct sk_buff *skb,
|
||||
struct iphdr *iph)
|
||||
static int get_fixed_ipv4_csum(__wsum hw_checksum, struct sk_buff *skb,
|
||||
struct iphdr *iph)
|
||||
{
|
||||
__u16 length_for_csum = 0;
|
||||
__wsum csum_pseudo_header = 0;
|
||||
__u8 ipproto = iph->protocol;
|
||||
|
||||
if (unlikely(ipproto == IPPROTO_SCTP))
|
||||
return -1;
|
||||
|
||||
length_for_csum = (be16_to_cpu(iph->tot_len) - (iph->ihl << 2));
|
||||
csum_pseudo_header = csum_tcpudp_nofold(iph->saddr, iph->daddr,
|
||||
length_for_csum, iph->protocol, 0);
|
||||
length_for_csum, ipproto, 0);
|
||||
skb->csum = csum_sub(hw_checksum, csum_pseudo_header);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
@@ -744,17 +749,20 @@ static void get_fixed_ipv4_csum(__wsum hw_checksum, struct sk_buff *skb,
|
||||
static int get_fixed_ipv6_csum(__wsum hw_checksum, struct sk_buff *skb,
|
||||
struct ipv6hdr *ipv6h)
|
||||
{
|
||||
__u8 nexthdr = ipv6h->nexthdr;
|
||||
__wsum csum_pseudo_hdr = 0;
|
||||
|
||||
if (unlikely(ipv6h->nexthdr == IPPROTO_FRAGMENT ||
|
||||
ipv6h->nexthdr == IPPROTO_HOPOPTS))
|
||||
if (unlikely(nexthdr == IPPROTO_FRAGMENT ||
|
||||
nexthdr == IPPROTO_HOPOPTS ||
|
||||
nexthdr == IPPROTO_SCTP))
|
||||
return -1;
|
||||
hw_checksum = csum_add(hw_checksum, (__force __wsum)htons(ipv6h->nexthdr));
|
||||
hw_checksum = csum_add(hw_checksum, (__force __wsum)htons(nexthdr));
|
||||
|
||||
csum_pseudo_hdr = csum_partial(&ipv6h->saddr,
|
||||
sizeof(ipv6h->saddr) + sizeof(ipv6h->daddr), 0);
|
||||
csum_pseudo_hdr = csum_add(csum_pseudo_hdr, (__force __wsum)ipv6h->payload_len);
|
||||
csum_pseudo_hdr = csum_add(csum_pseudo_hdr, (__force __wsum)ntohs(ipv6h->nexthdr));
|
||||
csum_pseudo_hdr = csum_add(csum_pseudo_hdr,
|
||||
(__force __wsum)htons(nexthdr));
|
||||
|
||||
skb->csum = csum_sub(hw_checksum, csum_pseudo_hdr);
|
||||
skb->csum = csum_add(skb->csum, csum_partial(ipv6h, sizeof(struct ipv6hdr), 0));
|
||||
@@ -777,11 +785,10 @@ static int check_csum(struct mlx4_cqe *cqe, struct sk_buff *skb, void *va,
|
||||
}
|
||||
|
||||
if (cqe->status & cpu_to_be16(MLX4_CQE_STATUS_IPV4))
|
||||
get_fixed_ipv4_csum(hw_checksum, skb, hdr);
|
||||
return get_fixed_ipv4_csum(hw_checksum, skb, hdr);
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
else if (cqe->status & cpu_to_be16(MLX4_CQE_STATUS_IPV6))
|
||||
if (unlikely(get_fixed_ipv6_csum(hw_checksum, skb, hdr)))
|
||||
return -1;
|
||||
if (cqe->status & cpu_to_be16(MLX4_CQE_STATUS_IPV6))
|
||||
return get_fixed_ipv6_csum(hw_checksum, skb, hdr);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -430,7 +430,7 @@ static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
|
||||
/* Virtual PCI function needs to determine UAR page size from
|
||||
* firmware. Only master PCI function can set the uar page size
|
||||
*/
|
||||
if (enable_4k_uar)
|
||||
if (enable_4k_uar || !dev->persist->num_vfs)
|
||||
dev->uar_page_shift = DEFAULT_UAR_PAGE_SHIFT;
|
||||
else
|
||||
dev->uar_page_shift = PAGE_SHIFT;
|
||||
@@ -2269,7 +2269,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev)
|
||||
|
||||
dev->caps.max_fmr_maps = (1 << (32 - ilog2(dev->caps.num_mpts))) - 1;
|
||||
|
||||
if (enable_4k_uar) {
|
||||
if (enable_4k_uar || !dev->persist->num_vfs) {
|
||||
init_hca.log_uar_sz = ilog2(dev->caps.num_uars) +
|
||||
PAGE_SHIFT - DEFAULT_UAR_PAGE_SHIFT;
|
||||
init_hca.uar_page_sz = DEFAULT_UAR_PAGE_SHIFT - 12;
|
||||
|
||||
@@ -871,8 +871,7 @@ static int nfp_net_tx(struct sk_buff *skb, struct net_device *netdev)
|
||||
return NETDEV_TX_OK;
|
||||
|
||||
err_unmap:
|
||||
--f;
|
||||
while (f >= 0) {
|
||||
while (--f >= 0) {
|
||||
frag = &skb_shinfo(skb)->frags[f];
|
||||
dma_unmap_page(&nn->pdev->dev,
|
||||
tx_ring->txbufs[wr_idx].dma_addr,
|
||||
|
||||
@@ -119,6 +119,7 @@ struct ppp {
|
||||
int n_channels; /* how many channels are attached 54 */
|
||||
spinlock_t rlock; /* lock for receive side 58 */
|
||||
spinlock_t wlock; /* lock for transmit side 5c */
|
||||
int *xmit_recursion __percpu; /* xmit recursion detect */
|
||||
int mru; /* max receive unit 60 */
|
||||
unsigned int flags; /* control bits 64 */
|
||||
unsigned int xstate; /* transmit state bits 68 */
|
||||
@@ -1024,6 +1025,7 @@ static int ppp_dev_configure(struct net *src_net, struct net_device *dev,
|
||||
struct ppp *ppp = netdev_priv(dev);
|
||||
int indx;
|
||||
int err;
|
||||
int cpu;
|
||||
|
||||
ppp->dev = dev;
|
||||
ppp->ppp_net = src_net;
|
||||
@@ -1038,6 +1040,15 @@ static int ppp_dev_configure(struct net *src_net, struct net_device *dev,
|
||||
INIT_LIST_HEAD(&ppp->channels);
|
||||
spin_lock_init(&ppp->rlock);
|
||||
spin_lock_init(&ppp->wlock);
|
||||
|
||||
ppp->xmit_recursion = alloc_percpu(int);
|
||||
if (!ppp->xmit_recursion) {
|
||||
err = -ENOMEM;
|
||||
goto err1;
|
||||
}
|
||||
for_each_possible_cpu(cpu)
|
||||
(*per_cpu_ptr(ppp->xmit_recursion, cpu)) = 0;
|
||||
|
||||
#ifdef CONFIG_PPP_MULTILINK
|
||||
ppp->minseq = -1;
|
||||
skb_queue_head_init(&ppp->mrq);
|
||||
@@ -1049,11 +1060,15 @@ static int ppp_dev_configure(struct net *src_net, struct net_device *dev,
|
||||
|
||||
err = ppp_unit_register(ppp, conf->unit, conf->ifname_is_set);
|
||||
if (err < 0)
|
||||
return err;
|
||||
goto err2;
|
||||
|
||||
conf->file->private_data = &ppp->file;
|
||||
|
||||
return 0;
|
||||
err2:
|
||||
free_percpu(ppp->xmit_recursion);
|
||||
err1:
|
||||
return err;
|
||||
}
|
||||
|
||||
static const struct nla_policy ppp_nl_policy[IFLA_PPP_MAX + 1] = {
|
||||
@@ -1399,18 +1414,16 @@ static void __ppp_xmit_process(struct ppp *ppp)
|
||||
ppp_xmit_unlock(ppp);
|
||||
}
|
||||
|
||||
static DEFINE_PER_CPU(int, ppp_xmit_recursion);
|
||||
|
||||
static void ppp_xmit_process(struct ppp *ppp)
|
||||
{
|
||||
local_bh_disable();
|
||||
|
||||
if (unlikely(__this_cpu_read(ppp_xmit_recursion)))
|
||||
if (unlikely(*this_cpu_ptr(ppp->xmit_recursion)))
|
||||
goto err;
|
||||
|
||||
__this_cpu_inc(ppp_xmit_recursion);
|
||||
(*this_cpu_ptr(ppp->xmit_recursion))++;
|
||||
__ppp_xmit_process(ppp);
|
||||
__this_cpu_dec(ppp_xmit_recursion);
|
||||
(*this_cpu_ptr(ppp->xmit_recursion))--;
|
||||
|
||||
local_bh_enable();
|
||||
|
||||
@@ -1901,23 +1914,23 @@ static void __ppp_channel_push(struct channel *pch)
|
||||
spin_unlock_bh(&pch->downl);
|
||||
/* see if there is anything from the attached unit to be sent */
|
||||
if (skb_queue_empty(&pch->file.xq)) {
|
||||
read_lock_bh(&pch->upl);
|
||||
ppp = pch->ppp;
|
||||
if (ppp)
|
||||
__ppp_xmit_process(ppp);
|
||||
read_unlock_bh(&pch->upl);
|
||||
}
|
||||
}
|
||||
|
||||
static void ppp_channel_push(struct channel *pch)
|
||||
{
|
||||
local_bh_disable();
|
||||
|
||||
__this_cpu_inc(ppp_xmit_recursion);
|
||||
__ppp_channel_push(pch);
|
||||
__this_cpu_dec(ppp_xmit_recursion);
|
||||
|
||||
local_bh_enable();
|
||||
read_lock_bh(&pch->upl);
|
||||
if (pch->ppp) {
|
||||
(*this_cpu_ptr(pch->ppp->xmit_recursion))++;
|
||||
__ppp_channel_push(pch);
|
||||
(*this_cpu_ptr(pch->ppp->xmit_recursion))--;
|
||||
} else {
|
||||
__ppp_channel_push(pch);
|
||||
}
|
||||
read_unlock_bh(&pch->upl);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3056,6 +3069,7 @@ static void ppp_destroy_interface(struct ppp *ppp)
|
||||
#endif /* CONFIG_PPP_FILTER */
|
||||
|
||||
kfree_skb(ppp->xmit_pending);
|
||||
free_percpu(ppp->xmit_recursion);
|
||||
|
||||
free_netdev(ppp->dev);
|
||||
}
|
||||
|
||||
@@ -876,6 +876,7 @@ static const struct usb_device_id products[] = {
|
||||
{QMI_FIXED_INTF(0x19d2, 0x1428, 2)}, /* Telewell TW-LTE 4G v2 */
|
||||
{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(0x0f3d, 0x68a2, 8)}, /* Sierra Wireless MC7700 */
|
||||
{QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */
|
||||
{QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */
|
||||
|
||||
@@ -177,6 +177,16 @@ static int fdp_nci_i2c_read(struct fdp_i2c_phy *phy, struct sk_buff **skb)
|
||||
/* Packet that contains a length */
|
||||
if (tmp[0] == 0 && tmp[1] == 0) {
|
||||
phy->next_read_size = (tmp[2] << 8) + tmp[3] + 3;
|
||||
/*
|
||||
* Ensure next_read_size does not exceed sizeof(tmp)
|
||||
* for reading that many bytes during next iteration
|
||||
*/
|
||||
if (phy->next_read_size > FDP_NCI_I2C_MAX_PAYLOAD) {
|
||||
dev_dbg(&client->dev, "%s: corrupted packet\n",
|
||||
__func__);
|
||||
phy->next_read_size = 5;
|
||||
goto flush;
|
||||
}
|
||||
} else {
|
||||
phy->next_read_size = FDP_NCI_I2C_MIN_PAYLOAD;
|
||||
|
||||
|
||||
@@ -217,7 +217,8 @@ static int st21nfca_tm_recv_atr_req(struct nfc_hci_dev *hdev,
|
||||
|
||||
atr_req = (struct st21nfca_atr_req *)skb->data;
|
||||
|
||||
if (atr_req->length < sizeof(struct st21nfca_atr_req)) {
|
||||
if (atr_req->length < sizeof(struct st21nfca_atr_req) ||
|
||||
atr_req->length > skb->len) {
|
||||
r = -EPROTO;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@@ -320,23 +320,33 @@ int st21nfca_connectivity_event_received(struct nfc_hci_dev *hdev, u8 host,
|
||||
* AID 81 5 to 16
|
||||
* PARAMETERS 82 0 to 255
|
||||
*/
|
||||
if (skb->len < NFC_MIN_AID_LENGTH + 2 &&
|
||||
if (skb->len < NFC_MIN_AID_LENGTH + 2 ||
|
||||
skb->data[0] != NFC_EVT_TRANSACTION_AID_TAG)
|
||||
return -EPROTO;
|
||||
|
||||
/*
|
||||
* Buffer should have enough space for at least
|
||||
* two tag fields + two length fields + aid_len (skb->data[1])
|
||||
*/
|
||||
if (skb->len < skb->data[1] + 4)
|
||||
return -EPROTO;
|
||||
|
||||
transaction = (struct nfc_evt_transaction *)devm_kzalloc(dev,
|
||||
skb->len - 2, GFP_KERNEL);
|
||||
|
||||
transaction->aid_len = skb->data[1];
|
||||
memcpy(transaction->aid, &skb->data[2],
|
||||
transaction->aid_len);
|
||||
|
||||
/* Check next byte is PARAMETERS tag (82) */
|
||||
if (skb->data[transaction->aid_len + 2] !=
|
||||
NFC_EVT_TRANSACTION_PARAMS_TAG)
|
||||
return -EPROTO;
|
||||
|
||||
transaction->params_len = skb->data[transaction->aid_len + 3];
|
||||
|
||||
/* Check next byte is PARAMETERS tag (82) and the length field */
|
||||
if (skb->data[transaction->aid_len + 2] !=
|
||||
NFC_EVT_TRANSACTION_PARAMS_TAG ||
|
||||
skb->len < transaction->aid_len + transaction->params_len + 4) {
|
||||
devm_kfree(dev, transaction);
|
||||
return -EPROTO;
|
||||
}
|
||||
|
||||
memcpy(transaction->params, skb->data +
|
||||
transaction->aid_len + 4, transaction->params_len);
|
||||
|
||||
|
||||
@@ -176,14 +176,12 @@ struct ntb_transport_qp {
|
||||
u64 rx_err_ver;
|
||||
u64 rx_memcpy;
|
||||
u64 rx_async;
|
||||
u64 dma_rx_prep_err;
|
||||
u64 tx_bytes;
|
||||
u64 tx_pkts;
|
||||
u64 tx_ring_full;
|
||||
u64 tx_err_no_buf;
|
||||
u64 tx_memcpy;
|
||||
u64 tx_async;
|
||||
u64 dma_tx_prep_err;
|
||||
};
|
||||
|
||||
struct ntb_transport_mw {
|
||||
@@ -256,8 +254,6 @@ enum {
|
||||
#define QP_TO_MW(nt, qp) ((qp) % nt->mw_count)
|
||||
#define NTB_QP_DEF_NUM_ENTRIES 100
|
||||
#define NTB_LINK_DOWN_TIMEOUT 10
|
||||
#define DMA_RETRIES 20
|
||||
#define DMA_OUT_RESOURCE_TO msecs_to_jiffies(50)
|
||||
|
||||
static void ntb_transport_rxc_db(unsigned long data);
|
||||
static const struct ntb_ctx_ops ntb_transport_ops;
|
||||
@@ -518,12 +514,6 @@ static ssize_t debugfs_read(struct file *filp, char __user *ubuf, size_t count,
|
||||
out_offset += snprintf(buf + out_offset, out_count - out_offset,
|
||||
"free tx - \t%u\n",
|
||||
ntb_transport_tx_free_entry(qp));
|
||||
out_offset += snprintf(buf + out_offset, out_count - out_offset,
|
||||
"DMA tx prep err - \t%llu\n",
|
||||
qp->dma_tx_prep_err);
|
||||
out_offset += snprintf(buf + out_offset, out_count - out_offset,
|
||||
"DMA rx prep err - \t%llu\n",
|
||||
qp->dma_rx_prep_err);
|
||||
|
||||
out_offset += snprintf(buf + out_offset, out_count - out_offset,
|
||||
"\n");
|
||||
@@ -625,7 +615,7 @@ static int ntb_transport_setup_qp_mw(struct ntb_transport_ctx *nt,
|
||||
if (!mw->virt_addr)
|
||||
return -ENOMEM;
|
||||
|
||||
if (qp_count % mw_count && mw_num + 1 < qp_count / mw_count)
|
||||
if (mw_num < qp_count % mw_count)
|
||||
num_qps_mw = qp_count / mw_count + 1;
|
||||
else
|
||||
num_qps_mw = qp_count / mw_count;
|
||||
@@ -770,8 +760,6 @@ static void ntb_qp_link_down_reset(struct ntb_transport_qp *qp)
|
||||
qp->tx_err_no_buf = 0;
|
||||
qp->tx_memcpy = 0;
|
||||
qp->tx_async = 0;
|
||||
qp->dma_tx_prep_err = 0;
|
||||
qp->dma_rx_prep_err = 0;
|
||||
}
|
||||
|
||||
static void ntb_qp_link_cleanup(struct ntb_transport_qp *qp)
|
||||
@@ -933,10 +921,8 @@ out1:
|
||||
ntb_free_mw(nt, i);
|
||||
|
||||
/* if there's an actual failure, we should just bail */
|
||||
if (rc < 0) {
|
||||
ntb_link_disable(ndev);
|
||||
if (rc < 0)
|
||||
return;
|
||||
}
|
||||
|
||||
out:
|
||||
if (ntb_link_is_up(ndev, NULL, NULL) == 1)
|
||||
@@ -1002,7 +988,7 @@ static int ntb_transport_init_queue(struct ntb_transport_ctx *nt,
|
||||
qp->event_handler = NULL;
|
||||
ntb_qp_link_down_reset(qp);
|
||||
|
||||
if (qp_count % mw_count && mw_num + 1 < qp_count / mw_count)
|
||||
if (mw_num < qp_count % mw_count)
|
||||
num_qps_mw = qp_count / mw_count + 1;
|
||||
else
|
||||
num_qps_mw = qp_count / mw_count;
|
||||
@@ -1125,8 +1111,8 @@ static int ntb_transport_probe(struct ntb_client *self, struct ntb_dev *ndev)
|
||||
qp_count = ilog2(qp_bitmap);
|
||||
if (max_num_clients && max_num_clients < qp_count)
|
||||
qp_count = max_num_clients;
|
||||
else if (mw_count < qp_count)
|
||||
qp_count = mw_count;
|
||||
else if (nt->mw_count < qp_count)
|
||||
qp_count = nt->mw_count;
|
||||
|
||||
qp_bitmap &= BIT_ULL(qp_count) - 1;
|
||||
|
||||
@@ -1314,7 +1300,6 @@ static int ntb_async_rx_submit(struct ntb_queue_entry *entry, void *offset)
|
||||
struct dmaengine_unmap_data *unmap;
|
||||
dma_cookie_t cookie;
|
||||
void *buf = entry->buf;
|
||||
int retries = 0;
|
||||
|
||||
len = entry->len;
|
||||
device = chan->device;
|
||||
@@ -1343,22 +1328,11 @@ static int ntb_async_rx_submit(struct ntb_queue_entry *entry, void *offset)
|
||||
|
||||
unmap->from_cnt = 1;
|
||||
|
||||
for (retries = 0; retries < DMA_RETRIES; retries++) {
|
||||
txd = device->device_prep_dma_memcpy(chan,
|
||||
unmap->addr[1],
|
||||
unmap->addr[0], len,
|
||||
DMA_PREP_INTERRUPT);
|
||||
if (txd)
|
||||
break;
|
||||
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
schedule_timeout(DMA_OUT_RESOURCE_TO);
|
||||
}
|
||||
|
||||
if (!txd) {
|
||||
qp->dma_rx_prep_err++;
|
||||
txd = device->device_prep_dma_memcpy(chan, unmap->addr[1],
|
||||
unmap->addr[0], len,
|
||||
DMA_PREP_INTERRUPT);
|
||||
if (!txd)
|
||||
goto err_get_unmap;
|
||||
}
|
||||
|
||||
txd->callback_result = ntb_rx_copy_callback;
|
||||
txd->callback_param = entry;
|
||||
@@ -1603,7 +1577,6 @@ static int ntb_async_tx_submit(struct ntb_transport_qp *qp,
|
||||
struct dmaengine_unmap_data *unmap;
|
||||
dma_addr_t dest;
|
||||
dma_cookie_t cookie;
|
||||
int retries = 0;
|
||||
|
||||
device = chan->device;
|
||||
dest = qp->tx_mw_phys + qp->tx_max_frame * entry->tx_index;
|
||||
@@ -1625,21 +1598,10 @@ static int ntb_async_tx_submit(struct ntb_transport_qp *qp,
|
||||
|
||||
unmap->to_cnt = 1;
|
||||
|
||||
for (retries = 0; retries < DMA_RETRIES; retries++) {
|
||||
txd = device->device_prep_dma_memcpy(chan, dest,
|
||||
unmap->addr[0], len,
|
||||
DMA_PREP_INTERRUPT);
|
||||
if (txd)
|
||||
break;
|
||||
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
schedule_timeout(DMA_OUT_RESOURCE_TO);
|
||||
}
|
||||
|
||||
if (!txd) {
|
||||
qp->dma_tx_prep_err++;
|
||||
txd = device->device_prep_dma_memcpy(chan, dest, unmap->addr[0], len,
|
||||
DMA_PREP_INTERRUPT);
|
||||
if (!txd)
|
||||
goto err_get_unmap;
|
||||
}
|
||||
|
||||
txd->callback_result = ntb_tx_copy_callback;
|
||||
txd->callback_param = entry;
|
||||
|
||||
@@ -956,7 +956,7 @@ static int __init dino_probe(struct parisc_device *dev)
|
||||
|
||||
dino_dev->hba.dev = dev;
|
||||
dino_dev->hba.base_addr = ioremap_nocache(hpa, 4096);
|
||||
dino_dev->hba.lmmio_space_offset = 0; /* CPU addrs == bus addrs */
|
||||
dino_dev->hba.lmmio_space_offset = PCI_F_EXTEND;
|
||||
spin_lock_init(&dino_dev->dinosaur_pen);
|
||||
dino_dev->hba.iommu = ccio_get_iommu(dev);
|
||||
|
||||
|
||||
@@ -343,9 +343,9 @@ static const struct pinctrl_pin_desc mrfld_pins[] = {
|
||||
|
||||
static const unsigned int mrfld_sdio_pins[] = { 50, 51, 52, 53, 54, 55, 56 };
|
||||
static const unsigned int mrfld_spi5_pins[] = { 90, 91, 92, 93, 94, 95, 96 };
|
||||
static const unsigned int mrfld_uart0_pins[] = { 124, 125, 126, 127 };
|
||||
static const unsigned int mrfld_uart1_pins[] = { 128, 129, 130, 131 };
|
||||
static const unsigned int mrfld_uart2_pins[] = { 132, 133, 134, 135 };
|
||||
static const unsigned int mrfld_uart0_pins[] = { 115, 116, 117, 118 };
|
||||
static const unsigned int mrfld_uart1_pins[] = { 119, 120, 121, 122 };
|
||||
static const unsigned int mrfld_uart2_pins[] = { 123, 124, 125, 126 };
|
||||
static const unsigned int mrfld_pwm0_pins[] = { 144 };
|
||||
static const unsigned int mrfld_pwm1_pins[] = { 145 };
|
||||
static const unsigned int mrfld_pwm2_pins[] = { 132 };
|
||||
|
||||
@@ -85,6 +85,7 @@ static const struct pinctrl_pin_desc meson_gxbb_periphs_pins[] = {
|
||||
MESON_PIN(GPIODV_15, EE_OFF),
|
||||
MESON_PIN(GPIODV_16, EE_OFF),
|
||||
MESON_PIN(GPIODV_17, EE_OFF),
|
||||
MESON_PIN(GPIODV_18, EE_OFF),
|
||||
MESON_PIN(GPIODV_19, EE_OFF),
|
||||
MESON_PIN(GPIODV_20, EE_OFF),
|
||||
MESON_PIN(GPIODV_21, EE_OFF),
|
||||
|
||||
@@ -195,8 +195,6 @@ static int exynos_irq_request_resources(struct irq_data *irqd)
|
||||
|
||||
spin_unlock_irqrestore(&bank->slock, flags);
|
||||
|
||||
exynos_irq_unmask(irqd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -217,8 +215,6 @@ static void exynos_irq_release_resources(struct irq_data *irqd)
|
||||
shift = irqd->hwirq * bank_type->fld_width[PINCFG_TYPE_FUNC];
|
||||
mask = (1 << bank_type->fld_width[PINCFG_TYPE_FUNC]) - 1;
|
||||
|
||||
exynos_irq_mask(irqd);
|
||||
|
||||
spin_lock_irqsave(&bank->slock, flags);
|
||||
|
||||
con = readl(d->virt_base + reg_con);
|
||||
|
||||
@@ -811,6 +811,7 @@ static const struct sunxi_desc_pin sun4i_a10_pins[] = {
|
||||
SUNXI_FUNCTION(0x2, "lcd1"), /* D16 */
|
||||
SUNXI_FUNCTION(0x3, "pata"), /* ATAD12 */
|
||||
SUNXI_FUNCTION(0x4, "keypad"), /* IN6 */
|
||||
SUNXI_FUNCTION(0x5, "sim"), /* DET */
|
||||
SUNXI_FUNCTION_IRQ(0x6, 16), /* EINT16 */
|
||||
SUNXI_FUNCTION(0x7, "csi1")), /* D16 */
|
||||
SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 17),
|
||||
|
||||
@@ -508,57 +508,71 @@ static const unsigned usb1_pins[] = {48, 49};
|
||||
static const int usb1_muxvals[] = {0, 0};
|
||||
static const unsigned usb2_pins[] = {50, 51};
|
||||
static const int usb2_muxvals[] = {0, 0};
|
||||
static const unsigned port_range_pins[] = {
|
||||
static const unsigned port_range0_pins[] = {
|
||||
159, 160, 161, 162, 163, 164, 165, 166, /* PORT0x */
|
||||
0, 1, 2, 3, 4, 5, 6, 7, /* PORT1x */
|
||||
8, 9, 10, 11, 12, 13, 14, 15, /* PORT2x */
|
||||
16, 17, 18, -1, -1, -1, -1, -1, /* PORT3x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT4x */
|
||||
-1, -1, -1, 46, 47, 48, 49, 50, /* PORT5x */
|
||||
51, -1, -1, 54, 55, 56, 57, 58, /* PORT6x */
|
||||
16, 17, 18, /* PORT30-32 */
|
||||
};
|
||||
static const int port_range0_muxvals[] = {
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT0x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT1x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT2x */
|
||||
15, 15, 15, /* PORT30-32 */
|
||||
};
|
||||
static const unsigned port_range1_pins[] = {
|
||||
46, 47, 48, 49, 50, /* PORT53-57 */
|
||||
51, /* PORT60 */
|
||||
};
|
||||
static const int port_range1_muxvals[] = {
|
||||
15, 15, 15, 15, 15, /* PORT53-57 */
|
||||
15, /* PORT60 */
|
||||
};
|
||||
static const unsigned port_range2_pins[] = {
|
||||
54, 55, 56, 57, 58, /* PORT63-67 */
|
||||
59, 60, 69, 70, 71, 72, 73, 74, /* PORT7x */
|
||||
75, 76, 77, 78, 79, 80, 81, 82, /* PORT8x */
|
||||
83, 84, 85, 86, 87, 88, 89, 90, /* PORT9x */
|
||||
91, 92, 93, 94, 95, 96, 97, 98, /* PORT10x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT11x */
|
||||
99, 100, 101, 102, 103, 104, 105, 106, /* PORT12x */
|
||||
107, 108, 109, 110, 111, 112, 113, 114, /* PORT13x */
|
||||
115, 116, 117, 118, 119, 120, 121, 122, /* PORT14x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT15x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT16x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT17x */
|
||||
61, 62, 63, 64, 65, 66, 67, 68, /* PORT18x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT19x */
|
||||
123, 124, 125, 126, 127, 128, 129, 130, /* PORT20x */
|
||||
131, 132, 133, 134, 135, 136, 137, 138, /* PORT21x */
|
||||
139, 140, 141, 142, -1, -1, -1, -1, /* PORT22x */
|
||||
147, 148, 149, 150, 151, 152, 153, 154, /* PORT23x */
|
||||
155, 156, 157, 143, 144, 145, 146, 158, /* PORT24x */
|
||||
};
|
||||
static const int port_range_muxvals[] = {
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT0x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT1x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT2x */
|
||||
15, 15, 15, -1, -1, -1, -1, -1, /* PORT3x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT4x */
|
||||
-1, -1, -1, 15, 15, 15, 15, 15, /* PORT5x */
|
||||
15, -1, -1, 15, 15, 15, 15, 15, /* PORT6x */
|
||||
static const int port_range2_muxvals[] = {
|
||||
15, 15, 15, 15, 15, /* PORT63-67 */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT7x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT8x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT9x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT10x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT11x */
|
||||
};
|
||||
static const unsigned port_range3_pins[] = {
|
||||
99, 100, 101, 102, 103, 104, 105, 106, /* PORT12x */
|
||||
107, 108, 109, 110, 111, 112, 113, 114, /* PORT13x */
|
||||
115, 116, 117, 118, 119, 120, 121, 122, /* PORT14x */
|
||||
};
|
||||
static const int port_range3_muxvals[] = {
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT12x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT13x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT14x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT15x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT16x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT17x */
|
||||
};
|
||||
static const unsigned port_range4_pins[] = {
|
||||
61, 62, 63, 64, 65, 66, 67, 68, /* PORT18x */
|
||||
};
|
||||
static const int port_range4_muxvals[] = {
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT18x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT19x */
|
||||
};
|
||||
static const unsigned port_range5_pins[] = {
|
||||
123, 124, 125, 126, 127, 128, 129, 130, /* PORT20x */
|
||||
131, 132, 133, 134, 135, 136, 137, 138, /* PORT21x */
|
||||
139, 140, 141, 142, /* PORT220-223 */
|
||||
};
|
||||
static const int port_range5_muxvals[] = {
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT20x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT21x */
|
||||
15, 15, 15, 15, -1, -1, -1, -1, /* PORT22x */
|
||||
15, 15, 15, 15, /* PORT220-223 */
|
||||
};
|
||||
static const unsigned port_range6_pins[] = {
|
||||
147, 148, 149, 150, 151, 152, 153, 154, /* PORT23x */
|
||||
155, 156, 157, 143, 144, 145, 146, 158, /* PORT24x */
|
||||
};
|
||||
static const int port_range6_muxvals[] = {
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT23x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT24x */
|
||||
};
|
||||
@@ -607,147 +621,153 @@ static const struct uniphier_pinctrl_group uniphier_ld11_groups[] = {
|
||||
UNIPHIER_PINCTRL_GROUP(usb0),
|
||||
UNIPHIER_PINCTRL_GROUP(usb1),
|
||||
UNIPHIER_PINCTRL_GROUP(usb2),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range0),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range1),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range2),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range3),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range4),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range5),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range6),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq_alternatives),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port00, port_range, 0),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port01, port_range, 1),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port02, port_range, 2),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port03, port_range, 3),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port04, port_range, 4),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port05, port_range, 5),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port06, port_range, 6),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port07, port_range, 7),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port10, port_range, 8),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port11, port_range, 9),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port12, port_range, 10),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port13, port_range, 11),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port14, port_range, 12),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port15, port_range, 13),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port16, port_range, 14),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port17, port_range, 15),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port20, port_range, 16),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port21, port_range, 17),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port22, port_range, 18),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port23, port_range, 19),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port24, port_range, 20),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port25, port_range, 21),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port26, port_range, 22),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port27, port_range, 23),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port30, port_range, 24),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port31, port_range, 25),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port32, port_range, 26),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port53, port_range, 43),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port54, port_range, 44),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port55, port_range, 45),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port56, port_range, 46),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port57, port_range, 47),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port60, port_range, 48),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port63, port_range, 51),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port64, port_range, 52),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port65, port_range, 53),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port66, port_range, 54),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port67, port_range, 55),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port70, port_range, 56),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port71, port_range, 57),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port72, port_range, 58),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port73, port_range, 59),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port74, port_range, 60),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port75, port_range, 61),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port76, port_range, 62),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port77, port_range, 63),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port80, port_range, 64),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port81, port_range, 65),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port82, port_range, 66),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port83, port_range, 67),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port84, port_range, 68),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port85, port_range, 69),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port86, port_range, 70),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port87, port_range, 71),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port90, port_range, 72),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port91, port_range, 73),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port92, port_range, 74),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port93, port_range, 75),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port94, port_range, 76),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port95, port_range, 77),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port96, port_range, 78),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port97, port_range, 79),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port100, port_range, 80),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port101, port_range, 81),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port102, port_range, 82),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port103, port_range, 83),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port104, port_range, 84),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port105, port_range, 85),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port106, port_range, 86),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port107, port_range, 87),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port120, port_range, 96),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port121, port_range, 97),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port122, port_range, 98),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port123, port_range, 99),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port124, port_range, 100),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port125, port_range, 101),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port126, port_range, 102),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port127, port_range, 103),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port130, port_range, 104),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port131, port_range, 105),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port132, port_range, 106),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port133, port_range, 107),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port134, port_range, 108),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port135, port_range, 109),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port136, port_range, 110),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port137, port_range, 111),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port140, port_range, 112),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port141, port_range, 113),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port142, port_range, 114),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port143, port_range, 115),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port144, port_range, 116),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port145, port_range, 117),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port146, port_range, 118),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port147, port_range, 119),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port180, port_range, 144),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port181, port_range, 145),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port182, port_range, 146),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port183, port_range, 147),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port184, port_range, 148),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port185, port_range, 149),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port186, port_range, 150),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port187, port_range, 151),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port200, port_range, 160),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port201, port_range, 161),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port202, port_range, 162),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port203, port_range, 163),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port204, port_range, 164),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port205, port_range, 165),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port206, port_range, 166),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port207, port_range, 167),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port210, port_range, 168),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port211, port_range, 169),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port212, port_range, 170),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port213, port_range, 171),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port214, port_range, 172),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port215, port_range, 173),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port216, port_range, 174),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port217, port_range, 175),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port220, port_range, 176),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port221, port_range, 177),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port222, port_range, 178),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port223, port_range, 179),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port230, port_range, 184),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port231, port_range, 185),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port232, port_range, 186),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port233, port_range, 187),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port234, port_range, 188),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port235, port_range, 189),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port236, port_range, 190),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port237, port_range, 191),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port240, port_range, 192),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port241, port_range, 193),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port242, port_range, 194),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port243, port_range, 195),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port244, port_range, 196),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port245, port_range, 197),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port246, port_range, 198),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port247, port_range, 199),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port00, port_range0, 0),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port01, port_range0, 1),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port02, port_range0, 2),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port03, port_range0, 3),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port04, port_range0, 4),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port05, port_range0, 5),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port06, port_range0, 6),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port07, port_range0, 7),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port10, port_range0, 8),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port11, port_range0, 9),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port12, port_range0, 10),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port13, port_range0, 11),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port14, port_range0, 12),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port15, port_range0, 13),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port16, port_range0, 14),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port17, port_range0, 15),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port20, port_range0, 16),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port21, port_range0, 17),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port22, port_range0, 18),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port23, port_range0, 19),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port24, port_range0, 20),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port25, port_range0, 21),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port26, port_range0, 22),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port27, port_range0, 23),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port30, port_range0, 24),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port31, port_range0, 25),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port32, port_range0, 26),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port53, port_range1, 0),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port54, port_range1, 1),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port55, port_range1, 2),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port56, port_range1, 3),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port57, port_range1, 4),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port60, port_range1, 5),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port63, port_range2, 0),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port64, port_range2, 1),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port65, port_range2, 2),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port66, port_range2, 3),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port67, port_range2, 4),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port70, port_range2, 5),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port71, port_range2, 6),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port72, port_range2, 7),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port73, port_range2, 8),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port74, port_range2, 9),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port75, port_range2, 10),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port76, port_range2, 11),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port77, port_range2, 12),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port80, port_range2, 13),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port81, port_range2, 14),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port82, port_range2, 15),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port83, port_range2, 16),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port84, port_range2, 17),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port85, port_range2, 18),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port86, port_range2, 19),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port87, port_range2, 20),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port90, port_range2, 21),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port91, port_range2, 22),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port92, port_range2, 23),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port93, port_range2, 24),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port94, port_range2, 25),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port95, port_range2, 26),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port96, port_range2, 27),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port97, port_range2, 28),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port100, port_range2, 29),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port101, port_range2, 30),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port102, port_range2, 31),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port103, port_range2, 32),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port104, port_range2, 33),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port105, port_range2, 34),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port106, port_range2, 35),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port107, port_range2, 36),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port120, port_range3, 0),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port121, port_range3, 1),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port122, port_range3, 2),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port123, port_range3, 3),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port124, port_range3, 4),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port125, port_range3, 5),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port126, port_range3, 6),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port127, port_range3, 7),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port130, port_range3, 8),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port131, port_range3, 9),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port132, port_range3, 10),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port133, port_range3, 11),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port134, port_range3, 12),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port135, port_range3, 13),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port136, port_range3, 14),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port137, port_range3, 15),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port140, port_range3, 16),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port141, port_range3, 17),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port142, port_range3, 18),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port143, port_range3, 19),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port144, port_range3, 20),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port145, port_range3, 21),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port146, port_range3, 22),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port147, port_range3, 23),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port180, port_range4, 0),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port181, port_range4, 1),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port182, port_range4, 2),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port183, port_range4, 3),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port184, port_range4, 4),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port185, port_range4, 5),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port186, port_range4, 6),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port187, port_range4, 7),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port200, port_range5, 0),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port201, port_range5, 1),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port202, port_range5, 2),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port203, port_range5, 3),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port204, port_range5, 4),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port205, port_range5, 5),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port206, port_range5, 6),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port207, port_range5, 7),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port210, port_range5, 8),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port211, port_range5, 9),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port212, port_range5, 10),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port213, port_range5, 11),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port214, port_range5, 12),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port215, port_range5, 13),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port216, port_range5, 14),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port217, port_range5, 15),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port220, port_range5, 16),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port221, port_range5, 17),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port222, port_range5, 18),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port223, port_range5, 19),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port230, port_range6, 0),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port231, port_range6, 1),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port232, port_range6, 2),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port233, port_range6, 3),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port234, port_range6, 4),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port235, port_range6, 5),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port236, port_range6, 6),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port237, port_range6, 7),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port240, port_range6, 8),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port241, port_range6, 9),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port242, port_range6, 10),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port243, port_range6, 11),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port244, port_range6, 12),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port245, port_range6, 13),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port246, port_range6, 14),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port247, port_range6, 15),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(xirq0, xirq, 0),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(xirq1, xirq, 1),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(xirq2, xirq, 2),
|
||||
|
||||
@@ -597,7 +597,7 @@ static const unsigned usb2_pins[] = {50, 51};
|
||||
static const int usb2_muxvals[] = {0, 0};
|
||||
static const unsigned usb3_pins[] = {52, 53};
|
||||
static const int usb3_muxvals[] = {0, 0};
|
||||
static const unsigned port_range_pins[] = {
|
||||
static const unsigned port_range0_pins[] = {
|
||||
168, 169, 170, 171, 172, 173, 174, 175, /* PORT0x */
|
||||
0, 1, 2, 3, 4, 5, 6, 7, /* PORT1x */
|
||||
8, 9, 10, 11, 12, 13, 14, 15, /* PORT2x */
|
||||
@@ -609,23 +609,8 @@ static const unsigned port_range_pins[] = {
|
||||
75, 76, 77, 78, 79, 80, 81, 82, /* PORT8x */
|
||||
83, 84, 85, 86, 87, 88, 89, 90, /* PORT9x */
|
||||
91, 92, 93, 94, 95, 96, 97, 98, /* PORT10x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT11x */
|
||||
99, 100, 101, 102, 103, 104, 105, 106, /* PORT12x */
|
||||
107, 108, 109, 110, 111, 112, 113, 114, /* PORT13x */
|
||||
115, 116, 117, 118, 119, 120, 121, 122, /* PORT14x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT15x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT16x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT17x */
|
||||
61, 62, 63, 64, 65, 66, 67, 68, /* PORT18x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT19x */
|
||||
123, 124, 125, 126, 127, 128, 129, 130, /* PORT20x */
|
||||
131, 132, 133, 134, 135, 136, 137, 138, /* PORT21x */
|
||||
139, 140, 141, 142, 143, 144, 145, 146, /* PORT22x */
|
||||
147, 148, 149, 150, 151, 152, 153, 154, /* PORT23x */
|
||||
155, 156, 157, 158, 159, 160, 161, 162, /* PORT24x */
|
||||
163, 164, 165, 166, 167, /* PORT25x */
|
||||
};
|
||||
static const int port_range_muxvals[] = {
|
||||
static const int port_range0_muxvals[] = {
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT0x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT1x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT2x */
|
||||
@@ -637,21 +622,38 @@ static const int port_range_muxvals[] = {
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT8x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT9x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT10x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT11x */
|
||||
};
|
||||
static const unsigned port_range1_pins[] = {
|
||||
99, 100, 101, 102, 103, 104, 105, 106, /* PORT12x */
|
||||
107, 108, 109, 110, 111, 112, 113, 114, /* PORT13x */
|
||||
115, 116, 117, 118, 119, 120, 121, 122, /* PORT14x */
|
||||
};
|
||||
static const int port_range1_muxvals[] = {
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT12x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT13x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT14x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT15x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT16x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT17x */
|
||||
};
|
||||
static const unsigned port_range2_pins[] = {
|
||||
61, 62, 63, 64, 65, 66, 67, 68, /* PORT18x */
|
||||
};
|
||||
static const int port_range2_muxvals[] = {
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT18x */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, /* PORT19x */
|
||||
};
|
||||
static const unsigned port_range3_pins[] = {
|
||||
123, 124, 125, 126, 127, 128, 129, 130, /* PORT20x */
|
||||
131, 132, 133, 134, 135, 136, 137, 138, /* PORT21x */
|
||||
139, 140, 141, 142, 143, 144, 145, 146, /* PORT22x */
|
||||
147, 148, 149, 150, 151, 152, 153, 154, /* PORT23x */
|
||||
155, 156, 157, 158, 159, 160, 161, 162, /* PORT24x */
|
||||
163, 164, 165, 166, 167, /* PORT250-254 */
|
||||
};
|
||||
static const int port_range3_muxvals[] = {
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT20x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT21x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT22x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT23x */
|
||||
15, 15, 15, 15, 15, 15, 15, 15, /* PORT24x */
|
||||
15, 15, 15, 15, 15, /* PORT25x */
|
||||
15, 15, 15, 15, 15, /* PORT250-254 */
|
||||
};
|
||||
static const unsigned xirq_pins[] = {
|
||||
149, 150, 151, 152, 153, 154, 155, 156, /* XIRQ0-7 */
|
||||
@@ -695,174 +697,177 @@ static const struct uniphier_pinctrl_group uniphier_ld20_groups[] = {
|
||||
UNIPHIER_PINCTRL_GROUP(usb1),
|
||||
UNIPHIER_PINCTRL_GROUP(usb2),
|
||||
UNIPHIER_PINCTRL_GROUP(usb3),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range0),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range1),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range2),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_PORT(port_range3),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq),
|
||||
UNIPHIER_PINCTRL_GROUP_GPIO_RANGE_IRQ(xirq_alternatives),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port00, port_range, 0),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port01, port_range, 1),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port02, port_range, 2),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port03, port_range, 3),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port04, port_range, 4),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port05, port_range, 5),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port06, port_range, 6),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port07, port_range, 7),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port10, port_range, 8),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port11, port_range, 9),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port12, port_range, 10),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port13, port_range, 11),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port14, port_range, 12),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port15, port_range, 13),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port16, port_range, 14),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port17, port_range, 15),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port20, port_range, 16),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port21, port_range, 17),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port22, port_range, 18),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port23, port_range, 19),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port24, port_range, 20),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port25, port_range, 21),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port26, port_range, 22),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port27, port_range, 23),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port30, port_range, 24),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port31, port_range, 25),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port32, port_range, 26),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port33, port_range, 27),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port34, port_range, 28),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port35, port_range, 29),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port36, port_range, 30),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port37, port_range, 31),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port40, port_range, 32),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port41, port_range, 33),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port42, port_range, 34),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port43, port_range, 35),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port44, port_range, 36),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port45, port_range, 37),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port46, port_range, 38),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port47, port_range, 39),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port50, port_range, 40),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port51, port_range, 41),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port52, port_range, 42),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port53, port_range, 43),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port54, port_range, 44),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port55, port_range, 45),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port56, port_range, 46),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port57, port_range, 47),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port60, port_range, 48),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port61, port_range, 49),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port62, port_range, 50),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port63, port_range, 51),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port64, port_range, 52),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port65, port_range, 53),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port66, port_range, 54),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port67, port_range, 55),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port70, port_range, 56),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port71, port_range, 57),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port72, port_range, 58),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port73, port_range, 59),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port74, port_range, 60),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port75, port_range, 61),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port76, port_range, 62),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port77, port_range, 63),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port80, port_range, 64),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port81, port_range, 65),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port82, port_range, 66),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port83, port_range, 67),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port84, port_range, 68),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port85, port_range, 69),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port86, port_range, 70),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port87, port_range, 71),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port90, port_range, 72),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port91, port_range, 73),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port92, port_range, 74),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port93, port_range, 75),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port94, port_range, 76),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port95, port_range, 77),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port96, port_range, 78),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port97, port_range, 79),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port100, port_range, 80),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port101, port_range, 81),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port102, port_range, 82),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port103, port_range, 83),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port104, port_range, 84),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port105, port_range, 85),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port106, port_range, 86),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port107, port_range, 87),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port120, port_range, 96),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port121, port_range, 97),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port122, port_range, 98),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port123, port_range, 99),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port124, port_range, 100),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port125, port_range, 101),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port126, port_range, 102),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port127, port_range, 103),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port130, port_range, 104),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port131, port_range, 105),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port132, port_range, 106),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port133, port_range, 107),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port134, port_range, 108),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port135, port_range, 109),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port136, port_range, 110),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port137, port_range, 111),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port140, port_range, 112),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port141, port_range, 113),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port142, port_range, 114),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port143, port_range, 115),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port144, port_range, 116),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port145, port_range, 117),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port146, port_range, 118),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port147, port_range, 119),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port180, port_range, 144),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port181, port_range, 145),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port182, port_range, 146),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port183, port_range, 147),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port184, port_range, 148),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port185, port_range, 149),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port186, port_range, 150),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port187, port_range, 151),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port200, port_range, 160),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port201, port_range, 161),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port202, port_range, 162),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port203, port_range, 163),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port204, port_range, 164),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port205, port_range, 165),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port206, port_range, 166),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port207, port_range, 167),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port210, port_range, 168),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port211, port_range, 169),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port212, port_range, 170),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port213, port_range, 171),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port214, port_range, 172),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port215, port_range, 173),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port216, port_range, 174),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port217, port_range, 175),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port220, port_range, 176),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port221, port_range, 177),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port222, port_range, 178),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port223, port_range, 179),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port224, port_range, 180),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port225, port_range, 181),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port226, port_range, 182),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port227, port_range, 183),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port230, port_range, 184),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port231, port_range, 185),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port232, port_range, 186),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port233, port_range, 187),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port234, port_range, 188),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port235, port_range, 189),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port236, port_range, 190),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port237, port_range, 191),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port240, port_range, 192),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port241, port_range, 193),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port242, port_range, 194),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port243, port_range, 195),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port244, port_range, 196),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port245, port_range, 197),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port246, port_range, 198),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port247, port_range, 199),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port250, port_range, 200),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port251, port_range, 201),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port252, port_range, 202),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port253, port_range, 203),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port254, port_range, 204),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port00, port_range0, 0),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port01, port_range0, 1),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port02, port_range0, 2),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port03, port_range0, 3),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port04, port_range0, 4),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port05, port_range0, 5),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port06, port_range0, 6),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port07, port_range0, 7),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port10, port_range0, 8),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port11, port_range0, 9),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port12, port_range0, 10),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port13, port_range0, 11),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port14, port_range0, 12),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port15, port_range0, 13),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port16, port_range0, 14),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port17, port_range0, 15),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port20, port_range0, 16),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port21, port_range0, 17),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port22, port_range0, 18),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port23, port_range0, 19),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port24, port_range0, 20),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port25, port_range0, 21),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port26, port_range0, 22),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port27, port_range0, 23),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port30, port_range0, 24),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port31, port_range0, 25),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port32, port_range0, 26),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port33, port_range0, 27),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port34, port_range0, 28),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port35, port_range0, 29),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port36, port_range0, 30),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port37, port_range0, 31),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port40, port_range0, 32),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port41, port_range0, 33),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port42, port_range0, 34),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port43, port_range0, 35),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port44, port_range0, 36),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port45, port_range0, 37),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port46, port_range0, 38),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port47, port_range0, 39),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port50, port_range0, 40),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port51, port_range0, 41),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port52, port_range0, 42),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port53, port_range0, 43),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port54, port_range0, 44),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port55, port_range0, 45),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port56, port_range0, 46),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port57, port_range0, 47),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port60, port_range0, 48),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port61, port_range0, 49),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port62, port_range0, 50),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port63, port_range0, 51),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port64, port_range0, 52),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port65, port_range0, 53),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port66, port_range0, 54),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port67, port_range0, 55),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port70, port_range0, 56),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port71, port_range0, 57),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port72, port_range0, 58),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port73, port_range0, 59),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port74, port_range0, 60),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port75, port_range0, 61),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port76, port_range0, 62),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port77, port_range0, 63),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port80, port_range0, 64),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port81, port_range0, 65),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port82, port_range0, 66),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port83, port_range0, 67),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port84, port_range0, 68),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port85, port_range0, 69),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port86, port_range0, 70),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port87, port_range0, 71),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port90, port_range0, 72),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port91, port_range0, 73),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port92, port_range0, 74),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port93, port_range0, 75),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port94, port_range0, 76),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port95, port_range0, 77),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port96, port_range0, 78),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port97, port_range0, 79),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port100, port_range0, 80),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port101, port_range0, 81),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port102, port_range0, 82),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port103, port_range0, 83),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port104, port_range0, 84),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port105, port_range0, 85),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port106, port_range0, 86),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port107, port_range0, 87),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port120, port_range1, 0),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port121, port_range1, 1),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port122, port_range1, 2),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port123, port_range1, 3),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port124, port_range1, 4),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port125, port_range1, 5),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port126, port_range1, 6),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port127, port_range1, 7),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port130, port_range1, 8),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port131, port_range1, 9),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port132, port_range1, 10),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port133, port_range1, 11),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port134, port_range1, 12),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port135, port_range1, 13),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port136, port_range1, 14),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port137, port_range1, 15),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port140, port_range1, 16),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port141, port_range1, 17),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port142, port_range1, 18),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port143, port_range1, 19),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port144, port_range1, 20),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port145, port_range1, 21),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port146, port_range1, 22),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port147, port_range1, 23),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port180, port_range2, 0),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port181, port_range2, 1),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port182, port_range2, 2),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port183, port_range2, 3),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port184, port_range2, 4),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port185, port_range2, 5),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port186, port_range2, 6),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port187, port_range2, 7),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port200, port_range3, 0),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port201, port_range3, 1),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port202, port_range3, 2),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port203, port_range3, 3),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port204, port_range3, 4),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port205, port_range3, 5),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port206, port_range3, 6),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port207, port_range3, 7),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port210, port_range3, 8),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port211, port_range3, 9),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port212, port_range3, 10),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port213, port_range3, 11),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port214, port_range3, 12),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port215, port_range3, 13),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port216, port_range3, 14),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port217, port_range3, 15),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port220, port_range3, 16),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port221, port_range3, 17),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port222, port_range3, 18),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port223, port_range3, 19),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port224, port_range3, 20),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port225, port_range3, 21),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port226, port_range3, 22),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port227, port_range3, 23),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port230, port_range3, 24),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port231, port_range3, 25),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port232, port_range3, 26),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port233, port_range3, 27),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port234, port_range3, 28),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port235, port_range3, 29),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port236, port_range3, 30),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port237, port_range3, 31),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port240, port_range3, 32),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port241, port_range3, 33),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port242, port_range3, 34),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port243, port_range3, 35),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port244, port_range3, 36),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port245, port_range3, 37),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port246, port_range3, 38),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port247, port_range3, 39),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port250, port_range3, 40),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port251, port_range3, 41),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port252, port_range3, 42),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port253, port_range3, 43),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(port254, port_range3, 44),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(xirq0, xirq, 0),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(xirq1, xirq, 1),
|
||||
UNIPHIER_PINCTRL_GROUP_SINGLE(xirq2, xirq, 2),
|
||||
|
||||
@@ -2385,6 +2385,7 @@ static ssize_t comedi_write(struct file *file, const char __user *buf,
|
||||
continue;
|
||||
}
|
||||
|
||||
set_current_state(TASK_RUNNING);
|
||||
wp = async->buf_write_ptr;
|
||||
n1 = min(n, async->prealloc_bufsz - wp);
|
||||
n2 = n - n1;
|
||||
@@ -2517,6 +2518,8 @@ static ssize_t comedi_read(struct file *file, char __user *buf, size_t nbytes,
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
set_current_state(TASK_RUNNING);
|
||||
rp = async->buf_read_ptr;
|
||||
n1 = min(n, async->prealloc_bufsz - rp);
|
||||
n2 = n - n1;
|
||||
|
||||
@@ -472,7 +472,7 @@ static int ad2s1210_read_raw(struct iio_dev *indio_dev,
|
||||
long m)
|
||||
{
|
||||
struct ad2s1210_state *st = iio_priv(indio_dev);
|
||||
bool negative;
|
||||
u16 negative;
|
||||
int ret = 0;
|
||||
u16 pos;
|
||||
s16 vel;
|
||||
|
||||
@@ -45,6 +45,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
|
||||
{USB_DEVICE(0x2001, 0x3311)}, /* DLink GO-USB-N150 REV B1 */
|
||||
{USB_DEVICE(0x2357, 0x010c)}, /* TP-Link TL-WN722N v2 */
|
||||
{USB_DEVICE(0x0df6, 0x0076)}, /* Sitecom N150 v2 */
|
||||
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0xffef)}, /* Rosewill RNX-N150NUB */
|
||||
{} /* Terminating entry */
|
||||
};
|
||||
|
||||
|
||||
@@ -418,6 +418,7 @@ int iscsit_reset_np_thread(
|
||||
return 0;
|
||||
}
|
||||
np->np_thread_state = ISCSI_NP_THREAD_RESET;
|
||||
atomic_inc(&np->np_reset_count);
|
||||
|
||||
if (np->np_thread) {
|
||||
spin_unlock_bh(&np->np_thread_lock);
|
||||
@@ -2177,6 +2178,7 @@ iscsit_setup_text_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
|
||||
cmd->cmd_sn = be32_to_cpu(hdr->cmdsn);
|
||||
cmd->exp_stat_sn = be32_to_cpu(hdr->exp_statsn);
|
||||
cmd->data_direction = DMA_NONE;
|
||||
kfree(cmd->text_in_ptr);
|
||||
cmd->text_in_ptr = NULL;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -1233,9 +1233,11 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
|
||||
flush_signals(current);
|
||||
|
||||
spin_lock_bh(&np->np_thread_lock);
|
||||
if (np->np_thread_state == ISCSI_NP_THREAD_RESET) {
|
||||
if (atomic_dec_if_positive(&np->np_reset_count) >= 0) {
|
||||
np->np_thread_state = ISCSI_NP_THREAD_ACTIVE;
|
||||
spin_unlock_bh(&np->np_thread_lock);
|
||||
complete(&np->np_restart_comp);
|
||||
return 1;
|
||||
} else if (np->np_thread_state == ISCSI_NP_THREAD_SHUTDOWN) {
|
||||
spin_unlock_bh(&np->np_thread_lock);
|
||||
goto exit;
|
||||
@@ -1268,7 +1270,8 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
|
||||
goto exit;
|
||||
} else if (rc < 0) {
|
||||
spin_lock_bh(&np->np_thread_lock);
|
||||
if (np->np_thread_state == ISCSI_NP_THREAD_RESET) {
|
||||
if (atomic_dec_if_positive(&np->np_reset_count) >= 0) {
|
||||
np->np_thread_state = ISCSI_NP_THREAD_ACTIVE;
|
||||
spin_unlock_bh(&np->np_thread_lock);
|
||||
complete(&np->np_restart_comp);
|
||||
iscsit_put_transport(conn->conn_transport);
|
||||
|
||||
@@ -364,7 +364,7 @@ void core_tpg_del_initiator_node_acl(struct se_node_acl *acl)
|
||||
mutex_lock(&tpg->acl_node_mutex);
|
||||
if (acl->dynamic_node_acl)
|
||||
acl->dynamic_node_acl = 0;
|
||||
list_del(&acl->acl_list);
|
||||
list_del_init(&acl->acl_list);
|
||||
mutex_unlock(&tpg->acl_node_mutex);
|
||||
|
||||
target_shutdown_sessions(acl);
|
||||
@@ -540,7 +540,7 @@ int core_tpg_deregister(struct se_portal_group *se_tpg)
|
||||
* in transport_deregister_session().
|
||||
*/
|
||||
list_for_each_entry_safe(nacl, nacl_tmp, &node_list, acl_list) {
|
||||
list_del(&nacl->acl_list);
|
||||
list_del_init(&nacl->acl_list);
|
||||
|
||||
core_tpg_wait_for_nacl_pr_ref(nacl);
|
||||
core_free_device_list_for_node(nacl, se_tpg);
|
||||
|
||||
@@ -465,7 +465,7 @@ static void target_complete_nacl(struct kref *kref)
|
||||
}
|
||||
|
||||
mutex_lock(&se_tpg->acl_node_mutex);
|
||||
list_del(&nacl->acl_list);
|
||||
list_del_init(&nacl->acl_list);
|
||||
mutex_unlock(&se_tpg->acl_node_mutex);
|
||||
|
||||
core_tpg_wait_for_nacl_pr_ref(nacl);
|
||||
@@ -537,7 +537,7 @@ void transport_free_session(struct se_session *se_sess)
|
||||
spin_unlock_irqrestore(&se_nacl->nacl_sess_lock, flags);
|
||||
|
||||
if (se_nacl->dynamic_stop)
|
||||
list_del(&se_nacl->acl_list);
|
||||
list_del_init(&se_nacl->acl_list);
|
||||
}
|
||||
mutex_unlock(&se_tpg->acl_node_mutex);
|
||||
|
||||
|
||||
@@ -1892,7 +1892,7 @@ void usb_hcd_flush_endpoint(struct usb_device *udev,
|
||||
/* No more submits can occur */
|
||||
spin_lock_irq(&hcd_urb_list_lock);
|
||||
rescan:
|
||||
list_for_each_entry (urb, &ep->urb_list, urb_list) {
|
||||
list_for_each_entry_reverse(urb, &ep->urb_list, urb_list) {
|
||||
int is_in;
|
||||
|
||||
if (urb->unlinked)
|
||||
@@ -2504,6 +2504,8 @@ void usb_hc_died (struct usb_hcd *hcd)
|
||||
}
|
||||
if (usb_hcd_is_primary_hcd(hcd) && hcd->shared_hcd) {
|
||||
hcd = hcd->shared_hcd;
|
||||
clear_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
|
||||
set_bit(HCD_FLAG_DEAD, &hcd->flags);
|
||||
if (hcd->rh_registered) {
|
||||
clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
|
||||
|
||||
|
||||
@@ -4728,7 +4728,8 @@ hub_power_remaining(struct usb_hub *hub)
|
||||
static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
|
||||
u16 portchange)
|
||||
{
|
||||
int status, i;
|
||||
int status = -ENODEV;
|
||||
int i;
|
||||
unsigned unit_load;
|
||||
struct usb_device *hdev = hub->hdev;
|
||||
struct usb_hcd *hcd = bus_to_hcd(hdev->bus);
|
||||
@@ -4932,9 +4933,10 @@ loop:
|
||||
|
||||
done:
|
||||
hub_port_disable(hub, port1, 1);
|
||||
if (hcd->driver->relinquish_port && !hub->hdev->parent)
|
||||
hcd->driver->relinquish_port(hcd, port1);
|
||||
|
||||
if (hcd->driver->relinquish_port && !hub->hdev->parent) {
|
||||
if (status != -ENOTCONN && status != -ENODEV)
|
||||
hcd->driver->relinquish_port(hcd, port1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Handle physical or logical connection change events.
|
||||
|
||||
@@ -150,6 +150,9 @@ static const struct usb_device_id usb_quirk_list[] = {
|
||||
/* appletouch */
|
||||
{ USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
/* Genesys Logic hub, internally used by Moshi USB to Ethernet Adapter */
|
||||
{ USB_DEVICE(0x05e3, 0x0616), .driver_info = USB_QUIRK_NO_LPM },
|
||||
|
||||
/* Avision AV600U */
|
||||
{ USB_DEVICE(0x0638, 0x0a13), .driver_info =
|
||||
USB_QUIRK_STRING_FETCH_255 },
|
||||
@@ -256,6 +259,7 @@ static const struct usb_device_id usb_amd_resume_quirk_list[] = {
|
||||
{ USB_DEVICE(0x093a, 0x2500), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
{ USB_DEVICE(0x093a, 0x2510), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
{ USB_DEVICE(0x093a, 0x2521), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
{ USB_DEVICE(0x03f0, 0x2b4a), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
/* Logitech Optical Mouse M90/M100 */
|
||||
{ USB_DEVICE(0x046d, 0xc05a), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
@@ -127,6 +127,22 @@ out:
|
||||
*/
|
||||
#define USB_ACPI_LOCATION_VALID (1 << 31)
|
||||
|
||||
static struct acpi_device *usb_acpi_find_port(struct acpi_device *parent,
|
||||
int raw)
|
||||
{
|
||||
struct acpi_device *adev;
|
||||
|
||||
if (!parent)
|
||||
return NULL;
|
||||
|
||||
list_for_each_entry(adev, &parent->children, node) {
|
||||
if (acpi_device_adr(adev) == raw)
|
||||
return adev;
|
||||
}
|
||||
|
||||
return acpi_find_child_device(parent, raw, false);
|
||||
}
|
||||
|
||||
static struct acpi_device *usb_acpi_find_companion(struct device *dev)
|
||||
{
|
||||
struct usb_device *udev;
|
||||
@@ -174,8 +190,10 @@ static struct acpi_device *usb_acpi_find_companion(struct device *dev)
|
||||
int raw;
|
||||
|
||||
raw = usb_hcd_find_raw_port_number(hcd, port1);
|
||||
adev = acpi_find_child_device(ACPI_COMPANION(&udev->dev),
|
||||
raw, false);
|
||||
|
||||
adev = usb_acpi_find_port(ACPI_COMPANION(&udev->dev),
|
||||
raw);
|
||||
|
||||
if (!adev)
|
||||
return NULL;
|
||||
} else {
|
||||
@@ -186,7 +204,9 @@ static struct acpi_device *usb_acpi_find_companion(struct device *dev)
|
||||
return NULL;
|
||||
|
||||
acpi_bus_get_device(parent_handle, &adev);
|
||||
adev = acpi_find_child_device(adev, port1, false);
|
||||
|
||||
adev = usb_acpi_find_port(adev, port1);
|
||||
|
||||
if (!adev)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1518,6 +1518,18 @@ static void android_disconnect(struct usb_gadget *gadget)
|
||||
struct usb_composite_dev *cdev = get_gadget_data(gadget);
|
||||
struct gadget_info *gi = container_of(cdev, struct gadget_info, cdev);
|
||||
|
||||
/* FIXME: There's a race between usb_gadget_udc_stop() which is likely
|
||||
* to set the gadget driver to NULL in the udc driver and this drivers
|
||||
* gadget disconnect fn which likely checks for the gadget driver to
|
||||
* be a null ptr. It happens that unbind (doing set_gadget_data(NULL))
|
||||
* is called before the gadget driver is set to NULL and the udc driver
|
||||
* calls disconnect fn which results in cdev being a null ptr.
|
||||
*/
|
||||
if (cdev == NULL) {
|
||||
WARN(1, "%s: gadget driver already disconnected\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
/* accessory HID support can be active while the
|
||||
accessory function is not actually enabled,
|
||||
so we need to inform it when we are disconnected.
|
||||
|
||||
@@ -811,6 +811,14 @@ static struct hid_driver acc_hid_driver = {
|
||||
.probe = acc_hid_probe,
|
||||
};
|
||||
|
||||
static void acc_complete_setup_noop(struct usb_ep *ep, struct usb_request *req)
|
||||
{
|
||||
/*
|
||||
* Default no-op function when nothing needs to be done for the
|
||||
* setup request
|
||||
*/
|
||||
}
|
||||
|
||||
int acc_ctrlrequest(struct usb_composite_dev *cdev,
|
||||
const struct usb_ctrlrequest *ctrl)
|
||||
{
|
||||
@@ -838,6 +846,7 @@ int acc_ctrlrequest(struct usb_composite_dev *cdev,
|
||||
schedule_delayed_work(
|
||||
&dev->start_work, msecs_to_jiffies(10));
|
||||
value = 0;
|
||||
cdev->req->complete = acc_complete_setup_noop;
|
||||
} else if (b_request == ACCESSORY_SEND_STRING) {
|
||||
dev->string_index = w_index;
|
||||
cdev->gadget->ep0->driver_data = dev;
|
||||
@@ -846,10 +855,13 @@ int acc_ctrlrequest(struct usb_composite_dev *cdev,
|
||||
} else if (b_request == ACCESSORY_SET_AUDIO_MODE &&
|
||||
w_index == 0 && w_length == 0) {
|
||||
dev->audio_mode = w_value;
|
||||
cdev->req->complete = acc_complete_setup_noop;
|
||||
value = 0;
|
||||
} else if (b_request == ACCESSORY_REGISTER_HID) {
|
||||
cdev->req->complete = acc_complete_setup_noop;
|
||||
value = acc_register_hid(dev, w_value, w_index);
|
||||
} else if (b_request == ACCESSORY_UNREGISTER_HID) {
|
||||
cdev->req->complete = acc_complete_setup_noop;
|
||||
value = acc_unregister_hid(dev, w_value);
|
||||
} else if (b_request == ACCESSORY_SET_HID_REPORT_DESC) {
|
||||
spin_lock_irqsave(&dev->lock, flags);
|
||||
@@ -884,7 +896,7 @@ int acc_ctrlrequest(struct usb_composite_dev *cdev,
|
||||
if (b_request == ACCESSORY_GET_PROTOCOL) {
|
||||
*((u16 *)cdev->req->buf) = PROTOCOL_VERSION;
|
||||
value = sizeof(u16);
|
||||
|
||||
cdev->req->complete = acc_complete_setup_noop;
|
||||
/* clear any string left over from a previous session */
|
||||
memset(dev->manufacturer, 0, sizeof(dev->manufacturer));
|
||||
memset(dev->model, 0, sizeof(dev->model));
|
||||
|
||||
@@ -685,21 +685,32 @@ static struct renesas_usb3_request *usb3_get_request(struct renesas_usb3_ep
|
||||
return usb3_req;
|
||||
}
|
||||
|
||||
static void __usb3_request_done(struct renesas_usb3_ep *usb3_ep,
|
||||
struct renesas_usb3_request *usb3_req,
|
||||
int status)
|
||||
{
|
||||
struct renesas_usb3 *usb3 = usb3_ep_to_usb3(usb3_ep);
|
||||
|
||||
dev_dbg(usb3_to_dev(usb3), "giveback: ep%2d, %u, %u, %d\n",
|
||||
usb3_ep->num, usb3_req->req.length, usb3_req->req.actual,
|
||||
status);
|
||||
usb3_req->req.status = status;
|
||||
usb3_ep->started = false;
|
||||
list_del_init(&usb3_req->queue);
|
||||
spin_unlock(&usb3->lock);
|
||||
usb_gadget_giveback_request(&usb3_ep->ep, &usb3_req->req);
|
||||
spin_lock(&usb3->lock);
|
||||
}
|
||||
|
||||
static void usb3_request_done(struct renesas_usb3_ep *usb3_ep,
|
||||
struct renesas_usb3_request *usb3_req, int status)
|
||||
{
|
||||
struct renesas_usb3 *usb3 = usb3_ep_to_usb3(usb3_ep);
|
||||
unsigned long flags;
|
||||
|
||||
dev_dbg(usb3_to_dev(usb3), "giveback: ep%2d, %u, %u, %d\n",
|
||||
usb3_ep->num, usb3_req->req.length, usb3_req->req.actual,
|
||||
status);
|
||||
usb3_req->req.status = status;
|
||||
spin_lock_irqsave(&usb3->lock, flags);
|
||||
usb3_ep->started = false;
|
||||
list_del_init(&usb3_req->queue);
|
||||
__usb3_request_done(usb3_ep, usb3_req, status);
|
||||
spin_unlock_irqrestore(&usb3->lock, flags);
|
||||
usb_gadget_giveback_request(&usb3_ep->ep, &usb3_req->req);
|
||||
}
|
||||
|
||||
static void usb3_irq_epc_pipe0_status_end(struct renesas_usb3 *usb3)
|
||||
|
||||
@@ -98,6 +98,7 @@ enum amd_chipset_gen {
|
||||
AMD_CHIPSET_HUDSON2,
|
||||
AMD_CHIPSET_BOLTON,
|
||||
AMD_CHIPSET_YANGTZE,
|
||||
AMD_CHIPSET_TAISHAN,
|
||||
AMD_CHIPSET_UNKNOWN,
|
||||
};
|
||||
|
||||
@@ -141,6 +142,11 @@ static int amd_chipset_sb_type_init(struct amd_chipset_info *pinfo)
|
||||
pinfo->sb_type.gen = AMD_CHIPSET_SB700;
|
||||
else if (rev >= 0x40 && rev <= 0x4f)
|
||||
pinfo->sb_type.gen = AMD_CHIPSET_SB800;
|
||||
}
|
||||
pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
|
||||
0x145c, NULL);
|
||||
if (pinfo->smbus_dev) {
|
||||
pinfo->sb_type.gen = AMD_CHIPSET_TAISHAN;
|
||||
} else {
|
||||
pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
|
||||
PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, NULL);
|
||||
@@ -260,11 +266,12 @@ int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
|
||||
{
|
||||
/* Make sure amd chipset type has already been initialized */
|
||||
usb_amd_find_chipset_info();
|
||||
if (amd_chipset.sb_type.gen != AMD_CHIPSET_YANGTZE)
|
||||
return 0;
|
||||
|
||||
dev_dbg(&pdev->dev, "QUIRK: Enable AMD remote wakeup fix\n");
|
||||
return 1;
|
||||
if (amd_chipset.sb_type.gen == AMD_CHIPSET_YANGTZE ||
|
||||
amd_chipset.sb_type.gen == AMD_CHIPSET_TAISHAN) {
|
||||
dev_dbg(&pdev->dev, "QUIRK: Enable AMD remote wakeup fix\n");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usb_hcd_amd_remote_wakeup_quirk);
|
||||
|
||||
|
||||
@@ -139,6 +139,7 @@ static void musb_h_tx_flush_fifo(struct musb_hw_ep *ep)
|
||||
"Could not flush host TX%d fifo: csr: %04x\n",
|
||||
ep->epnum, csr))
|
||||
return;
|
||||
mdelay(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,9 +20,13 @@
|
||||
/* Low Power Status register (LPSTS) */
|
||||
#define LPSTS_SUSPM 0x4000
|
||||
|
||||
/* USB General control register 2 (UGCTRL2), bit[31:6] should be 0 */
|
||||
/*
|
||||
* USB General control register 2 (UGCTRL2)
|
||||
* Remarks: bit[31:11] and bit[9:6] should be 0
|
||||
*/
|
||||
#define UGCTRL2_RESERVED_3 0x00000001 /* bit[3:0] should be B'0001 */
|
||||
#define UGCTRL2_USB0SEL_OTG 0x00000030
|
||||
#define UGCTRL2_VBUSSEL 0x00000400
|
||||
|
||||
static void usbhs_write32(struct usbhs_priv *priv, u32 reg, u32 data)
|
||||
{
|
||||
@@ -34,7 +38,8 @@ static int usbhs_rcar3_power_ctrl(struct platform_device *pdev,
|
||||
{
|
||||
struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);
|
||||
|
||||
usbhs_write32(priv, UGCTRL2, UGCTRL2_RESERVED_3 | UGCTRL2_USB0SEL_OTG);
|
||||
usbhs_write32(priv, UGCTRL2, UGCTRL2_RESERVED_3 | UGCTRL2_USB0SEL_OTG |
|
||||
UGCTRL2_VBUSSEL);
|
||||
|
||||
if (enable) {
|
||||
usbhs_bset(priv, LPSTS, LPSTS_SUSPM, LPSTS_SUSPM);
|
||||
|
||||
@@ -136,6 +136,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{ USB_DEVICE(0x10C4, 0x8998) }, /* KCF Technologies PRN */
|
||||
{ USB_DEVICE(0x10C4, 0x8A2A) }, /* HubZ dual ZigBee and Z-Wave dongle */
|
||||
{ USB_DEVICE(0x10C4, 0x8A5E) }, /* CEL EM3588 ZigBee USB Stick Long Range */
|
||||
{ USB_DEVICE(0x10C4, 0x8B34) }, /* Qivicon ZigBee USB Radio Stick */
|
||||
{ USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
|
||||
{ USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
|
||||
{ USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */
|
||||
|
||||
@@ -2025,6 +2025,8 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */
|
||||
.driver_info = (kernel_ulong_t)&net_intf4_blacklist },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e35, 0xff), /* D-Link DWM-222 */
|
||||
.driver_info = (kernel_ulong_t)&net_intf4_blacklist },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x7e11, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/A3 */
|
||||
|
||||
@@ -49,6 +49,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
|
||||
{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) },
|
||||
{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
|
||||
{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_UC485) },
|
||||
{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID2) },
|
||||
{ USB_DEVICE(ATEN_VENDOR_ID2, ATEN_PRODUCT_ID) },
|
||||
{ USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) },
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#define ATEN_VENDOR_ID 0x0557
|
||||
#define ATEN_VENDOR_ID2 0x0547
|
||||
#define ATEN_PRODUCT_ID 0x2008
|
||||
#define ATEN_PRODUCT_UC485 0x2021
|
||||
#define ATEN_PRODUCT_ID2 0x2118
|
||||
|
||||
#define IODATA_VENDOR_ID 0x04bb
|
||||
|
||||
@@ -124,9 +124,9 @@ UNUSUAL_DEV(0x0bc2, 0xab2a, 0x0000, 0x9999,
|
||||
/* Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> */
|
||||
UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999,
|
||||
"Initio Corporation",
|
||||
"",
|
||||
"INIC-3069",
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_NO_ATA_1X),
|
||||
US_FL_NO_ATA_1X | US_FL_IGNORE_RESIDUE),
|
||||
|
||||
/* Reported-by: Tom Arild Naess <tanaess@gmail.com> */
|
||||
UNUSUAL_DEV(0x152d, 0x0539, 0x0000, 0x9999,
|
||||
|
||||
@@ -10,8 +10,7 @@ bool xen_biovec_phys_mergeable(const struct bio_vec *vec1,
|
||||
unsigned long bfn1 = pfn_to_bfn(page_to_pfn(vec1->bv_page));
|
||||
unsigned long bfn2 = pfn_to_bfn(page_to_pfn(vec2->bv_page));
|
||||
|
||||
return __BIOVEC_PHYS_MERGEABLE(vec1, vec2) &&
|
||||
((bfn1 == bfn2) || ((bfn1+1) == bfn2));
|
||||
return bfn1 + PFN_DOWN(vec1->bv_offset + vec1->bv_len) == bfn2;
|
||||
#else
|
||||
/*
|
||||
* XXX: Add support for merging bio_vec when using different page
|
||||
|
||||
@@ -183,15 +183,20 @@ cifs_bp_rename_retry:
|
||||
}
|
||||
|
||||
/*
|
||||
* Don't allow path components longer than the server max.
|
||||
* Don't allow the separator character in a path component.
|
||||
* The VFS will not allow "/", but "\" is allowed by posix.
|
||||
*/
|
||||
static int
|
||||
check_name(struct dentry *direntry)
|
||||
check_name(struct dentry *direntry, struct cifs_tcon *tcon)
|
||||
{
|
||||
struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb);
|
||||
int i;
|
||||
|
||||
if (unlikely(direntry->d_name.len >
|
||||
tcon->fsAttrInfo.MaxPathNameComponentLength))
|
||||
return -ENAMETOOLONG;
|
||||
|
||||
if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)) {
|
||||
for (i = 0; i < direntry->d_name.len; i++) {
|
||||
if (direntry->d_name.name[i] == '\\') {
|
||||
@@ -489,10 +494,6 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
|
||||
return finish_no_open(file, res);
|
||||
}
|
||||
|
||||
rc = check_name(direntry);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
xid = get_xid();
|
||||
|
||||
cifs_dbg(FYI, "parent inode = 0x%p name is: %pd and dentry = 0x%p\n",
|
||||
@@ -505,6 +506,11 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
|
||||
}
|
||||
|
||||
tcon = tlink_tcon(tlink);
|
||||
|
||||
rc = check_name(direntry, tcon);
|
||||
if (rc)
|
||||
goto out_free_xid;
|
||||
|
||||
server = tcon->ses->server;
|
||||
|
||||
if (server->ops->new_lease_key)
|
||||
@@ -765,7 +771,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
|
||||
}
|
||||
pTcon = tlink_tcon(tlink);
|
||||
|
||||
rc = check_name(direntry);
|
||||
rc = check_name(direntry, pTcon);
|
||||
if (rc)
|
||||
goto lookup_out;
|
||||
|
||||
|
||||
@@ -2930,8 +2930,8 @@ copy_fs_info_to_kstatfs(struct smb2_fs_full_size_info *pfs_inf,
|
||||
kst->f_bsize = le32_to_cpu(pfs_inf->BytesPerSector) *
|
||||
le32_to_cpu(pfs_inf->SectorsPerAllocationUnit);
|
||||
kst->f_blocks = le64_to_cpu(pfs_inf->TotalAllocationUnits);
|
||||
kst->f_bfree = le64_to_cpu(pfs_inf->ActualAvailableAllocationUnits);
|
||||
kst->f_bavail = le64_to_cpu(pfs_inf->CallerAvailableAllocationUnits);
|
||||
kst->f_bfree = kst->f_bavail =
|
||||
le64_to_cpu(pfs_inf->CallerAvailableAllocationUnits);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ struct fuse_file *fuse_file_alloc(struct fuse_conn *fc)
|
||||
{
|
||||
struct fuse_file *ff;
|
||||
|
||||
ff = kmalloc(sizeof(struct fuse_file), GFP_KERNEL);
|
||||
ff = kzalloc(sizeof(struct fuse_file), GFP_KERNEL);
|
||||
if (unlikely(!ff))
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -121,6 +121,7 @@ config PNFS_FILE_LAYOUT
|
||||
config PNFS_BLOCK
|
||||
tristate
|
||||
depends on NFS_V4_1 && BLK_DEV_DM
|
||||
depends on 64BIT || LBDAF
|
||||
default NFS_V4
|
||||
|
||||
config PNFS_OBJLAYOUT
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user