forked from luck/tmp_suning_uos_patched
Linux 5.5-rc5
-----BEGIN PGP SIGNATURE----- iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAl4SYegeHHRvcnZhbGRz QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiG4m4H+QGCUN8SXN+2B+0/ BfzOf7PFoKzAx3NwDbJQIZqhSl+Zfa4n3VGPEF8sXsvoQgdYvuJnS/5JiAZ9iRIH HAfFzegzQ3mCl8Du+SqCvQKs2Jt4OMCX62KGRebRBhpoKfZdwmN7n7pn9lWO771K 9rxTpeItXhmK46jOFRbi5oyQfmkfSfyUN1b9CB53FXFS+ZDkDNA7QQiIYnKOD7SZ RrL7czhZ580QOC61qOlnz1GIhRzvU5SXg4OtuI3YfoOJRY5FKC3YtOgLReT0vPs+ vEhAyP93upVXIhqm10WHNjd4t4a45Vy5ff64uFsQ9QV4nnqsC2C70YwWbVDdtz/W Lm0mvE8= =NECs -----END PGP SIGNATURE----- Merge tag 'v5.5-rc5' into locking/kcsan, to resolve conflict Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
31c7ac388a
|
@ -251,11 +251,11 @@ selectively from different subsystems.
|
|||
.. code-block:: c
|
||||
|
||||
struct kcov_remote_arg {
|
||||
unsigned trace_mode;
|
||||
unsigned area_size;
|
||||
unsigned num_handles;
|
||||
uint64_t common_handle;
|
||||
uint64_t handles[0];
|
||||
__u32 trace_mode;
|
||||
__u32 area_size;
|
||||
__u32 num_handles;
|
||||
__aligned_u64 common_handle;
|
||||
__aligned_u64 handles[0];
|
||||
};
|
||||
|
||||
#define KCOV_INIT_TRACE _IOR('c', 1, unsigned long)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
| openrisc: | TODO |
|
||||
| parisc: | TODO |
|
||||
| powerpc: | ok |
|
||||
| riscv: | TODO |
|
||||
| riscv: | ok |
|
||||
| s390: | ok |
|
||||
| sh: | ok |
|
||||
| sparc: | TODO |
|
||||
|
|
|
@ -230,12 +230,6 @@ simultaneously on two ports. The driver checks the consistency of the schedules
|
|||
against this restriction and errors out when appropriate. Schedule analysis is
|
||||
needed to avoid this, which is outside the scope of the document.
|
||||
|
||||
At the moment, the time-aware scheduler can only be triggered based on a
|
||||
standalone clock and not based on PTP time. This means the base-time argument
|
||||
from tc-taprio is ignored and the schedule starts right away. It also means it
|
||||
is more difficult to phase-align the scheduler with the other devices in the
|
||||
network.
|
||||
|
||||
Device Tree bindings and board design
|
||||
=====================================
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ lack of a better place.
|
|||
volatile-considered-harmful
|
||||
botching-up-ioctls
|
||||
clang-format
|
||||
../riscv/patch-acceptance
|
||||
|
||||
.. only:: subproject and html
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ RISC-V architecture
|
|||
|
||||
boot-image-header
|
||||
pmu
|
||||
patch-acceptance
|
||||
|
||||
.. only:: subproject and html
|
||||
|
||||
|
|
35
Documentation/riscv/patch-acceptance.rst
Normal file
35
Documentation/riscv/patch-acceptance.rst
Normal file
|
@ -0,0 +1,35 @@
|
|||
.. SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
arch/riscv maintenance guidelines for developers
|
||||
================================================
|
||||
|
||||
Overview
|
||||
--------
|
||||
The RISC-V instruction set architecture is developed in the open:
|
||||
in-progress drafts are available for all to review and to experiment
|
||||
with implementations. New module or extension drafts can change
|
||||
during the development process - sometimes in ways that are
|
||||
incompatible with previous drafts. This flexibility can present a
|
||||
challenge for RISC-V Linux maintenance. Linux maintainers disapprove
|
||||
of churn, and the Linux development process prefers well-reviewed and
|
||||
tested code over experimental code. We wish to extend these same
|
||||
principles to the RISC-V-related code that will be accepted for
|
||||
inclusion in the kernel.
|
||||
|
||||
Submit Checklist Addendum
|
||||
-------------------------
|
||||
We'll only accept patches for new modules or extensions if the
|
||||
specifications for those modules or extensions are listed as being
|
||||
"Frozen" or "Ratified" by the RISC-V Foundation. (Developers may, of
|
||||
course, maintain their own Linux kernel trees that contain code for
|
||||
any draft extensions that they wish.)
|
||||
|
||||
Additionally, the RISC-V specification allows implementors to create
|
||||
their own custom extensions. These custom extensions aren't required
|
||||
to go through any review or ratification process by the RISC-V
|
||||
Foundation. To avoid the maintenance complexity and potential
|
||||
performance impact of adding kernel code for implementor-specific
|
||||
RISC-V extensions, we'll only to accept patches for extensions that
|
||||
have been officially frozen or ratified by the RISC-V Foundation.
|
||||
(Implementors, may, of course, maintain their own Linux kernel trees
|
||||
containing code for any custom extensions that they wish.)
|
|
@ -771,6 +771,8 @@ F: drivers/thermal/thermal_mmio.c
|
|||
|
||||
AMAZON ETHERNET DRIVERS
|
||||
M: Netanel Belgazal <netanel@amazon.com>
|
||||
M: Arthur Kiyanovski <akiyano@amazon.com>
|
||||
R: Guy Tzalik <gtzalik@amazon.com>
|
||||
R: Saeed Bishara <saeedb@amazon.com>
|
||||
R: Zorik Machulsky <zorik@amazon.com>
|
||||
L: netdev@vger.kernel.org
|
||||
|
@ -14130,6 +14132,7 @@ M: Paul Walmsley <paul.walmsley@sifive.com>
|
|||
M: Palmer Dabbelt <palmer@dabbelt.com>
|
||||
M: Albert Ou <aou@eecs.berkeley.edu>
|
||||
L: linux-riscv@lists.infradead.org
|
||||
P: Documentation/riscv/patch-acceptance.rst
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git
|
||||
S: Supported
|
||||
F: arch/riscv/
|
||||
|
|
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@
|
|||
VERSION = 5
|
||||
PATCHLEVEL = 5
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc4
|
||||
EXTRAVERSION = -rc5
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
@ -1070,7 +1070,6 @@ void arch_remove_memory(int nid, u64 start, u64 size,
|
|||
{
|
||||
unsigned long start_pfn = start >> PAGE_SHIFT;
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
struct zone *zone;
|
||||
|
||||
/*
|
||||
* FIXME: Cleanup page tables (also in arch_add_memory() in case
|
||||
|
@ -1079,7 +1078,6 @@ void arch_remove_memory(int nid, u64 start, u64 size,
|
|||
* unplug. ARCH_ENABLE_MEMORY_HOTREMOVE must not be
|
||||
* unlocked yet.
|
||||
*/
|
||||
zone = page_zone(pfn_to_page(start_pfn));
|
||||
__remove_pages(zone, start_pfn, nr_pages, altmap);
|
||||
__remove_pages(start_pfn, nr_pages, altmap);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -91,7 +91,7 @@ static inline void atomic_##op(int i, atomic_t *v) \
|
|||
"1: %0 = memw_locked(%1);\n" \
|
||||
" %0 = "#op "(%0,%2);\n" \
|
||||
" memw_locked(%1,P3)=%0;\n" \
|
||||
" if !P3 jump 1b;\n" \
|
||||
" if (!P3) jump 1b;\n" \
|
||||
: "=&r" (output) \
|
||||
: "r" (&v->counter), "r" (i) \
|
||||
: "memory", "p3" \
|
||||
|
@ -107,7 +107,7 @@ static inline int atomic_##op##_return(int i, atomic_t *v) \
|
|||
"1: %0 = memw_locked(%1);\n" \
|
||||
" %0 = "#op "(%0,%2);\n" \
|
||||
" memw_locked(%1,P3)=%0;\n" \
|
||||
" if !P3 jump 1b;\n" \
|
||||
" if (!P3) jump 1b;\n" \
|
||||
: "=&r" (output) \
|
||||
: "r" (&v->counter), "r" (i) \
|
||||
: "memory", "p3" \
|
||||
|
@ -124,7 +124,7 @@ static inline int atomic_fetch_##op(int i, atomic_t *v) \
|
|||
"1: %0 = memw_locked(%2);\n" \
|
||||
" %1 = "#op "(%0,%3);\n" \
|
||||
" memw_locked(%2,P3)=%1;\n" \
|
||||
" if !P3 jump 1b;\n" \
|
||||
" if (!P3) jump 1b;\n" \
|
||||
: "=&r" (output), "=&r" (val) \
|
||||
: "r" (&v->counter), "r" (i) \
|
||||
: "memory", "p3" \
|
||||
|
@ -173,7 +173,7 @@ static inline int atomic_fetch_add_unless(atomic_t *v, int a, int u)
|
|||
" }"
|
||||
" memw_locked(%2, p3) = %1;"
|
||||
" {"
|
||||
" if !p3 jump 1b;"
|
||||
" if (!p3) jump 1b;"
|
||||
" }"
|
||||
"2:"
|
||||
: "=&r" (__oldval), "=&r" (tmp)
|
||||
|
|
|
@ -38,7 +38,7 @@ static inline int test_and_clear_bit(int nr, volatile void *addr)
|
|||
"1: R12 = memw_locked(R10);\n"
|
||||
" { P0 = tstbit(R12,R11); R12 = clrbit(R12,R11); }\n"
|
||||
" memw_locked(R10,P1) = R12;\n"
|
||||
" {if !P1 jump 1b; %0 = mux(P0,#1,#0);}\n"
|
||||
" {if (!P1) jump 1b; %0 = mux(P0,#1,#0);}\n"
|
||||
: "=&r" (oldval)
|
||||
: "r" (addr), "r" (nr)
|
||||
: "r10", "r11", "r12", "p0", "p1", "memory"
|
||||
|
@ -62,7 +62,7 @@ static inline int test_and_set_bit(int nr, volatile void *addr)
|
|||
"1: R12 = memw_locked(R10);\n"
|
||||
" { P0 = tstbit(R12,R11); R12 = setbit(R12,R11); }\n"
|
||||
" memw_locked(R10,P1) = R12;\n"
|
||||
" {if !P1 jump 1b; %0 = mux(P0,#1,#0);}\n"
|
||||
" {if (!P1) jump 1b; %0 = mux(P0,#1,#0);}\n"
|
||||
: "=&r" (oldval)
|
||||
: "r" (addr), "r" (nr)
|
||||
: "r10", "r11", "r12", "p0", "p1", "memory"
|
||||
|
@ -88,7 +88,7 @@ static inline int test_and_change_bit(int nr, volatile void *addr)
|
|||
"1: R12 = memw_locked(R10);\n"
|
||||
" { P0 = tstbit(R12,R11); R12 = togglebit(R12,R11); }\n"
|
||||
" memw_locked(R10,P1) = R12;\n"
|
||||
" {if !P1 jump 1b; %0 = mux(P0,#1,#0);}\n"
|
||||
" {if (!P1) jump 1b; %0 = mux(P0,#1,#0);}\n"
|
||||
: "=&r" (oldval)
|
||||
: "r" (addr), "r" (nr)
|
||||
: "r10", "r11", "r12", "p0", "p1", "memory"
|
||||
|
@ -223,7 +223,7 @@ static inline int ffs(int x)
|
|||
int r;
|
||||
|
||||
asm("{ P0 = cmp.eq(%1,#0); %0 = ct0(%1);}\n"
|
||||
"{ if P0 %0 = #0; if !P0 %0 = add(%0,#1);}\n"
|
||||
"{ if (P0) %0 = #0; if (!P0) %0 = add(%0,#1);}\n"
|
||||
: "=&r" (r)
|
||||
: "r" (x)
|
||||
: "p0");
|
||||
|
|
|
@ -30,7 +30,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr,
|
|||
__asm__ __volatile__ (
|
||||
"1: %0 = memw_locked(%1);\n" /* load into retval */
|
||||
" memw_locked(%1,P0) = %2;\n" /* store into memory */
|
||||
" if !P0 jump 1b;\n"
|
||||
" if (!P0) jump 1b;\n"
|
||||
: "=&r" (retval)
|
||||
: "r" (ptr), "r" (x)
|
||||
: "memory", "p0"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
/* For example: %1 = %4 */ \
|
||||
insn \
|
||||
"2: memw_locked(%3,p2) = %1;\n" \
|
||||
" if !p2 jump 1b;\n" \
|
||||
" if (!p2) jump 1b;\n" \
|
||||
" %1 = #0;\n" \
|
||||
"3:\n" \
|
||||
".section .fixup,\"ax\"\n" \
|
||||
|
@ -84,10 +84,10 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, u32 oldval,
|
|||
"1: %1 = memw_locked(%3)\n"
|
||||
" {\n"
|
||||
" p2 = cmp.eq(%1,%4)\n"
|
||||
" if !p2.new jump:NT 3f\n"
|
||||
" if (!p2.new) jump:NT 3f\n"
|
||||
" }\n"
|
||||
"2: memw_locked(%3,p2) = %5\n"
|
||||
" if !p2 jump 1b\n"
|
||||
" if (!p2) jump 1b\n"
|
||||
"3:\n"
|
||||
".section .fixup,\"ax\"\n"
|
||||
"4: %0 = #%6\n"
|
||||
|
|
|
@ -173,6 +173,7 @@ static inline void writel(u32 data, volatile void __iomem *addr)
|
|||
|
||||
void __iomem *ioremap(unsigned long phys_addr, unsigned long size);
|
||||
#define ioremap_nocache ioremap
|
||||
#define ioremap_uc(X, Y) ioremap((X), (Y))
|
||||
|
||||
|
||||
#define __raw_writel writel
|
||||
|
|
|
@ -30,9 +30,9 @@ static inline void arch_read_lock(arch_rwlock_t *lock)
|
|||
__asm__ __volatile__(
|
||||
"1: R6 = memw_locked(%0);\n"
|
||||
" { P3 = cmp.ge(R6,#0); R6 = add(R6,#1);}\n"
|
||||
" { if !P3 jump 1b; }\n"
|
||||
" { if (!P3) jump 1b; }\n"
|
||||
" memw_locked(%0,P3) = R6;\n"
|
||||
" { if !P3 jump 1b; }\n"
|
||||
" { if (!P3) jump 1b; }\n"
|
||||
:
|
||||
: "r" (&lock->lock)
|
||||
: "memory", "r6", "p3"
|
||||
|
@ -46,7 +46,7 @@ static inline void arch_read_unlock(arch_rwlock_t *lock)
|
|||
"1: R6 = memw_locked(%0);\n"
|
||||
" R6 = add(R6,#-1);\n"
|
||||
" memw_locked(%0,P3) = R6\n"
|
||||
" if !P3 jump 1b;\n"
|
||||
" if (!P3) jump 1b;\n"
|
||||
:
|
||||
: "r" (&lock->lock)
|
||||
: "memory", "r6", "p3"
|
||||
|
@ -61,7 +61,7 @@ static inline int arch_read_trylock(arch_rwlock_t *lock)
|
|||
__asm__ __volatile__(
|
||||
" R6 = memw_locked(%1);\n"
|
||||
" { %0 = #0; P3 = cmp.ge(R6,#0); R6 = add(R6,#1);}\n"
|
||||
" { if !P3 jump 1f; }\n"
|
||||
" { if (!P3) jump 1f; }\n"
|
||||
" memw_locked(%1,P3) = R6;\n"
|
||||
" { %0 = P3 }\n"
|
||||
"1:\n"
|
||||
|
@ -78,9 +78,9 @@ static inline void arch_write_lock(arch_rwlock_t *lock)
|
|||
__asm__ __volatile__(
|
||||
"1: R6 = memw_locked(%0)\n"
|
||||
" { P3 = cmp.eq(R6,#0); R6 = #-1;}\n"
|
||||
" { if !P3 jump 1b; }\n"
|
||||
" { if (!P3) jump 1b; }\n"
|
||||
" memw_locked(%0,P3) = R6;\n"
|
||||
" { if !P3 jump 1b; }\n"
|
||||
" { if (!P3) jump 1b; }\n"
|
||||
:
|
||||
: "r" (&lock->lock)
|
||||
: "memory", "r6", "p3"
|
||||
|
@ -94,7 +94,7 @@ static inline int arch_write_trylock(arch_rwlock_t *lock)
|
|||
__asm__ __volatile__(
|
||||
" R6 = memw_locked(%1)\n"
|
||||
" { %0 = #0; P3 = cmp.eq(R6,#0); R6 = #-1;}\n"
|
||||
" { if !P3 jump 1f; }\n"
|
||||
" { if (!P3) jump 1f; }\n"
|
||||
" memw_locked(%1,P3) = R6;\n"
|
||||
" %0 = P3;\n"
|
||||
"1:\n"
|
||||
|
@ -117,9 +117,9 @@ static inline void arch_spin_lock(arch_spinlock_t *lock)
|
|||
__asm__ __volatile__(
|
||||
"1: R6 = memw_locked(%0);\n"
|
||||
" P3 = cmp.eq(R6,#0);\n"
|
||||
" { if !P3 jump 1b; R6 = #1; }\n"
|
||||
" { if (!P3) jump 1b; R6 = #1; }\n"
|
||||
" memw_locked(%0,P3) = R6;\n"
|
||||
" { if !P3 jump 1b; }\n"
|
||||
" { if (!P3) jump 1b; }\n"
|
||||
:
|
||||
: "r" (&lock->lock)
|
||||
: "memory", "r6", "p3"
|
||||
|
@ -139,7 +139,7 @@ static inline unsigned int arch_spin_trylock(arch_spinlock_t *lock)
|
|||
__asm__ __volatile__(
|
||||
" R6 = memw_locked(%1);\n"
|
||||
" P3 = cmp.eq(R6,#0);\n"
|
||||
" { if !P3 jump 1f; R6 = #1; %0 = #0; }\n"
|
||||
" { if (!P3) jump 1f; R6 = #1; %0 = #0; }\n"
|
||||
" memw_locked(%1,P3) = R6;\n"
|
||||
" %0 = P3;\n"
|
||||
"1:\n"
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
#include <linux/thread_info.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
register unsigned long current_frame_pointer asm("r30");
|
||||
|
||||
struct stackframe {
|
||||
unsigned long fp;
|
||||
unsigned long rets;
|
||||
|
@ -30,7 +28,7 @@ void save_stack_trace(struct stack_trace *trace)
|
|||
|
||||
low = (unsigned long)task_stack_page(current);
|
||||
high = low + THREAD_SIZE;
|
||||
fp = current_frame_pointer;
|
||||
fp = (unsigned long)__builtin_frame_address(0);
|
||||
|
||||
while (fp >= low && fp <= (high - sizeof(*frame))) {
|
||||
frame = (struct stackframe *)fp;
|
||||
|
|
|
@ -369,7 +369,7 @@ ret_from_fork:
|
|||
R26.L = #LO(do_work_pending);
|
||||
R0 = #VM_INT_DISABLE;
|
||||
}
|
||||
if P0 jump check_work_pending
|
||||
if (P0) jump check_work_pending
|
||||
{
|
||||
R0 = R25;
|
||||
callr R24
|
||||
|
|
|
@ -689,9 +689,7 @@ void arch_remove_memory(int nid, u64 start, u64 size,
|
|||
{
|
||||
unsigned long start_pfn = start >> PAGE_SHIFT;
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
struct zone *zone;
|
||||
|
||||
zone = page_zone(pfn_to_page(start_pfn));
|
||||
__remove_pages(zone, start_pfn, nr_pages, altmap);
|
||||
__remove_pages(start_pfn, nr_pages, altmap);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -47,7 +47,7 @@ config MIPS
|
|||
select HAVE_ARCH_TRACEHOOK
|
||||
select HAVE_ARCH_TRANSPARENT_HUGEPAGE if CPU_SUPPORTS_HUGEPAGES
|
||||
select HAVE_ASM_MODVERSIONS
|
||||
select HAVE_EBPF_JIT if (!CPU_MICROMIPS)
|
||||
select HAVE_EBPF_JIT if 64BIT && !CPU_MICROMIPS && TARGET_ISA_REV >= 2
|
||||
select HAVE_CONTEXT_TRACKING
|
||||
select HAVE_COPY_THREAD_TLS
|
||||
select HAVE_C_RECORDMCOUNT
|
||||
|
|
|
@ -29,6 +29,9 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
|
|||
-DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \
|
||||
-DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS)
|
||||
|
||||
# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in.
|
||||
KCOV_INSTRUMENT := n
|
||||
|
||||
# decompressor objects (linked with vmlinuz)
|
||||
vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o
|
||||
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
static inline int __pure __get_cpu_type(const int cpu_type)
|
||||
{
|
||||
switch (cpu_type) {
|
||||
#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2EF)
|
||||
#if defined(CONFIG_SYS_HAS_CPU_LOONGSON2E) || \
|
||||
defined(CONFIG_SYS_HAS_CPU_LOONGSON2F)
|
||||
case CPU_LOONGSON2EF:
|
||||
#endif
|
||||
|
||||
|
|
|
@ -49,8 +49,26 @@ struct thread_info {
|
|||
.addr_limit = KERNEL_DS, \
|
||||
}
|
||||
|
||||
/* How to get the thread information struct from C. */
|
||||
/*
|
||||
* A pointer to the struct thread_info for the currently executing thread is
|
||||
* held in register $28/$gp.
|
||||
*
|
||||
* We declare __current_thread_info as a global register variable rather than a
|
||||
* local register variable within current_thread_info() because clang doesn't
|
||||
* support explicit local register variables.
|
||||
*
|
||||
* When building the VDSO we take care not to declare the global register
|
||||
* variable because this causes GCC to not preserve the value of $28/$gp in
|
||||
* functions that change its value (which is common in the PIC VDSO when
|
||||
* accessing the GOT). Since the VDSO shouldn't be accessing
|
||||
* __current_thread_info anyway we declare it extern in order to cause a link
|
||||
* failure if it's referenced.
|
||||
*/
|
||||
#ifdef __VDSO__
|
||||
extern struct thread_info *__current_thread_info;
|
||||
#else
|
||||
register struct thread_info *__current_thread_info __asm__("$28");
|
||||
#endif
|
||||
|
||||
static inline struct thread_info *current_thread_info(void)
|
||||
{
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
|
||||
#define __VDSO_USE_SYSCALL ULLONG_MAX
|
||||
|
||||
#ifdef CONFIG_MIPS_CLOCK_VSYSCALL
|
||||
|
||||
static __always_inline long gettimeofday_fallback(
|
||||
struct __kernel_old_timeval *_tv,
|
||||
struct timezone *_tz)
|
||||
|
@ -48,17 +46,6 @@ static __always_inline long gettimeofday_fallback(
|
|||
return error ? -ret : ret;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static __always_inline long gettimeofday_fallback(
|
||||
struct __kernel_old_timeval *_tv,
|
||||
struct timezone *_tz)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static __always_inline long clock_gettime_fallback(
|
||||
clockid_t _clkid,
|
||||
struct __kernel_timespec *_ts)
|
||||
|
|
|
@ -50,6 +50,25 @@ static int __init_cache_level(unsigned int cpu)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void fill_cpumask_siblings(int cpu, cpumask_t *cpu_map)
|
||||
{
|
||||
int cpu1;
|
||||
|
||||
for_each_possible_cpu(cpu1)
|
||||
if (cpus_are_siblings(cpu, cpu1))
|
||||
cpumask_set_cpu(cpu1, cpu_map);
|
||||
}
|
||||
|
||||
static void fill_cpumask_cluster(int cpu, cpumask_t *cpu_map)
|
||||
{
|
||||
int cpu1;
|
||||
int cluster = cpu_cluster(&cpu_data[cpu]);
|
||||
|
||||
for_each_possible_cpu(cpu1)
|
||||
if (cpu_cluster(&cpu_data[cpu1]) == cluster)
|
||||
cpumask_set_cpu(cpu1, cpu_map);
|
||||
}
|
||||
|
||||
static int __populate_cache_leaves(unsigned int cpu)
|
||||
{
|
||||
struct cpuinfo_mips *c = ¤t_cpu_data;
|
||||
|
@ -57,14 +76,20 @@ static int __populate_cache_leaves(unsigned int cpu)
|
|||
struct cacheinfo *this_leaf = this_cpu_ci->info_list;
|
||||
|
||||
if (c->icache.waysize) {
|
||||
/* L1 caches are per core */
|
||||
fill_cpumask_siblings(cpu, &this_leaf->shared_cpu_map);
|
||||
populate_cache(dcache, this_leaf, 1, CACHE_TYPE_DATA);
|
||||
fill_cpumask_siblings(cpu, &this_leaf->shared_cpu_map);
|
||||
populate_cache(icache, this_leaf, 1, CACHE_TYPE_INST);
|
||||
} else {
|
||||
populate_cache(dcache, this_leaf, 1, CACHE_TYPE_UNIFIED);
|
||||
}
|
||||
|
||||
if (c->scache.waysize)
|
||||
if (c->scache.waysize) {
|
||||
/* L2 cache is per cluster */
|
||||
fill_cpumask_cluster(cpu, &this_leaf->shared_cpu_map);
|
||||
populate_cache(scache, this_leaf, 2, CACHE_TYPE_UNIFIED);
|
||||
}
|
||||
|
||||
if (c->tcache.waysize)
|
||||
populate_cache(tcache, this_leaf, 3, CACHE_TYPE_UNIFIED);
|
||||
|
|
|
@ -1804,7 +1804,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
|
|||
unsigned int image_size;
|
||||
u8 *image_ptr;
|
||||
|
||||
if (!prog->jit_requested || MIPS_ISA_REV < 2)
|
||||
if (!prog->jit_requested)
|
||||
return prog;
|
||||
|
||||
tmp = bpf_jit_blind_constants(prog);
|
||||
|
|
|
@ -17,12 +17,22 @@ int __vdso_clock_gettime(clockid_t clock,
|
|||
return __cvdso_clock_gettime32(clock, ts);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MIPS_CLOCK_VSYSCALL
|
||||
|
||||
/*
|
||||
* This is behind the ifdef so that we don't provide the symbol when there's no
|
||||
* possibility of there being a usable clocksource, because there's nothing we
|
||||
* can do without it. When libc fails the symbol lookup it should fall back on
|
||||
* the standard syscall path.
|
||||
*/
|
||||
int __vdso_gettimeofday(struct __kernel_old_timeval *tv,
|
||||
struct timezone *tz)
|
||||
{
|
||||
return __cvdso_gettimeofday(tv, tz);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_MIPS_CLOCK_VSYSCALL */
|
||||
|
||||
int __vdso_clock_getres(clockid_t clock_id,
|
||||
struct old_timespec32 *res)
|
||||
{
|
||||
|
@ -43,12 +53,22 @@ int __vdso_clock_gettime(clockid_t clock,
|
|||
return __cvdso_clock_gettime(clock, ts);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MIPS_CLOCK_VSYSCALL
|
||||
|
||||
/*
|
||||
* This is behind the ifdef so that we don't provide the symbol when there's no
|
||||
* possibility of there being a usable clocksource, because there's nothing we
|
||||
* can do without it. When libc fails the symbol lookup it should fall back on
|
||||
* the standard syscall path.
|
||||
*/
|
||||
int __vdso_gettimeofday(struct __kernel_old_timeval *tv,
|
||||
struct timezone *tz)
|
||||
{
|
||||
return __cvdso_gettimeofday(tv, tz);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_MIPS_CLOCK_VSYSCALL */
|
||||
|
||||
int __vdso_clock_getres(clockid_t clock_id,
|
||||
struct __kernel_timespec *res)
|
||||
{
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
*
|
||||
* (the type definitions are in asm/spinlock_types.h)
|
||||
*/
|
||||
#include <linux/jump_label.h>
|
||||
#include <linux/irqflags.h>
|
||||
#ifdef CONFIG_PPC64
|
||||
#include <asm/paca.h>
|
||||
|
|
|
@ -151,10 +151,9 @@ void __ref arch_remove_memory(int nid, u64 start, u64 size,
|
|||
{
|
||||
unsigned long start_pfn = start >> PAGE_SHIFT;
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
struct page *page = pfn_to_page(start_pfn) + vmem_altmap_offset(altmap);
|
||||
int ret;
|
||||
|
||||
__remove_pages(page_zone(page), start_pfn, nr_pages, altmap);
|
||||
__remove_pages(start_pfn, nr_pages, altmap);
|
||||
|
||||
/* Remove htab bolted mappings for this section of memory */
|
||||
start = (unsigned long)__va(start);
|
||||
|
|
|
@ -50,7 +50,7 @@ static void slice_print_mask(const char *label, const struct slice_mask *mask) {
|
|||
|
||||
#endif
|
||||
|
||||
static inline bool slice_addr_is_low(unsigned long addr)
|
||||
static inline notrace bool slice_addr_is_low(unsigned long addr)
|
||||
{
|
||||
u64 tmp = (u64)addr;
|
||||
|
||||
|
@ -659,7 +659,7 @@ unsigned long arch_get_unmapped_area_topdown(struct file *filp,
|
|||
mm_ctx_user_psize(¤t->mm->context), 1);
|
||||
}
|
||||
|
||||
unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr)
|
||||
unsigned int notrace get_slice_psize(struct mm_struct *mm, unsigned long addr)
|
||||
{
|
||||
unsigned char *psizes;
|
||||
int index, mask_index;
|
||||
|
|
|
@ -64,6 +64,7 @@ config RISCV
|
|||
select SPARSEMEM_STATIC if 32BIT
|
||||
select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
|
||||
select HAVE_ARCH_MMAP_RND_BITS if MMU
|
||||
select ARCH_HAS_GCOV_PROFILE_ALL
|
||||
|
||||
config ARCH_MMAP_RND_BITS_MIN
|
||||
default 18 if 64BIT
|
||||
|
|
|
@ -54,6 +54,7 @@ cpu1: cpu@1 {
|
|||
reg = <1>;
|
||||
riscv,isa = "rv64imafdc";
|
||||
tlb-split;
|
||||
next-level-cache = <&l2cache>;
|
||||
cpu1_intc: interrupt-controller {
|
||||
#interrupt-cells = <1>;
|
||||
compatible = "riscv,cpu-intc";
|
||||
|
@ -77,6 +78,7 @@ cpu2: cpu@2 {
|
|||
reg = <2>;
|
||||
riscv,isa = "rv64imafdc";
|
||||
tlb-split;
|
||||
next-level-cache = <&l2cache>;
|
||||
cpu2_intc: interrupt-controller {
|
||||
#interrupt-cells = <1>;
|
||||
compatible = "riscv,cpu-intc";
|
||||
|
@ -100,6 +102,7 @@ cpu3: cpu@3 {
|
|||
reg = <3>;
|
||||
riscv,isa = "rv64imafdc";
|
||||
tlb-split;
|
||||
next-level-cache = <&l2cache>;
|
||||
cpu3_intc: interrupt-controller {
|
||||
#interrupt-cells = <1>;
|
||||
compatible = "riscv,cpu-intc";
|
||||
|
@ -123,6 +126,7 @@ cpu4: cpu@4 {
|
|||
reg = <4>;
|
||||
riscv,isa = "rv64imafdc";
|
||||
tlb-split;
|
||||
next-level-cache = <&l2cache>;
|
||||
cpu4_intc: interrupt-controller {
|
||||
#interrupt-cells = <1>;
|
||||
compatible = "riscv,cpu-intc";
|
||||
|
@ -253,6 +257,17 @@ pwm1: pwm@10021000 {
|
|||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
l2cache: cache-controller@2010000 {
|
||||
compatible = "sifive,fu540-c000-ccache", "cache";
|
||||
cache-block-size = <64>;
|
||||
cache-level = <2>;
|
||||
cache-sets = <1024>;
|
||||
cache-size = <2097152>;
|
||||
cache-unified;
|
||||
interrupt-parent = <&plic0>;
|
||||
interrupts = <1 2 3>;
|
||||
reg = <0x0 0x2010000 0x0 0x1000>;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
|
|
@ -116,9 +116,9 @@
|
|||
# define SR_PIE SR_MPIE
|
||||
# define SR_PP SR_MPP
|
||||
|
||||
# define IRQ_SOFT IRQ_M_SOFT
|
||||
# define IRQ_TIMER IRQ_M_TIMER
|
||||
# define IRQ_EXT IRQ_M_EXT
|
||||
# define RV_IRQ_SOFT IRQ_M_SOFT
|
||||
# define RV_IRQ_TIMER IRQ_M_TIMER
|
||||
# define RV_IRQ_EXT IRQ_M_EXT
|
||||
#else /* CONFIG_RISCV_M_MODE */
|
||||
# define CSR_STATUS CSR_SSTATUS
|
||||
# define CSR_IE CSR_SIE
|
||||
|
@ -133,15 +133,15 @@
|
|||
# define SR_PIE SR_SPIE
|
||||
# define SR_PP SR_SPP
|
||||
|
||||
# define IRQ_SOFT IRQ_S_SOFT
|
||||
# define IRQ_TIMER IRQ_S_TIMER
|
||||
# define IRQ_EXT IRQ_S_EXT
|
||||
# define RV_IRQ_SOFT IRQ_S_SOFT
|
||||
# define RV_IRQ_TIMER IRQ_S_TIMER
|
||||
# define RV_IRQ_EXT IRQ_S_EXT
|
||||
#endif /* CONFIG_RISCV_M_MODE */
|
||||
|
||||
/* IE/IP (Supervisor/Machine Interrupt Enable/Pending) flags */
|
||||
#define IE_SIE (_AC(0x1, UL) << IRQ_SOFT)
|
||||
#define IE_TIE (_AC(0x1, UL) << IRQ_TIMER)
|
||||
#define IE_EIE (_AC(0x1, UL) << IRQ_EXT)
|
||||
#define IE_SIE (_AC(0x1, UL) << RV_IRQ_SOFT)
|
||||
#define IE_TIE (_AC(0x1, UL) << RV_IRQ_TIMER)
|
||||
#define IE_EIE (_AC(0x1, UL) << RV_IRQ_EXT)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
|
|||
*/
|
||||
old = *parent;
|
||||
|
||||
if (function_graph_enter(old, self_addr, frame_pointer, parent))
|
||||
if (!function_graph_enter(old, self_addr, frame_pointer, parent))
|
||||
*parent = return_hooker;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,11 +23,11 @@ asmlinkage __visible void __irq_entry do_IRQ(struct pt_regs *regs)
|
|||
|
||||
irq_enter();
|
||||
switch (regs->cause & ~CAUSE_IRQ_FLAG) {
|
||||
case IRQ_TIMER:
|
||||
case RV_IRQ_TIMER:
|
||||
riscv_timer_interrupt();
|
||||
break;
|
||||
#ifdef CONFIG_SMP
|
||||
case IRQ_SOFT:
|
||||
case RV_IRQ_SOFT:
|
||||
/*
|
||||
* We only use software interrupts to pass IPIs, so if a non-SMP
|
||||
* system gets one, then we don't know what to do.
|
||||
|
@ -35,7 +35,7 @@ asmlinkage __visible void __irq_entry do_IRQ(struct pt_regs *regs)
|
|||
riscv_software_interrupt();
|
||||
break;
|
||||
#endif
|
||||
case IRQ_EXT:
|
||||
case RV_IRQ_EXT:
|
||||
handle_arch_irq(regs);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -99,13 +99,13 @@ static void __init setup_initrd(void)
|
|||
pr_info("initrd not found or empty");
|
||||
goto disable;
|
||||
}
|
||||
if (__pa(initrd_end) > PFN_PHYS(max_low_pfn)) {
|
||||
if (__pa_symbol(initrd_end) > PFN_PHYS(max_low_pfn)) {
|
||||
pr_err("initrd extends beyond end of memory");
|
||||
goto disable;
|
||||
}
|
||||
|
||||
size = initrd_end - initrd_start;
|
||||
memblock_reserve(__pa(initrd_start), size);
|
||||
memblock_reserve(__pa_symbol(initrd_start), size);
|
||||
initrd_below_start_ok = 1;
|
||||
|
||||
pr_info("Initial ramdisk at: 0x%p (%lu bytes)\n",
|
||||
|
@ -124,8 +124,8 @@ void __init setup_bootmem(void)
|
|||
{
|
||||
struct memblock_region *reg;
|
||||
phys_addr_t mem_size = 0;
|
||||
phys_addr_t vmlinux_end = __pa(&_end);
|
||||
phys_addr_t vmlinux_start = __pa(&_start);
|
||||
phys_addr_t vmlinux_end = __pa_symbol(&_end);
|
||||
phys_addr_t vmlinux_start = __pa_symbol(&_start);
|
||||
|
||||
/* Find the memory region containing the kernel */
|
||||
for_each_memblock(memory, reg) {
|
||||
|
@ -445,7 +445,7 @@ static void __init setup_vm_final(void)
|
|||
|
||||
/* Setup swapper PGD for fixmap */
|
||||
create_pgd_mapping(swapper_pg_dir, FIXADDR_START,
|
||||
__pa(fixmap_pgd_next),
|
||||
__pa_symbol(fixmap_pgd_next),
|
||||
PGDIR_SIZE, PAGE_TABLE);
|
||||
|
||||
/* Map all memory banks */
|
||||
|
@ -474,7 +474,7 @@ static void __init setup_vm_final(void)
|
|||
clear_fixmap(FIX_PMD);
|
||||
|
||||
/* Move to swapper page table */
|
||||
csr_write(CSR_SATP, PFN_DOWN(__pa(swapper_pg_dir)) | SATP_MODE);
|
||||
csr_write(CSR_SATP, PFN_DOWN(__pa_symbol(swapper_pg_dir)) | SATP_MODE);
|
||||
local_flush_tlb_all();
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -292,10 +292,8 @@ void arch_remove_memory(int nid, u64 start, u64 size,
|
|||
{
|
||||
unsigned long start_pfn = start >> PAGE_SHIFT;
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
struct zone *zone;
|
||||
|
||||
zone = page_zone(pfn_to_page(start_pfn));
|
||||
__remove_pages(zone, start_pfn, nr_pages, altmap);
|
||||
__remove_pages(start_pfn, nr_pages, altmap);
|
||||
vmem_remove_mapping(start, size);
|
||||
}
|
||||
#endif /* CONFIG_MEMORY_HOTPLUG */
|
||||
|
|
|
@ -434,9 +434,7 @@ void arch_remove_memory(int nid, u64 start, u64 size,
|
|||
{
|
||||
unsigned long start_pfn = PFN_DOWN(start);
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
struct zone *zone;
|
||||
|
||||
zone = page_zone(pfn_to_page(start_pfn));
|
||||
__remove_pages(zone, start_pfn, nr_pages, altmap);
|
||||
__remove_pages(start_pfn, nr_pages, altmap);
|
||||
}
|
||||
#endif /* CONFIG_MEMORY_HOTPLUG */
|
||||
|
|
|
@ -865,10 +865,8 @@ void arch_remove_memory(int nid, u64 start, u64 size,
|
|||
{
|
||||
unsigned long start_pfn = start >> PAGE_SHIFT;
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
struct zone *zone;
|
||||
|
||||
zone = page_zone(pfn_to_page(start_pfn));
|
||||
__remove_pages(zone, start_pfn, nr_pages, altmap);
|
||||
__remove_pages(start_pfn, nr_pages, altmap);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1212,10 +1212,8 @@ void __ref arch_remove_memory(int nid, u64 start, u64 size,
|
|||
{
|
||||
unsigned long start_pfn = start >> PAGE_SHIFT;
|
||||
unsigned long nr_pages = size >> PAGE_SHIFT;
|
||||
struct page *page = pfn_to_page(start_pfn) + vmem_altmap_offset(altmap);
|
||||
struct zone *zone = page_zone(page);
|
||||
|
||||
__remove_pages(zone, start_pfn, nr_pages, altmap);
|
||||
__remove_pages(start_pfn, nr_pages, altmap);
|
||||
kernel_physical_mapping_remove(start, start + size);
|
||||
}
|
||||
#endif /* CONFIG_MEMORY_HOTPLUG */
|
||||
|
|
39
block/bio.c
39
block/bio.c
|
@ -538,6 +538,45 @@ void zero_fill_bio_iter(struct bio *bio, struct bvec_iter start)
|
|||
}
|
||||
EXPORT_SYMBOL(zero_fill_bio_iter);
|
||||
|
||||
void bio_truncate(struct bio *bio, unsigned new_size)
|
||||
{
|
||||
struct bio_vec bv;
|
||||
struct bvec_iter iter;
|
||||
unsigned int done = 0;
|
||||
bool truncated = false;
|
||||
|
||||
if (new_size >= bio->bi_iter.bi_size)
|
||||
return;
|
||||
|
||||
if (bio_data_dir(bio) != READ)
|
||||
goto exit;
|
||||
|
||||
bio_for_each_segment(bv, bio, iter) {
|
||||
if (done + bv.bv_len > new_size) {
|
||||
unsigned offset;
|
||||
|
||||
if (!truncated)
|
||||
offset = new_size - done;
|
||||
else
|
||||
offset = 0;
|
||||
zero_user(bv.bv_page, offset, bv.bv_len - offset);
|
||||
truncated = true;
|
||||
}
|
||||
done += bv.bv_len;
|
||||
}
|
||||
|
||||
exit:
|
||||
/*
|
||||
* Don't touch bvec table here and make it really immutable, since
|
||||
* fs bio user has to retrieve all pages via bio_for_each_segment_all
|
||||
* in its .end_bio() callback.
|
||||
*
|
||||
* It is enough to truncate bio by updating .bi_size since we can make
|
||||
* correct bvec with the updated .bi_size for drivers.
|
||||
*/
|
||||
bio->bi_iter.bi_size = new_size;
|
||||
}
|
||||
|
||||
/**
|
||||
* bio_put - release a reference to a bio
|
||||
* @bio: bio to release reference to
|
||||
|
|
|
@ -157,16 +157,14 @@ static inline unsigned get_max_io_size(struct request_queue *q,
|
|||
return sectors & (lbs - 1);
|
||||
}
|
||||
|
||||
static unsigned get_max_segment_size(const struct request_queue *q,
|
||||
unsigned offset)
|
||||
static inline unsigned get_max_segment_size(const struct request_queue *q,
|
||||
struct page *start_page,
|
||||
unsigned long offset)
|
||||
{
|
||||
unsigned long mask = queue_segment_boundary(q);
|
||||
|
||||
/* default segment boundary mask means no boundary limit */
|
||||
if (mask == BLK_SEG_BOUNDARY_MASK)
|
||||
return queue_max_segment_size(q);
|
||||
|
||||
return min_t(unsigned long, mask - (mask & offset) + 1,
|
||||
offset = mask & (page_to_phys(start_page) + offset);
|
||||
return min_t(unsigned long, mask - offset + 1,
|
||||
queue_max_segment_size(q));
|
||||
}
|
||||
|
||||
|
@ -201,7 +199,8 @@ static bool bvec_split_segs(const struct request_queue *q,
|
|||
unsigned seg_size = 0;
|
||||
|
||||
while (len && *nsegs < max_segs) {
|
||||
seg_size = get_max_segment_size(q, bv->bv_offset + total_len);
|
||||
seg_size = get_max_segment_size(q, bv->bv_page,
|
||||
bv->bv_offset + total_len);
|
||||
seg_size = min(seg_size, len);
|
||||
|
||||
(*nsegs)++;
|
||||
|
@ -419,7 +418,8 @@ static unsigned blk_bvec_map_sg(struct request_queue *q,
|
|||
|
||||
while (nbytes > 0) {
|
||||
unsigned offset = bvec->bv_offset + total;
|
||||
unsigned len = min(get_max_segment_size(q, offset), nbytes);
|
||||
unsigned len = min(get_max_segment_size(q, bvec->bv_page,
|
||||
offset), nbytes);
|
||||
struct page *page = bvec->bv_page;
|
||||
|
||||
/*
|
||||
|
|
|
@ -186,7 +186,10 @@ static blk_status_t null_zone_mgmt(struct nullb_cmd *cmd, enum req_opf op,
|
|||
if (zone->cond == BLK_ZONE_COND_FULL)
|
||||
return BLK_STS_IOERR;
|
||||
|
||||
zone->cond = BLK_ZONE_COND_CLOSED;
|
||||
if (zone->wp == zone->start)
|
||||
zone->cond = BLK_ZONE_COND_EMPTY;
|
||||
else
|
||||
zone->cond = BLK_ZONE_COND_CLOSED;
|
||||
break;
|
||||
case REQ_OP_ZONE_FINISH:
|
||||
if (zone->type == BLK_ZONE_TYPE_CONVENTIONAL)
|
||||
|
|
|
@ -84,7 +84,6 @@ static int agp_3_5_isochronous_node_enable(struct agp_bridge_data *bridge,
|
|||
unsigned int cdev = 0;
|
||||
u32 mnistat, tnistat, tstatus, mcmd;
|
||||
u16 tnicmd, mnicmd;
|
||||
u8 mcapndx;
|
||||
u32 tot_bw = 0, tot_n = 0, tot_rq = 0, y_max, rq_isoch, rq_async;
|
||||
u32 step, rem, rem_isoch, rem_async;
|
||||
int ret = 0;
|
||||
|
@ -138,8 +137,6 @@ static int agp_3_5_isochronous_node_enable(struct agp_bridge_data *bridge,
|
|||
cur = list_entry(pos, struct agp_3_5_dev, list);
|
||||
dev = cur->dev;
|
||||
|
||||
mcapndx = cur->capndx;
|
||||
|
||||
pci_read_config_dword(dev, cur->capndx+AGPNISTAT, &mnistat);
|
||||
|
||||
master[cdev].maxbw = (mnistat >> 16) & 0xff;
|
||||
|
@ -251,8 +248,6 @@ static int agp_3_5_isochronous_node_enable(struct agp_bridge_data *bridge,
|
|||
cur = master[cdev].dev;
|
||||
dev = cur->dev;
|
||||
|
||||
mcapndx = cur->capndx;
|
||||
|
||||
master[cdev].rq += (cdev == ndevs - 1)
|
||||
? (rem_async + rem_isoch) : step;
|
||||
|
||||
|
@ -319,7 +314,7 @@ int agp_3_5_enable(struct agp_bridge_data *bridge)
|
|||
{
|
||||
struct pci_dev *td = bridge->dev, *dev = NULL;
|
||||
u8 mcapndx;
|
||||
u32 isoch, arqsz;
|
||||
u32 isoch;
|
||||
u32 tstatus, mstatus, ncapid;
|
||||
u32 mmajor;
|
||||
u16 mpstat;
|
||||
|
@ -334,8 +329,6 @@ int agp_3_5_enable(struct agp_bridge_data *bridge)
|
|||
if (isoch == 0) /* isoch xfers not available, bail out. */
|
||||
return -ENODEV;
|
||||
|
||||
arqsz = (tstatus >> 13) & 0x7;
|
||||
|
||||
/*
|
||||
* Allocate a head for our AGP 3.5 device list
|
||||
* (multiple AGP v3 devices are allowed behind a single bridge).
|
||||
|
|
|
@ -56,7 +56,7 @@ static unsigned long long riscv_clocksource_rdtime(struct clocksource *cs)
|
|||
return get_cycles64();
|
||||
}
|
||||
|
||||
static u64 riscv_sched_clock(void)
|
||||
static u64 notrace riscv_sched_clock(void)
|
||||
{
|
||||
return get_cycles64();
|
||||
}
|
||||
|
|
|
@ -999,7 +999,8 @@ static const struct jz4780_dma_soc_data jz4740_dma_soc_data = {
|
|||
static const struct jz4780_dma_soc_data jz4725b_dma_soc_data = {
|
||||
.nb_channels = 6,
|
||||
.transfer_ord_max = 5,
|
||||
.flags = JZ_SOC_DATA_PER_CHAN_PM | JZ_SOC_DATA_NO_DCKES_DCKEC,
|
||||
.flags = JZ_SOC_DATA_PER_CHAN_PM | JZ_SOC_DATA_NO_DCKES_DCKEC |
|
||||
JZ_SOC_DATA_BREAK_LINKS,
|
||||
};
|
||||
|
||||
static const struct jz4780_dma_soc_data jz4770_dma_soc_data = {
|
||||
|
|
|
@ -377,10 +377,11 @@ ioat_alloc_ring(struct dma_chan *c, int order, gfp_t flags)
|
|||
|
||||
descs->virt = dma_alloc_coherent(to_dev(ioat_chan),
|
||||
SZ_2M, &descs->hw, flags);
|
||||
if (!descs->virt && (i > 0)) {
|
||||
if (!descs->virt) {
|
||||
int idx;
|
||||
|
||||
for (idx = 0; idx < i; idx++) {
|
||||
descs = &ioat_chan->descs[idx];
|
||||
dma_free_coherent(to_dev(ioat_chan), SZ_2M,
|
||||
descs->virt, descs->hw);
|
||||
descs->virt = NULL;
|
||||
|
|
|
@ -229,9 +229,11 @@ static irqreturn_t k3_dma_int_handler(int irq, void *dev_id)
|
|||
c = p->vchan;
|
||||
if (c && (tc1 & BIT(i))) {
|
||||
spin_lock_irqsave(&c->vc.lock, flags);
|
||||
vchan_cookie_complete(&p->ds_run->vd);
|
||||
p->ds_done = p->ds_run;
|
||||
p->ds_run = NULL;
|
||||
if (p->ds_run != NULL) {
|
||||
vchan_cookie_complete(&p->ds_run->vd);
|
||||
p->ds_done = p->ds_run;
|
||||
p->ds_run = NULL;
|
||||
}
|
||||
spin_unlock_irqrestore(&c->vc.lock, flags);
|
||||
}
|
||||
if (c && (tc2 & BIT(i))) {
|
||||
|
@ -271,6 +273,10 @@ static int k3_dma_start_txd(struct k3_dma_chan *c)
|
|||
if (BIT(c->phy->idx) & k3_dma_get_chan_stat(d))
|
||||
return -EAGAIN;
|
||||
|
||||
/* Avoid losing track of ds_run if a transaction is in flight */
|
||||
if (c->phy->ds_run)
|
||||
return -EAGAIN;
|
||||
|
||||
if (vd) {
|
||||
struct k3_dma_desc_sw *ds =
|
||||
container_of(vd, struct k3_dma_desc_sw, vd);
|
||||
|
|
|
@ -104,9 +104,8 @@ static void vchan_complete(unsigned long arg)
|
|||
dmaengine_desc_get_callback(&vd->tx, &cb);
|
||||
|
||||
list_del(&vd->node);
|
||||
vchan_vdesc_fini(vd);
|
||||
|
||||
dmaengine_desc_callback_invoke(&cb, &vd->tx_result);
|
||||
vchan_vdesc_fini(vd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -613,7 +613,17 @@ static bool amdgpu_atpx_detect(void)
|
|||
bool d3_supported = false;
|
||||
struct pci_dev *parent_pdev;
|
||||
|
||||
while ((pdev = pci_get_class(PCI_BASE_CLASS_DISPLAY << 16, pdev)) != NULL) {
|
||||
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
|
||||
vga_count++;
|
||||
|
||||
has_atpx |= (amdgpu_atpx_pci_probe_handle(pdev) == true);
|
||||
|
||||
parent_pdev = pci_upstream_bridge(pdev);
|
||||
d3_supported |= parent_pdev && parent_pdev->bridge_d3;
|
||||
amdgpu_atpx_get_quirks(pdev);
|
||||
}
|
||||
|
||||
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_OTHER << 8, pdev)) != NULL) {
|
||||
vga_count++;
|
||||
|
||||
has_atpx |= (amdgpu_atpx_pci_probe_handle(pdev) == true);
|
||||
|
|
|
@ -1488,7 +1488,7 @@ static int psp_np_fw_load(struct psp_context *psp)
|
|||
|
||||
/* Start rlc autoload after psp recieved all the gfx firmware */
|
||||
if (psp->autoload_supported && ucode->ucode_id == (amdgpu_sriov_vf(adev) ?
|
||||
AMDGPU_UCODE_ID_CP_MEC2 : AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM)) {
|
||||
AMDGPU_UCODE_ID_CP_MEC2 : AMDGPU_UCODE_ID_RLC_G)) {
|
||||
ret = psp_rlc_autoload(psp);
|
||||
if (ret) {
|
||||
DRM_ERROR("Failed to start rlc autoload\n");
|
||||
|
|
|
@ -292,10 +292,10 @@ enum AMDGPU_UCODE_ID {
|
|||
AMDGPU_UCODE_ID_CP_MEC2_JT,
|
||||
AMDGPU_UCODE_ID_CP_MES,
|
||||
AMDGPU_UCODE_ID_CP_MES_DATA,
|
||||
AMDGPU_UCODE_ID_RLC_G,
|
||||
AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL,
|
||||
AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM,
|
||||
AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM,
|
||||
AMDGPU_UCODE_ID_RLC_G,
|
||||
AMDGPU_UCODE_ID_STORAGE,
|
||||
AMDGPU_UCODE_ID_SMC,
|
||||
AMDGPU_UCODE_ID_UVD,
|
||||
|
|
|
@ -1052,17 +1052,10 @@ static void gfx_v9_0_check_if_need_gfxoff(struct amdgpu_device *adev)
|
|||
case CHIP_VEGA20:
|
||||
break;
|
||||
case CHIP_RAVEN:
|
||||
/* Disable GFXOFF on original raven. There are combinations
|
||||
* of sbios and platforms that are not stable.
|
||||
*/
|
||||
if (!(adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8))
|
||||
adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
|
||||
else if (!(adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8)
|
||||
&&((adev->gfx.rlc_fw_version != 106 &&
|
||||
adev->gfx.rlc_fw_version < 531) ||
|
||||
(adev->gfx.rlc_fw_version == 53815) ||
|
||||
(adev->gfx.rlc_feature_version < 1) ||
|
||||
!adev->gfx.rlc.is_rlc_v2_1))
|
||||
if (!(adev->rev_id >= 0x8 ||
|
||||
adev->pdev->device == 0x15d8) &&
|
||||
(adev->pm.fw_version < 0x41e2b || /* not raven1 fresh */
|
||||
!adev->gfx.rlc.is_rlc_v2_1)) /* without rlc save restore ucodes */
|
||||
adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
|
||||
|
||||
if (adev->pm.pp_feature & PP_GFXOFF_MASK)
|
||||
|
|
|
@ -866,6 +866,7 @@ static int smu_sw_init(void *handle)
|
|||
smu->smu_baco.platform_support = false;
|
||||
|
||||
mutex_init(&smu->sensor_lock);
|
||||
mutex_init(&smu->metrics_lock);
|
||||
|
||||
smu->watermarks_bitmap = 0;
|
||||
smu->power_profile_mode = PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT;
|
||||
|
|
|
@ -862,18 +862,21 @@ static int arcturus_get_metrics_table(struct smu_context *smu,
|
|||
struct smu_table_context *smu_table= &smu->smu_table;
|
||||
int ret = 0;
|
||||
|
||||
mutex_lock(&smu->metrics_lock);
|
||||
if (!smu_table->metrics_time ||
|
||||
time_after(jiffies, smu_table->metrics_time + HZ / 1000)) {
|
||||
ret = smu_update_table(smu, SMU_TABLE_SMU_METRICS, 0,
|
||||
(void *)smu_table->metrics_table, false);
|
||||
if (ret) {
|
||||
pr_info("Failed to export SMU metrics table!\n");
|
||||
mutex_unlock(&smu->metrics_lock);
|
||||
return ret;
|
||||
}
|
||||
smu_table->metrics_time = jiffies;
|
||||
}
|
||||
|
||||
memcpy(metrics_table, smu_table->metrics_table, sizeof(SmuMetrics_t));
|
||||
mutex_unlock(&smu->metrics_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -349,6 +349,7 @@ struct smu_context
|
|||
const struct pptable_funcs *ppt_funcs;
|
||||
struct mutex mutex;
|
||||
struct mutex sensor_lock;
|
||||
struct mutex metrics_lock;
|
||||
uint64_t pool_size;
|
||||
|
||||
struct smu_table_context smu_table;
|
||||
|
|
|
@ -562,17 +562,20 @@ static int navi10_get_metrics_table(struct smu_context *smu,
|
|||
struct smu_table_context *smu_table= &smu->smu_table;
|
||||
int ret = 0;
|
||||
|
||||
mutex_lock(&smu->metrics_lock);
|
||||
if (!smu_table->metrics_time || time_after(jiffies, smu_table->metrics_time + msecs_to_jiffies(100))) {
|
||||
ret = smu_update_table(smu, SMU_TABLE_SMU_METRICS, 0,
|
||||
(void *)smu_table->metrics_table, false);
|
||||
if (ret) {
|
||||
pr_info("Failed to export SMU metrics table!\n");
|
||||
mutex_unlock(&smu->metrics_lock);
|
||||
return ret;
|
||||
}
|
||||
smu_table->metrics_time = jiffies;
|
||||
}
|
||||
|
||||
memcpy(metrics_table, smu_table->metrics_table, sizeof(SmuMetrics_t));
|
||||
mutex_unlock(&smu->metrics_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -1678,17 +1678,20 @@ static int vega20_get_metrics_table(struct smu_context *smu,
|
|||
struct smu_table_context *smu_table= &smu->smu_table;
|
||||
int ret = 0;
|
||||
|
||||
mutex_lock(&smu->metrics_lock);
|
||||
if (!smu_table->metrics_time || time_after(jiffies, smu_table->metrics_time + HZ / 1000)) {
|
||||
ret = smu_update_table(smu, SMU_TABLE_SMU_METRICS, 0,
|
||||
(void *)smu_table->metrics_table, false);
|
||||
if (ret) {
|
||||
pr_info("Failed to export SMU metrics table!\n");
|
||||
mutex_unlock(&smu->metrics_lock);
|
||||
return ret;
|
||||
}
|
||||
smu_table->metrics_time = jiffies;
|
||||
}
|
||||
|
||||
memcpy(metrics_table, smu_table->metrics_table, sizeof(SmuMetrics_t));
|
||||
mutex_unlock(&smu->metrics_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ malidp_mw_connector_mode_valid(struct drm_connector *connector,
|
|||
return MODE_OK;
|
||||
}
|
||||
|
||||
const struct drm_connector_helper_funcs malidp_mw_connector_helper_funcs = {
|
||||
static const struct drm_connector_helper_funcs malidp_mw_connector_helper_funcs = {
|
||||
.get_modes = malidp_mw_connector_get_modes,
|
||||
.mode_valid = malidp_mw_connector_mode_valid,
|
||||
};
|
||||
|
|
|
@ -215,11 +215,12 @@ struct mtk_ddp_comp *mtk_drm_ddp_comp_for_plane(struct drm_crtc *crtc,
|
|||
struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
|
||||
struct mtk_ddp_comp *comp;
|
||||
int i, count = 0;
|
||||
unsigned int local_index = plane - mtk_crtc->planes;
|
||||
|
||||
for (i = 0; i < mtk_crtc->ddp_comp_nr; i++) {
|
||||
comp = mtk_crtc->ddp_comp[i];
|
||||
if (plane->index < (count + mtk_ddp_comp_layer_nr(comp))) {
|
||||
*local_layer = plane->index - count;
|
||||
if (local_index < (count + mtk_ddp_comp_layer_nr(comp))) {
|
||||
*local_layer = local_index - count;
|
||||
return comp;
|
||||
}
|
||||
count += mtk_ddp_comp_layer_nr(comp);
|
||||
|
@ -310,7 +311,9 @@ static int mtk_crtc_ddp_hw_init(struct mtk_drm_crtc *mtk_crtc)
|
|||
|
||||
plane_state = to_mtk_plane_state(plane->state);
|
||||
comp = mtk_drm_ddp_comp_for_plane(crtc, plane, &local_layer);
|
||||
mtk_ddp_comp_layer_config(comp, local_layer, plane_state);
|
||||
if (comp)
|
||||
mtk_ddp_comp_layer_config(comp, local_layer,
|
||||
plane_state);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -386,8 +389,9 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc)
|
|||
comp = mtk_drm_ddp_comp_for_plane(crtc, plane,
|
||||
&local_layer);
|
||||
|
||||
mtk_ddp_comp_layer_config(comp, local_layer,
|
||||
plane_state);
|
||||
if (comp)
|
||||
mtk_ddp_comp_layer_config(comp, local_layer,
|
||||
plane_state);
|
||||
plane_state->pending.config = false;
|
||||
}
|
||||
mtk_crtc->pending_planes = false;
|
||||
|
@ -401,7 +405,9 @@ int mtk_drm_crtc_plane_check(struct drm_crtc *crtc, struct drm_plane *plane,
|
|||
struct mtk_ddp_comp *comp;
|
||||
|
||||
comp = mtk_drm_ddp_comp_for_plane(crtc, plane, &local_layer);
|
||||
return mtk_ddp_comp_layer_check(comp, local_layer, state);
|
||||
if (comp)
|
||||
return mtk_ddp_comp_layer_check(comp, local_layer, state);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mtk_drm_crtc_atomic_enable(struct drm_crtc *crtc,
|
||||
|
|
|
@ -230,28 +230,25 @@ static void mtk_dsi_mask(struct mtk_dsi *dsi, u32 offset, u32 mask, u32 data)
|
|||
static void mtk_dsi_phy_timconfig(struct mtk_dsi *dsi)
|
||||
{
|
||||
u32 timcon0, timcon1, timcon2, timcon3;
|
||||
u32 ui, cycle_time;
|
||||
u32 data_rate_mhz = DIV_ROUND_UP(dsi->data_rate, 1000000);
|
||||
struct mtk_phy_timing *timing = &dsi->phy_timing;
|
||||
|
||||
ui = DIV_ROUND_UP(1000000000, dsi->data_rate);
|
||||
cycle_time = div_u64(8000000000ULL, dsi->data_rate);
|
||||
timing->lpx = (60 * data_rate_mhz / (8 * 1000)) + 1;
|
||||
timing->da_hs_prepare = (80 * data_rate_mhz + 4 * 1000) / 8000;
|
||||
timing->da_hs_zero = (170 * data_rate_mhz + 10 * 1000) / 8000 + 1 -
|
||||
timing->da_hs_prepare;
|
||||
timing->da_hs_trail = timing->da_hs_prepare + 1;
|
||||
|
||||
timing->lpx = NS_TO_CYCLE(60, cycle_time);
|
||||
timing->da_hs_prepare = NS_TO_CYCLE(50 + 5 * ui, cycle_time);
|
||||
timing->da_hs_zero = NS_TO_CYCLE(110 + 6 * ui, cycle_time);
|
||||
timing->da_hs_trail = NS_TO_CYCLE(77 + 4 * ui, cycle_time);
|
||||
timing->ta_go = 4 * timing->lpx - 2;
|
||||
timing->ta_sure = timing->lpx + 2;
|
||||
timing->ta_get = 4 * timing->lpx;
|
||||
timing->da_hs_exit = 2 * timing->lpx + 1;
|
||||
|
||||
timing->ta_go = 4 * timing->lpx;
|
||||
timing->ta_sure = 3 * timing->lpx / 2;
|
||||
timing->ta_get = 5 * timing->lpx;
|
||||
timing->da_hs_exit = 2 * timing->lpx;
|
||||
|
||||
timing->clk_hs_zero = NS_TO_CYCLE(336, cycle_time);
|
||||
timing->clk_hs_trail = NS_TO_CYCLE(100, cycle_time) + 10;
|
||||
|
||||
timing->clk_hs_prepare = NS_TO_CYCLE(64, cycle_time);
|
||||
timing->clk_hs_post = NS_TO_CYCLE(80 + 52 * ui, cycle_time);
|
||||
timing->clk_hs_exit = 2 * timing->lpx;
|
||||
timing->clk_hs_prepare = 70 * data_rate_mhz / (8 * 1000);
|
||||
timing->clk_hs_post = timing->clk_hs_prepare + 8;
|
||||
timing->clk_hs_trail = timing->clk_hs_prepare;
|
||||
timing->clk_hs_zero = timing->clk_hs_trail * 4;
|
||||
timing->clk_hs_exit = 2 * timing->clk_hs_trail;
|
||||
|
||||
timcon0 = timing->lpx | timing->da_hs_prepare << 8 |
|
||||
timing->da_hs_zero << 16 | timing->da_hs_trail << 24;
|
||||
|
@ -482,27 +479,39 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
|
|||
dsi_tmp_buf_bpp - 10);
|
||||
|
||||
data_phy_cycles = timing->lpx + timing->da_hs_prepare +
|
||||
timing->da_hs_zero + timing->da_hs_exit + 2;
|
||||
timing->da_hs_zero + timing->da_hs_exit + 3;
|
||||
|
||||
if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) {
|
||||
if (vm->hfront_porch * dsi_tmp_buf_bpp >
|
||||
if ((vm->hfront_porch + vm->hback_porch) * dsi_tmp_buf_bpp >
|
||||
data_phy_cycles * dsi->lanes + 18) {
|
||||
horizontal_frontporch_byte = vm->hfront_porch *
|
||||
dsi_tmp_buf_bpp -
|
||||
data_phy_cycles *
|
||||
dsi->lanes - 18;
|
||||
horizontal_frontporch_byte =
|
||||
vm->hfront_porch * dsi_tmp_buf_bpp -
|
||||
(data_phy_cycles * dsi->lanes + 18) *
|
||||
vm->hfront_porch /
|
||||
(vm->hfront_porch + vm->hback_porch);
|
||||
|
||||
horizontal_backporch_byte =
|
||||
horizontal_backporch_byte -
|
||||
(data_phy_cycles * dsi->lanes + 18) *
|
||||
vm->hback_porch /
|
||||
(vm->hfront_porch + vm->hback_porch);
|
||||
} else {
|
||||
DRM_WARN("HFP less than d-phy, FPS will under 60Hz\n");
|
||||
horizontal_frontporch_byte = vm->hfront_porch *
|
||||
dsi_tmp_buf_bpp;
|
||||
}
|
||||
} else {
|
||||
if (vm->hfront_porch * dsi_tmp_buf_bpp >
|
||||
if ((vm->hfront_porch + vm->hback_porch) * dsi_tmp_buf_bpp >
|
||||
data_phy_cycles * dsi->lanes + 12) {
|
||||
horizontal_frontporch_byte = vm->hfront_porch *
|
||||
dsi_tmp_buf_bpp -
|
||||
data_phy_cycles *
|
||||
dsi->lanes - 12;
|
||||
horizontal_frontporch_byte =
|
||||
vm->hfront_porch * dsi_tmp_buf_bpp -
|
||||
(data_phy_cycles * dsi->lanes + 12) *
|
||||
vm->hfront_porch /
|
||||
(vm->hfront_porch + vm->hback_porch);
|
||||
horizontal_backporch_byte = horizontal_backporch_byte -
|
||||
(data_phy_cycles * dsi->lanes + 12) *
|
||||
vm->hback_porch /
|
||||
(vm->hfront_porch + vm->hback_porch);
|
||||
} else {
|
||||
DRM_WARN("HFP less than d-phy, FPS will under 60Hz\n");
|
||||
horizontal_frontporch_byte = vm->hfront_porch *
|
||||
|
|
|
@ -685,8 +685,6 @@ static void sun4i_hdmi_unbind(struct device *dev, struct device *master,
|
|||
struct sun4i_hdmi *hdmi = dev_get_drvdata(dev);
|
||||
|
||||
cec_unregister_adapter(hdmi->cec_adap);
|
||||
drm_connector_cleanup(&hdmi->connector);
|
||||
drm_encoder_cleanup(&hdmi->encoder);
|
||||
i2c_del_adapter(hdmi->i2c);
|
||||
i2c_put_adapter(hdmi->ddc_i2c);
|
||||
clk_disable_unprepare(hdmi->mod_clk);
|
||||
|
|
|
@ -256,7 +256,7 @@ static int __init plic_init(struct device_node *node,
|
|||
* Skip contexts other than external interrupts for our
|
||||
* privilege level.
|
||||
*/
|
||||
if (parent.args[0] != IRQ_EXT)
|
||||
if (parent.args[0] != RV_IRQ_EXT)
|
||||
continue;
|
||||
|
||||
hartid = plic_find_hart_id(parent.np);
|
||||
|
|
|
@ -380,7 +380,8 @@ static void cec_data_cancel(struct cec_data *data, u8 tx_status)
|
|||
} else {
|
||||
list_del_init(&data->list);
|
||||
if (!(data->msg.tx_status & CEC_TX_STATUS_OK))
|
||||
data->adap->transmit_queue_sz--;
|
||||
if (!WARN_ON(!data->adap->transmit_queue_sz))
|
||||
data->adap->transmit_queue_sz--;
|
||||
}
|
||||
|
||||
if (data->msg.tx_status & CEC_TX_STATUS_OK) {
|
||||
|
@ -432,6 +433,14 @@ static void cec_flush(struct cec_adapter *adap)
|
|||
* need to do anything special in that case.
|
||||
*/
|
||||
}
|
||||
/*
|
||||
* If something went wrong and this counter isn't what it should
|
||||
* be, then this will reset it back to 0. Warn if it is not 0,
|
||||
* since it indicates a bug, either in this framework or in a
|
||||
* CEC driver.
|
||||
*/
|
||||
if (WARN_ON(adap->transmit_queue_sz))
|
||||
adap->transmit_queue_sz = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -456,7 +465,7 @@ int cec_thread_func(void *_adap)
|
|||
bool timeout = false;
|
||||
u8 attempts;
|
||||
|
||||
if (adap->transmitting) {
|
||||
if (adap->transmit_in_progress) {
|
||||
int err;
|
||||
|
||||
/*
|
||||
|
@ -491,7 +500,7 @@ int cec_thread_func(void *_adap)
|
|||
goto unlock;
|
||||
}
|
||||
|
||||
if (adap->transmitting && timeout) {
|
||||
if (adap->transmit_in_progress && timeout) {
|
||||
/*
|
||||
* If we timeout, then log that. Normally this does
|
||||
* not happen and it is an indication of a faulty CEC
|
||||
|
@ -500,14 +509,18 @@ int cec_thread_func(void *_adap)
|
|||
* so much traffic on the bus that the adapter was
|
||||
* unable to transmit for CEC_XFER_TIMEOUT_MS (2.1s).
|
||||
*/
|
||||
pr_warn("cec-%s: message %*ph timed out\n", adap->name,
|
||||
adap->transmitting->msg.len,
|
||||
adap->transmitting->msg.msg);
|
||||
if (adap->transmitting) {
|
||||
pr_warn("cec-%s: message %*ph timed out\n", adap->name,
|
||||
adap->transmitting->msg.len,
|
||||
adap->transmitting->msg.msg);
|
||||
/* Just give up on this. */
|
||||
cec_data_cancel(adap->transmitting,
|
||||
CEC_TX_STATUS_TIMEOUT);
|
||||
} else {
|
||||
pr_warn("cec-%s: transmit timed out\n", adap->name);
|
||||
}
|
||||
adap->transmit_in_progress = false;
|
||||
adap->tx_timeouts++;
|
||||
/* Just give up on this. */
|
||||
cec_data_cancel(adap->transmitting,
|
||||
CEC_TX_STATUS_TIMEOUT);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
|
@ -522,7 +535,8 @@ int cec_thread_func(void *_adap)
|
|||
data = list_first_entry(&adap->transmit_queue,
|
||||
struct cec_data, list);
|
||||
list_del_init(&data->list);
|
||||
adap->transmit_queue_sz--;
|
||||
if (!WARN_ON(!data->adap->transmit_queue_sz))
|
||||
adap->transmit_queue_sz--;
|
||||
|
||||
/* Make this the current transmitting message */
|
||||
adap->transmitting = data;
|
||||
|
@ -1085,11 +1099,11 @@ void cec_received_msg_ts(struct cec_adapter *adap,
|
|||
valid_la = false;
|
||||
else if (!cec_msg_is_broadcast(msg) && !(dir_fl & DIRECTED))
|
||||
valid_la = false;
|
||||
else if (cec_msg_is_broadcast(msg) && !(dir_fl & BCAST1_4))
|
||||
else if (cec_msg_is_broadcast(msg) && !(dir_fl & BCAST))
|
||||
valid_la = false;
|
||||
else if (cec_msg_is_broadcast(msg) &&
|
||||
adap->log_addrs.cec_version >= CEC_OP_CEC_VERSION_2_0 &&
|
||||
!(dir_fl & BCAST2_0))
|
||||
adap->log_addrs.cec_version < CEC_OP_CEC_VERSION_2_0 &&
|
||||
!(dir_fl & BCAST1_4))
|
||||
valid_la = false;
|
||||
}
|
||||
if (valid_la && min_len) {
|
||||
|
|
|
@ -116,6 +116,7 @@ struct pulse8 {
|
|||
unsigned int vers;
|
||||
struct completion cmd_done;
|
||||
struct work_struct work;
|
||||
u8 work_result;
|
||||
struct delayed_work ping_eeprom_work;
|
||||
struct cec_msg rx_msg;
|
||||
u8 data[DATA_SIZE];
|
||||
|
@ -137,8 +138,10 @@ static void pulse8_irq_work_handler(struct work_struct *work)
|
|||
{
|
||||
struct pulse8 *pulse8 =
|
||||
container_of(work, struct pulse8, work);
|
||||
u8 result = pulse8->work_result;
|
||||
|
||||
switch (pulse8->data[0] & 0x3f) {
|
||||
pulse8->work_result = 0;
|
||||
switch (result & 0x3f) {
|
||||
case MSGCODE_FRAME_DATA:
|
||||
cec_received_msg(pulse8->adap, &pulse8->rx_msg);
|
||||
break;
|
||||
|
@ -172,12 +175,12 @@ static irqreturn_t pulse8_interrupt(struct serio *serio, unsigned char data,
|
|||
pulse8->escape = false;
|
||||
} else if (data == MSGEND) {
|
||||
struct cec_msg *msg = &pulse8->rx_msg;
|
||||
u8 msgcode = pulse8->buf[0];
|
||||
|
||||
if (debug)
|
||||
dev_info(pulse8->dev, "received: %*ph\n",
|
||||
pulse8->idx, pulse8->buf);
|
||||
pulse8->data[0] = pulse8->buf[0];
|
||||
switch (pulse8->buf[0] & 0x3f) {
|
||||
switch (msgcode & 0x3f) {
|
||||
case MSGCODE_FRAME_START:
|
||||
msg->len = 1;
|
||||
msg->msg[0] = pulse8->buf[1];
|
||||
|
@ -186,14 +189,20 @@ static irqreturn_t pulse8_interrupt(struct serio *serio, unsigned char data,
|
|||
if (msg->len == CEC_MAX_MSG_SIZE)
|
||||
break;
|
||||
msg->msg[msg->len++] = pulse8->buf[1];
|
||||
if (pulse8->buf[0] & MSGCODE_FRAME_EOM)
|
||||
if (msgcode & MSGCODE_FRAME_EOM) {
|
||||
WARN_ON(pulse8->work_result);
|
||||
pulse8->work_result = msgcode;
|
||||
schedule_work(&pulse8->work);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case MSGCODE_TRANSMIT_SUCCEEDED:
|
||||
case MSGCODE_TRANSMIT_FAILED_LINE:
|
||||
case MSGCODE_TRANSMIT_FAILED_ACK:
|
||||
case MSGCODE_TRANSMIT_FAILED_TIMEOUT_DATA:
|
||||
case MSGCODE_TRANSMIT_FAILED_TIMEOUT_LINE:
|
||||
WARN_ON(pulse8->work_result);
|
||||
pulse8->work_result = msgcode;
|
||||
schedule_work(&pulse8->work);
|
||||
break;
|
||||
case MSGCODE_HIGH_ERROR:
|
||||
|
|
|
@ -358,7 +358,7 @@ static int bcm_sf2_cfp_ipv4_rule_set(struct bcm_sf2_priv *priv, int port,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
ip_frag = be32_to_cpu(fs->m_ext.data[0]);
|
||||
ip_frag = !!(be32_to_cpu(fs->h_ext.data[0]) & 1);
|
||||
|
||||
/* Locate the first rule available */
|
||||
if (fs->location == RX_CLS_LOC_ANY)
|
||||
|
@ -569,7 +569,7 @@ static int bcm_sf2_cfp_rule_cmp(struct bcm_sf2_priv *priv, int port,
|
|||
|
||||
if (rule->fs.flow_type != fs->flow_type ||
|
||||
rule->fs.ring_cookie != fs->ring_cookie ||
|
||||
rule->fs.m_ext.data[0] != fs->m_ext.data[0])
|
||||
rule->fs.h_ext.data[0] != fs->h_ext.data[0])
|
||||
continue;
|
||||
|
||||
switch (fs->flow_type & ~FLOW_EXT) {
|
||||
|
@ -621,7 +621,7 @@ static int bcm_sf2_cfp_ipv6_rule_set(struct bcm_sf2_priv *priv, int port,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
ip_frag = be32_to_cpu(fs->m_ext.data[0]);
|
||||
ip_frag = !!(be32_to_cpu(fs->h_ext.data[0]) & 1);
|
||||
|
||||
layout = &udf_tcpip6_layout;
|
||||
slice_num = bcm_sf2_get_slice_number(layout, 0);
|
||||
|
|
|
@ -1569,8 +1569,8 @@ static int sja1105_vlan_filtering(struct dsa_switch *ds, int port, bool enabled)
|
|||
|
||||
if (enabled) {
|
||||
/* Enable VLAN filtering. */
|
||||
tpid = ETH_P_8021AD;
|
||||
tpid2 = ETH_P_8021Q;
|
||||
tpid = ETH_P_8021Q;
|
||||
tpid2 = ETH_P_8021AD;
|
||||
} else {
|
||||
/* Disable VLAN filtering. */
|
||||
tpid = ETH_P_SJA1105;
|
||||
|
@ -1579,9 +1579,9 @@ static int sja1105_vlan_filtering(struct dsa_switch *ds, int port, bool enabled)
|
|||
|
||||
table = &priv->static_config.tables[BLK_IDX_GENERAL_PARAMS];
|
||||
general_params = table->entries;
|
||||
/* EtherType used to identify outer tagged (S-tag) VLAN traffic */
|
||||
general_params->tpid = tpid;
|
||||
/* EtherType used to identify inner tagged (C-tag) VLAN traffic */
|
||||
general_params->tpid = tpid;
|
||||
/* EtherType used to identify outer tagged (S-tag) VLAN traffic */
|
||||
general_params->tpid2 = tpid2;
|
||||
/* When VLAN filtering is on, we need to at least be able to
|
||||
* decode management traffic through the "backup plan".
|
||||
|
@ -1855,7 +1855,7 @@ static netdev_tx_t sja1105_port_deferred_xmit(struct dsa_switch *ds, int port,
|
|||
if (!clone)
|
||||
goto out;
|
||||
|
||||
sja1105_ptp_txtstamp_skb(ds, slot, clone);
|
||||
sja1105_ptp_txtstamp_skb(ds, port, clone);
|
||||
|
||||
out:
|
||||
mutex_unlock(&priv->mgmt_lock);
|
||||
|
|
|
@ -234,7 +234,7 @@ int sja1105_ptp_commit(struct dsa_switch *ds, struct sja1105_ptp_cmd *cmd,
|
|||
if (rw == SPI_WRITE)
|
||||
priv->info->ptp_cmd_packing(buf, cmd, PACK);
|
||||
|
||||
rc = sja1105_xfer_buf(priv, SPI_WRITE, regs->ptp_control, buf,
|
||||
rc = sja1105_xfer_buf(priv, rw, regs->ptp_control, buf,
|
||||
SJA1105_SIZE_PTP_CMD);
|
||||
|
||||
if (rw == SPI_READ)
|
||||
|
@ -659,7 +659,7 @@ void sja1105_ptp_clock_unregister(struct dsa_switch *ds)
|
|||
ptp_data->clock = NULL;
|
||||
}
|
||||
|
||||
void sja1105_ptp_txtstamp_skb(struct dsa_switch *ds, int slot,
|
||||
void sja1105_ptp_txtstamp_skb(struct dsa_switch *ds, int port,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
struct sja1105_private *priv = ds->priv;
|
||||
|
@ -679,7 +679,7 @@ void sja1105_ptp_txtstamp_skb(struct dsa_switch *ds, int slot,
|
|||
goto out;
|
||||
}
|
||||
|
||||
rc = sja1105_ptpegr_ts_poll(ds, slot, &ts);
|
||||
rc = sja1105_ptpegr_ts_poll(ds, port, &ts);
|
||||
if (rc < 0) {
|
||||
dev_err(ds->dev, "timed out polling for tstamp\n");
|
||||
kfree_skb(skb);
|
||||
|
|
|
@ -142,6 +142,9 @@ static size_t sja1105et_general_params_entry_packing(void *buf, void *entry_ptr,
|
|||
return size;
|
||||
}
|
||||
|
||||
/* TPID and TPID2 are intentionally reversed so that semantic
|
||||
* compatibility with E/T is kept.
|
||||
*/
|
||||
static size_t
|
||||
sja1105pqrs_general_params_entry_packing(void *buf, void *entry_ptr,
|
||||
enum packing_op op)
|
||||
|
@ -166,9 +169,9 @@ sja1105pqrs_general_params_entry_packing(void *buf, void *entry_ptr,
|
|||
sja1105_packing(buf, &entry->mirr_port, 141, 139, size, op);
|
||||
sja1105_packing(buf, &entry->vlmarker, 138, 107, size, op);
|
||||
sja1105_packing(buf, &entry->vlmask, 106, 75, size, op);
|
||||
sja1105_packing(buf, &entry->tpid, 74, 59, size, op);
|
||||
sja1105_packing(buf, &entry->tpid2, 74, 59, size, op);
|
||||
sja1105_packing(buf, &entry->ignore2stf, 58, 58, size, op);
|
||||
sja1105_packing(buf, &entry->tpid2, 57, 42, size, op);
|
||||
sja1105_packing(buf, &entry->tpid, 57, 42, size, op);
|
||||
sja1105_packing(buf, &entry->queue_ts, 41, 41, size, op);
|
||||
sja1105_packing(buf, &entry->egrmirrvid, 40, 29, size, op);
|
||||
sja1105_packing(buf, &entry->egrmirrpcp, 28, 26, size, op);
|
||||
|
|
|
@ -477,11 +477,6 @@ int sja1105_setup_tc_taprio(struct dsa_switch *ds, int port,
|
|||
if (admin->cycle_time_extension)
|
||||
return -ENOTSUPP;
|
||||
|
||||
if (!ns_to_sja1105_delta(admin->base_time)) {
|
||||
dev_err(ds->dev, "A base time of zero is not hardware-allowed\n");
|
||||
return -ERANGE;
|
||||
}
|
||||
|
||||
for (i = 0; i < admin->num_entries; i++) {
|
||||
s64 delta_ns = admin->entries[i].interval;
|
||||
s64 delta_cycles = ns_to_sja1105_delta(delta_ns);
|
||||
|
|
|
@ -1536,8 +1536,11 @@ void bnx2x_get_rss_ind_table(struct bnx2x_rss_config_obj *rss_obj,
|
|||
((MAX_MAC_CREDIT_E2 - GET_NUM_VFS_PER_PATH(bp) * VF_MAC_CREDIT_CNT) / \
|
||||
func_num + GET_NUM_VFS_PER_PF(bp) * VF_MAC_CREDIT_CNT)
|
||||
|
||||
#define BNX2X_VFS_VLAN_CREDIT(bp) \
|
||||
(GET_NUM_VFS_PER_PATH(bp) * VF_VLAN_CREDIT_CNT)
|
||||
|
||||
#define PF_VLAN_CREDIT_E2(bp, func_num) \
|
||||
((MAX_MAC_CREDIT_E2 - GET_NUM_VFS_PER_PATH(bp) * VF_VLAN_CREDIT_CNT) / \
|
||||
((MAX_VLAN_CREDIT_E2 - 1 - BNX2X_VFS_VLAN_CREDIT(bp)) / \
|
||||
func_num + GET_NUM_VFS_PER_PF(bp) * VF_VLAN_CREDIT_CNT)
|
||||
|
||||
#endif /* BNX2X_SP_VERBS */
|
||||
|
|
|
@ -504,6 +504,7 @@ struct link_config {
|
|||
|
||||
enum cc_pause requested_fc; /* flow control user has requested */
|
||||
enum cc_pause fc; /* actual link flow control */
|
||||
enum cc_pause advertised_fc; /* actual advertised flow control */
|
||||
|
||||
enum cc_fec requested_fec; /* Forward Error Correction: */
|
||||
enum cc_fec fec; /* requested and actual in use */
|
||||
|
|
|
@ -807,8 +807,8 @@ static void get_pauseparam(struct net_device *dev,
|
|||
struct port_info *p = netdev_priv(dev);
|
||||
|
||||
epause->autoneg = (p->link_cfg.requested_fc & PAUSE_AUTONEG) != 0;
|
||||
epause->rx_pause = (p->link_cfg.fc & PAUSE_RX) != 0;
|
||||
epause->tx_pause = (p->link_cfg.fc & PAUSE_TX) != 0;
|
||||
epause->rx_pause = (p->link_cfg.advertised_fc & PAUSE_RX) != 0;
|
||||
epause->tx_pause = (p->link_cfg.advertised_fc & PAUSE_TX) != 0;
|
||||
}
|
||||
|
||||
static int set_pauseparam(struct net_device *dev,
|
||||
|
|
|
@ -4089,7 +4089,8 @@ static inline fw_port_cap32_t cc_to_fwcap_pause(enum cc_pause cc_pause)
|
|||
if (cc_pause & PAUSE_TX)
|
||||
fw_pause |= FW_PORT_CAP32_802_3_PAUSE;
|
||||
else
|
||||
fw_pause |= FW_PORT_CAP32_802_3_ASM_DIR;
|
||||
fw_pause |= FW_PORT_CAP32_802_3_ASM_DIR |
|
||||
FW_PORT_CAP32_802_3_PAUSE;
|
||||
} else if (cc_pause & PAUSE_TX) {
|
||||
fw_pause |= FW_PORT_CAP32_802_3_ASM_DIR;
|
||||
}
|
||||
|
@ -8563,17 +8564,17 @@ static fw_port_cap32_t lstatus_to_fwcap(u32 lstatus)
|
|||
void t4_handle_get_port_info(struct port_info *pi, const __be64 *rpl)
|
||||
{
|
||||
const struct fw_port_cmd *cmd = (const void *)rpl;
|
||||
int action = FW_PORT_CMD_ACTION_G(be32_to_cpu(cmd->action_to_len16));
|
||||
struct adapter *adapter = pi->adapter;
|
||||
struct link_config *lc = &pi->link_cfg;
|
||||
int link_ok, linkdnrc;
|
||||
enum fw_port_type port_type;
|
||||
enum fw_port_module_type mod_type;
|
||||
unsigned int speed, fc, fec;
|
||||
fw_port_cap32_t pcaps, acaps, lpacaps, linkattr;
|
||||
struct link_config *lc = &pi->link_cfg;
|
||||
struct adapter *adapter = pi->adapter;
|
||||
unsigned int speed, fc, fec, adv_fc;
|
||||
enum fw_port_module_type mod_type;
|
||||
int action, link_ok, linkdnrc;
|
||||
enum fw_port_type port_type;
|
||||
|
||||
/* Extract the various fields from the Port Information message.
|
||||
*/
|
||||
action = FW_PORT_CMD_ACTION_G(be32_to_cpu(cmd->action_to_len16));
|
||||
switch (action) {
|
||||
case FW_PORT_ACTION_GET_PORT_INFO: {
|
||||
u32 lstatus = be32_to_cpu(cmd->u.info.lstatus_to_modtype);
|
||||
|
@ -8611,6 +8612,7 @@ void t4_handle_get_port_info(struct port_info *pi, const __be64 *rpl)
|
|||
}
|
||||
|
||||
fec = fwcap_to_cc_fec(acaps);
|
||||
adv_fc = fwcap_to_cc_pause(acaps);
|
||||
fc = fwcap_to_cc_pause(linkattr);
|
||||
speed = fwcap_to_speed(linkattr);
|
||||
|
||||
|
@ -8667,7 +8669,9 @@ void t4_handle_get_port_info(struct port_info *pi, const __be64 *rpl)
|
|||
}
|
||||
|
||||
if (link_ok != lc->link_ok || speed != lc->speed ||
|
||||
fc != lc->fc || fec != lc->fec) { /* something changed */
|
||||
fc != lc->fc || adv_fc != lc->advertised_fc ||
|
||||
fec != lc->fec) {
|
||||
/* something changed */
|
||||
if (!link_ok && lc->link_ok) {
|
||||
lc->link_down_rc = linkdnrc;
|
||||
dev_warn_ratelimited(adapter->pdev_dev,
|
||||
|
@ -8677,6 +8681,7 @@ void t4_handle_get_port_info(struct port_info *pi, const __be64 *rpl)
|
|||
}
|
||||
lc->link_ok = link_ok;
|
||||
lc->speed = speed;
|
||||
lc->advertised_fc = adv_fc;
|
||||
lc->fc = fc;
|
||||
lc->fec = fec;
|
||||
|
||||
|
|
|
@ -1690,8 +1690,8 @@ static void cxgb4vf_get_pauseparam(struct net_device *dev,
|
|||
struct port_info *pi = netdev_priv(dev);
|
||||
|
||||
pauseparam->autoneg = (pi->link_cfg.requested_fc & PAUSE_AUTONEG) != 0;
|
||||
pauseparam->rx_pause = (pi->link_cfg.fc & PAUSE_RX) != 0;
|
||||
pauseparam->tx_pause = (pi->link_cfg.fc & PAUSE_TX) != 0;
|
||||
pauseparam->rx_pause = (pi->link_cfg.advertised_fc & PAUSE_RX) != 0;
|
||||
pauseparam->tx_pause = (pi->link_cfg.advertised_fc & PAUSE_TX) != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -135,6 +135,7 @@ struct link_config {
|
|||
|
||||
enum cc_pause requested_fc; /* flow control user has requested */
|
||||
enum cc_pause fc; /* actual link flow control */
|
||||
enum cc_pause advertised_fc; /* actual advertised flow control */
|
||||
|
||||
enum cc_fec auto_fec; /* Forward Error Correction: */
|
||||
enum cc_fec requested_fec; /* "automatic" (IEEE 802.3), */
|
||||
|
|
|
@ -1913,16 +1913,16 @@ static const char *t4vf_link_down_rc_str(unsigned char link_down_rc)
|
|||
static void t4vf_handle_get_port_info(struct port_info *pi,
|
||||
const struct fw_port_cmd *cmd)
|
||||
{
|
||||
int action = FW_PORT_CMD_ACTION_G(be32_to_cpu(cmd->action_to_len16));
|
||||
struct adapter *adapter = pi->adapter;
|
||||
struct link_config *lc = &pi->link_cfg;
|
||||
int link_ok, linkdnrc;
|
||||
enum fw_port_type port_type;
|
||||
enum fw_port_module_type mod_type;
|
||||
unsigned int speed, fc, fec;
|
||||
fw_port_cap32_t pcaps, acaps, lpacaps, linkattr;
|
||||
struct link_config *lc = &pi->link_cfg;
|
||||
struct adapter *adapter = pi->adapter;
|
||||
unsigned int speed, fc, fec, adv_fc;
|
||||
enum fw_port_module_type mod_type;
|
||||
int action, link_ok, linkdnrc;
|
||||
enum fw_port_type port_type;
|
||||
|
||||
/* Extract the various fields from the Port Information message. */
|
||||
action = FW_PORT_CMD_ACTION_G(be32_to_cpu(cmd->action_to_len16));
|
||||
switch (action) {
|
||||
case FW_PORT_ACTION_GET_PORT_INFO: {
|
||||
u32 lstatus = be32_to_cpu(cmd->u.info.lstatus_to_modtype);
|
||||
|
@ -1982,6 +1982,7 @@ static void t4vf_handle_get_port_info(struct port_info *pi,
|
|||
}
|
||||
|
||||
fec = fwcap_to_cc_fec(acaps);
|
||||
adv_fc = fwcap_to_cc_pause(acaps);
|
||||
fc = fwcap_to_cc_pause(linkattr);
|
||||
speed = fwcap_to_speed(linkattr);
|
||||
|
||||
|
@ -2012,7 +2013,9 @@ static void t4vf_handle_get_port_info(struct port_info *pi,
|
|||
}
|
||||
|
||||
if (link_ok != lc->link_ok || speed != lc->speed ||
|
||||
fc != lc->fc || fec != lc->fec) { /* something changed */
|
||||
fc != lc->fc || adv_fc != lc->advertised_fc ||
|
||||
fec != lc->fec) {
|
||||
/* something changed */
|
||||
if (!link_ok && lc->link_ok) {
|
||||
lc->link_down_rc = linkdnrc;
|
||||
dev_warn_ratelimited(adapter->pdev_dev,
|
||||
|
@ -2022,6 +2025,7 @@ static void t4vf_handle_get_port_info(struct port_info *pi,
|
|||
}
|
||||
lc->link_ok = link_ok;
|
||||
lc->speed = speed;
|
||||
lc->advertised_fc = adv_fc;
|
||||
lc->fc = fc;
|
||||
lc->fec = fec;
|
||||
|
||||
|
|
|
@ -1719,7 +1719,7 @@ static struct sk_buff *sg_fd_to_skb(const struct dpaa_priv *priv,
|
|||
int page_offset;
|
||||
unsigned int sz;
|
||||
int *count_ptr;
|
||||
int i;
|
||||
int i, j;
|
||||
|
||||
vaddr = phys_to_virt(addr);
|
||||
WARN_ON(!IS_ALIGNED((unsigned long)vaddr, SMP_CACHE_BYTES));
|
||||
|
@ -1736,14 +1736,14 @@ static struct sk_buff *sg_fd_to_skb(const struct dpaa_priv *priv,
|
|||
WARN_ON(!IS_ALIGNED((unsigned long)sg_vaddr,
|
||||
SMP_CACHE_BYTES));
|
||||
|
||||
dma_unmap_page(priv->rx_dma_dev, sg_addr,
|
||||
DPAA_BP_RAW_SIZE, DMA_FROM_DEVICE);
|
||||
|
||||
/* We may use multiple Rx pools */
|
||||
dpaa_bp = dpaa_bpid2pool(sgt[i].bpid);
|
||||
if (!dpaa_bp)
|
||||
goto free_buffers;
|
||||
|
||||
count_ptr = this_cpu_ptr(dpaa_bp->percpu_count);
|
||||
dma_unmap_page(priv->rx_dma_dev, sg_addr,
|
||||
DPAA_BP_RAW_SIZE, DMA_FROM_DEVICE);
|
||||
if (!skb) {
|
||||
sz = dpaa_bp->size +
|
||||
SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
|
||||
|
@ -1786,7 +1786,9 @@ static struct sk_buff *sg_fd_to_skb(const struct dpaa_priv *priv,
|
|||
skb_add_rx_frag(skb, i - 1, head_page, frag_off,
|
||||
frag_len, dpaa_bp->size);
|
||||
}
|
||||
|
||||
/* Update the pool count for the current {cpu x bpool} */
|
||||
count_ptr = this_cpu_ptr(dpaa_bp->percpu_count);
|
||||
(*count_ptr)--;
|
||||
|
||||
if (qm_sg_entry_is_final(&sgt[i]))
|
||||
|
@ -1800,26 +1802,25 @@ static struct sk_buff *sg_fd_to_skb(const struct dpaa_priv *priv,
|
|||
return skb;
|
||||
|
||||
free_buffers:
|
||||
/* compensate sw bpool counter changes */
|
||||
for (i--; i >= 0; i--) {
|
||||
dpaa_bp = dpaa_bpid2pool(sgt[i].bpid);
|
||||
if (dpaa_bp) {
|
||||
count_ptr = this_cpu_ptr(dpaa_bp->percpu_count);
|
||||
(*count_ptr)++;
|
||||
}
|
||||
}
|
||||
/* free all the SG entries */
|
||||
for (i = 0; i < DPAA_SGT_MAX_ENTRIES ; i++) {
|
||||
sg_addr = qm_sg_addr(&sgt[i]);
|
||||
for (j = 0; j < DPAA_SGT_MAX_ENTRIES ; j++) {
|
||||
sg_addr = qm_sg_addr(&sgt[j]);
|
||||
sg_vaddr = phys_to_virt(sg_addr);
|
||||
/* all pages 0..i were unmaped */
|
||||
if (j > i)
|
||||
dma_unmap_page(priv->rx_dma_dev, qm_sg_addr(&sgt[j]),
|
||||
DPAA_BP_RAW_SIZE, DMA_FROM_DEVICE);
|
||||
free_pages((unsigned long)sg_vaddr, 0);
|
||||
dpaa_bp = dpaa_bpid2pool(sgt[i].bpid);
|
||||
if (dpaa_bp) {
|
||||
count_ptr = this_cpu_ptr(dpaa_bp->percpu_count);
|
||||
(*count_ptr)--;
|
||||
/* counters 0..i-1 were decremented */
|
||||
if (j >= i) {
|
||||
dpaa_bp = dpaa_bpid2pool(sgt[j].bpid);
|
||||
if (dpaa_bp) {
|
||||
count_ptr = this_cpu_ptr(dpaa_bp->percpu_count);
|
||||
(*count_ptr)--;
|
||||
}
|
||||
}
|
||||
|
||||
if (qm_sg_entry_is_final(&sgt[i]))
|
||||
if (qm_sg_entry_is_final(&sgt[j]))
|
||||
break;
|
||||
}
|
||||
/* free the SGT fragment */
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/xz.h>
|
||||
#include "mlxfw_mfa2.h"
|
||||
#include "mlxfw_mfa2_file.h"
|
||||
|
@ -548,7 +549,7 @@ mlxfw_mfa2_file_component_get(const struct mlxfw_mfa2_file *mfa2_file,
|
|||
comp_size = be32_to_cpu(comp->size);
|
||||
comp_buf_size = comp_size + mlxfw_mfa2_comp_magic_len;
|
||||
|
||||
comp_data = kmalloc(sizeof(*comp_data) + comp_buf_size, GFP_KERNEL);
|
||||
comp_data = vzalloc(sizeof(*comp_data) + comp_buf_size);
|
||||
if (!comp_data)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
comp_data->comp.data_size = comp_size;
|
||||
|
@ -570,7 +571,7 @@ mlxfw_mfa2_file_component_get(const struct mlxfw_mfa2_file *mfa2_file,
|
|||
comp_data->comp.data = comp_data->buff + mlxfw_mfa2_comp_magic_len;
|
||||
return &comp_data->comp;
|
||||
err_out:
|
||||
kfree(comp_data);
|
||||
vfree(comp_data);
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
|
@ -579,7 +580,7 @@ void mlxfw_mfa2_file_component_put(struct mlxfw_mfa2_component *comp)
|
|||
const struct mlxfw_mfa2_comp_data *comp_data;
|
||||
|
||||
comp_data = container_of(comp, struct mlxfw_mfa2_comp_data, comp);
|
||||
kfree(comp_data);
|
||||
vfree(comp_data);
|
||||
}
|
||||
|
||||
void mlxfw_mfa2_file_fini(struct mlxfw_mfa2_file *mfa2_file)
|
||||
|
|
|
@ -5472,6 +5472,7 @@ enum mlxsw_reg_htgt_trap_group {
|
|||
MLXSW_REG_HTGT_TRAP_GROUP_SP_LBERROR,
|
||||
MLXSW_REG_HTGT_TRAP_GROUP_SP_PTP0,
|
||||
MLXSW_REG_HTGT_TRAP_GROUP_SP_PTP1,
|
||||
MLXSW_REG_HTGT_TRAP_GROUP_SP_VRRP,
|
||||
|
||||
__MLXSW_REG_HTGT_TRAP_GROUP_MAX,
|
||||
MLXSW_REG_HTGT_TRAP_GROUP_MAX = __MLXSW_REG_HTGT_TRAP_GROUP_MAX - 1
|
||||
|
|
|
@ -4542,8 +4542,8 @@ static const struct mlxsw_listener mlxsw_sp_listener[] = {
|
|||
MLXSW_SP_RXL_MARK(ROUTER_ALERT_IPV6, TRAP_TO_CPU, ROUTER_EXP, false),
|
||||
MLXSW_SP_RXL_MARK(IPIP_DECAP_ERROR, TRAP_TO_CPU, ROUTER_EXP, false),
|
||||
MLXSW_SP_RXL_MARK(DECAP_ECN0, TRAP_TO_CPU, ROUTER_EXP, false),
|
||||
MLXSW_SP_RXL_MARK(IPV4_VRRP, TRAP_TO_CPU, ROUTER_EXP, false),
|
||||
MLXSW_SP_RXL_MARK(IPV6_VRRP, TRAP_TO_CPU, ROUTER_EXP, false),
|
||||
MLXSW_SP_RXL_MARK(IPV4_VRRP, TRAP_TO_CPU, VRRP, false),
|
||||
MLXSW_SP_RXL_MARK(IPV6_VRRP, TRAP_TO_CPU, VRRP, false),
|
||||
/* PKT Sample trap */
|
||||
MLXSW_RXL(mlxsw_sp_rx_listener_sample_func, PKT_SAMPLE, MIRROR_TO_CPU,
|
||||
false, SP_IP2ME, DISCARD),
|
||||
|
@ -4626,6 +4626,10 @@ static int mlxsw_sp_cpu_policers_set(struct mlxsw_core *mlxsw_core)
|
|||
rate = 19 * 1024;
|
||||
burst_size = 12;
|
||||
break;
|
||||
case MLXSW_REG_HTGT_TRAP_GROUP_SP_VRRP:
|
||||
rate = 360;
|
||||
burst_size = 7;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
@ -4665,6 +4669,7 @@ static int mlxsw_sp_trap_groups_set(struct mlxsw_core *mlxsw_core)
|
|||
case MLXSW_REG_HTGT_TRAP_GROUP_SP_OSPF:
|
||||
case MLXSW_REG_HTGT_TRAP_GROUP_SP_PIM:
|
||||
case MLXSW_REG_HTGT_TRAP_GROUP_SP_PTP0:
|
||||
case MLXSW_REG_HTGT_TRAP_GROUP_SP_VRRP:
|
||||
priority = 5;
|
||||
tc = 5;
|
||||
break;
|
||||
|
|
|
@ -7079,6 +7079,9 @@ static int mlxsw_sp_router_port_check_rif_addr(struct mlxsw_sp *mlxsw_sp,
|
|||
|
||||
for (i = 0; i < MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS); i++) {
|
||||
rif = mlxsw_sp->router->rifs[i];
|
||||
if (rif && rif->ops &&
|
||||
rif->ops->type == MLXSW_SP_RIF_TYPE_IPIP_LB)
|
||||
continue;
|
||||
if (rif && rif->dev && rif->dev != dev &&
|
||||
!ether_addr_equal_masked(rif->dev->dev_addr, dev_addr,
|
||||
mlxsw_sp->mac_mask)) {
|
||||
|
|
|
@ -112,6 +112,14 @@ static int meson8b_init_rgmii_tx_clk(struct meson8b_dwmac *dwmac)
|
|||
struct device *dev = dwmac->dev;
|
||||
const char *parent_name, *mux_parent_names[MUX_CLK_NUM_PARENTS];
|
||||
struct meson8b_dwmac_clk_configs *clk_configs;
|
||||
static const struct clk_div_table div_table[] = {
|
||||
{ .div = 2, .val = 2, },
|
||||
{ .div = 3, .val = 3, },
|
||||
{ .div = 4, .val = 4, },
|
||||
{ .div = 5, .val = 5, },
|
||||
{ .div = 6, .val = 6, },
|
||||
{ .div = 7, .val = 7, },
|
||||
};
|
||||
|
||||
clk_configs = devm_kzalloc(dev, sizeof(*clk_configs), GFP_KERNEL);
|
||||
if (!clk_configs)
|
||||
|
@ -146,9 +154,9 @@ static int meson8b_init_rgmii_tx_clk(struct meson8b_dwmac *dwmac)
|
|||
clk_configs->m250_div.reg = dwmac->regs + PRG_ETH0;
|
||||
clk_configs->m250_div.shift = PRG_ETH0_CLK_M250_DIV_SHIFT;
|
||||
clk_configs->m250_div.width = PRG_ETH0_CLK_M250_DIV_WIDTH;
|
||||
clk_configs->m250_div.flags = CLK_DIVIDER_ONE_BASED |
|
||||
CLK_DIVIDER_ALLOW_ZERO |
|
||||
CLK_DIVIDER_ROUND_CLOSEST;
|
||||
clk_configs->m250_div.table = div_table;
|
||||
clk_configs->m250_div.flags = CLK_DIVIDER_ALLOW_ZERO |
|
||||
CLK_DIVIDER_ROUND_CLOSEST;
|
||||
clk = meson8b_dwmac_register_clk(dwmac, "m250_div", &parent_name, 1,
|
||||
&clk_divider_ops,
|
||||
&clk_configs->m250_div.hw);
|
||||
|
|
|
@ -540,7 +540,7 @@ static int gtp_build_skb_ip4(struct sk_buff *skb, struct net_device *dev,
|
|||
mtu = dst_mtu(&rt->dst);
|
||||
}
|
||||
|
||||
rt->dst.ops->update_pmtu(&rt->dst, NULL, skb, mtu);
|
||||
rt->dst.ops->update_pmtu(&rt->dst, NULL, skb, mtu, false);
|
||||
|
||||
if (!skb_is_gso(skb) && (iph->frag_off & htons(IP_DF)) &&
|
||||
mtu < ntohs(iph->tot_len)) {
|
||||
|
|
|
@ -627,6 +627,8 @@ static struct phy_driver aqr_driver[] = {
|
|||
.config_intr = aqr_config_intr,
|
||||
.ack_interrupt = aqr_ack_interrupt,
|
||||
.read_status = aqr_read_status,
|
||||
.suspend = aqr107_suspend,
|
||||
.resume = aqr107_resume,
|
||||
},
|
||||
{
|
||||
PHY_ID_MATCH_MODEL(PHY_ID_AQR106),
|
||||
|
|
|
@ -18,7 +18,7 @@ if MIPS_PLATFORM_DEVICES
|
|||
|
||||
config CPU_HWMON
|
||||
tristate "Loongson-3 CPU HWMon Driver"
|
||||
depends on CONFIG_MACH_LOONGSON64
|
||||
depends on MACH_LOONGSON64
|
||||
select HWMON
|
||||
default y
|
||||
help
|
||||
|
|
|
@ -166,9 +166,9 @@ static struct posix_clock_operations ptp_clock_ops = {
|
|||
.read = ptp_read,
|
||||
};
|
||||
|
||||
static void delete_ptp_clock(struct posix_clock *pc)
|
||||
static void ptp_clock_release(struct device *dev)
|
||||
{
|
||||
struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock);
|
||||
struct ptp_clock *ptp = container_of(dev, struct ptp_clock, dev);
|
||||
|
||||
mutex_destroy(&ptp->tsevq_mux);
|
||||
mutex_destroy(&ptp->pincfg_mux);
|
||||
|
@ -213,7 +213,6 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
|
|||
}
|
||||
|
||||
ptp->clock.ops = ptp_clock_ops;
|
||||
ptp->clock.release = delete_ptp_clock;
|
||||
ptp->info = info;
|
||||
ptp->devid = MKDEV(major, index);
|
||||
ptp->index = index;
|
||||
|
@ -236,15 +235,6 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
|
|||
if (err)
|
||||
goto no_pin_groups;
|
||||
|
||||
/* Create a new device in our class. */
|
||||
ptp->dev = device_create_with_groups(ptp_class, parent, ptp->devid,
|
||||
ptp, ptp->pin_attr_groups,
|
||||
"ptp%d", ptp->index);
|
||||
if (IS_ERR(ptp->dev)) {
|
||||
err = PTR_ERR(ptp->dev);
|
||||
goto no_device;
|
||||
}
|
||||
|
||||
/* Register a new PPS source. */
|
||||
if (info->pps) {
|
||||
struct pps_source_info pps;
|
||||
|
@ -260,8 +250,18 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
|
|||
}
|
||||
}
|
||||
|
||||
/* Create a posix clock. */
|
||||
err = posix_clock_register(&ptp->clock, ptp->devid);
|
||||
/* Initialize a new device of our class in our clock structure. */
|
||||
device_initialize(&ptp->dev);
|
||||
ptp->dev.devt = ptp->devid;
|
||||
ptp->dev.class = ptp_class;
|
||||
ptp->dev.parent = parent;
|
||||
ptp->dev.groups = ptp->pin_attr_groups;
|
||||
ptp->dev.release = ptp_clock_release;
|
||||
dev_set_drvdata(&ptp->dev, ptp);
|
||||
dev_set_name(&ptp->dev, "ptp%d", ptp->index);
|
||||
|
||||
/* Create a posix clock and link it to the device. */
|
||||
err = posix_clock_register(&ptp->clock, &ptp->dev);
|
||||
if (err) {
|
||||
pr_err("failed to create posix clock\n");
|
||||
goto no_clock;
|
||||
|
@ -273,8 +273,6 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
|
|||
if (ptp->pps_source)
|
||||
pps_unregister_source(ptp->pps_source);
|
||||
no_pps:
|
||||
device_destroy(ptp_class, ptp->devid);
|
||||
no_device:
|
||||
ptp_cleanup_pin_groups(ptp);
|
||||
no_pin_groups:
|
||||
if (ptp->kworker)
|
||||
|
@ -304,7 +302,6 @@ int ptp_clock_unregister(struct ptp_clock *ptp)
|
|||
if (ptp->pps_source)
|
||||
pps_unregister_source(ptp->pps_source);
|
||||
|
||||
device_destroy(ptp_class, ptp->devid);
|
||||
ptp_cleanup_pin_groups(ptp);
|
||||
|
||||
posix_clock_unregister(&ptp->clock);
|
||||
|
|
|
@ -28,7 +28,7 @@ struct timestamp_event_queue {
|
|||
|
||||
struct ptp_clock {
|
||||
struct posix_clock clock;
|
||||
struct device *dev;
|
||||
struct device dev;
|
||||
struct ptp_clock_info *info;
|
||||
dev_t devid;
|
||||
int index; /* index into clocks.map */
|
||||
|
|
|
@ -2482,50 +2482,46 @@ static int qeth_mpc_initialize(struct qeth_card *card)
|
|||
rc = qeth_cm_enable(card);
|
||||
if (rc) {
|
||||
QETH_CARD_TEXT_(card, 2, "2err%d", rc);
|
||||
goto out_qdio;
|
||||
return rc;
|
||||
}
|
||||
rc = qeth_cm_setup(card);
|
||||
if (rc) {
|
||||
QETH_CARD_TEXT_(card, 2, "3err%d", rc);
|
||||
goto out_qdio;
|
||||
return rc;
|
||||
}
|
||||
rc = qeth_ulp_enable(card);
|
||||
if (rc) {
|
||||
QETH_CARD_TEXT_(card, 2, "4err%d", rc);
|
||||
goto out_qdio;
|
||||
return rc;
|
||||
}
|
||||
rc = qeth_ulp_setup(card);
|
||||
if (rc) {
|
||||
QETH_CARD_TEXT_(card, 2, "5err%d", rc);
|
||||
goto out_qdio;
|
||||
return rc;
|
||||
}
|
||||
rc = qeth_alloc_qdio_queues(card);
|
||||
if (rc) {
|
||||
QETH_CARD_TEXT_(card, 2, "5err%d", rc);
|
||||
goto out_qdio;
|
||||
return rc;
|
||||
}
|
||||
rc = qeth_qdio_establish(card);
|
||||
if (rc) {
|
||||
QETH_CARD_TEXT_(card, 2, "6err%d", rc);
|
||||
qeth_free_qdio_queues(card);
|
||||
goto out_qdio;
|
||||
return rc;
|
||||
}
|
||||
rc = qeth_qdio_activate(card);
|
||||
if (rc) {
|
||||
QETH_CARD_TEXT_(card, 2, "7err%d", rc);
|
||||
goto out_qdio;
|
||||
return rc;
|
||||
}
|
||||
rc = qeth_dm_act(card);
|
||||
if (rc) {
|
||||
QETH_CARD_TEXT_(card, 2, "8err%d", rc);
|
||||
goto out_qdio;
|
||||
return rc;
|
||||
}
|
||||
|
||||
return 0;
|
||||
out_qdio:
|
||||
qeth_qdio_clear_card(card, !IS_IQD(card));
|
||||
qdio_free(CARD_DDEV(card));
|
||||
return rc;
|
||||
}
|
||||
|
||||
void qeth_print_status_message(struct qeth_card *card)
|
||||
|
@ -3429,11 +3425,6 @@ int qeth_configure_cq(struct qeth_card *card, enum qeth_cq cq)
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (card->state != CARD_STATE_DOWN) {
|
||||
rc = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
qeth_free_qdio_queues(card);
|
||||
card->options.cq = cq;
|
||||
rc = 0;
|
||||
|
@ -5035,10 +5026,8 @@ int qeth_core_hardsetup_card(struct qeth_card *card, bool *carrier_ok)
|
|||
}
|
||||
if (qeth_adp_supported(card, IPA_SETADP_SET_DIAG_ASSIST)) {
|
||||
rc = qeth_query_setdiagass(card);
|
||||
if (rc < 0) {
|
||||
if (rc)
|
||||
QETH_CARD_TEXT_(card, 2, "8err%d", rc);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if (!qeth_is_diagass_supported(card, QETH_DIAGS_CMD_TRAP) ||
|
||||
|
|
|
@ -287,12 +287,12 @@ static void qeth_l2_stop_card(struct qeth_card *card)
|
|||
card->state = CARD_STATE_HARDSETUP;
|
||||
}
|
||||
if (card->state == CARD_STATE_HARDSETUP) {
|
||||
qeth_qdio_clear_card(card, 0);
|
||||
qeth_drain_output_queues(card);
|
||||
qeth_clear_working_pool_list(card);
|
||||
card->state = CARD_STATE_DOWN;
|
||||
}
|
||||
|
||||
qeth_qdio_clear_card(card, 0);
|
||||
flush_workqueue(card->event_wq);
|
||||
card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED;
|
||||
card->info.promisc_mode = 0;
|
||||
|
@ -1952,8 +1952,7 @@ int qeth_l2_vnicc_get_timeout(struct qeth_card *card, u32 *timeout)
|
|||
/* check if VNICC is currently enabled */
|
||||
bool qeth_l2_vnicc_is_in_use(struct qeth_card *card)
|
||||
{
|
||||
/* if everything is turned off, VNICC is not active */
|
||||
if (!card->options.vnicc.cur_chars)
|
||||
if (!card->options.vnicc.sup_chars)
|
||||
return false;
|
||||
/* default values are only OK if rx_bcast was not enabled by user
|
||||
* or the card is offline.
|
||||
|
@ -2040,8 +2039,9 @@ static void qeth_l2_vnicc_init(struct qeth_card *card)
|
|||
/* enforce assumed default values and recover settings, if changed */
|
||||
error |= qeth_l2_vnicc_recover_timeout(card, QETH_VNICC_LEARNING,
|
||||
timeout);
|
||||
chars_tmp = card->options.vnicc.wanted_chars ^ QETH_VNICC_DEFAULT;
|
||||
chars_tmp |= QETH_VNICC_BRIDGE_INVISIBLE;
|
||||
/* Change chars, if necessary */
|
||||
chars_tmp = card->options.vnicc.wanted_chars ^
|
||||
card->options.vnicc.cur_chars;
|
||||
chars_len = sizeof(card->options.vnicc.wanted_chars) * BITS_PER_BYTE;
|
||||
for_each_set_bit(i, &chars_tmp, chars_len) {
|
||||
vnicc = BIT(i);
|
||||
|
|
|
@ -1307,12 +1307,12 @@ static void qeth_l3_stop_card(struct qeth_card *card)
|
|||
card->state = CARD_STATE_HARDSETUP;
|
||||
}
|
||||
if (card->state == CARD_STATE_HARDSETUP) {
|
||||
qeth_qdio_clear_card(card, 0);
|
||||
qeth_drain_output_queues(card);
|
||||
qeth_clear_working_pool_list(card);
|
||||
card->state = CARD_STATE_DOWN;
|
||||
}
|
||||
|
||||
qeth_qdio_clear_card(card, 0);
|
||||
flush_workqueue(card->event_wq);
|
||||
card->info.promisc_mode = 0;
|
||||
}
|
||||
|
|
|
@ -242,21 +242,33 @@ static ssize_t qeth_l3_dev_hsuid_store(struct device *dev,
|
|||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
struct qeth_card *card = dev_get_drvdata(dev);
|
||||
int rc = 0;
|
||||
char *tmp;
|
||||
int rc;
|
||||
|
||||
if (!IS_IQD(card))
|
||||
return -EPERM;
|
||||
if (card->state != CARD_STATE_DOWN)
|
||||
return -EPERM;
|
||||
if (card->options.sniffer)
|
||||
return -EPERM;
|
||||
if (card->options.cq == QETH_CQ_NOTAVAILABLE)
|
||||
return -EPERM;
|
||||
|
||||
mutex_lock(&card->conf_mutex);
|
||||
if (card->state != CARD_STATE_DOWN) {
|
||||
rc = -EPERM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (card->options.sniffer) {
|
||||
rc = -EPERM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (card->options.cq == QETH_CQ_NOTAVAILABLE) {
|
||||
rc = -EPERM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
tmp = strsep((char **)&buf, "\n");
|
||||
if (strlen(tmp) > 8)
|
||||
return -EINVAL;
|
||||
if (strlen(tmp) > 8) {
|
||||
rc = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (card->options.hsuid[0])
|
||||
/* delete old ip address */
|
||||
|
@ -267,11 +279,13 @@ static ssize_t qeth_l3_dev_hsuid_store(struct device *dev,
|
|||
card->options.hsuid[0] = '\0';
|
||||
memcpy(card->dev->perm_addr, card->options.hsuid, 9);
|
||||
qeth_configure_cq(card, QETH_CQ_DISABLED);
|
||||
return count;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (qeth_configure_cq(card, QETH_CQ_ENABLED))
|
||||
return -EPERM;
|
||||
if (qeth_configure_cq(card, QETH_CQ_ENABLED)) {
|
||||
rc = -EPERM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
snprintf(card->options.hsuid, sizeof(card->options.hsuid),
|
||||
"%-8s", tmp);
|
||||
|
@ -280,6 +294,8 @@ static ssize_t qeth_l3_dev_hsuid_store(struct device *dev,
|
|||
|
||||
rc = qeth_l3_modify_hsuid(card, true);
|
||||
|
||||
out:
|
||||
mutex_unlock(&card->conf_mutex);
|
||||
return rc ? rc : count;
|
||||
}
|
||||
|
||||
|
|
|
@ -449,7 +449,7 @@ struct ipu3_uapi_awb_fr_config_s {
|
|||
__u16 reserved1;
|
||||
__u32 bayer_sign;
|
||||
__u8 bayer_nf;
|
||||
__u8 reserved2[3];
|
||||
__u8 reserved2[7];
|
||||
} __attribute__((aligned(32))) __packed;
|
||||
|
||||
/**
|
||||
|
|
|
@ -447,7 +447,7 @@ blk_status_t btrfs_submit_compressed_write(struct inode *inode, u64 start,
|
|||
|
||||
if (blkcg_css) {
|
||||
bio->bi_opf |= REQ_CGROUP_PUNT;
|
||||
bio_associate_blkg_from_css(bio, blkcg_css);
|
||||
kthread_associate_blkcg(blkcg_css);
|
||||
}
|
||||
refcount_set(&cb->pending_bios, 1);
|
||||
|
||||
|
@ -491,6 +491,8 @@ blk_status_t btrfs_submit_compressed_write(struct inode *inode, u64 start,
|
|||
bio->bi_opf = REQ_OP_WRITE | write_flags;
|
||||
bio->bi_private = cb;
|
||||
bio->bi_end_io = end_compressed_bio_write;
|
||||
if (blkcg_css)
|
||||
bio->bi_opf |= REQ_CGROUP_PUNT;
|
||||
bio_add_page(bio, page, PAGE_SIZE, 0);
|
||||
}
|
||||
if (bytes_left < PAGE_SIZE) {
|
||||
|
@ -517,6 +519,9 @@ blk_status_t btrfs_submit_compressed_write(struct inode *inode, u64 start,
|
|||
bio_endio(bio);
|
||||
}
|
||||
|
||||
if (blkcg_css)
|
||||
kthread_associate_blkcg(NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1479,10 +1479,10 @@ static noinline int run_delalloc_nocow(struct inode *inode,
|
|||
disk_num_bytes =
|
||||
btrfs_file_extent_disk_num_bytes(leaf, fi);
|
||||
/*
|
||||
* If extent we got ends before our range starts, skip
|
||||
* to next extent
|
||||
* If the extent we got ends before our current offset,
|
||||
* skip to the next extent.
|
||||
*/
|
||||
if (extent_end <= start) {
|
||||
if (extent_end <= cur_offset) {
|
||||
path->slots[0]++;
|
||||
goto next_slot;
|
||||
}
|
||||
|
|
25
fs/buffer.c
25
fs/buffer.c
|
@ -3034,8 +3034,6 @@ static void end_bio_bh_io_sync(struct bio *bio)
|
|||
void guard_bio_eod(int op, struct bio *bio)
|
||||
{
|
||||
sector_t maxsector;
|
||||
struct bio_vec *bvec = bio_last_bvec_all(bio);
|
||||
unsigned truncated_bytes;
|
||||
struct hd_struct *part;
|
||||
|
||||
rcu_read_lock();
|
||||
|
@ -3061,28 +3059,7 @@ void guard_bio_eod(int op, struct bio *bio)
|
|||
if (likely((bio->bi_iter.bi_size >> 9) <= maxsector))
|
||||
return;
|
||||
|
||||
/* Uhhuh. We've got a bio that straddles the device size! */
|
||||
truncated_bytes = bio->bi_iter.bi_size - (maxsector << 9);
|
||||
|
||||
/*
|
||||
* The bio contains more than one segment which spans EOD, just return
|
||||
* and let IO layer turn it into an EIO
|
||||
*/
|
||||
if (truncated_bytes > bvec->bv_len)
|
||||
return;
|
||||
|
||||
/* Truncate the bio.. */
|
||||
bio->bi_iter.bi_size -= truncated_bytes;
|
||||
bvec->bv_len -= truncated_bytes;
|
||||
|
||||
/* ..and clear the end of the buffer for reads */
|
||||
if (op == REQ_OP_READ) {
|
||||
struct bio_vec bv;
|
||||
|
||||
mp_bvec_last_segment(bvec, &bv);
|
||||
zero_user(bv.bv_page, bv.bv_offset + bv.bv_len,
|
||||
truncated_bytes);
|
||||
}
|
||||
bio_truncate(bio, maxsector << 9);
|
||||
}
|
||||
|
||||
static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh,
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
#include <linux/atomic.h>
|
||||
#include <linux/prefetch.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
/*
|
||||
* How many user pages to map in one call to get_user_pages(). This determines
|
||||
* the size of a structure in the slab cache
|
||||
|
|
|
@ -960,7 +960,7 @@ SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd)
|
|||
return ksys_dup3(oldfd, newfd, 0);
|
||||
}
|
||||
|
||||
SYSCALL_DEFINE1(dup, unsigned int, fildes)
|
||||
int ksys_dup(unsigned int fildes)
|
||||
{
|
||||
int ret = -EBADF;
|
||||
struct file *file = fget_raw(fildes);
|
||||
|
@ -975,6 +975,11 @@ SYSCALL_DEFINE1(dup, unsigned int, fildes)
|
|||
return ret;
|
||||
}
|
||||
|
||||
SYSCALL_DEFINE1(dup, unsigned int, fildes)
|
||||
{
|
||||
return ksys_dup(fildes);
|
||||
}
|
||||
|
||||
int f_dupfd(unsigned int from, struct file *file, unsigned flags)
|
||||
{
|
||||
int err;
|
||||
|
|
|
@ -1498,8 +1498,10 @@ static int __init init_hugetlbfs_fs(void)
|
|||
/* other hstates are optional */
|
||||
i = 0;
|
||||
for_each_hstate(h) {
|
||||
if (i == default_hstate_idx)
|
||||
if (i == default_hstate_idx) {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
|
||||
mnt = mount_one_hugetlbfs(h);
|
||||
if (IS_ERR(mnt))
|
||||
|
|
|
@ -1728,7 +1728,7 @@ static bool is_mnt_ns_file(struct dentry *dentry)
|
|||
dentry->d_fsdata == &mntns_operations;
|
||||
}
|
||||
|
||||
struct mnt_namespace *to_mnt_ns(struct ns_common *ns)
|
||||
static struct mnt_namespace *to_mnt_ns(struct ns_common *ns)
|
||||
{
|
||||
return container_of(ns, struct mnt_namespace, ns);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include <linux/pseudo_fs.h>
|
||||
#include <linux/file.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/proc_ns.h>
|
||||
#include <linux/magic.h>
|
||||
#include <linux/ktime.h>
|
||||
|
@ -11,6 +12,8 @@
|
|||
#include <linux/nsfs.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
static struct vfsmount *nsfs_mnt;
|
||||
|
||||
static long ns_ioctl(struct file *filp, unsigned int ioctl,
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user