diff --git a/config/bootscripts/boot-sun50i-next.cmd b/config/bootscripts/boot-sun50i-next.cmd index f5f93fe43..fd6a83649 100644 --- a/config/bootscripts/boot-sun50i-next.cmd +++ b/config/bootscripts/boot-sun50i-next.cmd @@ -23,9 +23,8 @@ if test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then env import -t ${load_addr} ${filesize} fi -# No display driver yet -if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi -if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "${consoleargs} console=ttyS0,115200"; fi +if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=ttyS0,115200 console=tty1"; fi +if test "${console}" = "serial"; then setenv consoleargs "console=ttyS0,115200"; fi # get PARTUUID of first partition on SD/eMMC it was loaded from # mmc 0 is always mapped to device u-boot (2016.09+) was loaded from diff --git a/config/kernel/linux-sunxi-dev.config b/config/kernel/linux-sunxi-dev.config index 07d143ec1..5162bb0ed 100644 --- a/config/kernel/linux-sunxi-dev.config +++ b/config/kernel/linux-sunxi-dev.config @@ -1,29 +1,11 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm 4.18.8 Kernel Configuration +# Linux/arm 4.19.1 Kernel Configuration # # # Compiler: arm-linux-gnueabihf-gcc (Linaro GCC 7.2-2017.11) 7.2.1 20171011 # -CONFIG_ARM=y -CONFIG_ARM_HAS_SG_CHAIN=y -CONFIG_ARM_DMA_USE_IOMMU=y -CONFIG_ARM_DMA_IOMMU_ALIGNMENT=8 -CONFIG_MIGHT_HAVE_PCI=y -CONFIG_SYS_SUPPORTS_APM_EMULATION=y -CONFIG_HAVE_PROC_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_FIX_EARLYCON_MEM=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ARCH_SUPPORTS_UPROBES=y -CONFIG_ARM_PATCH_PHYS_VIRT=y -CONFIG_GENERIC_BUG=y -CONFIG_PGTABLE_LEVELS=2 CONFIG_CC_IS_GCC=y CONFIG_GCC_VERSION=70201 CONFIG_CLANG_VERSION=0 @@ -37,6 +19,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 # CONFIG_COMPILE_TEST is not set CONFIG_LOCALVERSION="" # CONFIG_LOCALVERSION_AUTO is not set +CONFIG_BUILD_SALT="" CONFIG_HAVE_KERNEL_GZIP=y CONFIG_HAVE_KERNEL_LZMA=y CONFIG_HAVE_KERNEL_XZ=y @@ -76,6 +59,7 @@ CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y # CONFIG_GENERIC_IRQ_DEBUGFS is not set +CONFIG_GENERIC_IRQ_MULTI_HANDLER=y CONFIG_ARCH_CLOCKSOURCE_DATA=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_CLOCKEVENTS=y @@ -92,6 +76,9 @@ CONFIG_NO_HZ_IDLE=y # CONFIG_NO_HZ_FULL is not set CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set # # CPU/Task time and stats accounting @@ -128,6 +115,7 @@ CONFIG_PAGE_COUNTER=y CONFIG_MEMCG=y CONFIG_MEMCG_SWAP=y CONFIG_MEMCG_SWAP_ENABLED=y +CONFIG_MEMCG_KMEM=y CONFIG_BLK_CGROUP=y # CONFIG_DEBUG_BLK_CGROUP is not set CONFIG_CGROUP_WRITEBACK=y @@ -152,6 +140,7 @@ CONFIG_IPC_NS=y CONFIG_USER_NS=y CONFIG_PID_NS=y CONFIG_NET_NS=y +# CONFIG_CHECKPOINT_RESTORE is not set # CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set CONFIG_RELAY=y @@ -192,12 +181,12 @@ CONFIG_SHMEM=y CONFIG_AIO=y CONFIG_ADVISE_SYSCALLS=y CONFIG_MEMBARRIER=y -# CONFIG_CHECKPOINT_RESTORE is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set CONFIG_KALLSYMS_BASE_RELATIVE=y CONFIG_BPF_SYSCALL=y # CONFIG_USERFAULTFD is not set +CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y CONFIG_RSEQ=y # CONFIG_DEBUG_RSEQ is not set # CONFIG_EMBEDDED is not set @@ -224,133 +213,31 @@ CONFIG_SLUB_CPU_PARTIAL=y CONFIG_SYSTEM_DATA_VERIFICATION=y # CONFIG_PROFILING is not set CONFIG_TRACEPOINTS=y -CONFIG_HAVE_OPROFILE=y -# CONFIG_KPROBES is not set -CONFIG_JUMP_LABEL=y -# CONFIG_STATIC_KEYS_SELFTEST is not set -CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y -CONFIG_ARCH_USE_BUILTIN_BSWAP=y -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_NMI=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_ARCH_HAS_FORTIFY_SOURCE=y -CONFIG_ARCH_HAS_SET_MEMORY=y -CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_RSEQ=y -CONFIG_HAVE_CLK=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_PERF_REGS=y -CONFIG_HAVE_PERF_USER_STACK_DUMP=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_PLUGIN_HOSTCC="" -CONFIG_HAVE_GCC_PLUGINS=y -CONFIG_HAVE_STACKPROTECTOR=y -CONFIG_CC_HAS_STACKPROTECTOR_NONE=y -CONFIG_STACKPROTECTOR=y -CONFIG_STACKPROTECTOR_STRONG=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_HAVE_MOD_ARCH_SPECIFIC=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_ARCH_HAS_ELF_RANDOMIZE=y -CONFIG_HAVE_ARCH_MMAP_RND_BITS=y -CONFIG_HAVE_EXIT_THREAD=y -CONFIG_ARCH_MMAP_RND_BITS_MIN=8 -CONFIG_ARCH_MMAP_RND_BITS_MAX=16 -CONFIG_ARCH_MMAP_RND_BITS=8 -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_OLD_SIGACTION=y -CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y -CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y -CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y -CONFIG_STRICT_KERNEL_RWX=y -CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y -CONFIG_STRICT_MODULE_RWX=y -CONFIG_ARCH_HAS_PHYS_TO_DMA=y -CONFIG_REFCOUNT_FULL=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -CONFIG_MODULES=y -# CONFIG_MODULE_FORCE_LOAD is not set -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_MODULE_SIG is not set -# CONFIG_MODULE_COMPRESS is not set -# CONFIG_TRIM_UNUSED_KSYMS is not set -CONFIG_MODULES_TREE_LOOKUP=y -CONFIG_BLOCK=y -CONFIG_LBDAF=y -CONFIG_BLK_SCSI_REQUEST=y -CONFIG_BLK_DEV_BSG=y -CONFIG_BLK_DEV_BSGLIB=y -CONFIG_BLK_DEV_INTEGRITY=y -# CONFIG_BLK_DEV_ZONED is not set -CONFIG_BLK_DEV_THROTTLING=y -# CONFIG_BLK_DEV_THROTTLING_LOW is not set -# CONFIG_BLK_CMDLINE_PARSER is not set -CONFIG_BLK_WBT=y -CONFIG_BLK_WBT_SQ=y -CONFIG_BLK_WBT_MQ=y -# CONFIG_BLK_DEBUG_FS is not set -# CONFIG_BLK_SED_OPAL is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_CFQ_GROUP_IOSCHED=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_MQ_IOSCHED_DEADLINE=y -CONFIG_MQ_IOSCHED_KYBER=y -CONFIG_IOSCHED_BFQ=y -CONFIG_BFQ_GROUP_IOSCHED=y -CONFIG_PADATA=y -CONFIG_ASN1=y -CONFIG_INLINE_SPIN_UNLOCK_IRQ=y -CONFIG_INLINE_READ_UNLOCK=y -CONFIG_INLINE_READ_UNLOCK_IRQ=y -CONFIG_INLINE_WRITE_UNLOCK=y -CONFIG_INLINE_WRITE_UNLOCK_IRQ=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_RWSEM_SPIN_ON_OWNER=y -CONFIG_LOCK_SPIN_ON_OWNER=y -CONFIG_FREEZER=y +CONFIG_ARM=y +CONFIG_ARM_HAS_SG_CHAIN=y +CONFIG_ARM_DMA_USE_IOMMU=y +CONFIG_ARM_DMA_IOMMU_ALIGNMENT=8 +CONFIG_MIGHT_HAVE_PCI=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ARCH_SUPPORTS_UPROBES=y +CONFIG_ARM_PATCH_PHYS_VIRT=y +CONFIG_GENERIC_BUG=y +CONFIG_PGTABLE_LEVELS=2 # # System Type # CONFIG_MMU=y +CONFIG_ARCH_MMAP_RND_BITS_MIN=8 +CONFIG_ARCH_MMAP_RND_BITS_MAX=16 CONFIG_ARCH_MULTIPLATFORM=y # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_EP93XX is not set @@ -483,7 +370,6 @@ CONFIG_ARM_DMA_MEM_BUFFERABLE=y CONFIG_ARM_HEAVY_MB=y CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y CONFIG_DEBUG_ALIGN_RODATA=y -CONFIG_MULTI_IRQ_HANDLER=y # CONFIG_ARM_ERRATA_430973 is not set CONFIG_ARM_ERRATA_643719=y # CONFIG_ARM_ERRATA_720789 is not set @@ -531,9 +417,6 @@ CONFIG_NR_CPUS=8 CONFIG_HOTPLUG_CPU=y CONFIG_ARM_PSCI=y CONFIG_ARCH_NR_GPIO=416 -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set CONFIG_HZ_FIXED=0 # CONFIG_HZ_100 is not set # CONFIG_HZ_200 is not set @@ -554,35 +437,6 @@ CONFIG_CPU_SW_DOMAIN_PAN=y CONFIG_HW_PERF_EVENTS=y CONFIG_ARCH_WANT_GENERAL_HUGETLB=y CONFIG_ARM_MODULE_PLTS=y -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_HAVE_MEMBLOCK=y -CONFIG_NO_BOOTMEM=y -CONFIG_MEMORY_ISOLATION=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -CONFIG_BOUNCE=y -CONFIG_KSM=y -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_CLEANCACHE=y -CONFIG_FRONTSWAP=y -CONFIG_CMA=y -# CONFIG_CMA_DEBUG is not set -# CONFIG_CMA_DEBUGFS is not set -CONFIG_CMA_AREAS=7 -CONFIG_ZSWAP=y -CONFIG_ZPOOL=y -CONFIG_ZBUD=y -CONFIG_Z3FOLD=y -CONFIG_ZSMALLOC=y -# CONFIG_PGTABLE_MAPPING is not set -# CONFIG_ZSMALLOC_STAT is not set -CONFIG_GENERIC_EARLY_IOREMAP=y -CONFIG_IDLE_PAGE_TRACKING=y -CONFIG_FRAME_VECTOR=y -# CONFIG_PERCPU_STATS is not set -# CONFIG_GUP_BENCHMARK is not set CONFIG_FORCE_MAX_ZONEORDER=11 CONFIG_ALIGNMENT_TRAP=y # CONFIG_UACCESS_WITH_MEMCPY is not set @@ -666,20 +520,6 @@ CONFIG_VFPv3=y CONFIG_NEON=y CONFIG_KERNEL_MODE_NEON=y -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_ELF_FDPIC is not set -CONFIG_ELFCORE=y -CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y -CONFIG_BINFMT_SCRIPT=y -CONFIG_BINFMT_FLAT=y -CONFIG_BINFMT_ZFLAT=y -CONFIG_BINFMT_SHARED_FLAT=y -CONFIG_BINFMT_MISC=m -CONFIG_COREDUMP=y - # # Power management options # @@ -700,6 +540,212 @@ CONFIG_CPU_PM=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARM_CPU_SUSPEND=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y + +# +# Firmware Drivers +# +CONFIG_ARM_PSCI_FW=y +# CONFIG_ARM_PSCI_CHECKER is not set +# CONFIG_FIRMWARE_MEMMAP is not set +CONFIG_FW_CFG_SYSFS=m +# CONFIG_FW_CFG_SYSFS_CMDLINE is not set +CONFIG_HAVE_ARM_SMCCC=y +# CONFIG_GOOGLE_FIRMWARE is not set + +# +# Tegra firmware driver +# +CONFIG_ARM_CRYPTO=y +CONFIG_CRYPTO_SHA1_ARM=m +CONFIG_CRYPTO_SHA1_ARM_NEON=m +CONFIG_CRYPTO_SHA1_ARM_CE=m +CONFIG_CRYPTO_SHA2_ARM_CE=m +CONFIG_CRYPTO_SHA256_ARM=m +CONFIG_CRYPTO_SHA512_ARM=m +CONFIG_CRYPTO_AES_ARM=m +CONFIG_CRYPTO_AES_ARM_BS=m +CONFIG_CRYPTO_AES_ARM_CE=m +CONFIG_CRYPTO_GHASH_ARM_CE=m +# CONFIG_CRYPTO_CRCT10DIF_ARM_CE is not set +# CONFIG_CRYPTO_CRC32_ARM_CE is not set +# CONFIG_CRYPTO_CHACHA20_NEON is not set +# CONFIG_CRYPTO_SPECK_NEON is not set +CONFIG_VIRTUALIZATION=y +# CONFIG_VHOST_NET is not set +# CONFIG_VHOST_SCSI is not set +# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set + +# +# General architecture-dependent options +# +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_JUMP_LABEL=y +# CONFIG_STATIC_KEYS_SELFTEST is not set +CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_ARCH_USE_BUILTIN_BSWAP=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_NMI=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_ARCH_HAS_FORTIFY_SOURCE=y +CONFIG_ARCH_HAS_SET_MEMORY=y +CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_RSEQ=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_PERF_REGS=y +CONFIG_HAVE_PERF_USER_STACK_DUMP=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_SECCOMP_FILTER=y +CONFIG_HAVE_STACKPROTECTOR=y +CONFIG_CC_HAS_STACKPROTECTOR_NONE=y +CONFIG_STACKPROTECTOR=y +CONFIG_STACKPROTECTOR_STRONG=y +CONFIG_HAVE_CONTEXT_TRACKING=y +CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y +CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y +CONFIG_HAVE_MOD_ARCH_SPECIFIC=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_ARCH_HAS_ELF_RANDOMIZE=y +CONFIG_HAVE_ARCH_MMAP_RND_BITS=y +CONFIG_HAVE_EXIT_THREAD=y +CONFIG_ARCH_MMAP_RND_BITS=8 +CONFIG_CLONE_BACKWARDS=y +CONFIG_OLD_SIGSUSPEND3=y +CONFIG_OLD_SIGACTION=y +CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y +CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y +CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y +CONFIG_STRICT_KERNEL_RWX=y +CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y +CONFIG_STRICT_MODULE_RWX=y +CONFIG_ARCH_HAS_PHYS_TO_DMA=y +CONFIG_REFCOUNT_FULL=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y +CONFIG_PLUGIN_HOSTCC="" +CONFIG_HAVE_GCC_PLUGINS=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_MODULE_SIG is not set +# CONFIG_MODULE_COMPRESS is not set +# CONFIG_TRIM_UNUSED_KSYMS is not set +CONFIG_MODULES_TREE_LOOKUP=y +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_SCSI_REQUEST=y +CONFIG_BLK_DEV_BSG=y +CONFIG_BLK_DEV_BSGLIB=y +CONFIG_BLK_DEV_INTEGRITY=y +# CONFIG_BLK_DEV_ZONED is not set +CONFIG_BLK_DEV_THROTTLING=y +# CONFIG_BLK_DEV_THROTTLING_LOW is not set +# CONFIG_BLK_CMDLINE_PARSER is not set +CONFIG_BLK_WBT=y +# CONFIG_BLK_CGROUP_IOLATENCY is not set +CONFIG_BLK_WBT_SQ=y +CONFIG_BLK_WBT_MQ=y +# CONFIG_BLK_DEBUG_FS is not set +# CONFIG_BLK_SED_OPAL is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_EFI_PARTITION=y + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_CFQ_GROUP_IOSCHED=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_MQ_IOSCHED_DEADLINE=y +CONFIG_MQ_IOSCHED_KYBER=y +CONFIG_IOSCHED_BFQ=y +CONFIG_BFQ_GROUP_IOSCHED=y +CONFIG_PADATA=y +CONFIG_ASN1=y +CONFIG_INLINE_SPIN_UNLOCK_IRQ=y +CONFIG_INLINE_READ_UNLOCK=y +CONFIG_INLINE_READ_UNLOCK_IRQ=y +CONFIG_INLINE_WRITE_UNLOCK=y +CONFIG_INLINE_WRITE_UNLOCK_IRQ=y +CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y +CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_RWSEM_SPIN_ON_OWNER=y +CONFIG_LOCK_SPIN_ON_OWNER=y +CONFIG_FREEZER=y + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_ELF_FDPIC is not set +CONFIG_ELFCORE=y +CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y +CONFIG_BINFMT_SCRIPT=y +CONFIG_BINFMT_FLAT=y +CONFIG_BINFMT_ZFLAT=y +CONFIG_BINFMT_SHARED_FLAT=y +CONFIG_BINFMT_MISC=m +CONFIG_COREDUMP=y + +# +# Memory Management options +# +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_NO_BOOTMEM=y +CONFIG_MEMORY_ISOLATION=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_COMPACTION=y +CONFIG_MIGRATION=y +CONFIG_BOUNCE=y +CONFIG_KSM=y +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_CLEANCACHE=y +CONFIG_FRONTSWAP=y +CONFIG_CMA=y +# CONFIG_CMA_DEBUG is not set +# CONFIG_CMA_DEBUGFS is not set +CONFIG_CMA_AREAS=7 +CONFIG_ZSWAP=y +CONFIG_ZPOOL=y +CONFIG_ZBUD=y +CONFIG_Z3FOLD=y +CONFIG_ZSMALLOC=y +# CONFIG_PGTABLE_MAPPING is not set +# CONFIG_ZSMALLOC_STAT is not set +CONFIG_GENERIC_EARLY_IOREMAP=y +CONFIG_IDLE_PAGE_TRACKING=y +CONFIG_FRAME_VECTOR=y +# CONFIG_PERCPU_STATS is not set +# CONFIG_GUP_BENCHMARK is not set CONFIG_NET=y CONFIG_NET_INGRESS=y CONFIG_NET_EGRESS=y @@ -716,6 +762,7 @@ CONFIG_XFRM=y CONFIG_XFRM_OFFLOAD=y CONFIG_XFRM_ALGO=y CONFIG_XFRM_USER=y +CONFIG_XFRM_INTERFACE=m # CONFIG_XFRM_SUB_POLICY is not set # CONFIG_XFRM_MIGRATE is not set # CONFIG_XFRM_STATISTICS is not set @@ -838,6 +885,7 @@ CONFIG_NETFILTER_FAMILY_ARP=y CONFIG_NETFILTER_NETLINK_ACCT=m CONFIG_NETFILTER_NETLINK_QUEUE=m CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NETFILTER_NETLINK_OSF=m CONFIG_NF_CONNTRACK=m CONFIG_NF_LOG_COMMON=m CONFIG_NF_LOG_NETDEV=m @@ -877,7 +925,6 @@ CONFIG_NF_NAT_SIP=m CONFIG_NF_NAT_TFTP=m CONFIG_NF_NAT_REDIRECT=y CONFIG_NETFILTER_SYNPROXY=m -CONFIG_NF_OSF=m CONFIG_NF_TABLES=m CONFIG_NF_TABLES_SET=m # CONFIG_NF_TABLES_INET is not set @@ -892,6 +939,7 @@ CONFIG_NFT_LIMIT=m CONFIG_NFT_MASQ=m CONFIG_NFT_REDIR=m CONFIG_NFT_NAT=m +CONFIG_NFT_TUNNEL=m CONFIG_NFT_OBJREF=m CONFIG_NFT_QUEUE=m CONFIG_NFT_QUOTA=m @@ -899,6 +947,8 @@ CONFIG_NFT_REJECT=m CONFIG_NFT_COMPAT=m CONFIG_NFT_HASH=m CONFIG_NFT_SOCKET=m +CONFIG_NFT_OSF=m +CONFIG_NFT_TPROXY=m CONFIG_NF_FLOW_TABLE_INET=m CONFIG_NF_FLOW_TABLE=m CONFIG_NETFILTER_XTABLES=m @@ -1060,7 +1110,6 @@ CONFIG_IP_VS_PE_SIP=m # IP: Netfilter Configuration # CONFIG_NF_DEFRAG_IPV4=m -CONFIG_NF_CONNTRACK_IPV4=m CONFIG_NF_SOCKET_IPV4=m CONFIG_NF_TPROXY_IPV4=m # CONFIG_NF_TABLES_IPV4 is not set @@ -1100,8 +1149,6 @@ CONFIG_IP_NF_ARP_MANGLE=m # # IPv6: Netfilter Configuration # -CONFIG_NF_DEFRAG_IPV6=m -CONFIG_NF_CONNTRACK_IPV6=m CONFIG_NF_SOCKET_IPV6=m CONFIG_NF_TPROXY_IPV6=m # CONFIG_NF_TABLES_IPV6 is not set @@ -1131,6 +1178,7 @@ CONFIG_IP6_NF_RAW=m CONFIG_IP6_NF_NAT=m CONFIG_IP6_NF_TARGET_MASQUERADE=m CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_DEFRAG_IPV6=m # CONFIG_NF_TABLES_BRIDGE is not set CONFIG_BRIDGE_NF_EBTABLES=m CONFIG_BRIDGE_EBT_BROUTE=m @@ -1252,15 +1300,18 @@ CONFIG_NET_SCH_SFQ=m CONFIG_NET_SCH_TEQL=m CONFIG_NET_SCH_TBF=m # CONFIG_NET_SCH_CBS is not set +CONFIG_NET_SCH_ETF=m CONFIG_NET_SCH_GRED=m CONFIG_NET_SCH_DSMARK=m CONFIG_NET_SCH_NETEM=m # CONFIG_NET_SCH_DRR is not set CONFIG_NET_SCH_MQPRIO=m +CONFIG_NET_SCH_SKBPRIO=m # CONFIG_NET_SCH_CHOKE is not set CONFIG_NET_SCH_QFQ=m CONFIG_NET_SCH_CODEL=m CONFIG_NET_SCH_FQ_CODEL=m +CONFIG_NET_SCH_CAKE=m # CONFIG_NET_SCH_FQ is not set # CONFIG_NET_SCH_HHF is not set # CONFIG_NET_SCH_PIE is not set @@ -1387,7 +1438,6 @@ CONFIG_CAN_VXCAN=m CONFIG_CAN_SLCAN=m CONFIG_CAN_DEV=m CONFIG_CAN_CALC_BITTIMING=y -# CONFIG_CAN_LEDS is not set CONFIG_CAN_FLEXCAN=m CONFIG_CAN_GRCAN=m CONFIG_CAN_SUN4I=m @@ -1415,13 +1465,14 @@ CONFIG_CAN_MCP251X=m # # CAN USB interfaces # +CONFIG_CAN_8DEV_USB=m CONFIG_CAN_EMS_USB=m CONFIG_CAN_ESD_USB2=m CONFIG_CAN_GS_USB=m CONFIG_CAN_KVASER_USB=m -CONFIG_CAN_PEAK_USB=m -CONFIG_CAN_8DEV_USB=m # CONFIG_CAN_MCBA_USB is not set +CONFIG_CAN_PEAK_USB=m +CONFIG_CAN_UCAN=m # CONFIG_CAN_DEBUG_DEVICES is not set CONFIG_BT=m CONFIG_BT_BREDR=y @@ -1469,6 +1520,7 @@ CONFIG_BT_HCIBFUSB=m CONFIG_BT_MRVL=m CONFIG_BT_MRVL_SDIO=m CONFIG_BT_ATH3K=m +CONFIG_BT_MTKUART=m CONFIG_AF_RXRPC=m # CONFIG_AF_RXRPC_IPV6 is not set # CONFIG_AF_RXRPC_INJECT_LOSS is not set @@ -1589,9 +1641,13 @@ CONFIG_ARM_CCI400_COMMON=y CONFIG_ARM_CCI400_PORT_CTRL=y # CONFIG_BRCMSTB_GISB_ARB is not set # CONFIG_SIMPLE_PM_BUS is not set +CONFIG_SUN50I_DE2_BUS=y CONFIG_SUNXI_RSB=y # CONFIG_VEXPRESS_CONFIG is not set # CONFIG_CONNECTOR is not set +CONFIG_GNSS=m +CONFIG_GNSS_SIRF_SERIAL=m +# CONFIG_GNSS_UBX_SERIAL is not set CONFIG_MTD=y # CONFIG_MTD_TESTS is not set # CONFIG_MTD_REDBOOT_PARTS is not set @@ -1656,6 +1712,7 @@ CONFIG_MTD_BLOCK2MTD=m # Disk-On-Chip Device Drivers # # CONFIG_MTD_DOCG3 is not set +CONFIG_MTD_NAND_CORE=m # CONFIG_MTD_ONENAND is not set CONFIG_MTD_NAND_ECC=y # CONFIG_MTD_NAND_ECC_SMC is not set @@ -1669,6 +1726,7 @@ CONFIG_MTD_NAND_GPIO=y # CONFIG_MTD_NAND_BRCMNAND is not set CONFIG_MTD_NAND_PLATFORM=y CONFIG_MTD_NAND_SUNXI=y +CONFIG_MTD_SPI_NAND=m # # LPDDR & LPDDR2 PCM memory drivers @@ -1986,8 +2044,10 @@ CONFIG_B53_SRAB_DRIVER=m # CONFIG_MICROCHIP_KSZ is not set # CONFIG_NET_DSA_MV88E6XXX is not set # CONFIG_NET_DSA_QCA8K is not set +CONFIG_NET_DSA_REALTEK_SMI=m # CONFIG_NET_DSA_SMSC_LAN9303_I2C is not set # CONFIG_NET_DSA_SMSC_LAN9303_MDIO is not set +CONFIG_NET_DSA_VITESSE_VSC73XX=m CONFIG_ETHERNET=y CONFIG_NET_VENDOR_ALACRITECH=y CONFIG_NET_VENDOR_ALLWINNER=y @@ -1998,7 +2058,9 @@ CONFIG_NET_VENDOR_AQUANTIA=y # CONFIG_NET_VENDOR_ARC is not set # CONFIG_NET_VENDOR_AURORA is not set # CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_CADENCE is not set +CONFIG_NET_VENDOR_CADENCE=y +# CONFIG_MACB is not set +CONFIG_NET_VENDOR_CAVIUM=y # CONFIG_NET_VENDOR_CIRRUS is not set CONFIG_NET_VENDOR_CORTINA=y # CONFIG_GEMINI_ETHERNET is not set @@ -2255,6 +2317,11 @@ CONFIG_RTL8812AU=m CONFIG_RTL8814AU=m CONFIG_WLAN_VENDOR_MEDIATEK=y CONFIG_MT7601U=m +CONFIG_MT76_CORE=m +CONFIG_MT76_USB=m +CONFIG_MT76x2_COMMON=m +CONFIG_MT76x0U=m +CONFIG_MT76x2U=m CONFIG_WLAN_VENDOR_RALINK=y CONFIG_RT2X00=m CONFIG_RT2500USB=m @@ -2396,10 +2463,12 @@ CONFIG_TOUCHSCREEN_PROPERTIES=y # CONFIG_TOUCHSCREEN_ADS7846 is not set # CONFIG_TOUCHSCREEN_AD7877 is not set # CONFIG_TOUCHSCREEN_AD7879 is not set +CONFIG_TOUCHSCREEN_ADC=m # CONFIG_TOUCHSCREEN_AR1021_I2C is not set # CONFIG_TOUCHSCREEN_ATMEL_MXT is not set # CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set # CONFIG_TOUCHSCREEN_BU21013 is not set +CONFIG_TOUCHSCREEN_BU21029=m CONFIG_TOUCHSCREEN_CHIPONE_ICN8318=m # CONFIG_TOUCHSCREEN_CY8CTMG110 is not set # CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set @@ -2644,6 +2713,7 @@ CONFIG_I2C_SUN6I_P2WI=m # # Other I2C/SMBus bus drivers # +CONFIG_I2C_FSI=m CONFIG_I2C_STUB=m CONFIG_I2C_SLAVE=y CONFIG_I2C_SLAVE_EEPROM=m @@ -2730,6 +2800,7 @@ CONFIG_PINCTRL_SUN8I_H3_R=y CONFIG_PINCTRL_SUN8I_V3S=y CONFIG_PINCTRL_SUN9I_A80=y CONFIG_PINCTRL_SUN9I_A80_R=y +CONFIG_PINCTRL_MADERA=m CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y CONFIG_GPIOLIB=y CONFIG_GPIOLIB_FASTPATH_LIMIT=512 @@ -2770,6 +2841,7 @@ CONFIG_GPIO_PCF857X=m # MFD GPIO expanders # # CONFIG_HTC_EGPIO is not set +# CONFIG_GPIO_MADERA is not set # # SPI GPIO expanders @@ -2810,7 +2882,6 @@ CONFIG_W1_SLAVE_DS2431=m CONFIG_W1_SLAVE_DS2433=m # CONFIG_W1_SLAVE_DS2433_CRC is not set # CONFIG_W1_SLAVE_DS2438 is not set -# CONFIG_W1_SLAVE_DS2760 is not set # CONFIG_W1_SLAVE_DS2780 is not set # CONFIG_W1_SLAVE_DS2781 is not set # CONFIG_W1_SLAVE_DS28E04 is not set @@ -2833,7 +2904,9 @@ CONFIG_POWER_SUPPLY=y # CONFIG_PDA_POWER is not set # CONFIG_GENERIC_ADC_BATTERY is not set # CONFIG_TEST_POWER is not set +CONFIG_CHARGER_ADP5061=m CONFIG_BATTERY_CPCAP=m +CONFIG_BATTERY_DS2760=m # CONFIG_BATTERY_DS2780 is not set # CONFIG_BATTERY_DS2781 is not set # CONFIG_BATTERY_DS2782 is not set @@ -2953,6 +3026,7 @@ CONFIG_SENSORS_NCT6683=m CONFIG_SENSORS_NCT6775=m CONFIG_SENSORS_NCT7802=m CONFIG_SENSORS_NCT7904=m +CONFIG_SENSORS_NPCM7XX=m CONFIG_SENSORS_PCF8591=m # CONFIG_PMBUS is not set CONFIG_SENSORS_PWM_FAN=m @@ -3059,8 +3133,6 @@ CONFIG_SSB=m CONFIG_SSB_BLOCKIO=y CONFIG_SSB_SDIOHOST_POSSIBLE=y # CONFIG_SSB_SDIOHOST is not set -# CONFIG_SSB_SILENT is not set -# CONFIG_SSB_DEBUG is not set # CONFIG_SSB_DRIVER_GPIO is not set CONFIG_BCMA_POSSIBLE=y CONFIG_BCMA=m @@ -3089,6 +3161,12 @@ CONFIG_MFD_AXP20X=y CONFIG_MFD_AXP20X_I2C=y CONFIG_MFD_AXP20X_RSB=y # CONFIG_MFD_CROS_EC is not set +CONFIG_MFD_MADERA=m +# CONFIG_MFD_MADERA_I2C is not set +# CONFIG_MFD_MADERA_SPI is not set +# CONFIG_MFD_CS47L35 is not set +# CONFIG_MFD_CS47L85 is not set +# CONFIG_MFD_CS47L90 is not set # CONFIG_MFD_ASIC3 is not set # CONFIG_PMIC_DA903X is not set # CONFIG_MFD_DA9052_SPI is not set @@ -3171,6 +3249,7 @@ CONFIG_MFD_WL1273_CORE=m # CONFIG_MFD_WM831X_SPI is not set # CONFIG_MFD_WM8350_I2C is not set # CONFIG_MFD_WM8994 is not set +CONFIG_MFD_ROHM_BD718XX=m # CONFIG_RAVE_SP_CORE is not set CONFIG_REGULATOR=y # CONFIG_REGULATOR_DEBUG is not set @@ -3182,6 +3261,7 @@ CONFIG_REGULATOR_VIRTUAL_CONSUMER=y # CONFIG_REGULATOR_AD5398 is not set # CONFIG_REGULATOR_ANATOP is not set CONFIG_REGULATOR_AXP20X=y +CONFIG_REGULATOR_BD718XX=m CONFIG_REGULATOR_CPCAP=m # CONFIG_REGULATOR_DA9210 is not set # CONFIG_REGULATOR_DA9211 is not set @@ -3409,7 +3489,6 @@ CONFIG_DVB_USB_PCTV452E=m CONFIG_DVB_USB_DW2102=m CONFIG_DVB_USB_CINERGY_T2=m CONFIG_DVB_USB_DTV5100=m -CONFIG_DVB_USB_FRIIO=m CONFIG_DVB_USB_AZ6027=m CONFIG_DVB_USB_TECHNISAT_USB2=m CONFIG_DVB_USB_V2=y @@ -3461,6 +3540,7 @@ CONFIG_VIDEO_VIVID=m # CONFIG_VIDEO_VIVID_CEC is not set CONFIG_VIDEO_VIVID_MAX_DEVS=64 CONFIG_VIDEO_VIM2M=m +CONFIG_VIDEO_VICODEC=m CONFIG_DVB_PLATFORM_DRIVERS=y CONFIG_DVB_C8SECTPFE=m # CONFIG_SDR_PLATFORM_DRIVERS is not set @@ -3564,7 +3644,9 @@ CONFIG_VIDEO_BT866=m CONFIG_VIDEO_KS0127=m CONFIG_VIDEO_ML86V7667=m # CONFIG_VIDEO_AD5820 is not set +CONFIG_VIDEO_AK7375=m # CONFIG_VIDEO_DW9714 is not set +CONFIG_VIDEO_DW9807_VCM=m CONFIG_VIDEO_SAA7110=m CONFIG_VIDEO_SAA711X=m CONFIG_VIDEO_TC358743=m @@ -3606,6 +3688,7 @@ CONFIG_VIDEO_THS8200=m # CONFIG_VIDEO_IMX274 is not set # CONFIG_VIDEO_OV2640 is not set # CONFIG_VIDEO_OV2659 is not set +CONFIG_VIDEO_OV2680=m CONFIG_VIDEO_OV2685=m # CONFIG_VIDEO_OV5640 is not set CONFIG_VIDEO_OV5645=m @@ -3628,9 +3711,11 @@ CONFIG_VIDEO_OV7740=m # CONFIG_VIDEO_MT9T112 is not set # CONFIG_VIDEO_MT9V011 is not set # CONFIG_VIDEO_MT9V032 is not set +CONFIG_VIDEO_MT9V111=m # CONFIG_VIDEO_SR030PC30 is not set # CONFIG_VIDEO_NOON010PC30 is not set # CONFIG_VIDEO_M5MOLS is not set +CONFIG_VIDEO_RJ54N1=m # CONFIG_VIDEO_S5K6AA is not set # CONFIG_VIDEO_S5K6A3 is not set # CONFIG_VIDEO_S5K4ECGX is not set @@ -3851,6 +3936,7 @@ CONFIG_DVB_MB86A20S=m # ISDB-S (satellite) & ISDB-T (terrestrial) frontends # CONFIG_DVB_TC90522=m +CONFIG_DVB_MN88443X=m # # Digital terrestrial only tuners/PLL @@ -3906,6 +3992,7 @@ CONFIG_DRM_KMS_FB_HELPER=y CONFIG_DRM_FBDEV_EMULATION=y CONFIG_DRM_FBDEV_OVERALLOC=100 CONFIG_DRM_LOAD_EDID_FIRMWARE=y +# CONFIG_DRM_DP_CEC is not set CONFIG_DRM_GEM_CMA_HELPER=y CONFIG_DRM_KMS_CMA_HELPER=y @@ -3927,6 +4014,7 @@ CONFIG_DRM_KMS_CMA_HELPER=y # AMD Library routines # # CONFIG_DRM_VGEM is not set +CONFIG_DRM_VKMS=m # CONFIG_DRM_EXYNOS is not set # CONFIG_DRM_UDL is not set # CONFIG_DRM_ARMADA is not set @@ -3939,6 +4027,7 @@ CONFIG_DRM_SUN4I_BACKEND=y CONFIG_DRM_SUN6I_DSI=m CONFIG_DRM_SUN8I_DW_HDMI=y CONFIG_DRM_SUN8I_MIXER=y +CONFIG_DRM_SUN8I_TCON_TOP=y # CONFIG_DRM_OMAP is not set # CONFIG_DRM_TILCDC is not set # CONFIG_DRM_FSL_DCU is not set @@ -3952,6 +4041,7 @@ CONFIG_DRM_PANEL_ARM_VERSATILE=m CONFIG_DRM_PANEL_LVDS=m CONFIG_DRM_PANEL_SIMPLE=m CONFIG_DRM_PANEL_ILITEK_IL9322=m +CONFIG_DRM_PANEL_ILITEK_ILI9881C=m # CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set # CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set # CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set @@ -3997,6 +4087,7 @@ CONFIG_DRM_DW_HDMI=y CONFIG_DRM_TINYDRM=m CONFIG_TINYDRM_MIPI_DBI=m # CONFIG_TINYDRM_ILI9225 is not set +CONFIG_TINYDRM_ILI9341=m CONFIG_TINYDRM_MI0283QT=m # CONFIG_TINYDRM_REPAPER is not set # CONFIG_TINYDRM_ST7586 is not set @@ -4078,6 +4169,7 @@ CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set CONFIG_LOGO=y # CONFIG_LOGO_LINUX_MONO is not set # CONFIG_LOGO_LINUX_VGA16 is not set @@ -4205,8 +4297,8 @@ CONFIG_SND_SOC_CS35L35=m # CONFIG_SND_SOC_CS43130 is not set # CONFIG_SND_SOC_CS4349 is not set # CONFIG_SND_SOC_CS53L30 is not set -# CONFIG_SND_SOC_DIO2125 is not set # CONFIG_SND_SOC_ES7134 is not set +CONFIG_SND_SOC_ES7241=m # CONFIG_SND_SOC_ES8316 is not set CONFIG_SND_SOC_ES8328=m CONFIG_SND_SOC_ES8328_I2C=m @@ -4234,6 +4326,7 @@ CONFIG_SND_SOC_PCM186X_SPI=m # CONFIG_SND_SOC_RT5616 is not set # CONFIG_SND_SOC_RT5631 is not set # CONFIG_SND_SOC_SGTL5000 is not set +CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m # CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set CONFIG_SND_SOC_SPDIF=m # CONFIG_SND_SOC_SSM2305 is not set @@ -4319,6 +4412,7 @@ CONFIG_HID_BETOP_FF=m CONFIG_HID_CHERRY=m CONFIG_HID_CHICONY=m CONFIG_HID_CORSAIR=m +CONFIG_HID_COUGAR=m CONFIG_HID_PRODIKEYS=m # CONFIG_HID_CMEDIA is not set CONFIG_HID_CP2112=m @@ -4835,7 +4929,6 @@ CONFIG_RTC_INTF_DEV=y # CONFIG_RTC_DRV_ABB5ZES3 is not set # CONFIG_RTC_DRV_ABX80X is not set CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1307_HWMON=y # CONFIG_RTC_DRV_DS1307_CENTURY is not set # CONFIG_RTC_DRV_DS1374 is not set # CONFIG_RTC_DRV_DS1672 is not set @@ -5014,11 +5107,6 @@ CONFIG_88EU_AP_MODE=y CONFIG_AD9832=m CONFIG_AD9834=m -# -# Digital gyroscope sensors -# -# CONFIG_ADIS16060 is not set - # # Network Analyzer, Impedance Converters # @@ -5097,14 +5185,23 @@ CONFIG_MOST=m # CONFIG_MOST_USB is not set # CONFIG_KS7010 is not set # CONFIG_GREYBUS is not set - -# -# USB Power Delivery and Type-C drivers -# # CONFIG_PI433 is not set CONFIG_MTK_MMC=m # CONFIG_MTK_AEE_KDUMP is not set # CONFIG_MTK_MMC_CD_POLL is not set + +# +# Gasket devices +# +CONFIG_XIL_AXIS_FIFO=m +CONFIG_EROFS_FS=m +# CONFIG_EROFS_FS_DEBUG is not set +CONFIG_EROFS_FS_XATTR=y +CONFIG_EROFS_FS_POSIX_ACL=y +# CONFIG_EROFS_FS_SECURITY is not set +# CONFIG_EROFS_FS_USE_VM_MAP_RAM is not set +# CONFIG_EROFS_FAULT_INJECTION is not set +# CONFIG_EROFS_FS_ZIP is not set # CONFIG_GOLDFISH is not set # CONFIG_CHROME_PLATFORMS is not set # CONFIG_MELLANOX_PLATFORM is not set @@ -5116,6 +5213,7 @@ CONFIG_COMMON_CLK=y # Common Clock Framework # # CONFIG_CLK_HSDK is not set +CONFIG_COMMON_CLK_MAX9485=m # CONFIG_COMMON_CLK_SI5351 is not set # CONFIG_COMMON_CLK_SI514 is not set # CONFIG_COMMON_CLK_SI544 is not set @@ -5164,6 +5262,8 @@ CONFIG_IOMMU_IO_PGTABLE_LPAE=y # CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set CONFIG_IOMMU_IO_PGTABLE_ARMV7S=y # CONFIG_IOMMU_IO_PGTABLE_ARMV7S_SELFTEST is not set +# CONFIG_IOMMU_DEBUGFS is not set +# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set CONFIG_OF_IOMMU=y CONFIG_ARM_SMMU=y @@ -5191,6 +5291,10 @@ CONFIG_ARM_SMMU=y # # CONFIG_SOC_BRCMSTB is not set +# +# NXP/Freescale QorIQ SoC drivers +# + # # i.MX SoC drivers # @@ -5339,6 +5443,9 @@ CONFIG_TI_TLC4541=m # Chemical Sensors # # CONFIG_ATLAS_PH_SENSOR is not set +CONFIG_BME680=m +CONFIG_BME680_I2C=m +CONFIG_BME680_SPI=m # CONFIG_CCS811 is not set # CONFIG_IAQCORE is not set # CONFIG_VZ89X is not set @@ -5375,6 +5482,7 @@ CONFIG_LTC2632=m # CONFIG_AD5686_SPI is not set # CONFIG_AD5696_I2C is not set # CONFIG_AD5755 is not set +CONFIG_AD5758=m # CONFIG_AD5761 is not set # CONFIG_AD5764 is not set # CONFIG_AD5791 is not set @@ -5488,6 +5596,7 @@ CONFIG_CM3605=m # CONFIG_MAX44000 is not set # CONFIG_OPT3001 is not set # CONFIG_PA12203001 is not set +CONFIG_SI1133=m # CONFIG_SI1145 is not set # CONFIG_STK3310 is not set # CONFIG_ST_UVIS25 is not set @@ -5577,6 +5686,7 @@ CONFIG_MAX5481=m # # Proximity and distance sensors # +CONFIG_ISL29501=m # CONFIG_LIDAR_LITE_V2 is not set # CONFIG_RFD77402 is not set # CONFIG_SRF04 is not set @@ -5667,34 +5777,22 @@ CONFIG_STM_SOURCE_CONSOLE=m # CONFIG_INTEL_TH is not set # CONFIG_FPGA is not set CONFIG_FSI=m +# CONFIG_FSI_NEW_DEV_NODE is not set # CONFIG_FSI_MASTER_GPIO is not set # CONFIG_FSI_MASTER_HUB is not set # CONFIG_FSI_SCOM is not set +# CONFIG_FSI_SBEFIFO is not set CONFIG_TEE=m # # TEE drivers # CONFIG_OPTEE=m +CONFIG_OPTEE_SHM_NUM_PRIV_PAGES=1 CONFIG_PM_OPP=y # CONFIG_SIOX is not set # CONFIG_SLIMBUS is not set -# -# Firmware Drivers -# -CONFIG_ARM_PSCI_FW=y -# CONFIG_ARM_PSCI_CHECKER is not set -# CONFIG_FIRMWARE_MEMMAP is not set -CONFIG_FW_CFG_SYSFS=m -# CONFIG_FW_CFG_SYSFS_CMDLINE is not set -CONFIG_HAVE_ARM_SMCCC=y -# CONFIG_GOOGLE_FIRMWARE is not set - -# -# Tegra firmware driver -# - # # File systems # @@ -5768,6 +5866,7 @@ CONFIG_OVERLAY_FS=m CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y # CONFIG_OVERLAY_FS_INDEX is not set # CONFIG_OVERLAY_FS_XINO_AUTO is not set +# CONFIG_OVERLAY_FS_METACOPY is not set # # Caches @@ -5822,7 +5921,6 @@ CONFIG_ECRYPT_FS=m # CONFIG_ECRYPT_FS_MESSAGING is not set CONFIG_HFS_FS=m CONFIG_HFSPLUS_FS=m -CONFIG_HFSPLUS_FS_POSIX_ACL=y # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set @@ -5840,6 +5938,7 @@ CONFIG_UBIFS_FS_ADVANCED_COMPR=y CONFIG_UBIFS_FS_LZO=y CONFIG_UBIFS_FS_ZLIB=y # CONFIG_UBIFS_ATIME_SUPPORT is not set +CONFIG_UBIFS_FS_XATTR=y # CONFIG_UBIFS_FS_ENCRYPTION is not set CONFIG_UBIFS_FS_SECURITY=y # CONFIG_CRAMFS is not set @@ -5927,8 +6026,8 @@ CONFIG_CEPH_FS=m CONFIG_CEPH_FSCACHE=y CONFIG_CEPH_FS_POSIX_ACL=y CONFIG_CIFS=m -CONFIG_CIFS_STATS=y # CONFIG_CIFS_STATS2 is not set +CONFIG_CIFS_ALLOW_INSECURE_LEGACY=y # CONFIG_CIFS_WEAK_PW_HASH is not set CONFIG_CIFS_UPCALL=y CONFIG_CIFS_XATTR=y @@ -5936,7 +6035,6 @@ CONFIG_CIFS_POSIX=y CONFIG_CIFS_ACL=y # CONFIG_CIFS_DEBUG is not set # CONFIG_CIFS_DFS_UPCALL is not set -CONFIG_CIFS_SMB311=y CONFIG_CIFS_FSCACHE=y # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -5993,220 +6091,6 @@ CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y # CONFIG_DLM is not set -# -# Kernel hacking -# - -# -# printk and dmesg options -# -CONFIG_PRINTK_TIME=y -CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 -CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 -# CONFIG_BOOT_PRINTK_DELAY is not set -# CONFIG_DYNAMIC_DEBUG is not set - -# -# Compile-time checks and compiler options -# -# CONFIG_DEBUG_INFO is not set -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=1024 -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_READABLE_ASM is not set -# CONFIG_UNUSED_SYMBOLS is not set -# CONFIG_PAGE_OWNER is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_SECTION_MISMATCH_WARN_ONLY=y -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -# CONFIG_MAGIC_SYSRQ is not set -CONFIG_DEBUG_KERNEL=y - -# -# Memory Debugging -# -CONFIG_PAGE_EXTENSION=y -# CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_PAGE_POISONING is not set -# CONFIG_DEBUG_PAGE_REF is not set -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_DEBUG_OBJECTS is not set -# CONFIG_SLUB_DEBUG_ON is not set -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -# CONFIG_DEBUG_KMEMLEAK is not set -# CONFIG_DEBUG_STACK_USAGE is not set -# CONFIG_DEBUG_VM is not set -CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y -# CONFIG_DEBUG_VIRTUAL is not set -# CONFIG_DEBUG_MEMORY_INIT is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set -# CONFIG_DEBUG_HIGHMEM is not set -CONFIG_ARCH_HAS_KCOV=y -CONFIG_CC_HAS_SANCOV_TRACE_PC=y -# CONFIG_KCOV is not set -# CONFIG_DEBUG_SHIRQ is not set - -# -# Debug Lockups and Hangs -# -# CONFIG_SOFTLOCKUP_DETECTOR is not set -# CONFIG_DETECT_HUNG_TASK is not set -# CONFIG_WQ_WATCHDOG is not set -# CONFIG_PANIC_ON_OOPS is not set -CONFIG_PANIC_ON_OOPS_VALUE=0 -CONFIG_PANIC_TIMEOUT=0 -CONFIG_SCHED_DEBUG=y -CONFIG_SCHED_INFO=y -# CONFIG_SCHEDSTATS is not set -# CONFIG_SCHED_STACK_END_CHECK is not set -# CONFIG_DEBUG_TIMEKEEPING is not set - -# -# Lock Debugging (spinlocks, mutexes, etc...) -# -CONFIG_LOCK_DEBUGGING_SUPPORT=y -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set -# CONFIG_DEBUG_RWSEMS is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_DEBUG_ATOMIC_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_LOCK_TORTURE_TEST is not set -CONFIG_WW_MUTEX_SELFTEST=m -CONFIG_STACKTRACE=y -# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_LIST is not set -# CONFIG_DEBUG_PI_LIST is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set -# CONFIG_DEBUG_CREDENTIALS is not set - -# -# RCU Debugging -# -# CONFIG_RCU_PERF_TEST is not set -# CONFIG_RCU_TORTURE_TEST is not set -CONFIG_RCU_CPU_STALL_TIMEOUT=21 -# CONFIG_RCU_TRACE is not set -# CONFIG_RCU_EQS_DEBUG is not set -# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set -# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set -# CONFIG_NOTIFIER_ERROR_INJECTION is not set -# CONFIG_FAULT_INJECTION is not set -# CONFIG_LATENCYTOP is not set -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACE_CLOCK=y -CONFIG_RING_BUFFER=y -CONFIG_EVENT_TRACING=y -CONFIG_CONTEXT_SWITCH_TRACER=y -CONFIG_TRACING=y -CONFIG_GENERIC_TRACER=y -CONFIG_TRACING_SUPPORT=y -CONFIG_FTRACE=y -CONFIG_FUNCTION_TRACER=y -# CONFIG_PREEMPTIRQ_EVENTS is not set -# CONFIG_IRQSOFF_TRACER is not set -# CONFIG_SCHED_TRACER is not set -# CONFIG_HWLAT_TRACER is not set -# CONFIG_FTRACE_SYSCALLS is not set -# CONFIG_TRACER_SNAPSHOT is not set -CONFIG_BRANCH_PROFILE_NONE=y -# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set -# CONFIG_PROFILE_ALL_BRANCHES is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_UPROBE_EVENTS is not set -CONFIG_DYNAMIC_FTRACE=y -CONFIG_DYNAMIC_FTRACE_WITH_REGS=y -# CONFIG_FUNCTION_PROFILER is not set -CONFIG_FTRACE_MCOUNT_RECORD=y -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_TRACEPOINT_BENCHMARK is not set -# CONFIG_RING_BUFFER_BENCHMARK is not set -# CONFIG_RING_BUFFER_STARTUP_TEST is not set -# CONFIG_TRACE_EVAL_MAP_FILE is not set -CONFIG_TRACING_EVENTS_GPIO=y -# CONFIG_DMA_API_DEBUG is not set -CONFIG_RUNTIME_TESTING_MENU=y -# CONFIG_LKDTM is not set -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_TEST_SORT is not set -# CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_RBTREE_TEST is not set -# CONFIG_INTERVAL_TREE_TEST is not set -# CONFIG_PERCPU_TEST is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_ASYNC_RAID6_TEST is not set -CONFIG_TEST_HEXDUMP=m -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_TEST_PRINTF is not set -# CONFIG_TEST_BITMAP is not set -# CONFIG_TEST_UUID is not set -CONFIG_TEST_OVERFLOW=m -# CONFIG_TEST_RHASHTABLE is not set -# CONFIG_TEST_HASH is not set -# CONFIG_TEST_LKM is not set -# CONFIG_TEST_USER_COPY is not set -# CONFIG_TEST_BPF is not set -# CONFIG_FIND_BIT_BENCHMARK is not set -# CONFIG_TEST_FIRMWARE is not set -# CONFIG_TEST_SYSCTL is not set -# CONFIG_TEST_UDELAY is not set -# CONFIG_TEST_STATIC_KEYS is not set -# CONFIG_TEST_KMOD is not set -# CONFIG_MEMTEST is not set -# CONFIG_BUG_ON_DATA_CORRUPTION is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -# CONFIG_KGDB is not set -# CONFIG_UBSAN is not set -CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_ARM_PTDUMP_DEBUGFS is not set -# CONFIG_DEBUG_WX is not set -CONFIG_ARM_UNWIND=y -# CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_LL=y -# CONFIG_DEBUG_SUN9I_UART0 is not set -CONFIG_DEBUG_SUNXI_UART0=y -# CONFIG_DEBUG_SUNXI_UART1 is not set -# CONFIG_DEBUG_SUNXI_R_UART is not set -# CONFIG_DEBUG_ICEDCC is not set -# CONFIG_DEBUG_SEMIHOSTING is not set -# CONFIG_DEBUG_LL_UART_8250 is not set -# CONFIG_DEBUG_LL_UART_PL01X is not set -CONFIG_DEBUG_LL_INCLUDE="debug/8250.S" -CONFIG_DEBUG_UART_8250=y -CONFIG_DEBUG_UART_PHYS=0x01c28000 -CONFIG_DEBUG_UART_VIRT=0xf1c28000 -CONFIG_DEBUG_UART_8250_SHIFT=2 -# CONFIG_DEBUG_UART_8250_WORD is not set -# CONFIG_DEBUG_UART_8250_PALMCHIP is not set -# CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set -CONFIG_DEBUG_UNCOMPRESS=y -CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" -# CONFIG_EARLY_PRINTK is not set -# CONFIG_PID_IN_CONTEXTIDR is not set -# CONFIG_CORESIGHT is not set - # # Security options # @@ -6398,21 +6282,6 @@ CONFIG_SYSTEM_TRUSTED_KEYS="" # CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set # CONFIG_SECONDARY_TRUSTED_KEYRING is not set # CONFIG_SYSTEM_BLACKLIST_KEYRING is not set -CONFIG_ARM_CRYPTO=y -CONFIG_CRYPTO_SHA1_ARM=m -CONFIG_CRYPTO_SHA1_ARM_NEON=m -CONFIG_CRYPTO_SHA1_ARM_CE=m -CONFIG_CRYPTO_SHA2_ARM_CE=m -CONFIG_CRYPTO_SHA256_ARM=m -CONFIG_CRYPTO_SHA512_ARM=m -CONFIG_CRYPTO_AES_ARM=m -CONFIG_CRYPTO_AES_ARM_BS=m -CONFIG_CRYPTO_AES_ARM_CE=m -CONFIG_CRYPTO_GHASH_ARM_CE=m -# CONFIG_CRYPTO_CRCT10DIF_ARM_CE is not set -# CONFIG_CRYPTO_CRC32_ARM_CE is not set -# CONFIG_CRYPTO_CHACHA20_NEON is not set -# CONFIG_CRYPTO_SPECK_NEON is not set CONFIG_BINARY_PRINTF=y # @@ -6437,6 +6306,7 @@ CONFIG_CRC32_SLICEBY8=y # CONFIG_CRC32_SLICEBY4 is not set # CONFIG_CRC32_SARWATE is not set # CONFIG_CRC32_BIT is not set +CONFIG_CRC64=m CONFIG_CRC4=m CONFIG_CRC7=m CONFIG_LIBCRC32C=y @@ -6503,7 +6373,220 @@ CONFIG_SG_POOL=y CONFIG_ARCH_HAS_SG_CHAIN=y CONFIG_SBITMAP=y # CONFIG_STRING_SELFTEST is not set -CONFIG_VIRTUALIZATION=y -# CONFIG_VHOST_NET is not set -# CONFIG_VHOST_SCSI is not set -# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set + +# +# Kernel hacking +# + +# +# printk and dmesg options +# +CONFIG_PRINTK_TIME=y +CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 +CONFIG_CONSOLE_LOGLEVEL_QUIET=4 +CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_DYNAMIC_DEBUG is not set + +# +# Compile-time checks and compiler options +# +# CONFIG_DEBUG_INFO is not set +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_READABLE_ASM is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_PAGE_OWNER is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_SECTION_MISMATCH_WARN_ONLY=y +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_MAGIC_SYSRQ is not set +CONFIG_DEBUG_KERNEL=y + +# +# Memory Debugging +# +CONFIG_PAGE_EXTENSION=y +# CONFIG_DEBUG_PAGEALLOC is not set +# CONFIG_PAGE_POISONING is not set +# CONFIG_DEBUG_PAGE_REF is not set +# CONFIG_DEBUG_RODATA_TEST is not set +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_DEBUG_ON is not set +# CONFIG_SLUB_STATS is not set +CONFIG_HAVE_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_VM is not set +CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y +# CONFIG_DEBUG_VIRTUAL is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_PER_CPU_MAPS is not set +# CONFIG_DEBUG_HIGHMEM is not set +CONFIG_ARCH_HAS_KCOV=y +CONFIG_CC_HAS_SANCOV_TRACE_PC=y +# CONFIG_KCOV is not set +# CONFIG_DEBUG_SHIRQ is not set + +# +# Debug Lockups and Hangs +# +# CONFIG_SOFTLOCKUP_DETECTOR is not set +# CONFIG_DETECT_HUNG_TASK is not set +# CONFIG_WQ_WATCHDOG is not set +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_PANIC_TIMEOUT=0 +CONFIG_SCHED_DEBUG=y +CONFIG_SCHED_INFO=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_SCHED_STACK_END_CHECK is not set +# CONFIG_DEBUG_TIMEKEEPING is not set + +# +# Lock Debugging (spinlocks, mutexes, etc...) +# +CONFIG_LOCK_DEBUGGING_SUPPORT=y +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set +# CONFIG_DEBUG_RWSEMS is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_DEBUG_ATOMIC_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_LOCK_TORTURE_TEST is not set +CONFIG_WW_MUTEX_SELFTEST=m +CONFIG_STACKTRACE=y +# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_LIST is not set +# CONFIG_DEBUG_PI_LIST is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set + +# +# RCU Debugging +# +# CONFIG_RCU_PERF_TEST is not set +# CONFIG_RCU_TORTURE_TEST is not set +CONFIG_RCU_CPU_STALL_TIMEOUT=21 +# CONFIG_RCU_TRACE is not set +# CONFIG_RCU_EQS_DEBUG is not set +# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set +# CONFIG_NOTIFIER_ERROR_INJECTION is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set +CONFIG_NOP_TRACER=y +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACE_CLOCK=y +CONFIG_RING_BUFFER=y +CONFIG_EVENT_TRACING=y +CONFIG_CONTEXT_SWITCH_TRACER=y +CONFIG_TRACING=y +CONFIG_GENERIC_TRACER=y +CONFIG_TRACING_SUPPORT=y +CONFIG_FTRACE=y +CONFIG_FUNCTION_TRACER=y +# CONFIG_PREEMPTIRQ_EVENTS is not set +# CONFIG_IRQSOFF_TRACER is not set +# CONFIG_SCHED_TRACER is not set +# CONFIG_HWLAT_TRACER is not set +# CONFIG_FTRACE_SYSCALLS is not set +# CONFIG_TRACER_SNAPSHOT is not set +CONFIG_BRANCH_PROFILE_NONE=y +# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set +# CONFIG_PROFILE_ALL_BRANCHES is not set +# CONFIG_STACK_TRACER is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_UPROBE_EVENTS is not set +CONFIG_DYNAMIC_FTRACE=y +CONFIG_DYNAMIC_FTRACE_WITH_REGS=y +# CONFIG_FUNCTION_PROFILER is not set +CONFIG_FTRACE_MCOUNT_RECORD=y +# CONFIG_FTRACE_STARTUP_TEST is not set +# CONFIG_TRACEPOINT_BENCHMARK is not set +# CONFIG_RING_BUFFER_BENCHMARK is not set +# CONFIG_RING_BUFFER_STARTUP_TEST is not set +# CONFIG_PREEMPTIRQ_DELAY_TEST is not set +# CONFIG_TRACE_EVAL_MAP_FILE is not set +CONFIG_TRACING_EVENTS_GPIO=y +# CONFIG_DMA_API_DEBUG is not set +CONFIG_RUNTIME_TESTING_MENU=y +# CONFIG_LKDTM is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_TEST_SORT is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_RBTREE_TEST is not set +# CONFIG_INTERVAL_TREE_TEST is not set +# CONFIG_PERCPU_TEST is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_ASYNC_RAID6_TEST is not set +CONFIG_TEST_HEXDUMP=m +# CONFIG_TEST_STRING_HELPERS is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_TEST_PRINTF is not set +# CONFIG_TEST_BITMAP is not set +# CONFIG_TEST_BITFIELD is not set +# CONFIG_TEST_UUID is not set +CONFIG_TEST_OVERFLOW=m +# CONFIG_TEST_RHASHTABLE is not set +# CONFIG_TEST_HASH is not set +CONFIG_TEST_IDA=m +# CONFIG_TEST_LKM is not set +# CONFIG_TEST_USER_COPY is not set +# CONFIG_TEST_BPF is not set +# CONFIG_FIND_BIT_BENCHMARK is not set +# CONFIG_TEST_FIRMWARE is not set +# CONFIG_TEST_SYSCTL is not set +# CONFIG_TEST_UDELAY is not set +# CONFIG_TEST_STATIC_KEYS is not set +# CONFIG_TEST_KMOD is not set +# CONFIG_MEMTEST is not set +# CONFIG_BUG_ON_DATA_CORRUPTION is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_UBSAN is not set +CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y +# CONFIG_STRICT_DEVMEM is not set +# CONFIG_ARM_PTDUMP_DEBUGFS is not set +# CONFIG_DEBUG_WX is not set +CONFIG_ARM_UNWIND=y +# CONFIG_DEBUG_USER is not set +CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_SUN9I_UART0 is not set +CONFIG_DEBUG_SUNXI_UART0=y +# CONFIG_DEBUG_SUNXI_UART1 is not set +# CONFIG_DEBUG_SUNXI_R_UART is not set +# CONFIG_DEBUG_ICEDCC is not set +# CONFIG_DEBUG_SEMIHOSTING is not set +# CONFIG_DEBUG_LL_UART_8250 is not set +# CONFIG_DEBUG_LL_UART_PL01X is not set +CONFIG_DEBUG_LL_INCLUDE="debug/8250.S" +CONFIG_DEBUG_UART_8250=y +CONFIG_DEBUG_UART_PHYS=0x01c28000 +CONFIG_DEBUG_UART_VIRT=0xf1c28000 +CONFIG_DEBUG_UART_8250_SHIFT=2 +# CONFIG_DEBUG_UART_8250_WORD is not set +# CONFIG_DEBUG_UART_8250_PALMCHIP is not set +# CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set +CONFIG_DEBUG_UNCOMPRESS=y +CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +# CONFIG_EARLY_PRINTK is not set +# CONFIG_PID_IN_CONTEXTIDR is not set +# CONFIG_CORESIGHT is not set diff --git a/config/kernel/linux-sunxi64-dev.config b/config/kernel/linux-sunxi64-dev.config index bce318418..a2a6bf670 100644 --- a/config/kernel/linux-sunxi64-dev.config +++ b/config/kernel/linux-sunxi64-dev.config @@ -1,40 +1,11 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm64 4.18.6 Kernel Configuration +# Linux/arm64 4.19.1 Kernel Configuration # # # Compiler: aarch64-linux-gnu-gcc (Linaro GCC 7.2-2017.11) 7.2.1 20171011 # -CONFIG_ARM64=y -CONFIG_64BIT=y -CONFIG_MMU=y -CONFIG_ARM64_PAGE_SHIFT=12 -CONFIG_ARM64_CONT_SHIFT=4 -CONFIG_ARCH_MMAP_RND_BITS_MIN=18 -CONFIG_ARCH_MMAP_RND_BITS_MAX=33 -CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 -CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16 -CONFIG_NO_IOPORT_MAP=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 -CONFIG_LOCKDEP_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_BUG=y -CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CSUM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ZONE_DMA32=y -CONFIG_HAVE_GENERIC_GUP=y -CONFIG_SMP=y -CONFIG_KERNEL_MODE_NEON=y -CONFIG_FIX_EARLYCON_MEM=y -CONFIG_PGTABLE_LEVELS=4 -CONFIG_ARCH_SUPPORTS_UPROBES=y -CONFIG_ARCH_PROC_KCORE_TEXT=y -CONFIG_MULTI_IRQ_HANDLER=y CONFIG_CC_IS_GCC=y CONFIG_GCC_VERSION=70201 CONFIG_CLANG_VERSION=0 @@ -49,6 +20,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 # CONFIG_COMPILE_TEST is not set CONFIG_LOCALVERSION="" # CONFIG_LOCALVERSION_AUTO is not set +CONFIG_BUILD_SALT="" CONFIG_DEFAULT_HOSTNAME="(none)" CONFIG_SWAP=y CONFIG_SYSVIPC=y @@ -81,6 +53,7 @@ CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y # CONFIG_GENERIC_IRQ_DEBUGFS is not set +CONFIG_GENERIC_IRQ_MULTI_HANDLER=y CONFIG_ARCH_CLOCKSOURCE_DATA=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_CLOCKEVENTS=y @@ -97,6 +70,9 @@ CONFIG_NO_HZ_IDLE=y # CONFIG_NO_HZ_FULL is not set CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set # # CPU/Task time and stats accounting @@ -136,6 +112,7 @@ CONFIG_PAGE_COUNTER=y CONFIG_MEMCG=y CONFIG_MEMCG_SWAP=y # CONFIG_MEMCG_SWAP_ENABLED is not set +CONFIG_MEMCG_KMEM=y CONFIG_BLK_CGROUP=y # CONFIG_DEBUG_BLK_CGROUP is not set CONFIG_CGROUP_WRITEBACK=y @@ -159,6 +136,7 @@ CONFIG_IPC_NS=y CONFIG_USER_NS=y CONFIG_PID_NS=y CONFIG_NET_NS=y +# CONFIG_CHECKPOINT_RESTORE is not set # CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set CONFIG_RELAY=y @@ -203,6 +181,7 @@ CONFIG_KALLSYMS_BASE_RELATIVE=y # CONFIG_BPF_SYSCALL is not set # CONFIG_USERFAULTFD is not set CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y +CONFIG_RSEQ=y # CONFIG_EMBEDDED is not set CONFIG_HAVE_PERF_EVENTS=y @@ -221,162 +200,34 @@ CONFIG_SLAB_MERGE_DEFAULT=y CONFIG_SLUB_CPU_PARTIAL=y CONFIG_SYSTEM_DATA_VERIFICATION=y # CONFIG_PROFILING is not set -# CONFIG_KPROBES is not set -CONFIG_JUMP_LABEL=y -# CONFIG_STATIC_KEYS_SELFTEST is not set -CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y -CONFIG_HAVE_KPROBES=y -CONFIG_HAVE_KRETPROBES=y -CONFIG_HAVE_NMI=y -CONFIG_HAVE_ARCH_TRACEHOOK=y -CONFIG_HAVE_DMA_CONTIGUOUS=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_ARCH_HAS_FORTIFY_SOURCE=y -CONFIG_ARCH_HAS_SET_MEMORY=y -CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y -CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y -CONFIG_HAVE_CLK=y -CONFIG_HAVE_HW_BREAKPOINT=y -CONFIG_HAVE_PERF_REGS=y -CONFIG_HAVE_PERF_USER_STACK_DUMP=y -CONFIG_HAVE_ARCH_JUMP_LABEL=y -CONFIG_HAVE_RCU_TABLE_FREE=y -CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y -CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y -CONFIG_HAVE_CMPXCHG_LOCAL=y -CONFIG_HAVE_CMPXCHG_DOUBLE=y -CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y -CONFIG_HAVE_ARCH_SECCOMP_FILTER=y -CONFIG_SECCOMP_FILTER=y -CONFIG_PLUGIN_HOSTCC="" -CONFIG_HAVE_GCC_PLUGINS=y -CONFIG_HAVE_STACKPROTECTOR=y -CONFIG_CC_HAS_STACKPROTECTOR_NONE=y -CONFIG_STACKPROTECTOR=y -CONFIG_STACKPROTECTOR_STRONG=y -CONFIG_HAVE_CONTEXT_TRACKING=y -CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y -CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y -CONFIG_HAVE_ARCH_HUGE_VMAP=y -CONFIG_HAVE_MOD_ARCH_SPECIFIC=y -CONFIG_MODULES_USE_ELF_RELA=y -CONFIG_ARCH_HAS_ELF_RANDOMIZE=y -CONFIG_HAVE_ARCH_MMAP_RND_BITS=y -CONFIG_ARCH_MMAP_RND_BITS=18 -CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y -CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11 -CONFIG_CLONE_BACKWARDS=y -CONFIG_OLD_SIGSUSPEND3=y -CONFIG_COMPAT_OLD_SIGACTION=y -CONFIG_COMPAT_32BIT_TIME=y -CONFIG_HAVE_ARCH_VMAP_STACK=y -CONFIG_VMAP_STACK=y -CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y -CONFIG_STRICT_KERNEL_RWX=y -CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y -CONFIG_STRICT_MODULE_RWX=y -CONFIG_REFCOUNT_FULL=y - -# -# GCOV-based kernel profiling -# -# CONFIG_GCOV_KERNEL is not set -CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y -CONFIG_RT_MUTEXES=y -CONFIG_BASE_SMALL=0 -CONFIG_MODULES=y -# CONFIG_MODULE_FORCE_LOAD is not set -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_MODULE_SIG is not set -# CONFIG_MODULE_COMPRESS is not set -# CONFIG_TRIM_UNUSED_KSYMS is not set -CONFIG_MODULES_TREE_LOOKUP=y -CONFIG_BLOCK=y -CONFIG_BLK_SCSI_REQUEST=y -CONFIG_BLK_DEV_BSG=y -CONFIG_BLK_DEV_BSGLIB=y -# CONFIG_BLK_DEV_INTEGRITY is not set -CONFIG_BLK_DEV_ZONED=y -CONFIG_BLK_DEV_THROTTLING=y -# CONFIG_BLK_DEV_THROTTLING_LOW is not set -# CONFIG_BLK_CMDLINE_PARSER is not set -CONFIG_BLK_WBT=y -CONFIG_BLK_WBT_SQ=y -CONFIG_BLK_WBT_MQ=y -# CONFIG_BLK_DEBUG_FS is not set -# CONFIG_BLK_SED_OPAL is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y -CONFIG_EFI_PARTITION=y -CONFIG_BLOCK_COMPAT=y -CONFIG_BLK_MQ_VIRTIO=y - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -CONFIG_CFQ_GROUP_IOSCHED=y -# CONFIG_DEFAULT_DEADLINE is not set -CONFIG_DEFAULT_CFQ=y -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="cfq" -CONFIG_MQ_IOSCHED_DEADLINE=y -CONFIG_MQ_IOSCHED_KYBER=y -CONFIG_IOSCHED_BFQ=y -CONFIG_BFQ_GROUP_IOSCHED=y -CONFIG_PADATA=y -CONFIG_ASN1=y -CONFIG_ARCH_INLINE_READ_LOCK=y -CONFIG_ARCH_INLINE_READ_LOCK_BH=y -CONFIG_ARCH_INLINE_READ_LOCK_IRQ=y -CONFIG_ARCH_INLINE_READ_LOCK_IRQSAVE=y -CONFIG_ARCH_INLINE_READ_UNLOCK=y -CONFIG_ARCH_INLINE_READ_UNLOCK_BH=y -CONFIG_ARCH_INLINE_READ_UNLOCK_IRQ=y -CONFIG_ARCH_INLINE_READ_UNLOCK_IRQRESTORE=y -CONFIG_ARCH_INLINE_WRITE_LOCK=y -CONFIG_ARCH_INLINE_WRITE_LOCK_BH=y -CONFIG_ARCH_INLINE_WRITE_LOCK_IRQ=y -CONFIG_ARCH_INLINE_WRITE_LOCK_IRQSAVE=y -CONFIG_ARCH_INLINE_WRITE_UNLOCK=y -CONFIG_ARCH_INLINE_WRITE_UNLOCK_BH=y -CONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQ=y -CONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE=y -CONFIG_INLINE_SPIN_UNLOCK_IRQ=y -CONFIG_INLINE_READ_LOCK=y -CONFIG_INLINE_READ_LOCK_BH=y -CONFIG_INLINE_READ_LOCK_IRQ=y -CONFIG_INLINE_READ_LOCK_IRQSAVE=y -CONFIG_INLINE_READ_UNLOCK=y -CONFIG_INLINE_READ_UNLOCK_BH=y -CONFIG_INLINE_READ_UNLOCK_IRQ=y -CONFIG_INLINE_READ_UNLOCK_IRQRESTORE=y -CONFIG_INLINE_WRITE_LOCK=y -CONFIG_INLINE_WRITE_LOCK_BH=y -CONFIG_INLINE_WRITE_LOCK_IRQ=y -CONFIG_INLINE_WRITE_LOCK_IRQSAVE=y -CONFIG_INLINE_WRITE_UNLOCK=y -CONFIG_INLINE_WRITE_UNLOCK_BH=y -CONFIG_INLINE_WRITE_UNLOCK_IRQ=y -CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE=y -CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_RWSEM_SPIN_ON_OWNER=y -CONFIG_LOCK_SPIN_ON_OWNER=y -CONFIG_ARCH_USE_QUEUED_RWLOCKS=y -CONFIG_QUEUED_RWLOCKS=y -CONFIG_FREEZER=y +CONFIG_ARM64=y +CONFIG_64BIT=y +CONFIG_MMU=y +CONFIG_ARM64_PAGE_SHIFT=12 +CONFIG_ARM64_CONT_SHIFT=4 +CONFIG_ARCH_MMAP_RND_BITS_MIN=18 +CONFIG_ARCH_MMAP_RND_BITS_MAX=33 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16 +CONFIG_NO_IOPORT_MAP=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CSUM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ZONE_DMA32=y +CONFIG_HAVE_GENERIC_GUP=y +CONFIG_SMP=y +CONFIG_KERNEL_MODE_NEON=y +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_PGTABLE_LEVELS=4 +CONFIG_ARCH_SUPPORTS_UPROBES=y +CONFIG_ARCH_PROC_KCORE_TEXT=y # # Platform selection @@ -389,6 +240,7 @@ CONFIG_ARCH_SUNXI=y # CONFIG_ARCH_BERLIN is not set # CONFIG_ARCH_BRCMSTB is not set # CONFIG_ARCH_EXYNOS is not set +# CONFIG_ARCH_K3 is not set # CONFIG_ARCH_LAYERSCAPE is not set # CONFIG_ARCH_LG1K is not set # CONFIG_ARCH_HISI is not set @@ -467,9 +319,6 @@ CONFIG_USE_PERCPU_NUMA_NODE_ID=y CONFIG_HAVE_SETUP_PER_CPU_AREA=y CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y CONFIG_HOLES_IN_ZONE=y -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set # CONFIG_HZ_100 is not set CONFIG_HZ_250=y # CONFIG_HZ_300 is not set @@ -486,51 +335,6 @@ CONFIG_HW_PERF_EVENTS=y CONFIG_SYS_SUPPORTS_HUGETLBFS=y CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_NEED_MULTIPLE_NODES=y -CONFIG_HAVE_MEMORY_PRESENT=y -CONFIG_SPARSEMEM_EXTREME=y -CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y -CONFIG_SPARSEMEM_VMEMMAP=y -CONFIG_HAVE_MEMBLOCK=y -CONFIG_HAVE_MEMBLOCK_NODE_MAP=y -CONFIG_NO_BOOTMEM=y -CONFIG_MEMORY_ISOLATION=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_MEMORY_BALLOON=y -CONFIG_BALLOON_COMPACTION=y -CONFIG_COMPACTION=y -CONFIG_MIGRATION=y -CONFIG_PHYS_ADDR_T_64BIT=y -CONFIG_KSM=y -CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y -# CONFIG_MEMORY_FAILURE is not set -CONFIG_TRANSPARENT_HUGEPAGE=y -# CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS is not set -CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y -CONFIG_TRANSPARENT_HUGE_PAGECACHE=y -CONFIG_CLEANCACHE=y -CONFIG_FRONTSWAP=y -CONFIG_CMA=y -# CONFIG_CMA_DEBUGFS is not set -CONFIG_CMA_AREAS=7 -CONFIG_ZSWAP=y -CONFIG_ZPOOL=y -CONFIG_ZBUD=y -CONFIG_Z3FOLD=y -CONFIG_ZSMALLOC=y -# CONFIG_PGTABLE_MAPPING is not set -# CONFIG_ZSMALLOC_STAT is not set -CONFIG_GENERIC_EARLY_IOREMAP=y -# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set -CONFIG_IDLE_PAGE_TRACKING=y -CONFIG_FRAME_VECTOR=y -CONFIG_PERCPU_STATS=y -# CONFIG_GUP_BENCHMARK is not set -CONFIG_ARCH_HAS_PTE_SPECIAL=y CONFIG_SECCOMP=y CONFIG_PARAVIRT=y # CONFIG_PARAVIRT_TIME_ACCOUNTING is not set @@ -569,17 +373,6 @@ CONFIG_ARM64_MODULE_PLTS=y CONFIG_CMDLINE="" # CONFIG_CMDLINE_FORCE is not set # CONFIG_EFI is not set - -# -# Userspace binary formats -# -CONFIG_BINFMT_ELF=y -CONFIG_COMPAT_BINFMT_ELF=y -CONFIG_ELFCORE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -CONFIG_BINFMT_SCRIPT=y -CONFIG_BINFMT_MISC=y -CONFIG_COREDUMP=y CONFIG_COMPAT=y CONFIG_SYSVIPC_COMPAT=y @@ -652,6 +445,287 @@ CONFIG_ARM_BIG_LITTLE_CPUFREQ=m CONFIG_ARM_SCPI_CPUFREQ=m # CONFIG_ARM_SCMI_CPUFREQ is not set # CONFIG_QORIQ_CPUFREQ is not set + +# +# Firmware Drivers +# +CONFIG_ARM_PSCI_FW=y +# CONFIG_ARM_PSCI_CHECKER is not set +CONFIG_ARM_SCMI_PROTOCOL=y +CONFIG_ARM_SCMI_POWER_DOMAIN=y +CONFIG_ARM_SCPI_PROTOCOL=y +CONFIG_ARM_SCPI_POWER_DOMAIN=y +# CONFIG_ARM_SDE_INTERFACE is not set +CONFIG_HAVE_ARM_SMCCC=y +# CONFIG_GOOGLE_FIRMWARE is not set + +# +# Tegra firmware driver +# +# CONFIG_VIRTUALIZATION is not set +CONFIG_ARM64_CRYPTO=y +CONFIG_CRYPTO_SHA256_ARM64=y +CONFIG_CRYPTO_SHA512_ARM64=y +CONFIG_CRYPTO_SHA1_ARM64_CE=y +CONFIG_CRYPTO_SHA2_ARM64_CE=y +# CONFIG_CRYPTO_SHA512_ARM64_CE is not set +# CONFIG_CRYPTO_SHA3_ARM64 is not set +# CONFIG_CRYPTO_SM3_ARM64_CE is not set +CONFIG_CRYPTO_SM4_ARM64_CE=m +CONFIG_CRYPTO_GHASH_ARM64_CE=y +CONFIG_CRYPTO_CRC32_ARM64_CE=y +CONFIG_CRYPTO_AES_ARM64=y +CONFIG_CRYPTO_AES_ARM64_CE=y +CONFIG_CRYPTO_AES_ARM64_CE_CCM=y +CONFIG_CRYPTO_AES_ARM64_CE_BLK=y +CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y +CONFIG_CRYPTO_CHACHA20_NEON=y +CONFIG_CRYPTO_AES_ARM64_BS=y +# CONFIG_CRYPTO_SPECK_NEON is not set + +# +# General architecture-dependent options +# +# CONFIG_KPROBES is not set +CONFIG_JUMP_LABEL=y +# CONFIG_STATIC_KEYS_SELFTEST is not set +CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_NMI=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_ARCH_HAS_FORTIFY_SOURCE=y +CONFIG_ARCH_HAS_SET_MEMORY=y +CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_RSEQ=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_PERF_REGS=y +CONFIG_HAVE_PERF_USER_STACK_DUMP=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_HAVE_RCU_TABLE_FREE=y +CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y +CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y +CONFIG_HAVE_CMPXCHG_LOCAL=y +CONFIG_HAVE_CMPXCHG_DOUBLE=y +CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_SECCOMP_FILTER=y +CONFIG_HAVE_STACKPROTECTOR=y +CONFIG_CC_HAS_STACKPROTECTOR_NONE=y +CONFIG_STACKPROTECTOR=y +CONFIG_STACKPROTECTOR_STRONG=y +CONFIG_HAVE_CONTEXT_TRACKING=y +CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y +CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y +CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y +CONFIG_HAVE_ARCH_HUGE_VMAP=y +CONFIG_HAVE_MOD_ARCH_SPECIFIC=y +CONFIG_MODULES_USE_ELF_RELA=y +CONFIG_ARCH_HAS_ELF_RANDOMIZE=y +CONFIG_HAVE_ARCH_MMAP_RND_BITS=y +CONFIG_ARCH_MMAP_RND_BITS=18 +CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y +CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11 +CONFIG_CLONE_BACKWARDS=y +CONFIG_OLD_SIGSUSPEND3=y +CONFIG_COMPAT_OLD_SIGACTION=y +CONFIG_COMPAT_32BIT_TIME=y +CONFIG_HAVE_ARCH_VMAP_STACK=y +CONFIG_VMAP_STACK=y +CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y +CONFIG_STRICT_KERNEL_RWX=y +CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y +CONFIG_STRICT_MODULE_RWX=y +CONFIG_REFCOUNT_FULL=y +CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y +CONFIG_PLUGIN_HOSTCC="" +CONFIG_HAVE_GCC_PLUGINS=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_MODULE_SIG is not set +# CONFIG_MODULE_COMPRESS is not set +# CONFIG_TRIM_UNUSED_KSYMS is not set +CONFIG_MODULES_TREE_LOOKUP=y +CONFIG_BLOCK=y +CONFIG_BLK_SCSI_REQUEST=y +CONFIG_BLK_DEV_BSG=y +CONFIG_BLK_DEV_BSGLIB=y +# CONFIG_BLK_DEV_INTEGRITY is not set +CONFIG_BLK_DEV_ZONED=y +CONFIG_BLK_DEV_THROTTLING=y +# CONFIG_BLK_DEV_THROTTLING_LOW is not set +# CONFIG_BLK_CMDLINE_PARSER is not set +CONFIG_BLK_WBT=y +# CONFIG_BLK_CGROUP_IOLATENCY is not set +CONFIG_BLK_WBT_SQ=y +CONFIG_BLK_WBT_MQ=y +# CONFIG_BLK_DEBUG_FS is not set +# CONFIG_BLK_SED_OPAL is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_EFI_PARTITION=y +CONFIG_BLOCK_COMPAT=y +CONFIG_BLK_MQ_VIRTIO=y + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_CFQ_GROUP_IOSCHED=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_MQ_IOSCHED_DEADLINE=y +CONFIG_MQ_IOSCHED_KYBER=y +CONFIG_IOSCHED_BFQ=y +CONFIG_BFQ_GROUP_IOSCHED=y +CONFIG_PADATA=y +CONFIG_ASN1=y +CONFIG_ARCH_INLINE_SPIN_TRYLOCK=y +CONFIG_ARCH_INLINE_SPIN_TRYLOCK_BH=y +CONFIG_ARCH_INLINE_SPIN_LOCK=y +CONFIG_ARCH_INLINE_SPIN_LOCK_BH=y +CONFIG_ARCH_INLINE_SPIN_LOCK_IRQ=y +CONFIG_ARCH_INLINE_SPIN_LOCK_IRQSAVE=y +CONFIG_ARCH_INLINE_SPIN_UNLOCK=y +CONFIG_ARCH_INLINE_SPIN_UNLOCK_BH=y +CONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQ=y +CONFIG_ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE=y +CONFIG_ARCH_INLINE_READ_LOCK=y +CONFIG_ARCH_INLINE_READ_LOCK_BH=y +CONFIG_ARCH_INLINE_READ_LOCK_IRQ=y +CONFIG_ARCH_INLINE_READ_LOCK_IRQSAVE=y +CONFIG_ARCH_INLINE_READ_UNLOCK=y +CONFIG_ARCH_INLINE_READ_UNLOCK_BH=y +CONFIG_ARCH_INLINE_READ_UNLOCK_IRQ=y +CONFIG_ARCH_INLINE_READ_UNLOCK_IRQRESTORE=y +CONFIG_ARCH_INLINE_WRITE_LOCK=y +CONFIG_ARCH_INLINE_WRITE_LOCK_BH=y +CONFIG_ARCH_INLINE_WRITE_LOCK_IRQ=y +CONFIG_ARCH_INLINE_WRITE_LOCK_IRQSAVE=y +CONFIG_ARCH_INLINE_WRITE_UNLOCK=y +CONFIG_ARCH_INLINE_WRITE_UNLOCK_BH=y +CONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQ=y +CONFIG_ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE=y +CONFIG_INLINE_SPIN_TRYLOCK=y +CONFIG_INLINE_SPIN_TRYLOCK_BH=y +CONFIG_INLINE_SPIN_LOCK=y +CONFIG_INLINE_SPIN_LOCK_BH=y +CONFIG_INLINE_SPIN_LOCK_IRQ=y +CONFIG_INLINE_SPIN_LOCK_IRQSAVE=y +CONFIG_INLINE_SPIN_UNLOCK_BH=y +CONFIG_INLINE_SPIN_UNLOCK_IRQ=y +CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE=y +CONFIG_INLINE_READ_LOCK=y +CONFIG_INLINE_READ_LOCK_BH=y +CONFIG_INLINE_READ_LOCK_IRQ=y +CONFIG_INLINE_READ_LOCK_IRQSAVE=y +CONFIG_INLINE_READ_UNLOCK=y +CONFIG_INLINE_READ_UNLOCK_BH=y +CONFIG_INLINE_READ_UNLOCK_IRQ=y +CONFIG_INLINE_READ_UNLOCK_IRQRESTORE=y +CONFIG_INLINE_WRITE_LOCK=y +CONFIG_INLINE_WRITE_LOCK_BH=y +CONFIG_INLINE_WRITE_LOCK_IRQ=y +CONFIG_INLINE_WRITE_LOCK_IRQSAVE=y +CONFIG_INLINE_WRITE_UNLOCK=y +CONFIG_INLINE_WRITE_UNLOCK_BH=y +CONFIG_INLINE_WRITE_UNLOCK_IRQ=y +CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE=y +CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y +CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_RWSEM_SPIN_ON_OWNER=y +CONFIG_LOCK_SPIN_ON_OWNER=y +CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y +CONFIG_QUEUED_SPINLOCKS=y +CONFIG_ARCH_USE_QUEUED_RWLOCKS=y +CONFIG_QUEUED_RWLOCKS=y +CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y +CONFIG_FREEZER=y + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +CONFIG_COMPAT_BINFMT_ELF=y +CONFIG_ELFCORE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_BINFMT_SCRIPT=y +CONFIG_BINFMT_MISC=y +CONFIG_COREDUMP=y + +# +# Memory Management options +# +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_SPARSEMEM_MANUAL=y +CONFIG_SPARSEMEM=y +CONFIG_NEED_MULTIPLE_NODES=y +CONFIG_HAVE_MEMORY_PRESENT=y +CONFIG_SPARSEMEM_EXTREME=y +CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y +CONFIG_SPARSEMEM_VMEMMAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_HAVE_MEMBLOCK_NODE_MAP=y +CONFIG_NO_BOOTMEM=y +CONFIG_MEMORY_ISOLATION=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_MEMORY_BALLOON=y +CONFIG_BALLOON_COMPACTION=y +CONFIG_COMPACTION=y +CONFIG_MIGRATION=y +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_KSM=y +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y +# CONFIG_MEMORY_FAILURE is not set +CONFIG_TRANSPARENT_HUGEPAGE=y +# CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS is not set +CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y +CONFIG_TRANSPARENT_HUGE_PAGECACHE=y +CONFIG_CLEANCACHE=y +CONFIG_FRONTSWAP=y +CONFIG_CMA=y +# CONFIG_CMA_DEBUGFS is not set +CONFIG_CMA_AREAS=7 +CONFIG_ZSWAP=y +CONFIG_ZPOOL=y +CONFIG_ZBUD=y +CONFIG_Z3FOLD=y +CONFIG_ZSMALLOC=y +# CONFIG_PGTABLE_MAPPING is not set +# CONFIG_ZSMALLOC_STAT is not set +CONFIG_GENERIC_EARLY_IOREMAP=y +# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set +CONFIG_IDLE_PAGE_TRACKING=y +CONFIG_FRAME_VECTOR=y +CONFIG_PERCPU_STATS=y +# CONFIG_GUP_BENCHMARK is not set +CONFIG_ARCH_HAS_PTE_SPECIAL=y CONFIG_NET=y CONFIG_COMPAT_NETLINK_MESSAGES=y CONFIG_NET_INGRESS=y @@ -669,6 +743,7 @@ CONFIG_XFRM=y CONFIG_XFRM_OFFLOAD=y CONFIG_XFRM_ALGO=m CONFIG_XFRM_USER=m +CONFIG_XFRM_INTERFACE=m # CONFIG_XFRM_SUB_POLICY is not set # CONFIG_XFRM_MIGRATE is not set # CONFIG_XFRM_STATISTICS is not set @@ -785,6 +860,7 @@ CONFIG_NETFILTER_FAMILY_ARP=y CONFIG_NETFILTER_NETLINK_ACCT=m CONFIG_NETFILTER_NETLINK_QUEUE=m CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NETFILTER_NETLINK_OSF=m CONFIG_NF_CONNTRACK=m CONFIG_NF_LOG_COMMON=m CONFIG_NF_LOG_NETDEV=m @@ -828,7 +904,6 @@ CONFIG_NF_NAT_SIP=m CONFIG_NF_NAT_TFTP=m CONFIG_NF_NAT_REDIRECT=y CONFIG_NETFILTER_SYNPROXY=m -CONFIG_NF_OSF=m CONFIG_NF_TABLES=m CONFIG_NF_TABLES_SET=m # CONFIG_NF_TABLES_INET is not set @@ -843,6 +918,7 @@ CONFIG_NFT_LIMIT=m CONFIG_NFT_MASQ=m CONFIG_NFT_REDIR=m CONFIG_NFT_NAT=m +CONFIG_NFT_TUNNEL=m CONFIG_NFT_OBJREF=m CONFIG_NFT_QUEUE=m CONFIG_NFT_QUOTA=m @@ -850,6 +926,8 @@ CONFIG_NFT_REJECT=m CONFIG_NFT_COMPAT=m CONFIG_NFT_HASH=m CONFIG_NFT_SOCKET=m +CONFIG_NFT_OSF=m +CONFIG_NFT_TPROXY=m CONFIG_NF_FLOW_TABLE_INET=m CONFIG_NF_FLOW_TABLE=m CONFIG_NETFILTER_XTABLES=y @@ -1011,7 +1089,6 @@ CONFIG_IP_VS_NFCT=y # IP: Netfilter Configuration # CONFIG_NF_DEFRAG_IPV4=m -CONFIG_NF_CONNTRACK_IPV4=m CONFIG_NF_SOCKET_IPV4=m CONFIG_NF_TPROXY_IPV4=m # CONFIG_NF_TABLES_IPV4 is not set @@ -1052,8 +1129,6 @@ CONFIG_IP_NF_ARP_MANGLE=m # # IPv6: Netfilter Configuration # -CONFIG_NF_DEFRAG_IPV6=m -CONFIG_NF_CONNTRACK_IPV6=m CONFIG_NF_SOCKET_IPV6=m CONFIG_NF_TPROXY_IPV6=m # CONFIG_NF_TABLES_IPV6 is not set @@ -1084,6 +1159,7 @@ CONFIG_IP6_NF_SECURITY=m CONFIG_IP6_NF_NAT=m CONFIG_IP6_NF_TARGET_MASQUERADE=m CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_DEFRAG_IPV6=m # CONFIG_NF_TABLES_BRIDGE is not set CONFIG_BRIDGE_NF_EBTABLES=m CONFIG_BRIDGE_EBT_BROUTE=m @@ -1173,15 +1249,18 @@ CONFIG_NET_SCH_SFQ=m CONFIG_NET_SCH_TEQL=m CONFIG_NET_SCH_TBF=m CONFIG_NET_SCH_CBS=m +CONFIG_NET_SCH_ETF=m CONFIG_NET_SCH_GRED=m CONFIG_NET_SCH_DSMARK=m CONFIG_NET_SCH_NETEM=m CONFIG_NET_SCH_DRR=m CONFIG_NET_SCH_MQPRIO=m +CONFIG_NET_SCH_SKBPRIO=m CONFIG_NET_SCH_CHOKE=m CONFIG_NET_SCH_QFQ=m CONFIG_NET_SCH_CODEL=m # CONFIG_NET_SCH_FQ_CODEL is not set +CONFIG_NET_SCH_CAKE=m CONFIG_NET_SCH_FQ=m # CONFIG_NET_SCH_HHF is not set # CONFIG_NET_SCH_PIE is not set @@ -1286,7 +1365,6 @@ CONFIG_CAN_VXCAN=m CONFIG_CAN_SLCAN=m CONFIG_CAN_DEV=m CONFIG_CAN_CALC_BITTIMING=y -CONFIG_CAN_LEDS=y # CONFIG_CAN_GRCAN is not set # CONFIG_CAN_XILINXCAN is not set # CONFIG_CAN_C_CAN is not set @@ -1305,13 +1383,14 @@ CONFIG_CAN_MCP251X=m # # CAN USB interfaces # +CONFIG_CAN_8DEV_USB=m CONFIG_CAN_EMS_USB=m CONFIG_CAN_ESD_USB2=m CONFIG_CAN_GS_USB=m CONFIG_CAN_KVASER_USB=m -CONFIG_CAN_PEAK_USB=m -CONFIG_CAN_8DEV_USB=m CONFIG_CAN_MCBA_USB=m +CONFIG_CAN_PEAK_USB=m +CONFIG_CAN_UCAN=m # CONFIG_CAN_DEBUG_DEVICES is not set CONFIG_BT=m CONFIG_BT_BREDR=y @@ -1342,7 +1421,6 @@ CONFIG_BT_HCIUART=m CONFIG_BT_HCIUART_H4=y CONFIG_BT_HCIUART_BCSP=y CONFIG_BT_HCIUART_ATH3K=y -CONFIG_BT_HCIUART_3WIRE=y CONFIG_BT_HCIUART_INTEL=y CONFIG_BT_HCIUART_AG6XX=y CONFIG_BT_HCIUART_MRVL=y @@ -1464,9 +1542,11 @@ CONFIG_GENERIC_ARCH_TOPOLOGY=y CONFIG_ARM_CCI=y # CONFIG_BRCMSTB_GISB_ARB is not set # CONFIG_SIMPLE_PM_BUS is not set +CONFIG_SUN50I_DE2_BUS=y CONFIG_SUNXI_RSB=y # CONFIG_VEXPRESS_CONFIG is not set # CONFIG_CONNECTOR is not set +CONFIG_GNSS=m CONFIG_MTD=y # CONFIG_MTD_TESTS is not set # CONFIG_MTD_REDBOOT_PARTS is not set @@ -1538,8 +1618,10 @@ CONFIG_MTD_M25P80=y # Disk-On-Chip Device Drivers # # CONFIG_MTD_DOCG3 is not set +CONFIG_MTD_NAND_CORE=m # CONFIG_MTD_ONENAND is not set # CONFIG_MTD_NAND is not set +CONFIG_MTD_SPI_NAND=m # # LPDDR & LPDDR2 PCM memory drivers @@ -1795,8 +1877,10 @@ CONFIG_NLMON=m # CONFIG_MICROCHIP_KSZ is not set # CONFIG_NET_DSA_MV88E6XXX is not set # CONFIG_NET_DSA_QCA8K is not set +CONFIG_NET_DSA_REALTEK_SMI=m # CONFIG_NET_DSA_SMSC_LAN9303_I2C is not set # CONFIG_NET_DSA_SMSC_LAN9303_MDIO is not set +CONFIG_NET_DSA_VITESSE_VSC73XX=m CONFIG_ETHERNET=y CONFIG_NET_VENDOR_ALACRITECH=y CONFIG_NET_VENDOR_ALLWINNER=y @@ -1810,7 +1894,9 @@ CONFIG_NET_VENDOR_AQUANTIA=y # CONFIG_NET_VENDOR_ARC is not set # CONFIG_NET_VENDOR_AURORA is not set # CONFIG_NET_VENDOR_BROADCOM is not set -# CONFIG_NET_CADENCE is not set +CONFIG_NET_VENDOR_CADENCE=y +# CONFIG_MACB is not set +CONFIG_NET_VENDOR_CAVIUM=y CONFIG_NET_VENDOR_CORTINA=y # CONFIG_GEMINI_ETHERNET is not set # CONFIG_DNET is not set @@ -1979,7 +2065,6 @@ CONFIG_USB_VL600=m CONFIG_USB_NET_CH9200=m CONFIG_WLAN=y CONFIG_WLAN_VENDOR_ADMTEK=y -CONFIG_RTL8189ES=m CONFIG_ATH_COMMON=m CONFIG_WLAN_VENDOR_ATH=y # CONFIG_ATH_DEBUG is not set @@ -2050,6 +2135,11 @@ CONFIG_RTL8812AU=m CONFIG_RTL8814AU=m CONFIG_WLAN_VENDOR_MEDIATEK=y CONFIG_MT7601U=m +CONFIG_MT76_CORE=m +CONFIG_MT76_USB=m +CONFIG_MT76x2_COMMON=m +CONFIG_MT76x0U=m +CONFIG_MT76x2U=m CONFIG_WLAN_VENDOR_RALINK=y CONFIG_RT2X00=m CONFIG_RT2500USB=m @@ -2071,12 +2161,10 @@ CONFIG_RT2X00_LIB_LEDS=y CONFIG_WLAN_VENDOR_REALTEK=y CONFIG_RTL8187=m CONFIG_RTL8187_LEDS=y -CONFIG_RTL8189FS=m CONFIG_RTL_CARDS=m # CONFIG_RTL8192CU is not set CONFIG_RTL8XXXU=m CONFIG_RTL8XXXU_UNTESTED=y -CONFIG_RTL8723CS=m # CONFIG_WLAN_VENDOR_RSI is not set # CONFIG_WLAN_VENDOR_ST is not set # CONFIG_WLAN_VENDOR_TI is not set @@ -2181,11 +2269,13 @@ CONFIG_TOUCHSCREEN_AD7877=m CONFIG_TOUCHSCREEN_AD7879=m CONFIG_TOUCHSCREEN_AD7879_I2C=m CONFIG_TOUCHSCREEN_AD7879_SPI=m +CONFIG_TOUCHSCREEN_ADC=m CONFIG_TOUCHSCREEN_AR1021_I2C=m CONFIG_TOUCHSCREEN_ATMEL_MXT=m # CONFIG_TOUCHSCREEN_ATMEL_MXT_T37 is not set # CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set # CONFIG_TOUCHSCREEN_BU21013 is not set +CONFIG_TOUCHSCREEN_BU21029=m # CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set # CONFIG_TOUCHSCREEN_CY8CTMG110 is not set # CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set @@ -2532,6 +2622,7 @@ CONFIG_PINCTRL_SUN50I_A64_R=y CONFIG_PINCTRL_SUN50I_H5=y CONFIG_PINCTRL_SUN50I_H6=y CONFIG_PINCTRL_SUN50I_H6_R=y +CONFIG_PINCTRL_MADERA=m CONFIG_GPIOLIB=y CONFIG_GPIOLIB_FASTPATH_LIMIT=512 CONFIG_OF_GPIO=y @@ -2571,6 +2662,7 @@ CONFIG_GPIO_HLWD=m # MFD GPIO expanders # # CONFIG_GPIO_BD9571MWV is not set +CONFIG_GPIO_MADERA=m # # SPI GPIO expanders @@ -2611,7 +2703,6 @@ CONFIG_W1_SLAVE_DS2431=m CONFIG_W1_SLAVE_DS2433=m # CONFIG_W1_SLAVE_DS2433_CRC is not set # CONFIG_W1_SLAVE_DS2438 is not set -# CONFIG_W1_SLAVE_DS2760 is not set # CONFIG_W1_SLAVE_DS2780 is not set # CONFIG_W1_SLAVE_DS2781 is not set # CONFIG_W1_SLAVE_DS28E04 is not set @@ -2632,6 +2723,8 @@ CONFIG_POWER_SUPPLY=y # CONFIG_PDA_POWER is not set # CONFIG_GENERIC_ADC_BATTERY is not set # CONFIG_TEST_POWER is not set +CONFIG_CHARGER_ADP5061=m +CONFIG_BATTERY_DS2760=m # CONFIG_BATTERY_DS2780 is not set # CONFIG_BATTERY_DS2781 is not set # CONFIG_BATTERY_DS2782 is not set @@ -2753,6 +2846,7 @@ CONFIG_SENSORS_NCT6683=m CONFIG_SENSORS_NCT6775=m CONFIG_SENSORS_NCT7802=m CONFIG_SENSORS_NCT7904=m +CONFIG_SENSORS_NPCM7XX=m CONFIG_SENSORS_PCF8591=m # CONFIG_PMBUS is not set CONFIG_SENSORS_PWM_FAN=m @@ -2861,7 +2955,6 @@ CONFIG_SSB=m CONFIG_SSB_BLOCKIO=y CONFIG_SSB_SDIOHOST_POSSIBLE=y CONFIG_SSB_SDIOHOST=y -# CONFIG_SSB_DEBUG is not set # CONFIG_SSB_DRIVER_GPIO is not set CONFIG_BCMA_POSSIBLE=y CONFIG_BCMA=m @@ -2890,6 +2983,12 @@ CONFIG_MFD_AXP20X=y CONFIG_MFD_AXP20X_I2C=y CONFIG_MFD_AXP20X_RSB=y # CONFIG_MFD_CROS_EC is not set +CONFIG_MFD_MADERA=m +CONFIG_MFD_MADERA_I2C=m +# CONFIG_MFD_MADERA_SPI is not set +# CONFIG_MFD_CS47L35 is not set +# CONFIG_MFD_CS47L85 is not set +# CONFIG_MFD_CS47L90 is not set # CONFIG_PMIC_DA903X is not set # CONFIG_MFD_DA9052_SPI is not set # CONFIG_MFD_DA9052_I2C is not set @@ -2967,6 +3066,7 @@ CONFIG_MFD_WL1273_CORE=m # CONFIG_MFD_WM831X_SPI is not set # CONFIG_MFD_WM8350_I2C is not set # CONFIG_MFD_WM8994 is not set +CONFIG_MFD_ROHM_BD718XX=m CONFIG_REGULATOR=y # CONFIG_REGULATOR_DEBUG is not set CONFIG_REGULATOR_FIXED_VOLTAGE=y @@ -2977,6 +3077,7 @@ CONFIG_REGULATOR_88PG86X=m # CONFIG_REGULATOR_AD5398 is not set # CONFIG_REGULATOR_ANATOP is not set CONFIG_REGULATOR_AXP20X=y +CONFIG_REGULATOR_BD718XX=m CONFIG_REGULATOR_BD9571MWV=m # CONFIG_REGULATOR_DA9210 is not set # CONFIG_REGULATOR_DA9211 is not set @@ -3205,7 +3306,6 @@ CONFIG_DVB_USB_PCTV452E=m CONFIG_DVB_USB_DW2102=m CONFIG_DVB_USB_CINERGY_T2=m CONFIG_DVB_USB_DTV5100=m -CONFIG_DVB_USB_FRIIO=m CONFIG_DVB_USB_AZ6027=m CONFIG_DVB_USB_TECHNISAT_USB2=m CONFIG_DVB_USB_V2=m @@ -3540,6 +3640,7 @@ CONFIG_DRM_KMS_FB_HELPER=y CONFIG_DRM_FBDEV_EMULATION=y CONFIG_DRM_FBDEV_OVERALLOC=100 CONFIG_DRM_LOAD_EDID_FIRMWARE=y +# CONFIG_DRM_DP_CEC is not set CONFIG_DRM_GEM_CMA_HELPER=y CONFIG_DRM_KMS_CMA_HELPER=y @@ -3561,6 +3662,7 @@ CONFIG_DRM_I2C_NXP_TDA9950=m # AMD Library routines # # CONFIG_DRM_VGEM is not set +CONFIG_DRM_VKMS=m # CONFIG_DRM_UDL is not set # CONFIG_DRM_RCAR_DW_HDMI is not set CONFIG_DRM_RCAR_LVDS=m @@ -3571,6 +3673,7 @@ CONFIG_DRM_SUN4I_BACKEND=y CONFIG_DRM_SUN6I_DSI=m CONFIG_DRM_SUN8I_DW_HDMI=y CONFIG_DRM_SUN8I_MIXER=y +CONFIG_DRM_SUN8I_TCON_TOP=y # CONFIG_DRM_VIRTIO_GPU is not set CONFIG_DRM_PANEL=y @@ -3581,6 +3684,7 @@ CONFIG_DRM_PANEL_ARM_VERSATILE=m CONFIG_DRM_PANEL_LVDS=m CONFIG_DRM_PANEL_SIMPLE=m CONFIG_DRM_PANEL_ILITEK_IL9322=m +CONFIG_DRM_PANEL_ILITEK_ILI9881C=m CONFIG_DRM_PANEL_INNOLUX_P079ZCA=m CONFIG_DRM_PANEL_JDI_LT070ME05000=m # CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set @@ -3703,6 +3807,7 @@ CONFIG_DUMMY_CONSOLE_ROWS=25 CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set CONFIG_LOGO=y # CONFIG_LOGO_LINUX_MONO is not set # CONFIG_LOGO_LINUX_VGA16 is not set @@ -3829,9 +3934,9 @@ CONFIG_SND_SOC_BD28623=m CONFIG_SND_SOC_CS43130=m # CONFIG_SND_SOC_CS4349 is not set # CONFIG_SND_SOC_CS53L30 is not set -# CONFIG_SND_SOC_DIO2125 is not set CONFIG_SND_SOC_HDMI_CODEC=m # CONFIG_SND_SOC_ES7134 is not set +CONFIG_SND_SOC_ES7241=m # CONFIG_SND_SOC_ES8316 is not set # CONFIG_SND_SOC_ES8328_I2C is not set # CONFIG_SND_SOC_ES8328_SPI is not set @@ -3859,6 +3964,7 @@ CONFIG_SND_SOC_PCM186X_SPI=m # CONFIG_SND_SOC_RT5616 is not set # CONFIG_SND_SOC_RT5631 is not set # CONFIG_SND_SOC_SGTL5000 is not set +CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m # CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set CONFIG_SND_SOC_SPDIF=m CONFIG_SND_SOC_SSM2305=m @@ -3945,6 +4051,7 @@ CONFIG_HID_BETOP_FF=m CONFIG_HID_CHERRY=m CONFIG_HID_CHICONY=m CONFIG_HID_CORSAIR=m +CONFIG_HID_COUGAR=m CONFIG_HID_PRODIKEYS=m # CONFIG_HID_CMEDIA is not set CONFIG_HID_CP2112=m @@ -4308,6 +4415,7 @@ CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PLTFM=y # CONFIG_MMC_SDHCI_OF_ARASAN is not set # CONFIG_MMC_SDHCI_OF_AT91 is not set +# CONFIG_MMC_SDHCI_OF_DWCMSHC is not set # CONFIG_MMC_SDHCI_CADENCE is not set # CONFIG_MMC_SDHCI_F_SDH30 is not set CONFIG_MMC_SPI=y @@ -4418,7 +4526,6 @@ CONFIG_RTC_INTF_DEV=y # CONFIG_RTC_DRV_ABB5ZES3 is not set # CONFIG_RTC_DRV_ABX80X is not set CONFIG_RTC_DRV_DS1307=m -CONFIG_RTC_DRV_DS1307_HWMON=y CONFIG_RTC_DRV_DS1307_CENTURY=y CONFIG_RTC_DRV_DS1374=m CONFIG_RTC_DRV_DS1374_WDT=y @@ -4605,11 +4712,6 @@ CONFIG_88EU_AP_MODE=y CONFIG_AD9832=m CONFIG_AD9834=m -# -# Digital gyroscope sensors -# -# CONFIG_ADIS16060 is not set - # # Network Analyzer, Impedance Converters # @@ -4686,14 +4788,16 @@ CONFIG_MOST=m # CONFIG_MOST_USB is not set # CONFIG_KS7010 is not set # CONFIG_GREYBUS is not set - -# -# USB Power Delivery and Type-C drivers -# # CONFIG_PI433 is not set CONFIG_MTK_MMC=m # CONFIG_MTK_AEE_KDUMP is not set # CONFIG_MTK_MMC_CD_POLL is not set + +# +# Gasket devices +# +CONFIG_XIL_AXIS_FIFO=m +# CONFIG_EROFS_FS is not set # CONFIG_GOLDFISH is not set # CONFIG_CHROME_PLATFORMS is not set CONFIG_CLKDEV_LOOKUP=y @@ -4705,6 +4809,7 @@ CONFIG_COMMON_CLK=y # # CONFIG_COMMON_CLK_VERSATILE is not set # CONFIG_CLK_HSDK is not set +CONFIG_COMMON_CLK_MAX9485=m # CONFIG_COMMON_CLK_SCMI is not set CONFIG_COMMON_CLK_SCPI=y # CONFIG_COMMON_CLK_SI5351 is not set @@ -4757,6 +4862,8 @@ CONFIG_IOMMU_IO_PGTABLE=y CONFIG_IOMMU_IO_PGTABLE_LPAE=y # CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set # CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set +# CONFIG_IOMMU_DEBUGFS is not set +# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set CONFIG_IOMMU_IOVA=y CONFIG_OF_IOMMU=y CONFIG_IOMMU_DMA=y @@ -4788,6 +4895,10 @@ CONFIG_ARM_SMMU=y # # CONFIG_SOC_BRCMSTB is not set +# +# NXP/Freescale QorIQ SoC drivers +# + # # i.MX SoC drivers # @@ -4936,6 +5047,9 @@ CONFIG_SUN4I_GPADC=m # Chemical Sensors # # CONFIG_ATLAS_PH_SENSOR is not set +CONFIG_BME680=m +CONFIG_BME680_I2C=m +CONFIG_BME680_SPI=m # CONFIG_CCS811 is not set # CONFIG_IAQCORE is not set # CONFIG_VZ89X is not set @@ -4973,6 +5087,7 @@ CONFIG_AD5686=m CONFIG_AD5686_SPI=m CONFIG_AD5696_I2C=m # CONFIG_AD5755 is not set +CONFIG_AD5758=m # CONFIG_AD5761 is not set # CONFIG_AD5764 is not set # CONFIG_AD5791 is not set @@ -5084,6 +5199,7 @@ CONFIG_LV0104CS=m # CONFIG_MAX44000 is not set # CONFIG_OPT3001 is not set # CONFIG_PA12203001 is not set +CONFIG_SI1133=m # CONFIG_SI1145 is not set # CONFIG_STK3310 is not set # CONFIG_ST_UVIS25 is not set @@ -5173,6 +5289,7 @@ CONFIG_HID_SENSOR_PRESS=m # # Proximity and distance sensors # +CONFIG_ISL29501=m # CONFIG_LIDAR_LITE_V2 is not set # CONFIG_RFD77402 is not set # CONFIG_SRF04 is not set @@ -5271,29 +5388,13 @@ CONFIG_MULTIPLEXER=m # Multiplexer drivers # # CONFIG_MUX_ADG792A is not set +CONFIG_MUX_ADGS1408=m # CONFIG_MUX_GPIO is not set # CONFIG_MUX_MMIO is not set CONFIG_PM_OPP=y # CONFIG_SIOX is not set # CONFIG_SLIMBUS is not set -# -# Firmware Drivers -# -CONFIG_ARM_PSCI_FW=y -# CONFIG_ARM_PSCI_CHECKER is not set -CONFIG_ARM_SCMI_PROTOCOL=y -CONFIG_ARM_SCMI_POWER_DOMAIN=y -CONFIG_ARM_SCPI_PROTOCOL=y -CONFIG_ARM_SCPI_POWER_DOMAIN=y -# CONFIG_ARM_SDE_INTERFACE is not set -CONFIG_HAVE_ARM_SMCCC=y -# CONFIG_GOOGLE_FIRMWARE is not set - -# -# Tegra firmware driver -# - # # File systems # @@ -5366,6 +5467,7 @@ CONFIG_OVERLAY_FS=m CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y # CONFIG_OVERLAY_FS_INDEX is not set # CONFIG_OVERLAY_FS_XINO_AUTO is not set +# CONFIG_OVERLAY_FS_METACOPY is not set # # Caches @@ -5513,8 +5615,8 @@ CONFIG_CEPH_FS=m CONFIG_CEPH_FSCACHE=y CONFIG_CEPH_FS_POSIX_ACL=y CONFIG_CIFS=m -CONFIG_CIFS_STATS=y # CONFIG_CIFS_STATS2 is not set +CONFIG_CIFS_ALLOW_INSECURE_LEGACY=y # CONFIG_CIFS_WEAK_PW_HASH is not set CONFIG_CIFS_UPCALL=y CONFIG_CIFS_XATTR=y @@ -5522,7 +5624,6 @@ CONFIG_CIFS_POSIX=y CONFIG_CIFS_ACL=y # CONFIG_CIFS_DEBUG is not set # CONFIG_CIFS_DFS_UPCALL is not set -CONFIG_CIFS_SMB311=y CONFIG_CIFS_FSCACHE=y # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set @@ -5581,125 +5682,6 @@ CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_MAC_TURKISH is not set # CONFIG_NLS_UTF8 is not set # CONFIG_DLM is not set -# CONFIG_VIRTUALIZATION is not set - -# -# Kernel hacking -# - -# -# printk and dmesg options -# -CONFIG_PRINTK_TIME=y -CONFIG_CONSOLE_LOGLEVEL_DEFAULT=1 -CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 -# CONFIG_DYNAMIC_DEBUG is not set - -# -# Compile-time checks and compiler options -# -CONFIG_ENABLE_WARN_DEPRECATED=y -CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=2048 -# CONFIG_STRIP_ASM_SYMS is not set -# CONFIG_UNUSED_SYMBOLS is not set -CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set -# CONFIG_DEBUG_SECTION_MISMATCH is not set -CONFIG_SECTION_MISMATCH_WARN_ONLY=y -CONFIG_ARCH_WANT_FRAME_POINTERS=y -CONFIG_FRAME_POINTER=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 -CONFIG_MAGIC_SYSRQ_SERIAL=y -# CONFIG_DEBUG_KERNEL is not set - -# -# Memory Debugging -# -# CONFIG_PAGE_EXTENSION is not set -# CONFIG_PAGE_POISONING is not set -# CONFIG_DEBUG_RODATA_TEST is not set -# CONFIG_SLUB_DEBUG_ON is not set -# CONFIG_SLUB_STATS is not set -CONFIG_HAVE_DEBUG_KMEMLEAK=y -CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y -CONFIG_DEBUG_MEMORY_INIT=y -CONFIG_HAVE_ARCH_KASAN=y -# CONFIG_KASAN is not set -CONFIG_ARCH_HAS_KCOV=y -CONFIG_CC_HAS_SANCOV_TRACE_PC=y -# CONFIG_KCOV is not set - -# -# Debug Lockups and Hangs -# -# CONFIG_PANIC_ON_OOPS is not set -CONFIG_PANIC_ON_OOPS_VALUE=0 -CONFIG_PANIC_TIMEOUT=0 -CONFIG_SCHED_INFO=y -# CONFIG_DEBUG_TIMEKEEPING is not set - -# -# Lock Debugging (spinlocks, mutexes, etc...) -# -CONFIG_LOCK_DEBUGGING_SUPPORT=y -# CONFIG_WW_MUTEX_SELFTEST is not set -# CONFIG_STACKTRACE is not set -# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set -CONFIG_HAVE_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_BUGVERBOSE=y - -# -# RCU Debugging -# -CONFIG_RCU_CPU_STALL_TIMEOUT=21 -CONFIG_HAVE_FUNCTION_TRACER=y -CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y -CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_HAVE_SYSCALL_TRACEPOINTS=y -CONFIG_HAVE_C_RECORDMCOUNT=y -CONFIG_TRACING_SUPPORT=y -# CONFIG_FTRACE is not set -# CONFIG_DMA_API_DEBUG is not set -CONFIG_RUNTIME_TESTING_MENU=y -# CONFIG_LKDTM is not set -# CONFIG_TEST_LIST_SORT is not set -# CONFIG_TEST_SORT is not set -# CONFIG_ATOMIC64_SELFTEST is not set -# CONFIG_TEST_HEXDUMP is not set -# CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_TEST_KSTRTOX is not set -# CONFIG_TEST_PRINTF is not set -# CONFIG_TEST_BITMAP is not set -# CONFIG_TEST_UUID is not set -# CONFIG_TEST_OVERFLOW is not set -# CONFIG_TEST_RHASHTABLE is not set -# CONFIG_TEST_HASH is not set -# CONFIG_TEST_LKM is not set -# CONFIG_TEST_USER_COPY is not set -# CONFIG_TEST_BPF is not set -# CONFIG_FIND_BIT_BENCHMARK is not set -# CONFIG_TEST_FIRMWARE is not set -# CONFIG_TEST_SYSCTL is not set -# CONFIG_TEST_UDELAY is not set -# CONFIG_TEST_STATIC_KEYS is not set -# CONFIG_TEST_KMOD is not set -# CONFIG_MEMTEST is not set -# CONFIG_BUG_ON_DATA_CORRUPTION is not set -# CONFIG_SAMPLES is not set -CONFIG_HAVE_ARCH_KGDB=y -CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y -# CONFIG_UBSAN is not set -CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y -# CONFIG_STRICT_DEVMEM is not set -# CONFIG_PID_IN_CONTEXTIDR is not set -# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set -# CONFIG_DEBUG_WX is not set -# CONFIG_DEBUG_ALIGN_RODATA is not set -# CONFIG_ARM64_RELOC_TEST is not set -# CONFIG_CORESIGHT is not set # # Security options @@ -5911,25 +5893,6 @@ CONFIG_SYSTEM_TRUSTED_KEYS="" # CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set # CONFIG_SECONDARY_TRUSTED_KEYRING is not set # CONFIG_SYSTEM_BLACKLIST_KEYRING is not set -CONFIG_ARM64_CRYPTO=y -CONFIG_CRYPTO_SHA256_ARM64=y -CONFIG_CRYPTO_SHA512_ARM64=y -CONFIG_CRYPTO_SHA1_ARM64_CE=y -CONFIG_CRYPTO_SHA2_ARM64_CE=y -# CONFIG_CRYPTO_SHA512_ARM64_CE is not set -# CONFIG_CRYPTO_SHA3_ARM64 is not set -# CONFIG_CRYPTO_SM3_ARM64_CE is not set -CONFIG_CRYPTO_SM4_ARM64_CE=m -CONFIG_CRYPTO_GHASH_ARM64_CE=y -CONFIG_CRYPTO_CRC32_ARM64_CE=y -CONFIG_CRYPTO_AES_ARM64=y -CONFIG_CRYPTO_AES_ARM64_CE=y -CONFIG_CRYPTO_AES_ARM64_CE_CCM=y -CONFIG_CRYPTO_AES_ARM64_CE_BLK=y -CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y -CONFIG_CRYPTO_CHACHA20_NEON=y -CONFIG_CRYPTO_AES_ARM64_BS=y -# CONFIG_CRYPTO_SPECK_NEON is not set # # Library routines @@ -5955,6 +5918,7 @@ CONFIG_CRC32_SLICEBY8=y # CONFIG_CRC32_SLICEBY4 is not set # CONFIG_CRC32_SARWATE is not set # CONFIG_CRC32_BIT is not set +CONFIG_CRC64=m CONFIG_CRC4=y CONFIG_CRC7=y CONFIG_LIBCRC32C=y @@ -6024,3 +5988,123 @@ CONFIG_SG_POOL=y CONFIG_ARCH_HAS_SG_CHAIN=y CONFIG_SBITMAP=y # CONFIG_STRING_SELFTEST is not set + +# +# Kernel hacking +# + +# +# printk and dmesg options +# +CONFIG_PRINTK_TIME=y +CONFIG_CONSOLE_LOGLEVEL_DEFAULT=1 +CONFIG_CONSOLE_LOGLEVEL_QUIET=4 +CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 +# CONFIG_DYNAMIC_DEBUG is not set + +# +# Compile-time checks and compiler options +# +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=2048 +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_SECTION_MISMATCH_WARN_ONLY=y +CONFIG_ARCH_WANT_FRAME_POINTERS=y +CONFIG_FRAME_POINTER=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 +CONFIG_MAGIC_SYSRQ_SERIAL=y +# CONFIG_DEBUG_KERNEL is not set + +# +# Memory Debugging +# +# CONFIG_PAGE_EXTENSION is not set +# CONFIG_PAGE_POISONING is not set +# CONFIG_DEBUG_RODATA_TEST is not set +# CONFIG_SLUB_DEBUG_ON is not set +# CONFIG_SLUB_STATS is not set +CONFIG_HAVE_DEBUG_KMEMLEAK=y +CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y +CONFIG_DEBUG_MEMORY_INIT=y +CONFIG_HAVE_ARCH_KASAN=y +# CONFIG_KASAN is not set +CONFIG_ARCH_HAS_KCOV=y +CONFIG_CC_HAS_SANCOV_TRACE_PC=y +# CONFIG_KCOV is not set + +# +# Debug Lockups and Hangs +# +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_PANIC_TIMEOUT=0 +CONFIG_SCHED_INFO=y +# CONFIG_DEBUG_TIMEKEEPING is not set + +# +# Lock Debugging (spinlocks, mutexes, etc...) +# +CONFIG_LOCK_DEBUGGING_SUPPORT=y +# CONFIG_WW_MUTEX_SELFTEST is not set +# CONFIG_STACKTRACE is not set +# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set +CONFIG_HAVE_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_BUGVERBOSE=y + +# +# RCU Debugging +# +CONFIG_RCU_CPU_STALL_TIMEOUT=21 +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_DMA_API_DEBUG is not set +CONFIG_RUNTIME_TESTING_MENU=y +# CONFIG_LKDTM is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_TEST_SORT is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_TEST_HEXDUMP is not set +# CONFIG_TEST_STRING_HELPERS is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_TEST_PRINTF is not set +# CONFIG_TEST_BITMAP is not set +# CONFIG_TEST_BITFIELD is not set +# CONFIG_TEST_UUID is not set +# CONFIG_TEST_OVERFLOW is not set +# CONFIG_TEST_RHASHTABLE is not set +# CONFIG_TEST_HASH is not set +# CONFIG_TEST_IDA is not set +# CONFIG_TEST_LKM is not set +# CONFIG_TEST_USER_COPY is not set +# CONFIG_TEST_BPF is not set +# CONFIG_FIND_BIT_BENCHMARK is not set +# CONFIG_TEST_FIRMWARE is not set +# CONFIG_TEST_SYSCTL is not set +# CONFIG_TEST_UDELAY is not set +# CONFIG_TEST_STATIC_KEYS is not set +# CONFIG_TEST_KMOD is not set +# CONFIG_MEMTEST is not set +# CONFIG_BUG_ON_DATA_CORRUPTION is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y +# CONFIG_UBSAN is not set +CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y +# CONFIG_STRICT_DEVMEM is not set +# CONFIG_PID_IN_CONTEXTIDR is not set +# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set +# CONFIG_DEBUG_WX is not set +# CONFIG_DEBUG_ALIGN_RODATA is not set +# CONFIG_ARM64_RELOC_TEST is not set +# CONFIG_CORESIGHT is not set diff --git a/config/sources/sun50iw6.conf b/config/sources/sun50iw6.conf index 8c6b8a139..983e3f600 100644 --- a/config/sources/sun50iw6.conf +++ b/config/sources/sun50iw6.conf @@ -33,7 +33,7 @@ case $BRANCH in KERNELPATCHDIR='sunxi-dev-h6' KERNELSOURCE=$MAINLINE_KERNEL_SOURCE - KERNELBRANCH='branch:linux-4.18.y' + KERNELBRANCH='branch:linux-4.19.y' KERNELDIR=$MAINLINE_KERNEL_DIR KERNEL_USE_GCC='> 7.0' KERNELPATCHDIR='sunxi-dev' diff --git a/config/sources/sunxi64_common.inc b/config/sources/sunxi64_common.inc index 62209b3c3..26be27514 100644 --- a/config/sources/sunxi64_common.inc +++ b/config/sources/sunxi64_common.inc @@ -46,7 +46,7 @@ case $BRANCH in ATF_TARGET_MAP='PLAT=sun50iw1p1 DEBUG=1 bl31;;build/sun50iw1p1/debug/bl31.bin' KERNELSOURCE=$MAINLINE_KERNEL_SOURCE - KERNELBRANCH='branch:linux-4.18.y' + KERNELBRANCH='branch:linux-4.19.y' KERNELDIR=$MAINLINE_KERNEL_DIR KERNEL_USE_GCC='> 7.0' KERNELPATCHDIR='sunxi-dev' diff --git a/config/sources/sunxi_common.inc b/config/sources/sunxi_common.inc index 66d27a847..547a09cd5 100644 --- a/config/sources/sunxi_common.inc +++ b/config/sources/sunxi_common.inc @@ -37,7 +37,7 @@ case $BRANCH in dev) KERNELSOURCE=$MAINLINE_KERNEL_SOURCE - KERNELBRANCH='branch:linux-4.18.y' + KERNELBRANCH='branch:linux-4.19.y' KERNELDIR=$MAINLINE_KERNEL_DIR KERNEL_USE_GCC='> 7.0' diff --git a/patch/kernel/sunxi-dev/0001-general-ata-ahci-platform-add-reset-control-support-except-for-existing-drivers.patch b/patch/kernel/sunxi-dev/0001-general-ata-ahci-platform-add-reset-control-support-except-for-existing-drivers.patch deleted file mode 100644 index 1317bfafe..000000000 --- a/patch/kernel/sunxi-dev/0001-general-ata-ahci-platform-add-reset-control-support-except-for-existing-drivers.patch +++ /dev/null @@ -1,444 +0,0 @@ -Add an extra argument to ahci_platform_get_resources(), that is -for the bitmap representing the resource to get in this function. - -Currently there is no resources to be defined, so all the callers set -'0' to the argument. - -Suggested-by: Hans de Goede -Cc: Thierry Reding -Cc: Matthias Brugger -Cc: Patrice Chotard -Cc: Maxime Ripard -Signed-off-by: Kunihiko Hayashi ---- - drivers/ata/ahci_brcm.c | 2 +- - drivers/ata/ahci_ceva.c | 2 +- - drivers/ata/ahci_da850.c | 2 +- - drivers/ata/ahci_dm816.c | 2 +- - drivers/ata/ahci_imx.c | 2 +- - drivers/ata/ahci_mtk.c | 2 +- - drivers/ata/ahci_mvebu.c | 2 +- - drivers/ata/ahci_platform.c | 2 +- - drivers/ata/ahci_qoriq.c | 2 +- - drivers/ata/ahci_seattle.c | 2 +- - drivers/ata/ahci_st.c | 2 +- - drivers/ata/ahci_sunxi.c | 2 +- - drivers/ata/ahci_tegra.c | 2 +- - drivers/ata/ahci_xgene.c | 2 +- - drivers/ata/libahci_platform.c | 4 +++- - include/linux/ahci_platform.h | 2 +- - 16 files changed, 18 insertions(+), 16 deletions(-) - -diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c -index ea43081..f3d5577 100644 ---- a/drivers/ata/ahci_brcm.c -+++ b/drivers/ata/ahci_brcm.c -@@ -425,7 +425,7 @@ static int brcm_ahci_probe(struct platform_device *pdev) - - brcm_sata_phys_enable(priv); - -- hpriv = ahci_platform_get_resources(pdev); -+ hpriv = ahci_platform_get_resources(pdev, 0); - if (IS_ERR(hpriv)) - return PTR_ERR(hpriv); - hpriv->plat_data = priv; -diff --git a/drivers/ata/ahci_ceva.c b/drivers/ata/ahci_ceva.c -index 5ecc9d4..dc78c98 100644 ---- a/drivers/ata/ahci_ceva.c -+++ b/drivers/ata/ahci_ceva.c -@@ -213,7 +213,7 @@ static int ceva_ahci_probe(struct platform_device *pdev) - - cevapriv->ahci_pdev = pdev; - -- hpriv = ahci_platform_get_resources(pdev); -+ hpriv = ahci_platform_get_resources(pdev, 0); - if (IS_ERR(hpriv)) - return PTR_ERR(hpriv); - -diff --git a/drivers/ata/ahci_da850.c b/drivers/ata/ahci_da850.c -index 9b34dff..ebaa657 100644 ---- a/drivers/ata/ahci_da850.c -+++ b/drivers/ata/ahci_da850.c -@@ -171,7 +171,7 @@ static int ahci_da850_probe(struct platform_device *pdev) - u32 mpy; - int rc; - -- hpriv = ahci_platform_get_resources(pdev); -+ hpriv = ahci_platform_get_resources(pdev, 0); - if (IS_ERR(hpriv)) - return PTR_ERR(hpriv); - -diff --git a/drivers/ata/ahci_dm816.c b/drivers/ata/ahci_dm816.c -index fbd827c..89509c3 100644 ---- a/drivers/ata/ahci_dm816.c -+++ b/drivers/ata/ahci_dm816.c -@@ -148,7 +148,7 @@ static int ahci_dm816_probe(struct platform_device *pdev) - struct ahci_host_priv *hpriv; - int rc; - -- hpriv = ahci_platform_get_resources(pdev); -+ hpriv = ahci_platform_get_resources(pdev, 0); - if (IS_ERR(hpriv)) - return PTR_ERR(hpriv); - -diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c -index 6822e2f..b00799d 100644 ---- a/drivers/ata/ahci_imx.c -+++ b/drivers/ata/ahci_imx.c -@@ -1127,7 +1127,7 @@ static int imx_ahci_probe(struct platform_device *pdev) - return ret; - } - -- hpriv = ahci_platform_get_resources(pdev); -+ hpriv = ahci_platform_get_resources(pdev, 0); - if (IS_ERR(hpriv)) - return PTR_ERR(hpriv); - -diff --git a/drivers/ata/ahci_mtk.c b/drivers/ata/ahci_mtk.c -index 0ae6971..8bc1a26 100644 ---- a/drivers/ata/ahci_mtk.c -+++ b/drivers/ata/ahci_mtk.c -@@ -142,7 +142,7 @@ static int mtk_ahci_probe(struct platform_device *pdev) - if (!plat) - return -ENOMEM; - -- hpriv = ahci_platform_get_resources(pdev); -+ hpriv = ahci_platform_get_resources(pdev, 0); - if (IS_ERR(hpriv)) - return PTR_ERR(hpriv); - -diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c -index 72d90b4..f9cb51b 100644 ---- a/drivers/ata/ahci_mvebu.c -+++ b/drivers/ata/ahci_mvebu.c -@@ -158,7 +158,7 @@ static int ahci_mvebu_probe(struct platform_device *pdev) - const struct mbus_dram_target_info *dram; - int rc; - -- hpriv = ahci_platform_get_resources(pdev); -+ hpriv = ahci_platform_get_resources(pdev, 0); - if (IS_ERR(hpriv)) - return PTR_ERR(hpriv); - -diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c -index 99f9a89..5709273 100644 ---- a/drivers/ata/ahci_platform.c -+++ b/drivers/ata/ahci_platform.c -@@ -43,7 +43,7 @@ static int ahci_probe(struct platform_device *pdev) - struct ahci_host_priv *hpriv; - int rc; - -- hpriv = ahci_platform_get_resources(pdev); -+ hpriv = ahci_platform_get_resources(pdev, 0); - if (IS_ERR(hpriv)) - return PTR_ERR(hpriv); - -diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c -index cfdef4d..ce59253 100644 ---- a/drivers/ata/ahci_qoriq.c -+++ b/drivers/ata/ahci_qoriq.c -@@ -250,7 +250,7 @@ static int ahci_qoriq_probe(struct platform_device *pdev) - struct resource *res; - int rc; - -- hpriv = ahci_platform_get_resources(pdev); -+ hpriv = ahci_platform_get_resources(pdev, 0); - if (IS_ERR(hpriv)) - return PTR_ERR(hpriv); - -diff --git a/drivers/ata/ahci_seattle.c b/drivers/ata/ahci_seattle.c -index 1d31c0c..e57b6f9 100644 ---- a/drivers/ata/ahci_seattle.c -+++ b/drivers/ata/ahci_seattle.c -@@ -164,7 +164,7 @@ static int ahci_seattle_probe(struct platform_device *pdev) - int rc; - struct ahci_host_priv *hpriv; - -- hpriv = ahci_platform_get_resources(pdev); -+ hpriv = ahci_platform_get_resources(pdev, 0); - if (IS_ERR(hpriv)) - return PTR_ERR(hpriv); - -diff --git a/drivers/ata/ahci_st.c b/drivers/ata/ahci_st.c -index bc345f2..21c5c44 100644 ---- a/drivers/ata/ahci_st.c -+++ b/drivers/ata/ahci_st.c -@@ -156,7 +156,7 @@ static int st_ahci_probe(struct platform_device *pdev) - if (!drv_data) - return -ENOMEM; - -- hpriv = ahci_platform_get_resources(pdev); -+ hpriv = ahci_platform_get_resources(pdev, 0); - if (IS_ERR(hpriv)) - return PTR_ERR(hpriv); - hpriv->plat_data = drv_data; -diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c -index b264374..631610b 100644 ---- a/drivers/ata/ahci_sunxi.c -+++ b/drivers/ata/ahci_sunxi.c -@@ -181,7 +181,7 @@ static int ahci_sunxi_probe(struct platform_device *pdev) - struct ahci_host_priv *hpriv; - int rc; - -- hpriv = ahci_platform_get_resources(pdev); -+ hpriv = ahci_platform_get_resources(pdev, 0); - if (IS_ERR(hpriv)) - return PTR_ERR(hpriv); - -diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c -index 64d8484..004f260 100644 ---- a/drivers/ata/ahci_tegra.c -+++ b/drivers/ata/ahci_tegra.c -@@ -494,7 +494,7 @@ static int tegra_ahci_probe(struct platform_device *pdev) - int ret; - unsigned int i; - -- hpriv = ahci_platform_get_resources(pdev); -+ hpriv = ahci_platform_get_resources(pdev, 0); - if (IS_ERR(hpriv)) - return PTR_ERR(hpriv); - -diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c -index ad58da7..7e157e1 100644 ---- a/drivers/ata/ahci_xgene.c -+++ b/drivers/ata/ahci_xgene.c -@@ -759,7 +759,7 @@ static int xgene_ahci_probe(struct platform_device *pdev) - &xgene_ahci_v2_port_info }; - int rc; - -- hpriv = ahci_platform_get_resources(pdev); -+ hpriv = ahci_platform_get_resources(pdev, 0); - if (IS_ERR(hpriv)) - return PTR_ERR(hpriv); - -diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c -index 30cc8f1..6abc1cd 100644 ---- a/drivers/ata/libahci_platform.c -+++ b/drivers/ata/libahci_platform.c -@@ -332,6 +332,7 @@ static int ahci_platform_get_regulator(struct ahci_host_priv *hpriv, u32 port, - /** - * ahci_platform_get_resources - Get platform resources - * @pdev: platform device to get resources for -+ * @flags: bitmap representing the resource to get - * - * This function allocates an ahci_host_priv struct, and gets the following - * resources, storing a reference to them inside the returned struct: -@@ -345,7 +346,8 @@ static int ahci_platform_get_regulator(struct ahci_host_priv *hpriv, u32 port, - * RETURNS: - * The allocated ahci_host_priv on success, otherwise an ERR_PTR value - */ --struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev) -+struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev, -+ unsigned int flags) - { - struct device *dev = &pdev->dev; - struct ahci_host_priv *hpriv; -diff --git a/include/linux/ahci_platform.h b/include/linux/ahci_platform.h -index 1b0a17b..6490be1 100644 ---- a/include/linux/ahci_platform.h -+++ b/include/linux/ahci_platform.h -@@ -30,7 +30,7 @@ void ahci_platform_disable_regulators(struct ahci_host_priv *hpriv); - int ahci_platform_enable_resources(struct ahci_host_priv *hpriv); - void ahci_platform_disable_resources(struct ahci_host_priv *hpriv); - struct ahci_host_priv *ahci_platform_get_resources( -- struct platform_device *pdev); -+ struct platform_device *pdev, unsigned int flags); - int ahci_platform_init_host(struct platform_device *pdev, - struct ahci_host_priv *hpriv, - const struct ata_port_info *pi_template, - -From patchwork Wed Aug 22 12:13:02 2018 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [v2,2/3] ata: libahci_platform: add reset control support -X-Patchwork-Submitter: Kunihiko Hayashi -X-Patchwork-Id: 960932 -X-Patchwork-Delegate: davem@davemloft.net -Message-Id: <1534939983-16264-3-git-send-email-hayashi.kunihiko@socionext.com> -To: Tejun Heo , Hans de Goede , - Rob Herring , - Mark Rutland , linux-ide@vger.kernel.org -Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, - Kunihiko Hayashi , - Thierry Reding -Date: Wed, 22 Aug 2018 21:13:02 +0900 -From: Kunihiko Hayashi -List-Id: - -Add support to get and control a list of resets for the device -as optional and shared. These resets must be kept de-asserted until -the device is enabled. - -This is specified as shared because some SoCs like UniPhier series -have common reset controls with all ahci controller instances. - -However, according to Thierry's view, -https://www.spinics.net/lists/linux-ide/msg55357.html -some hardware-specific drivers already use their own resets, -and the common reset make a path to occur double controls of resets. - -The ahci_platform_get_resources() can get and control the reset -only when the second argument includes AHCI_PLATFORM_GET_RESETS bit. - -Suggested-by: Hans de Goede -Cc: Thierry Reding -Signed-off-by: Kunihiko Hayashi -Acked-by: Rob Herring ---- - .../devicetree/bindings/ata/ahci-platform.txt | 1 + - drivers/ata/ahci.h | 1 + - drivers/ata/libahci_platform.c | 31 ++++++++++++++++++---- - include/linux/ahci_platform.h | 2 ++ - 4 files changed, 30 insertions(+), 5 deletions(-) - -diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt -index c760ecb..f4006d3 100644 ---- a/Documentation/devicetree/bindings/ata/ahci-platform.txt -+++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt -@@ -30,6 +30,7 @@ compatible: - Optional properties: - - dma-coherent : Present if dma operations are coherent - - clocks : a list of phandle + clock specifier pairs -+- resets : a list of phandle + reset specifier pairs - - target-supply : regulator for SATA target power - - phys : reference to the SATA PHY node - - phy-names : must be "sata-phy" -diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h -index 1609eba..6a1515f 100644 ---- a/drivers/ata/ahci.h -+++ b/drivers/ata/ahci.h -@@ -350,6 +350,7 @@ struct ahci_host_priv { - u32 em_msg_type; /* EM message type */ - bool got_runtime_pm; /* Did we do pm_runtime_get? */ - struct clk *clks[AHCI_MAX_CLKS]; /* Optional */ -+ struct reset_control *rsts; /* Optional */ - struct regulator **target_pwrs; /* Optional */ - /* - * If platform uses PHYs. There is a 1:1 relation between the port number and -diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c -index 6abc1cd..6817143 100644 ---- a/drivers/ata/libahci_platform.c -+++ b/drivers/ata/libahci_platform.c -@@ -25,6 +25,7 @@ - #include - #include - #include -+#include - #include "ahci.h" - - static void ahci_host_stop(struct ata_host *host); -@@ -195,7 +196,8 @@ EXPORT_SYMBOL_GPL(ahci_platform_disable_regulators); - * following order: - * 1) Regulator - * 2) Clocks (through ahci_platform_enable_clks) -- * 3) Phys -+ * 3) Resets -+ * 4) Phys - * - * If resource enabling fails at any point the previous enabled resources - * are disabled in reverse order. -@@ -215,12 +217,19 @@ int ahci_platform_enable_resources(struct ahci_host_priv *hpriv) - if (rc) - goto disable_regulator; - -- rc = ahci_platform_enable_phys(hpriv); -+ rc = reset_control_deassert(hpriv->rsts); - if (rc) - goto disable_clks; - -+ rc = ahci_platform_enable_phys(hpriv); -+ if (rc) -+ goto disable_resets; -+ - return 0; - -+disable_resets: -+ reset_control_assert(hpriv->rsts); -+ - disable_clks: - ahci_platform_disable_clks(hpriv); - -@@ -238,13 +247,16 @@ EXPORT_SYMBOL_GPL(ahci_platform_enable_resources); - * This function disables all ahci_platform managed resources in the - * following order: - * 1) Phys -- * 2) Clocks (through ahci_platform_disable_clks) -- * 3) Regulator -+ * 2) Resets -+ * 3) Clocks (through ahci_platform_disable_clks) -+ * 4) Regulator - */ - void ahci_platform_disable_resources(struct ahci_host_priv *hpriv) - { - ahci_platform_disable_phys(hpriv); - -+ reset_control_assert(hpriv->rsts); -+ - ahci_platform_disable_clks(hpriv); - - ahci_platform_disable_regulators(hpriv); -@@ -341,7 +353,8 @@ static int ahci_platform_get_regulator(struct ahci_host_priv *hpriv, u32 port, - * 2) regulator for controlling the targets power (optional) - * 3) 0 - AHCI_MAX_CLKS clocks, as specified in the devs devicetree node, - * or for non devicetree enabled platforms a single clock -- * 4) phys (optional) -+ * 4) resets, if flags has AHCI_PLATFORM_GET_RESETS (optional) -+ * 5) phys (optional) - * - * RETURNS: - * The allocated ahci_host_priv on success, otherwise an ERR_PTR value -@@ -395,6 +408,14 @@ struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev, - hpriv->clks[i] = clk; - } - -+ if (flags & AHCI_PLATFORM_GET_RESETS) { -+ hpriv->rsts = devm_reset_control_array_get_optional_shared(dev); -+ if (IS_ERR(hpriv->rsts)) { -+ rc = PTR_ERR(hpriv->rsts); -+ goto err_out; -+ } -+ } -+ - hpriv->nports = child_nodes = of_get_child_count(dev->of_node); - - /* -diff --git a/include/linux/ahci_platform.h b/include/linux/ahci_platform.h -index 6490be1..eaedca5f 100644 ---- a/include/linux/ahci_platform.h -+++ b/include/linux/ahci_platform.h -@@ -43,4 +43,6 @@ int ahci_platform_resume_host(struct device *dev); - int ahci_platform_suspend(struct device *dev); - int ahci_platform_resume(struct device *dev); - -+#define AHCI_PLATFORM_GET_RESETS 0x01 -+ - #endif /* _AHCI_PLATFORM_H */ - -Unlike SoC-specific driver, generic ahci_platform driver doesn't -have any chances to control resets. - -This adds AHCI_PLATFORM_GET_RESETS to ahci_platform_get_resources() -on the generic driver to enable reset control support. - -Suggested-by: Hans de Goede -Cc: Thierry Reding -Signed-off-by: Kunihiko Hayashi ---- - drivers/ata/ahci_platform.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c -index 5709273..ddd9308 100644 ---- a/drivers/ata/ahci_platform.c -+++ b/drivers/ata/ahci_platform.c -@@ -43,7 +43,8 @@ static int ahci_probe(struct platform_device *pdev) - struct ahci_host_priv *hpriv; - int rc; - -- hpriv = ahci_platform_get_resources(pdev, 0); -+ hpriv = ahci_platform_get_resources(pdev, -+ AHCI_PLATFORM_GET_RESETS); - if (IS_ERR(hpriv)) - return PTR_ERR(hpriv); - diff --git a/patch/kernel/sunxi-dev/board-0001-r40-HDMI.patch b/patch/kernel/sunxi-dev/board-0001-r40-HDMI.patch deleted file mode 100644 index 31334e28f..000000000 --- a/patch/kernel/sunxi-dev/board-0001-r40-HDMI.patch +++ /dev/null @@ -1,1922 +0,0 @@ -diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-r40.c b/drivers/clk/sunxi-ng/ccu-sun8i-r40.c -index 933f2e68f42a..c16a62a7bdbd 100644 ---- a/drivers/clk/sunxi-ng/ccu-sun8i-r40.c -+++ b/drivers/clk/sunxi-ng/ccu-sun8i-r40.c -@@ -65,17 +65,18 @@ static SUNXI_CCU_NM_WITH_GATE_LOCK(pll_audio_base_clk, "pll-audio-base", - CLK_SET_RATE_UNGATE); - - /* TODO: The result of N/M is required to be in [8, 25] range. */ --static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_video0_clk, "pll-video0", -- "osc24M", 0x0010, -- 8, 7, /* N */ -- 0, 4, /* M */ -- BIT(24), /* frac enable */ -- BIT(25), /* frac select */ -- 270000000, /* frac rate 0 */ -- 297000000, /* frac rate 1 */ -- BIT(31), /* gate */ -- BIT(28), /* lock */ -- CLK_SET_RATE_UNGATE); -+static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN(pll_video0_clk, "pll-video0", -+ "osc24M", 0x0010, -+ 192000000, /* Minimum rate */ -+ 8, 7, /* N */ -+ 0, 4, /* M */ -+ BIT(24), /* frac enable */ -+ BIT(25), /* frac select */ -+ 270000000, /* frac rate 0 */ -+ 297000000, /* frac rate 1 */ -+ BIT(31), /* gate */ -+ BIT(28), /* lock */ -+ CLK_SET_RATE_UNGATE); - - /* TODO: The result of N/M is required to be in [8, 25] range. */ - static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_ve_clk, "pll-ve", -@@ -151,17 +152,18 @@ static struct ccu_nk pll_periph1_clk = { - }; - - /* TODO: The result of N/M is required to be in [8, 25] range. */ --static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK(pll_video1_clk, "pll-video1", -- "osc24M", 0x030, -- 8, 7, /* N */ -- 0, 4, /* M */ -- BIT(24), /* frac enable */ -- BIT(25), /* frac select */ -- 270000000, /* frac rate 0 */ -- 297000000, /* frac rate 1 */ -- BIT(31), /* gate */ -- BIT(28), /* lock */ -- CLK_SET_RATE_UNGATE); -+static SUNXI_CCU_NM_WITH_FRAC_GATE_LOCK_MIN(pll_video1_clk, "pll-video1", -+ "osc24M", 0x030, -+ 192000000, /* Minimum rate */ -+ 8, 7, /* N */ -+ 0, 4, /* M */ -+ BIT(24), /* frac enable */ -+ BIT(25), /* frac select */ -+ 270000000, /* frac rate 0 */ -+ 297000000, /* frac rate 1 */ -+ BIT(31), /* gate */ -+ BIT(28), /* lock */ -+ CLK_SET_RATE_UNGATE); - - static struct ccu_nkm pll_sata_clk = { - .enable = BIT(31), -diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-r40.c b/drivers/clk/sunxi-ng/ccu-sun8i-r40.c -index c16a62a7bdbd..fa5317719684 100644 ---- a/drivers/clk/sunxi-ng/ccu-sun8i-r40.c -+++ b/drivers/clk/sunxi-ng/ccu-sun8i-r40.c -@@ -655,7 +655,8 @@ static SUNXI_CCU_GATE(dram_deinterlace_clk, "dram-deinterlace", "dram", - - static const char * const de_parents[] = { "pll-periph0-2x", "pll-de" }; - static SUNXI_CCU_M_WITH_MUX_GATE(de_clk, "de", de_parents, -- 0x104, 0, 4, 24, 3, BIT(31), 0); -+ 0x104, 0, 4, 24, 3, BIT(31), -+ CLK_SET_RATE_PARENT); - static SUNXI_CCU_M_WITH_MUX_GATE(mp_clk, "mp", de_parents, - 0x108, 0, 4, 24, 3, BIT(31), 0); - -@@ -667,9 +668,11 @@ static SUNXI_CCU_MUX_WITH_GATE(tcon_lcd0_clk, "tcon-lcd0", tcon_parents, - static SUNXI_CCU_MUX_WITH_GATE(tcon_lcd1_clk, "tcon-lcd1", tcon_parents, - 0x114, 24, 3, BIT(31), CLK_SET_RATE_PARENT); - static SUNXI_CCU_M_WITH_MUX_GATE(tcon_tv0_clk, "tcon-tv0", tcon_parents, -- 0x118, 0, 4, 24, 3, BIT(31), 0); -+ 0x118, 0, 4, 24, 3, BIT(31), -+ CLK_SET_RATE_PARENT); - static SUNXI_CCU_M_WITH_MUX_GATE(tcon_tv1_clk, "tcon-tv1", tcon_parents, -- 0x11c, 0, 4, 24, 3, BIT(31), 0); -+ 0x11c, 0, 4, 24, 3, BIT(31), -+ CLK_SET_RATE_PARENT); - - static const char * const deinterlace_parents[] = { "pll-periph0", - "pll-periph1" }; -@@ -699,7 +702,8 @@ static SUNXI_CCU_GATE(avs_clk, "avs", "osc24M", - - static const char * const hdmi_parents[] = { "pll-video0", "pll-video1" }; - static SUNXI_CCU_M_WITH_MUX_GATE(hdmi_clk, "hdmi", hdmi_parents, -- 0x150, 0, 4, 24, 2, BIT(31), 0); -+ 0x150, 0, 4, 24, 2, BIT(31), -+ CLK_SET_RATE_PARENT); - - static SUNXI_CCU_GATE(hdmi_slow_clk, "hdmi-slow", "osc24M", - 0x154, BIT(31), 0); -diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-r40.h b/drivers/clk/sunxi-ng/ccu-sun8i-r40.h -index 0db8e1e97af8..db2a1243f9ff 100644 ---- a/drivers/clk/sunxi-ng/ccu-sun8i-r40.h -+++ b/drivers/clk/sunxi-ng/ccu-sun8i-r40.h -@@ -25,7 +25,9 @@ - #define CLK_PLL_AUDIO_2X 4 - #define CLK_PLL_AUDIO_4X 5 - #define CLK_PLL_AUDIO_8X 6 --#define CLK_PLL_VIDEO0 7 -+ -+/* PLL_VIDEO0 is exported */ -+ - #define CLK_PLL_VIDEO0_2X 8 - #define CLK_PLL_VE 9 - #define CLK_PLL_DDR0 10 -@@ -34,7 +36,9 @@ - #define CLK_PLL_PERIPH0_2X 13 - #define CLK_PLL_PERIPH1 14 - #define CLK_PLL_PERIPH1_2X 15 --#define CLK_PLL_VIDEO1 16 -+ -+/* PLL_VIDEO1 is exported */ -+ - #define CLK_PLL_VIDEO1_2X 17 - #define CLK_PLL_SATA 18 - #define CLK_PLL_SATA_OUT 19 -diff --git a/include/dt-bindings/clock/sun8i-r40-ccu.h b/include/dt-bindings/clock/sun8i-r40-ccu.h -index 4fa5f69fc297..f9e15a235626 100644 ---- a/include/dt-bindings/clock/sun8i-r40-ccu.h -+++ b/include/dt-bindings/clock/sun8i-r40-ccu.h -@@ -43,6 +43,10 @@ - #ifndef _DT_BINDINGS_CLK_SUN8I_R40_H_ - #define _DT_BINDINGS_CLK_SUN8I_R40_H_ - -+#define CLK_PLL_VIDEO0 7 -+ -+#define CLK_PLL_VIDEO1 16 -+ - #define CLK_CPU 24 - - #define CLK_BUS_MIPI_DSI 29 -diff --git a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -index 3346c1e2a7a0..fe31b1510717 100644 ---- a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -+++ b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -@@ -187,6 +187,62 @@ And on the A23, A31, A31s and A33, you need one more clock line: - - 'lvds-alt': An alternative clock source, separate from the TCON channel 0 - clock, that can be used to drive the LVDS clock - -+TCON TOP -+-------- -+ -+TCON TOPs main purpose is to configure whole display pipeline. It determines -+relationships between mixers and TCONs, selects source TCON for HDMI, muxes -+LCD and TV encoder GPIO output, selects TV encoder clock source and contains -+additional TV TCON and DSI gates. -+ -+It allows display pipeline to be configured in very different ways: -+ -+ / LCD0/LVDS0 -+ / [0] TCON-LCD0 -+ | \ MIPI DSI -+ mixer0 | -+ \ / [1] TCON-LCD1 - LCD1/LVDS1 -+ TCON-TOP -+ / \ [2] TCON-TV0 [0] - TVE0/RGB -+ mixer1 | \ -+ | TCON-TOP - HDMI -+ | / -+ \ [3] TCON-TV1 [1] - TVE1/RGB -+ -+Note that both TCON TOP references same physical unit. Both mixers can be -+connected to any TCON. -+ -+Required properties: -+ - compatible: value must be one of: -+ * allwinner,sun8i-r40-tcon-top -+ - reg: base address and size of the memory-mapped region. -+ - clocks: phandle to the clocks feeding the TCON TOP -+ * bus: TCON TOP interface clock -+ * tcon-tv0: TCON TV0 clock -+ * tve0: TVE0 clock -+ * tcon-tv1: TCON TV1 clock -+ * tve1: TVE0 clock -+ * dsi: MIPI DSI clock -+ - clock-names: clock name mentioned above -+ - resets: phandle to the reset line driving the TCON TOP -+ - #clock-cells : must contain 1 -+ - clock-output-names: Names of clocks created for TCON TV0 channel clock, -+ TCON TV1 channel clock and DSI channel clock, in that order. -+ -+- ports: A ports node with endpoint definitions as defined in -+ Documentation/devicetree/bindings/media/video-interfaces.txt. 6 ports should -+ be defined: -+ * port 0 is input for mixer0 mux -+ * port 1 is output for mixer0 mux -+ * port 2 is input for mixer1 mux -+ * port 3 is output for mixer1 mux -+ * port 4 is input for HDMI mux -+ * port 5 is output for HDMI mux -+ All output endpoints for mixer muxes and input endpoints for HDMI mux should -+ have reg property with the id of the target TCON, as shown in above graph -+ (0-3 for mixer muxes and 0-1 for HDMI mux). All ports should have only one -+ endpoint connected to remote endpoint. -+ - DRC - --- - -diff --git a/include/dt-bindings/clock/sun8i-tcon-top.h b/include/dt-bindings/clock/sun8i-tcon-top.h -new file mode 100644 -index 000000000000..25164d767835 ---- /dev/null -+++ b/include/dt-bindings/clock/sun8i-tcon-top.h -@@ -0,0 +1,11 @@ -+/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ -+/* Copyright (C) 2018 Jernej Skrabec */ -+ -+#ifndef _DT_BINDINGS_CLOCK_SUN8I_TCON_TOP_H_ -+#define _DT_BINDINGS_CLOCK_SUN8I_TCON_TOP_H_ -+ -+#define CLK_TCON_TOP_TV0 0 -+#define CLK_TCON_TOP_TV1 1 -+#define CLK_TCON_TOP_DSI 2 -+ -+#endif /* _DT_BINDINGS_CLOCK_SUN8I_TCON_TOP_H_ */ -diff --git a/drivers/gpu/drm/sun4i/Makefile b/drivers/gpu/drm/sun4i/Makefile -index 2589f4acd5ae..09fbfd6304ba 100644 ---- a/drivers/gpu/drm/sun4i/Makefile -+++ b/drivers/gpu/drm/sun4i/Makefile -@@ -16,7 +16,8 @@ sun8i-drm-hdmi-y += sun8i_hdmi_phy_clk.o - - sun8i-mixer-y += sun8i_mixer.o sun8i_ui_layer.o \ - sun8i_vi_layer.o sun8i_ui_scaler.o \ -- sun8i_vi_scaler.o sun8i_csc.o -+ sun8i_vi_scaler.o sun8i_csc.o \ -+ sun8i_tcon_top.o - - sun4i-tcon-y += sun4i_crtc.o - sun4i-tcon-y += sun4i_dotclock.o -diff --git a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c -new file mode 100644 -index 000000000000..8da0460e0028 ---- /dev/null -+++ b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c -@@ -0,0 +1,300 @@ -+// SPDX-License-Identifier: GPL-2.0+ -+/* Copyright (c) 2018 Jernej Skrabec */ -+ -+#include -+ -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "sun8i_tcon_top.h" -+ -+static int sun8i_tcon_top_get_connected_ep_id(struct device_node *node, -+ int port_id) -+{ -+ struct device_node *ep, *remote, *port; -+ struct of_endpoint endpoint; -+ -+ port = of_graph_get_port_by_id(node, port_id); -+ if (!port) -+ return -ENOENT; -+ -+ for_each_available_child_of_node(port, ep) { -+ remote = of_graph_get_remote_port_parent(ep); -+ if (!remote) -+ continue; -+ -+ if (of_device_is_available(remote)) { -+ of_graph_parse_endpoint(ep, &endpoint); -+ -+ of_node_put(remote); -+ -+ return endpoint.id; -+ } -+ -+ of_node_put(remote); -+ } -+ -+ return -ENOENT; -+} -+ -+static struct clk_hw *sun8i_tcon_top_register_gate(struct device *dev, -+ struct clk *parent, -+ void __iomem *regs, -+ spinlock_t *lock, -+ u8 bit, int name_index) -+{ -+ const char *clk_name, *parent_name; -+ int ret; -+ -+ parent_name = __clk_get_name(parent); -+ ret = of_property_read_string_index(dev->of_node, -+ "clock-output-names", name_index, -+ &clk_name); -+ if (ret) -+ return ERR_PTR(ret); -+ -+ return clk_hw_register_gate(dev, clk_name, parent_name, -+ CLK_SET_RATE_PARENT, -+ regs + TCON_TOP_GATE_SRC_REG, -+ bit, 0, lock); -+}; -+ -+static int sun8i_tcon_top_bind(struct device *dev, struct device *master, -+ void *data) -+{ -+ struct platform_device *pdev = to_platform_device(dev); -+ struct clk *dsi, *tcon_tv0, *tcon_tv1, *tve0, *tve1; -+ struct clk_hw_onecell_data *clk_data; -+ struct sun8i_tcon_top *tcon_top; -+ bool mixer0_unused = false; -+ struct resource *res; -+ void __iomem *regs; -+ int ret, i, id; -+ u32 val; -+ -+ tcon_top = devm_kzalloc(dev, sizeof(*tcon_top), GFP_KERNEL); -+ if (!tcon_top) -+ return -ENOMEM; -+ -+ clk_data = devm_kzalloc(dev, sizeof(*clk_data) + -+ sizeof(*clk_data->hws) * CLK_NUM, -+ GFP_KERNEL); -+ if (!clk_data) -+ return -ENOMEM; -+ tcon_top->clk_data = clk_data; -+ -+ spin_lock_init(&tcon_top->reg_lock); -+ -+ tcon_top->rst = devm_reset_control_get(dev, NULL); -+ if (IS_ERR(tcon_top->rst)) { -+ dev_err(dev, "Couldn't get our reset line\n"); -+ return PTR_ERR(tcon_top->rst); -+ } -+ -+ tcon_top->bus = devm_clk_get(dev, "bus"); -+ if (IS_ERR(tcon_top->bus)) { -+ dev_err(dev, "Couldn't get the bus clock\n"); -+ return PTR_ERR(tcon_top->bus); -+ } -+ -+ dsi = devm_clk_get(dev, "dsi"); -+ if (IS_ERR(dsi)) { -+ dev_err(dev, "Couldn't get the dsi clock\n"); -+ return PTR_ERR(dsi); -+ } -+ -+ tcon_tv0 = devm_clk_get(dev, "tcon-tv0"); -+ if (IS_ERR(tcon_tv0)) { -+ dev_err(dev, "Couldn't get the tcon-tv0 clock\n"); -+ return PTR_ERR(tcon_tv0); -+ } -+ -+ tcon_tv1 = devm_clk_get(dev, "tcon-tv1"); -+ if (IS_ERR(tcon_tv1)) { -+ dev_err(dev, "Couldn't get the tcon-tv1 clock\n"); -+ return PTR_ERR(tcon_tv1); -+ } -+ -+ tve0 = devm_clk_get(dev, "tve0"); -+ if (IS_ERR(tve0)) { -+ dev_err(dev, "Couldn't get the tve0 clock\n"); -+ return PTR_ERR(tve0); -+ } -+ -+ tve1 = devm_clk_get(dev, "tve1"); -+ if (IS_ERR(tve1)) { -+ dev_err(dev, "Couldn't get the tve1 clock\n"); -+ return PTR_ERR(tve1); -+ } -+ -+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); -+ regs = devm_ioremap_resource(dev, res); -+ if (IS_ERR(regs)) -+ return PTR_ERR(regs); -+ -+ ret = reset_control_deassert(tcon_top->rst); -+ if (ret) { -+ dev_err(dev, "Could not deassert ctrl reset control\n"); -+ return ret; -+ } -+ -+ ret = clk_prepare_enable(tcon_top->bus); -+ if (ret) { -+ dev_err(dev, "Could not enable bus clock\n"); -+ goto err_assert_reset; -+ } -+ -+ val = 0; -+ -+ /* check if HDMI mux output is connected */ -+ if (sun8i_tcon_top_get_connected_ep_id(dev->of_node, 5) >= 0) { -+ /* find HDMI input endpoint id, if it is connected at all*/ -+ id = sun8i_tcon_top_get_connected_ep_id(dev->of_node, 4); -+ if (id >= 0) -+ val = FIELD_PREP(TCON_TOP_HDMI_SRC_MSK, id + 1); -+ else -+ DRM_DEBUG_DRIVER("TCON TOP HDMI input is not connected\n"); -+ } else { -+ DRM_DEBUG_DRIVER("TCON TOP HDMI output is not connected\n"); -+ } -+ -+ writel(val, regs + TCON_TOP_GATE_SRC_REG); -+ -+ val = 0; -+ -+ /* process mixer0 mux output */ -+ id = sun8i_tcon_top_get_connected_ep_id(dev->of_node, 1); -+ if (id >= 0) { -+ val = FIELD_PREP(TCON_TOP_PORT_DE0_MSK, id); -+ } else { -+ DRM_DEBUG_DRIVER("TCON TOP mixer0 output is not connected\n"); -+ mixer0_unused = true; -+ } -+ -+ /* process mixer1 mux output */ -+ id = sun8i_tcon_top_get_connected_ep_id(dev->of_node, 3); -+ if (id >= 0) { -+ val |= FIELD_PREP(TCON_TOP_PORT_DE1_MSK, id); -+ -+ /* -+ * mixer0 mux has priority over mixer1 mux. We have to -+ * make sure mixer0 doesn't overtake TCON from mixer1. -+ */ -+ if (mixer0_unused && id == 0) -+ val |= FIELD_PREP(TCON_TOP_PORT_DE0_MSK, 1); -+ } else { -+ DRM_DEBUG_DRIVER("TCON TOP mixer1 output is not connected\n"); -+ } -+ -+ writel(val, regs + TCON_TOP_PORT_SEL_REG); -+ -+ /* -+ * TCON TOP has two muxes, which select parent clock for each TCON TV -+ * channel clock. Parent could be either TCON TV or TVE clock. For now -+ * we leave this fixed to TCON TV, since TVE driver for R40 is not yet -+ * implemented. Once it is, graph needs to be traversed to determine -+ * if TVE is active on each TCON TV. If it is, mux should be switched -+ * to TVE clock parent. -+ */ -+ clk_data->hws[CLK_TCON_TOP_TV0] = -+ sun8i_tcon_top_register_gate(dev, tcon_tv0, regs, -+ &tcon_top->reg_lock, -+ TCON_TOP_TCON_TV0_GATE, 0); -+ -+ clk_data->hws[CLK_TCON_TOP_TV1] = -+ sun8i_tcon_top_register_gate(dev, tcon_tv1, regs, -+ &tcon_top->reg_lock, -+ TCON_TOP_TCON_TV1_GATE, 1); -+ -+ clk_data->hws[CLK_TCON_TOP_DSI] = -+ sun8i_tcon_top_register_gate(dev, dsi, regs, -+ &tcon_top->reg_lock, -+ TCON_TOP_TCON_DSI_GATE, 2); -+ -+ for (i = 0; i < CLK_NUM; i++) -+ if (IS_ERR(clk_data->hws[i])) { -+ ret = PTR_ERR(clk_data->hws[i]); -+ goto err_unregister_gates; -+ } -+ -+ clk_data->num = CLK_NUM; -+ -+ ret = of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get, -+ clk_data); -+ if (ret) -+ goto err_unregister_gates; -+ -+ dev_set_drvdata(dev, tcon_top); -+ -+ return 0; -+ -+err_unregister_gates: -+ for (i = 0; i < CLK_NUM; i++) -+ if (clk_data->hws[i]) -+ clk_hw_unregister_gate(clk_data->hws[i]); -+ clk_disable_unprepare(tcon_top->bus); -+err_assert_reset: -+ reset_control_assert(tcon_top->rst); -+ -+ return ret; -+} -+ -+static void sun8i_tcon_top_unbind(struct device *dev, struct device *master, -+ void *data) -+{ -+ struct sun8i_tcon_top *tcon_top = dev_get_drvdata(dev); -+ struct clk_hw_onecell_data *clk_data = tcon_top->clk_data; -+ int i; -+ -+ of_clk_del_provider(dev->of_node); -+ for (i = 0; i < CLK_NUM; i++) -+ clk_hw_unregister_gate(clk_data->hws[i]); -+ -+ clk_disable_unprepare(tcon_top->bus); -+ reset_control_assert(tcon_top->rst); -+} -+ -+static const struct component_ops sun8i_tcon_top_ops = { -+ .bind = sun8i_tcon_top_bind, -+ .unbind = sun8i_tcon_top_unbind, -+}; -+ -+static int sun8i_tcon_top_probe(struct platform_device *pdev) -+{ -+ return component_add(&pdev->dev, &sun8i_tcon_top_ops); -+} -+ -+static int sun8i_tcon_top_remove(struct platform_device *pdev) -+{ -+ component_del(&pdev->dev, &sun8i_tcon_top_ops); -+ -+ return 0; -+} -+ -+/* sun4i_drv uses this list to check if a device node is a TCON TOP */ -+const struct of_device_id sun8i_tcon_top_of_table[] = { -+ { .compatible = "allwinner,sun8i-r40-tcon-top" }, -+ { /* sentinel */ } -+}; -+MODULE_DEVICE_TABLE(of, sun8i_tcon_top_of_table); -+EXPORT_SYMBOL(sun8i_tcon_top_of_table); -+ -+static struct platform_driver sun8i_tcon_top_platform_driver = { -+ .probe = sun8i_tcon_top_probe, -+ .remove = sun8i_tcon_top_remove, -+ .driver = { -+ .name = "sun8i-tcon-top", -+ .of_match_table = sun8i_tcon_top_of_table, -+ }, -+}; -+module_platform_driver(sun8i_tcon_top_platform_driver); -+ -+MODULE_AUTHOR("Jernej Skrabec "); -+MODULE_DESCRIPTION("Allwinner R40 TCON TOP driver"); -+MODULE_LICENSE("GPL"); -diff --git a/drivers/gpu/drm/sun4i/sun8i_tcon_top.h b/drivers/gpu/drm/sun4i/sun8i_tcon_top.h -new file mode 100644 -index 000000000000..39838bbfeaee ---- /dev/null -+++ b/drivers/gpu/drm/sun4i/sun8i_tcon_top.h -@@ -0,0 +1,40 @@ -+/* SPDX-License-Identifier: GPL-2.0+ */ -+/* Copyright (c) 2018 Jernej Skrabec */ -+ -+#ifndef _SUN8I_TCON_TOP_H_ -+#define _SUN8I_TCON_TOP_H_ -+ -+#include -+#include -+#include -+#include -+ -+#define TCON_TOP_TCON_TV_SETUP_REG 0x00 -+ -+#define TCON_TOP_PORT_SEL_REG 0x1C -+#define TCON_TOP_PORT_DE0_MSK GENMASK(1, 0) -+#define TCON_TOP_PORT_DE1_MSK GENMASK(5, 4) -+ -+#define TCON_TOP_GATE_SRC_REG 0x20 -+#define TCON_TOP_HDMI_SRC_MSK GENMASK(29, 28) -+#define TCON_TOP_TCON_TV1_GATE 24 -+#define TCON_TOP_TCON_TV0_GATE 20 -+#define TCON_TOP_TCON_DSI_GATE 16 -+ -+#define CLK_NUM 3 -+ -+struct sun8i_tcon_top { -+ struct clk *bus; -+ struct clk_hw_onecell_data *clk_data; -+ struct reset_control *rst; -+ -+ /* -+ * spinlock is used to synchronize access to same -+ * register where multiple clock gates can be set. -+ */ -+ spinlock_t reg_lock; -+}; -+ -+extern const struct of_device_id sun8i_tcon_top_of_table[]; -+ -+#endif /* _SUN8I_TCON_TOP_H_ */ -diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c -index 50d19605c38f..e15fa2389e3f 100644 ---- a/drivers/gpu/drm/sun4i/sun4i_drv.c -+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c -@@ -283,7 +283,6 @@ static int sun4i_drv_add_endpoints(struct device *dev, - remote = of_graph_get_remote_port_parent(ep); - if (!remote) { - DRM_DEBUG_DRIVER("Error retrieving the output node\n"); -- of_node_put(remote); - continue; - } - -@@ -297,11 +296,13 @@ static int sun4i_drv_add_endpoints(struct device *dev, - - if (of_graph_parse_endpoint(ep, &endpoint)) { - DRM_DEBUG_DRIVER("Couldn't parse endpoint\n"); -+ of_node_put(remote); - continue; - } - - if (!endpoint.id) { - DRM_DEBUG_DRIVER("Endpoint is our panel... skipping\n"); -+ of_node_put(remote); - continue; - } - } -diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c -index e15fa2389e3f..20193d6f33ba 100644 ---- a/drivers/gpu/drm/sun4i/sun4i_drv.c -+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c -@@ -231,12 +231,55 @@ struct endpoint_list { - DECLARE_KFIFO(fifo, struct device_node *, 16); - }; - -+static void sun4i_drv_traverse_endpoints(struct endpoint_list *list, -+ struct device_node *node, -+ int port_id) -+{ -+ struct device_node *ep, *remote, *port; -+ -+ port = of_graph_get_port_by_id(node, port_id); -+ if (!port) { -+ DRM_DEBUG_DRIVER("No output to bind on port %d\n", port_id); -+ return; -+ } -+ -+ for_each_available_child_of_node(port, ep) { -+ remote = of_graph_get_remote_port_parent(ep); -+ if (!remote) { -+ DRM_DEBUG_DRIVER("Error retrieving the output node\n"); -+ continue; -+ } -+ -+ /* -+ * If the node is our TCON, the first port is used for -+ * panel or bridges, and will not be part of the -+ * component framework. -+ */ -+ if (sun4i_drv_node_is_tcon(node)) { -+ struct of_endpoint endpoint; -+ -+ if (of_graph_parse_endpoint(ep, &endpoint)) { -+ DRM_DEBUG_DRIVER("Couldn't parse endpoint\n"); -+ of_node_put(remote); -+ continue; -+ } -+ -+ if (!endpoint.id) { -+ DRM_DEBUG_DRIVER("Endpoint is our panel... skipping\n"); -+ of_node_put(remote); -+ continue; -+ } -+ } -+ -+ kfifo_put(&list->fifo, remote); -+ } -+} -+ - static int sun4i_drv_add_endpoints(struct device *dev, - struct endpoint_list *list, - struct component_match **match, - struct device_node *node) - { -- struct device_node *port, *ep, *remote; - int count = 0; - - /* -@@ -272,43 +315,8 @@ static int sun4i_drv_add_endpoints(struct device *dev, - count++; - } - -- /* Inputs are listed first, then outputs */ -- port = of_graph_get_port_by_id(node, 1); -- if (!port) { -- DRM_DEBUG_DRIVER("No output to bind\n"); -- return count; -- } -- -- for_each_available_child_of_node(port, ep) { -- remote = of_graph_get_remote_port_parent(ep); -- if (!remote) { -- DRM_DEBUG_DRIVER("Error retrieving the output node\n"); -- continue; -- } -- -- /* -- * If the node is our TCON, the first port is used for -- * panel or bridges, and will not be part of the -- * component framework. -- */ -- if (sun4i_drv_node_is_tcon(node)) { -- struct of_endpoint endpoint; -- -- if (of_graph_parse_endpoint(ep, &endpoint)) { -- DRM_DEBUG_DRIVER("Couldn't parse endpoint\n"); -- of_node_put(remote); -- continue; -- } -- -- if (!endpoint.id) { -- DRM_DEBUG_DRIVER("Endpoint is our panel... skipping\n"); -- of_node_put(remote); -- continue; -- } -- } -- -- kfifo_put(&list->fifo, remote); -- } -+ /* each node has at least one output */ -+ sun4i_drv_traverse_endpoints(list, node, 1); - - return count; - } -diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c -index 20193d6f33ba..e6c62c079146 100644 ---- a/drivers/gpu/drm/sun4i/sun4i_drv.c -+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c -@@ -26,6 +26,7 @@ - #include "sun4i_frontend.h" - #include "sun4i_framebuffer.h" - #include "sun4i_tcon.h" -+#include "sun8i_tcon_top.h" - - DEFINE_DRM_GEM_CMA_FOPS(sun4i_drv_fops); - -@@ -197,6 +198,11 @@ static bool sun4i_drv_node_is_tcon(struct device_node *node) - return !!of_match_node(sun4i_tcon_of_table, node); - } - -+static bool sun4i_drv_node_is_tcon_top(struct device_node *node) -+{ -+ return !!of_match_node(sun8i_tcon_top_of_table, node); -+} -+ - static int compare_of(struct device *dev, void *data) - { - DRM_DEBUG_DRIVER("Comparing of node %pOF with %pOF\n", -@@ -258,6 +264,18 @@ static void sun4i_drv_traverse_endpoints(struct endpoint_list *list, - if (sun4i_drv_node_is_tcon(node)) { - struct of_endpoint endpoint; - -+ /* -+ * TCON TOP is always probed before TCON. However, TCON -+ * points back to TCON TOP when it is source for HDMI. -+ * We have to skip it here to prevent infinite looping -+ * between TCON TOP and TCON. -+ */ -+ if (sun4i_drv_node_is_tcon_top(remote)) { -+ DRM_DEBUG_DRIVER("TCON output endpoint is TCON TOP... skipping\n"); -+ of_node_put(remote); -+ continue; -+ } -+ - if (of_graph_parse_endpoint(ep, &endpoint)) { - DRM_DEBUG_DRIVER("Couldn't parse endpoint\n"); - of_node_put(remote); -@@ -318,6 +336,12 @@ static int sun4i_drv_add_endpoints(struct device *dev, - /* each node has at least one output */ - sun4i_drv_traverse_endpoints(list, node, 1); - -+ /* TCON TOP has second and third output */ -+ if (sun4i_drv_node_is_tcon_top(node)) { -+ sun4i_drv_traverse_endpoints(list, node, 3); -+ sun4i_drv_traverse_endpoints(list, node, 5); -+ } -+ - return count; - } - -diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c -index e6c62c079146..6ddf4eaccb40 100644 ---- a/drivers/gpu/drm/sun4i/sun4i_drv.c -+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c -@@ -198,6 +198,22 @@ static bool sun4i_drv_node_is_tcon(struct device_node *node) - return !!of_match_node(sun4i_tcon_of_table, node); - } - -+static bool sun4i_drv_node_is_tcon_with_ch0(struct device_node *node) -+{ -+ const struct of_device_id *match; -+ -+ match = of_match_node(sun4i_tcon_of_table, node); -+ if (match) { -+ struct sun4i_tcon_quirks *quirks; -+ -+ quirks = (struct sun4i_tcon_quirks *)match->data; -+ -+ return quirks->has_channel_0; -+ } -+ -+ return false; -+} -+ - static bool sun4i_drv_node_is_tcon_top(struct device_node *node) - { - return !!of_match_node(sun8i_tcon_top_of_table, node); -@@ -256,14 +272,7 @@ static void sun4i_drv_traverse_endpoints(struct endpoint_list *list, - continue; - } - -- /* -- * If the node is our TCON, the first port is used for -- * panel or bridges, and will not be part of the -- * component framework. -- */ - if (sun4i_drv_node_is_tcon(node)) { -- struct of_endpoint endpoint; -- - /* - * TCON TOP is always probed before TCON. However, TCON - * points back to TCON TOP when it is source for HDMI. -@@ -276,16 +285,25 @@ static void sun4i_drv_traverse_endpoints(struct endpoint_list *list, - continue; - } - -- if (of_graph_parse_endpoint(ep, &endpoint)) { -- DRM_DEBUG_DRIVER("Couldn't parse endpoint\n"); -- of_node_put(remote); -- continue; -- } -- -- if (!endpoint.id) { -- DRM_DEBUG_DRIVER("Endpoint is our panel... skipping\n"); -- of_node_put(remote); -- continue; -+ /* -+ * If the node is our TCON with channel 0, the first -+ * port is used for panel or bridges, and will not be -+ * part of the component framework. -+ */ -+ if (sun4i_drv_node_is_tcon_with_ch0(node)) { -+ struct of_endpoint endpoint; -+ -+ if (of_graph_parse_endpoint(ep, &endpoint)) { -+ DRM_DEBUG_DRIVER("Couldn't parse endpoint\n"); -+ of_node_put(remote); -+ continue; -+ } -+ -+ if (!endpoint.id) { -+ DRM_DEBUG_DRIVER("Endpoint is our panel... skipping\n"); -+ of_node_put(remote); -+ continue; -+ } - } - } - -diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c -index 08747fc3ee71..264bcc43da11 100644 ---- a/drivers/gpu/drm/sun4i/sun4i_tcon.c -+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c -@@ -791,12 +791,14 @@ static int sun4i_tcon_init_regmap(struct device *dev, - */ - static struct sunxi_engine * - sun4i_tcon_find_engine_traverse(struct sun4i_drv *drv, -- struct device_node *node) -+ struct device_node *node, -+ u32 port_id) - { - struct device_node *port, *ep, *remote; - struct sunxi_engine *engine = ERR_PTR(-EINVAL); -+ u32 reg = 0; - -- port = of_graph_get_port_by_id(node, 0); -+ port = of_graph_get_port_by_id(node, port_id); - if (!port) - return ERR_PTR(-EINVAL); - -@@ -826,8 +828,20 @@ sun4i_tcon_find_engine_traverse(struct sun4i_drv *drv, - if (remote == engine->node) - goto out_put_remote; - -+ /* -+ * According to device tree binding input ports have even id -+ * number and output ports have odd id. Since component with -+ * more than one input and one output (TCON TOP) exits, correct -+ * remote input id has to be calculated by subtracting 1 from -+ * remote output id. If this for some reason can't be done, 0 -+ * is used as input port id. -+ */ -+ port = of_graph_get_remote_port(ep); -+ if (!of_property_read_u32(port, "reg", ®) && reg > 0) -+ reg -= 1; -+ - /* keep looking through upstream ports */ -- engine = sun4i_tcon_find_engine_traverse(drv, remote); -+ engine = sun4i_tcon_find_engine_traverse(drv, remote, reg); - - out_put_remote: - of_node_put(remote); -@@ -950,7 +964,7 @@ static struct sunxi_engine *sun4i_tcon_find_engine(struct sun4i_drv *drv, - - /* Fallback to old method by traversing input endpoints */ - of_node_put(port); -- return sun4i_tcon_find_engine_traverse(drv, node); -+ return sun4i_tcon_find_engine_traverse(drv, node, 0); - } - - static int sun4i_tcon_bind(struct device *dev, struct device *master, -diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c -index 264bcc43da11..761687ebacba 100644 ---- a/drivers/gpu/drm/sun4i/sun4i_tcon.c -+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c -@@ -1106,23 +1106,25 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master, - goto err_free_dotclock; - } - -- /* -- * If we have an LVDS panel connected to the TCON, we should -- * just probe the LVDS connector. Otherwise, just probe RGB as -- * we used to. -- */ -- remote = of_graph_get_remote_node(dev->of_node, 1, 0); -- if (of_device_is_compatible(remote, "panel-lvds")) -- if (can_lvds) -- ret = sun4i_lvds_init(drm, tcon); -+ if (tcon->quirks->has_channel_0) { -+ /* -+ * If we have an LVDS panel connected to the TCON, we should -+ * just probe the LVDS connector. Otherwise, just probe RGB as -+ * we used to. -+ */ -+ remote = of_graph_get_remote_node(dev->of_node, 1, 0); -+ if (of_device_is_compatible(remote, "panel-lvds")) -+ if (can_lvds) -+ ret = sun4i_lvds_init(drm, tcon); -+ else -+ ret = -EINVAL; - else -- ret = -EINVAL; -- else -- ret = sun4i_rgb_init(drm, tcon); -- of_node_put(remote); -+ ret = sun4i_rgb_init(drm, tcon); -+ of_node_put(remote); - -- if (ret < 0) -- goto err_free_dotclock; -+ if (ret < 0) -+ goto err_free_dotclock; -+ } - - if (tcon->quirks->needs_de_be_mux) { - /* -diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c -index 761687ebacba..a41c7bb0d557 100644 ---- a/drivers/gpu/drm/sun4i/sun4i_tcon.c -+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c -@@ -1178,13 +1178,19 @@ static const struct component_ops sun4i_tcon_ops = { - static int sun4i_tcon_probe(struct platform_device *pdev) - { - struct device_node *node = pdev->dev.of_node; -+ const struct sun4i_tcon_quirks *quirks; - struct drm_bridge *bridge; - struct drm_panel *panel; - int ret; - -- ret = drm_of_find_panel_or_bridge(node, 1, 0, &panel, &bridge); -- if (ret == -EPROBE_DEFER) -- return ret; -+ quirks = of_device_get_match_data(&pdev->dev); -+ -+ /* panels and bridges are present only on TCONs with channel 0 */ -+ if (quirks->has_channel_0) { -+ ret = drm_of_find_panel_or_bridge(node, 1, 0, &panel, &bridge); -+ if (ret == -EPROBE_DEFER) -+ return ret; -+ } - - return component_add(&pdev->dev, &sun4i_tcon_ops); - } -diff --git a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -index fe31b1510717..84fe38dbb900 100644 ---- a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -+++ b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -@@ -366,6 +366,8 @@ Required properties: - * allwinner,sun8i-a83t-de2-mixer-0 - * allwinner,sun8i-a83t-de2-mixer-1 - * allwinner,sun8i-h3-de2-mixer-0 -+ * allwinner,sun8i-r40-de2-mixer-0 -+ * allwinner,sun8i-r40-de2-mixer-1 - * allwinner,sun8i-v3s-de2-mixer - - reg: base address and size of the memory-mapped region. - - clocks: phandles to the clocks feeding the mixer -diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c -index 126899d6f0d3..ee8febb25903 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_mixer.c -+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c -@@ -500,6 +500,22 @@ static const struct sun8i_mixer_cfg sun8i_h3_mixer0_cfg = { - .vi_num = 1, - }; - -+static const struct sun8i_mixer_cfg sun8i_r40_mixer0_cfg = { -+ .ccsc = 0, -+ .mod_rate = 297000000, -+ .scaler_mask = 0xf, -+ .ui_num = 3, -+ .vi_num = 1, -+}; -+ -+static const struct sun8i_mixer_cfg sun8i_r40_mixer1_cfg = { -+ .ccsc = 1, -+ .mod_rate = 297000000, -+ .scaler_mask = 0x3, -+ .ui_num = 1, -+ .vi_num = 1, -+}; -+ - static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = { - .vi_num = 2, - .ui_num = 1, -@@ -521,6 +537,14 @@ static const struct of_device_id sun8i_mixer_of_table[] = { - .compatible = "allwinner,sun8i-h3-de2-mixer-0", - .data = &sun8i_h3_mixer0_cfg, - }, -+ { -+ .compatible = "allwinner,sun8i-r40-de2-mixer-0", -+ .data = &sun8i_r40_mixer0_cfg, -+ }, -+ { -+ .compatible = "allwinner,sun8i-r40-de2-mixer-1", -+ .data = &sun8i_r40_mixer1_cfg, -+ }, - { - .compatible = "allwinner,sun8i-v3s-de2-mixer", - .data = &sun8i_v3s_mixer_cfg, -diff --git a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -index 84fe38dbb900..dc83f21ef188 100644 ---- a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -+++ b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -@@ -101,6 +101,7 @@ DWC HDMI PHY - - Required properties: - - compatible: value must be one of: -+ * allwinner,sun50i-a64-hdmi-phy - * allwinner,sun8i-a83t-hdmi-phy - * allwinner,sun8i-h3-hdmi-phy - - reg: base address and size of memory-mapped region -@@ -111,8 +112,9 @@ Required properties: - - resets: phandle to the reset controller driving the PHY - - reset-names: must be "phy" - --H3 HDMI PHY requires additional clock: -+H3 and A64 HDMI PHY require additional clocks: - - pll-0: parent of phy clock -+ - pll-1: second possible phy clock parent (A64 only) - - TV Encoder - ---------- -diff --git a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c -index 5a52fc489a9d..966688f04741 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c -+++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c -@@ -477,13 +477,15 @@ int sun8i_hdmi_phy_probe(struct sun8i_dw_hdmi *hdmi, struct device_node *node) - dev_err(dev, "Couldn't create the PHY clock\n"); - goto err_put_clk_pll0; - } -+ -+ clk_prepare_enable(phy->clk_phy); - } - - phy->rst_phy = of_reset_control_get_shared(node, "phy"); - if (IS_ERR(phy->rst_phy)) { - dev_err(dev, "Could not get phy reset control\n"); - ret = PTR_ERR(phy->rst_phy); -- goto err_put_clk_pll0; -+ goto err_disable_clk_phy; - } - - ret = reset_control_deassert(phy->rst_phy); -@@ -514,6 +516,8 @@ int sun8i_hdmi_phy_probe(struct sun8i_dw_hdmi *hdmi, struct device_node *node) - reset_control_assert(phy->rst_phy); - err_put_rst_phy: - reset_control_put(phy->rst_phy); -+err_disable_clk_phy: -+ clk_disable_unprepare(phy->clk_phy); - err_put_clk_pll0: - if (phy->variant->has_phy_clk) - clk_put(phy->clk_pll0); -@@ -531,6 +535,7 @@ void sun8i_hdmi_phy_remove(struct sun8i_dw_hdmi *hdmi) - - clk_disable_unprepare(phy->clk_mod); - clk_disable_unprepare(phy->clk_bus); -+ clk_disable_unprepare(phy->clk_phy); - - reset_control_assert(phy->rst_phy); - -diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h -index 79154f0f674a..3ba71aff92fc 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h -+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h -@@ -98,7 +98,7 @@ - #define SUN8I_HDMI_PHY_PLL_CFG1_LDO2_EN BIT(29) - #define SUN8I_HDMI_PHY_PLL_CFG1_LDO1_EN BIT(28) - #define SUN8I_HDMI_PHY_PLL_CFG1_HV_IS_33 BIT(27) --#define SUN8I_HDMI_PHY_PLL_CFG1_CKIN_SEL BIT(26) -+#define SUN8I_HDMI_PHY_PLL_CFG1_CKIN_SEL_MSK BIT(26) - #define SUN8I_HDMI_PHY_PLL_CFG1_PLLEN BIT(25) - #define SUN8I_HDMI_PHY_PLL_CFG1_LDO_VSET(x) ((x) << 22) - #define SUN8I_HDMI_PHY_PLL_CFG1_UNKNOWN(x) ((x) << 20) -diff --git a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c -index 966688f04741..e56b9e5b1c42 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c -+++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c -@@ -183,7 +183,13 @@ static int sun8i_hdmi_phy_config_h3(struct dw_hdmi *hdmi, - regmap_update_bits(phy->regs, SUN8I_HDMI_PHY_ANA_CFG1_REG, - SUN8I_HDMI_PHY_ANA_CFG1_TXEN_MASK, 0); - -- regmap_write(phy->regs, SUN8I_HDMI_PHY_PLL_CFG1_REG, pll_cfg1_init); -+ /* -+ * NOTE: We have to be careful not to overwrite PHY parent -+ * clock selection bit and clock divider. -+ */ -+ regmap_update_bits(phy->regs, SUN8I_HDMI_PHY_PLL_CFG1_REG, -+ (u32)~SUN8I_HDMI_PHY_PLL_CFG1_CKIN_SEL_MSK, -+ pll_cfg1_init); - regmap_update_bits(phy->regs, SUN8I_HDMI_PHY_PLL_CFG2_REG, - (u32)~SUN8I_HDMI_PHY_PLL_CFG2_PREDIV_MSK, - pll_cfg2_init); -@@ -352,6 +358,10 @@ static void sun8i_hdmi_phy_init_h3(struct sun8i_hdmi_phy *phy) - SUN8I_HDMI_PHY_ANA_CFG3_SCLEN | - SUN8I_HDMI_PHY_ANA_CFG3_SDAEN); - -+ /* reset PHY PLL clock parent */ -+ regmap_update_bits(phy->regs, SUN8I_HDMI_PHY_PLL_CFG1_REG, -+ SUN8I_HDMI_PHY_PLL_CFG1_CKIN_SEL_MSK, 0); -+ - /* set HW control of CEC pins */ - regmap_write(phy->regs, SUN8I_HDMI_PHY_CEC_REG, 0); - -diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h -index 3ba71aff92fc..46a3aa6a53a9 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h -+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h -@@ -147,6 +147,7 @@ struct sun8i_hdmi_phy; - - struct sun8i_hdmi_phy_variant { - bool has_phy_clk; -+ bool has_second_pll; - void (*phy_init)(struct sun8i_hdmi_phy *phy); - void (*phy_disable)(struct dw_hdmi *hdmi, - struct sun8i_hdmi_phy *phy); -@@ -160,6 +161,7 @@ struct sun8i_hdmi_phy { - struct clk *clk_mod; - struct clk *clk_phy; - struct clk *clk_pll0; -+ struct clk *clk_pll1; - unsigned int rcal; - struct regmap *regs; - struct reset_control *rst_phy; -diff --git a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c -index e56b9e5b1c42..f0877b3f67e7 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c -+++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c -@@ -482,10 +482,19 @@ int sun8i_hdmi_phy_probe(struct sun8i_dw_hdmi *hdmi, struct device_node *node) - goto err_put_clk_mod; - } - -+ if (phy->variant->has_second_pll) { -+ phy->clk_pll1 = of_clk_get_by_name(node, "pll-1"); -+ if (IS_ERR(phy->clk_pll1)) { -+ dev_err(dev, "Could not get pll-1 clock\n"); -+ ret = PTR_ERR(phy->clk_pll1); -+ goto err_put_clk_pll0; -+ } -+ } -+ - ret = sun8i_phy_clk_create(phy, dev); - if (ret) { - dev_err(dev, "Couldn't create the PHY clock\n"); -- goto err_put_clk_pll0; -+ goto err_put_clk_pll1; - } - - clk_prepare_enable(phy->clk_phy); -@@ -528,9 +537,10 @@ int sun8i_hdmi_phy_probe(struct sun8i_dw_hdmi *hdmi, struct device_node *node) - reset_control_put(phy->rst_phy); - err_disable_clk_phy: - clk_disable_unprepare(phy->clk_phy); -+err_put_clk_pll1: -+ clk_put(phy->clk_pll1); - err_put_clk_pll0: -- if (phy->variant->has_phy_clk) -- clk_put(phy->clk_pll0); -+ clk_put(phy->clk_pll0); - err_put_clk_mod: - clk_put(phy->clk_mod); - err_put_clk_bus: -@@ -551,8 +561,8 @@ void sun8i_hdmi_phy_remove(struct sun8i_dw_hdmi *hdmi) - - reset_control_put(phy->rst_phy); - -- if (phy->variant->has_phy_clk) -- clk_put(phy->clk_pll0); -+ clk_put(phy->clk_pll0); -+ clk_put(phy->clk_pll1); - clk_put(phy->clk_mod); - clk_put(phy->clk_bus); - } -diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h -index 46a3aa6a53a9..aadbe0a10b0c 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h -+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h -@@ -99,6 +99,7 @@ - #define SUN8I_HDMI_PHY_PLL_CFG1_LDO1_EN BIT(28) - #define SUN8I_HDMI_PHY_PLL_CFG1_HV_IS_33 BIT(27) - #define SUN8I_HDMI_PHY_PLL_CFG1_CKIN_SEL_MSK BIT(26) -+#define SUN8I_HDMI_PHY_PLL_CFG1_CKIN_SEL_SHIFT 26 - #define SUN8I_HDMI_PHY_PLL_CFG1_PLLEN BIT(25) - #define SUN8I_HDMI_PHY_PLL_CFG1_LDO_VSET(x) ((x) << 22) - #define SUN8I_HDMI_PHY_PLL_CFG1_UNKNOWN(x) ((x) << 20) -@@ -190,6 +191,7 @@ void sun8i_hdmi_phy_remove(struct sun8i_dw_hdmi *hdmi); - void sun8i_hdmi_phy_init(struct sun8i_hdmi_phy *phy); - const struct dw_hdmi_phy_ops *sun8i_hdmi_phy_get_ops(void); - --int sun8i_phy_clk_create(struct sun8i_hdmi_phy *phy, struct device *dev); -+int sun8i_phy_clk_create(struct sun8i_hdmi_phy *phy, struct device *dev, -+ bool second_parent); - - #endif /* _SUN8I_DW_HDMI_H_ */ -diff --git a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c -index f0877b3f67e7..aea46b08f127 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c -+++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c -@@ -491,7 +491,8 @@ int sun8i_hdmi_phy_probe(struct sun8i_dw_hdmi *hdmi, struct device_node *node) - } - } - -- ret = sun8i_phy_clk_create(phy, dev); -+ ret = sun8i_phy_clk_create(phy, dev, -+ phy->variant->has_second_pll); - if (ret) { - dev_err(dev, "Couldn't create the PHY clock\n"); - goto err_put_clk_pll1; -diff --git a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c -index faea449812f8..a4d31fe3abff 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c -+++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c -@@ -22,35 +22,45 @@ static int sun8i_phy_clk_determine_rate(struct clk_hw *hw, - { - unsigned long rate = req->rate; - unsigned long best_rate = 0; -+ struct clk_hw *best_parent = NULL; - struct clk_hw *parent; - int best_div = 1; -- int i; -+ int i, p; - -- parent = clk_hw_get_parent(hw); -- -- for (i = 1; i <= 16; i++) { -- unsigned long ideal = rate * i; -- unsigned long rounded; -- -- rounded = clk_hw_round_rate(parent, ideal); -+ for (p = 0; p < clk_hw_get_num_parents(hw); p++) { -+ parent = clk_hw_get_parent_by_index(hw, p); -+ if (!parent) -+ continue; - -- if (rounded == ideal) { -- best_rate = rounded; -- best_div = i; -- break; -+ for (i = 1; i <= 16; i++) { -+ unsigned long ideal = rate * i; -+ unsigned long rounded; -+ -+ rounded = clk_hw_round_rate(parent, ideal); -+ -+ if (rounded == ideal) { -+ best_rate = rounded; -+ best_div = i; -+ best_parent = parent; -+ break; -+ } -+ -+ if (!best_rate || -+ abs(rate - rounded / i) < -+ abs(rate - best_rate / best_div)) { -+ best_rate = rounded; -+ best_div = i; -+ best_parent = parent; -+ } - } - -- if (!best_rate || -- abs(rate - rounded / i) < -- abs(rate - best_rate / best_div)) { -- best_rate = rounded; -- best_div = i; -- } -+ if (best_rate / best_div == rate) -+ break; - } - - req->rate = best_rate / best_div; - req->best_parent_rate = best_rate; -- req->best_parent_hw = parent; -+ req->best_parent_hw = best_parent; - - return 0; - } -@@ -95,22 +105,58 @@ static int sun8i_phy_clk_set_rate(struct clk_hw *hw, unsigned long rate, - return 0; - } - -+static u8 sun8i_phy_clk_get_parent(struct clk_hw *hw) -+{ -+ struct sun8i_phy_clk *priv = hw_to_phy_clk(hw); -+ u32 reg; -+ -+ regmap_read(priv->phy->regs, SUN8I_HDMI_PHY_PLL_CFG1_REG, ®); -+ reg = (reg & SUN8I_HDMI_PHY_PLL_CFG1_CKIN_SEL_MSK) >> -+ SUN8I_HDMI_PHY_PLL_CFG1_CKIN_SEL_SHIFT; -+ -+ return reg; -+} -+ -+static int sun8i_phy_clk_set_parent(struct clk_hw *hw, u8 index) -+{ -+ struct sun8i_phy_clk *priv = hw_to_phy_clk(hw); -+ -+ if (index > 1) -+ return -EINVAL; -+ -+ regmap_update_bits(priv->phy->regs, SUN8I_HDMI_PHY_PLL_CFG1_REG, -+ SUN8I_HDMI_PHY_PLL_CFG1_CKIN_SEL_MSK, -+ index << SUN8I_HDMI_PHY_PLL_CFG1_CKIN_SEL_SHIFT); -+ -+ return 0; -+} -+ - static const struct clk_ops sun8i_phy_clk_ops = { - .determine_rate = sun8i_phy_clk_determine_rate, - .recalc_rate = sun8i_phy_clk_recalc_rate, - .set_rate = sun8i_phy_clk_set_rate, -+ -+ .get_parent = sun8i_phy_clk_get_parent, -+ .set_parent = sun8i_phy_clk_set_parent, - }; - --int sun8i_phy_clk_create(struct sun8i_hdmi_phy *phy, struct device *dev) -+int sun8i_phy_clk_create(struct sun8i_hdmi_phy *phy, struct device *dev, -+ bool second_parent) - { - struct clk_init_data init; - struct sun8i_phy_clk *priv; -- const char *parents[1]; -+ const char *parents[2]; - - parents[0] = __clk_get_name(phy->clk_pll0); - if (!parents[0]) - return -ENODEV; - -+ if (second_parent) { -+ parents[1] = __clk_get_name(phy->clk_pll1); -+ if (!parents[1]) -+ return -ENODEV; -+ } -+ - priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); - if (!priv) - return -ENOMEM; -@@ -118,7 +164,7 @@ int sun8i_phy_clk_create(struct sun8i_hdmi_phy *phy, struct device *dev) - init.name = "hdmi-phy-clk"; - init.ops = &sun8i_phy_clk_ops; - init.parent_names = parents; -- init.num_parents = 1; -+ init.num_parents = second_parent ? 2 : 1; - init.flags = CLK_SET_RATE_PARENT; - - priv->phy = phy; -diff --git a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c -index aea46b08f127..82502b351aec 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c -+++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c -@@ -396,6 +396,14 @@ static struct regmap_config sun8i_hdmi_phy_regmap_config = { - .name = "phy" - }; - -+static const struct sun8i_hdmi_phy_variant sun50i_a64_hdmi_phy = { -+ .has_phy_clk = true, -+ .has_second_pll = true, -+ .phy_init = &sun8i_hdmi_phy_init_h3, -+ .phy_disable = &sun8i_hdmi_phy_disable_h3, -+ .phy_config = &sun8i_hdmi_phy_config_h3, -+}; -+ - static const struct sun8i_hdmi_phy_variant sun8i_a83t_hdmi_phy = { - .phy_init = &sun8i_hdmi_phy_init_a83t, - .phy_disable = &sun8i_hdmi_phy_disable_a83t, -@@ -410,6 +418,10 @@ static const struct sun8i_hdmi_phy_variant sun8i_h3_hdmi_phy = { - }; - - static const struct of_device_id sun8i_hdmi_phy_of_table[] = { -+ { -+ .compatible = "allwinner,sun50i-a64-hdmi-phy", -+ .data = &sun50i_a64_hdmi_phy, -+ }, - { - .compatible = "allwinner,sun8i-a83t-hdmi-phy", - .data = &sun8i_a83t_hdmi_phy, -diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c -index 1fe122461298..50e738857258 100644 ---- a/drivers/gpu/drm/drm_of.c -+++ b/drivers/gpu/drm/drm_of.c -@@ -22,8 +22,8 @@ static void drm_release_of(struct device *dev, void *data) - * Given a port OF node, return the possible mask of the corresponding - * CRTC within a device's list of CRTCs. Returns zero if not found. - */ --static uint32_t drm_crtc_port_mask(struct drm_device *dev, -- struct device_node *port) -+uint32_t drm_crtc_port_mask(struct drm_device *dev, -+ struct device_node *port) - { - unsigned int index = 0; - struct drm_crtc *tmp; -@@ -37,6 +37,7 @@ static uint32_t drm_crtc_port_mask(struct drm_device *dev, - - return 0; - } -+EXPORT_SYMBOL(drm_crtc_port_mask); - - /** - * drm_of_find_possible_crtcs - find the possible CRTCs for an encoder port -diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h -index b93c239afb60..a61fd77e46ba 100644 ---- a/include/drm/drm_of.h -+++ b/include/drm/drm_of.h -@@ -17,6 +17,8 @@ struct drm_bridge; - struct device_node; - - #ifdef CONFIG_OF -+uint32_t drm_crtc_port_mask(struct drm_device *dev, -+ struct device_node *port); - uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, - struct device_node *port); - void drm_of_component_match_add(struct device *master, -@@ -34,6 +36,12 @@ int drm_of_find_panel_or_bridge(const struct device_node *np, - struct drm_panel **panel, - struct drm_bridge **bridge); - #else -+static inline uint32_t drm_crtc_port_mask(struct drm_device *dev, -+ struct device_node *port) -+{ -+ return 0; -+} -+ - static inline uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, - struct device_node *port) - { -diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c -index 9f40a44b456b..d443886e055b 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c -+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c -@@ -12,6 +12,7 @@ - #include - - #include "sun8i_dw_hdmi.h" -+#include "sun8i_tcon_top.h" - - static void sun8i_dw_hdmi_encoder_mode_set(struct drm_encoder *encoder, - struct drm_display_mode *mode, -@@ -41,6 +42,48 @@ sun8i_dw_hdmi_mode_valid(struct drm_connector *connector, - return MODE_OK; - } - -+static bool sun8i_dw_hdmi_node_is_tcon_top(struct device_node *node) -+{ -+ return !!of_match_node(sun8i_tcon_top_of_table, node); -+} -+ -+static u32 sun8i_dw_hdmi_find_possible_crtcs(struct drm_device *drm, -+ struct device_node *node) -+{ -+ struct device_node *port, *ep, *remote, *remote_port; -+ u32 crtcs = 0; -+ -+ port = of_graph_get_port_by_id(node, 0); -+ if (!port) -+ return 0; -+ -+ ep = of_get_next_available_child(port, NULL); -+ if (!ep) -+ return 0; -+ -+ remote = of_graph_get_remote_port_parent(ep); -+ if (!remote) -+ return 0; -+ -+ if (sun8i_dw_hdmi_node_is_tcon_top(remote)) { -+ port = of_graph_get_port_by_id(remote, 4); -+ if (!port) -+ return 0; -+ -+ for_each_child_of_node(port, ep) { -+ remote_port = of_graph_get_remote_port(ep); -+ if (remote_port) { -+ crtcs |= drm_crtc_port_mask(drm, remote_port); -+ of_node_put(remote_port); -+ } -+ } -+ } else { -+ crtcs = drm_of_find_possible_crtcs(drm, node); -+ } -+ -+ return crtcs; -+} -+ - static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master, - void *data) - { -@@ -63,7 +106,8 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master, - hdmi->dev = &pdev->dev; - encoder = &hdmi->encoder; - -- encoder->possible_crtcs = drm_of_find_possible_crtcs(drm, dev->of_node); -+ encoder->possible_crtcs = -+ sun8i_dw_hdmi_find_possible_crtcs(drm, dev->of_node); - /* - * If we failed to find the CRTC(s) which this encoder is - * supposed to be connected to, it's because the CRTC has -diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi -index 173dcc1652d2..a2a75fb04caf 100644 ---- a/arch/arm/boot/dts/sun8i-r40.dtsi -+++ b/arch/arm/boot/dts/sun8i-r40.dtsi -@@ -42,8 +42,11 @@ - */ - - #include -+#include - #include -+#include - #include -+#include - - / { - #address-cells = <1>; -@@ -99,12 +102,76 @@ - }; - }; - -+ de: display-engine { -+ compatible = "allwinner,sun8i-r40-display-engine", -+ "allwinner,sun8i-h3-display-engine"; -+ allwinner,pipelines = <&mixer0>, <&mixer1>; -+ status = "disabled"; -+ }; -+ - soc { - compatible = "simple-bus"; - #address-cells = <1>; - #size-cells = <1>; - ranges; - -+ display_clocks: clock@1000000 { -+ compatible = "allwinner,sun8i-r40-de2-clk", -+ "allwinner,sun8i-h3-de2-clk"; -+ reg = <0x01000000 0x100000>; -+ clocks = <&ccu CLK_DE>, -+ <&ccu CLK_BUS_DE>; -+ clock-names = "mod", -+ "bus"; -+ resets = <&ccu RST_BUS_DE>; -+ #clock-cells = <1>; -+ #reset-cells = <1>; -+ }; -+ -+ mixer0: mixer@1100000 { -+ compatible = "allwinner,sun8i-r40-de2-mixer-0"; -+ reg = <0x01100000 0x100000>; -+ clocks = <&display_clocks CLK_BUS_MIXER0>, -+ <&display_clocks CLK_MIXER0>; -+ clock-names = "bus", -+ "mod"; -+ resets = <&display_clocks RST_MIXER0>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ mixer0_out: port@1 { -+ reg = <1>; -+ mixer0_out_tcon_top: endpoint { -+ remote-endpoint = <&tcon_top_mixer0_in_mixer0>; -+ }; -+ }; -+ }; -+ }; -+ -+ mixer1: mixer@1200000 { -+ compatible = "allwinner,sun8i-r40-de2-mixer-1"; -+ reg = <0x01200000 0x100000>; -+ clocks = <&display_clocks CLK_BUS_MIXER1>, -+ <&display_clocks CLK_MIXER1>; -+ clock-names = "bus", -+ "mod"; -+ resets = <&display_clocks RST_WB>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ mixer1_out: port@1 { -+ reg = <1>; -+ mixer1_out_tcon_top: endpoint { -+ remote-endpoint = <&tcon_top_mixer1_in_mixer1>; -+ }; -+ }; -+ }; -+ }; -+ - nmi_intc: interrupt-controller@1c00030 { - compatible = "allwinner,sun7i-a20-sc-nmi"; - interrupt-controller; -@@ -451,6 +518,163 @@ - #size-cells = <0>; - }; - -+ tcon_top: tcon-top@1c70000 { -+ compatible = "allwinner,sun8i-r40-tcon-top"; -+ reg = <0x01c70000 0x1000>; -+ clocks = <&ccu CLK_BUS_TCON_TOP>, -+ <&ccu CLK_TCON_TV0>, -+ <&ccu CLK_TVE0>, -+ <&ccu CLK_TCON_TV1>, -+ <&ccu CLK_TVE1>, -+ <&ccu CLK_DSI_DPHY>; -+ clock-names = "bus", -+ "tcon-tv0", -+ "tve0", -+ "tcon-tv1", -+ "tve1", -+ "dsi"; -+ clock-output-names = "tcon-top-tv0", -+ "tcon-top-tv1", -+ "tcon-top-dsi"; -+ resets = <&ccu RST_BUS_TCON_TOP>; -+ #clock-cells = <1>; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ tcon_top_mixer0_in: port@0 { -+ reg = <0>; -+ -+ tcon_top_mixer0_in_mixer0: endpoint { -+ remote-endpoint = <&mixer0_out_tcon_top>; -+ }; -+ }; -+ -+ tcon_top_mixer0_out: port@1 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <1>; -+ -+ tcon_top_mixer0_out_tcon_lcd0: endpoint@0 { -+ reg = <0>; -+ }; -+ -+ tcon_top_mixer0_out_tcon_lcd1: endpoint@1 { -+ reg = <1>; -+ }; -+ -+ tcon_top_mixer0_out_tcon_tv0: endpoint@2 { -+ reg = <2>; -+ }; -+ -+ tcon_top_mixer0_out_tcon_tv1: endpoint@3 { -+ reg = <3>; -+ }; -+ }; -+ -+ tcon_top_mixer1_in: port@2 { -+ reg = <2>; -+ -+ tcon_top_mixer1_in_mixer1: endpoint { -+ remote-endpoint = <&mixer1_out_tcon_top>; -+ }; -+ }; -+ -+ tcon_top_mixer1_out: port@3 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <3>; -+ -+ tcon_top_mixer1_out_tcon_lcd0: endpoint@0 { -+ reg = <0>; -+ }; -+ -+ tcon_top_mixer1_out_tcon_lcd1: endpoint@1 { -+ reg = <1>; -+ }; -+ -+ tcon_top_mixer1_out_tcon_tv0: endpoint@2 { -+ reg = <2>; -+ }; -+ -+ tcon_top_mixer1_out_tcon_tv1: endpoint@3 { -+ reg = <3>; -+ }; -+ }; -+ -+ tcon_top_hdmi_in: port@4 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <4>; -+ -+ tcon_top_hdmi_in_tcon_tv0: endpoint@0 { -+ reg = <0>; -+ }; -+ -+ tcon_top_hdmi_in_tcon_tv1: endpoint@1 { -+ reg = <1>; -+ }; -+ }; -+ -+ tcon_top_hdmi_out: port@5 { -+ reg = <5>; -+ -+ tcon_top_hdmi_out_hdmi: endpoint { -+ remote-endpoint = <&hdmi_in_tcon_top>; -+ }; -+ }; -+ }; -+ }; -+ -+ tcon_tv0: lcd-controller@1c73000 { -+ compatible = "allwinner,sun8i-r40-tcon-tv", -+ "allwinner,sun8i-a83t-tcon-tv"; -+ reg = <0x01c73000 0x1000>; -+ interrupts = ; -+ clocks = <&ccu CLK_BUS_TCON_TV0>, <&tcon_top 0>; -+ clock-names = "ahb", "tcon-ch1"; -+ resets = <&ccu RST_BUS_TCON_TV0>; -+ reset-names = "lcd"; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ tcon_tv0_in: port@0 { -+ reg = <0>; -+ }; -+ -+ tcon_tv0_out: port@1 { -+ reg = <1>; -+ }; -+ }; -+ }; -+ -+ tcon_tv1: lcd-controller@1c74000 { -+ compatible = "allwinner,sun8i-r40-tcon-tv", -+ "allwinner,sun8i-a83t-tcon-tv"; -+ reg = <0x01c74000 0x1000>; -+ interrupts = ; -+ clocks = <&ccu CLK_BUS_TCON_TV1>, <&tcon_top 1>; -+ clock-names = "ahb", "tcon-ch1"; -+ resets = <&ccu RST_BUS_TCON_TV1>; -+ reset-names = "lcd"; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ tcon_tv1_in: port@0 { -+ reg = <0>; -+ }; -+ -+ tcon_tv1_out: port@1 { -+ reg = <1>; -+ }; -+ }; -+ }; -+ - gic: interrupt-controller@1c81000 { - compatible = "arm,gic-400"; - reg = <0x01c81000 0x1000>, -@@ -461,6 +685,51 @@ - #interrupt-cells = <3>; - interrupts = ; - }; -+ -+ hdmi: hdmi@1ee0000 { -+ compatible = "allwinner,sun8i-r40-dw-hdmi", -+ "allwinner,sun8i-a83t-dw-hdmi"; -+ reg = <0x01ee0000 0x10000>; -+ reg-io-width = <1>; -+ interrupts = ; -+ clocks = <&ccu CLK_BUS_HDMI0>, <&ccu CLK_HDMI_SLOW>, -+ <&ccu CLK_HDMI>; -+ clock-names = "iahb", "isfr", "tmds"; -+ resets = <&ccu RST_BUS_HDMI1>; -+ reset-names = "ctrl"; -+ phys = <&hdmi_phy>; -+ phy-names = "hdmi-phy"; -+ status = "disabled"; -+ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ hdmi_in: port@0 { -+ reg = <0>; -+ -+ hdmi_in_tcon_top: endpoint { -+ remote-endpoint = <&tcon_top_hdmi_out_hdmi>; -+ }; -+ }; -+ -+ hdmi_out: port@1 { -+ reg = <1>; -+ }; -+ }; -+ }; -+ -+ hdmi_phy: hdmi-phy@1ef0000 { -+ compatible = "allwinner,sun8i-r40-hdmi-phy", -+ "allwinner,sun50i-a64-hdmi-phy"; -+ reg = <0x01ef0000 0x10000>; -+ clocks = <&ccu CLK_BUS_HDMI1>, <&ccu CLK_HDMI_SLOW>, -+ <&ccu 7>, <&ccu 16>; -+ clock-names = "bus", "mod", "pll-0", "pll-1"; -+ resets = <&ccu RST_BUS_HDMI0>; -+ reset-names = "phy"; -+ #phy-cells = <0>; -+ }; - }; - - timer { -diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts -index 27d9ccd0ef2f..0ebc2f9a980e 100644 ---- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts -+++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts -@@ -58,6 +58,17 @@ - stdout-path = "serial0:115200n8"; - }; - -+ connector { -+ compatible = "hdmi-connector"; -+ type = "a"; -+ -+ port { -+ hdmi_con_in: endpoint { -+ remote-endpoint = <&hdmi_out_con>; -+ }; -+ }; -+ }; -+ - leds { - compatible = "gpio-leds"; - -@@ -93,6 +104,10 @@ - }; - }; - -+&de { -+ status = "okay"; -+}; -+ - &ehci1 { - status = "okay"; - }; -@@ -101,6 +116,16 @@ - status = "okay"; - }; - -+&hdmi { -+ status = "okay"; -+}; -+ -+&hdmi_out { -+ hdmi_out_con: endpoint { -+ remote-endpoint = <&hdmi_con_in>; -+ }; -+}; -+ - &i2c0 { - status = "okay"; - -@@ -195,6 +220,26 @@ - status = "okay"; - }; - -+&tcon_top_hdmi_in_tcon_tv0 { -+ remote-endpoint = <&tcon_tv0_out_tcon_top>; -+}; -+ -+&tcon_top_mixer0_out_tcon_tv0 { -+ remote-endpoint = <&tcon_tv0_in_tcon_top>; -+}; -+ -+&tcon_tv0_in { -+ tcon_tv0_in_tcon_top: endpoint { -+ remote-endpoint = <&tcon_top_mixer0_out_tcon_tv0>; -+ }; -+}; -+ -+&tcon_tv0_out { -+ tcon_tv0_out_tcon_top: endpoint { -+ remote-endpoint = <&tcon_top_hdmi_in_tcon_tv0>; -+ }; -+}; -+ - &uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_pb_pins>; diff --git a/patch/kernel/sunxi-dev/board-0002-r40-HDMI-refactoring.patch b/patch/kernel/sunxi-dev/board-0002-r40-HDMI-refactoring.patch deleted file mode 100644 index 4a57efb79..000000000 --- a/patch/kernel/sunxi-dev/board-0002-r40-HDMI-refactoring.patch +++ /dev/null @@ -1,867 +0,0 @@ -diff --git a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -index 5a9319ad8861..288b4cbc255e 100644 ---- a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -+++ b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -@@ -399,6 +399,7 @@ Required properties: - * allwinner,sun8i-a33-display-engine - * allwinner,sun8i-a83t-display-engine - * allwinner,sun8i-h3-display-engine -+ * allwinner,sun8i-r40-display-engine - * allwinner,sun8i-v3s-display-engine - * allwinner,sun9i-a80-display-engine - -diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c -index 6ddf4eaccb40..a15feb807393 100644 ---- a/drivers/gpu/drm/sun4i/sun4i_drv.c -+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c -@@ -417,6 +417,7 @@ static const struct of_device_id sun4i_drv_of_table[] = { - { .compatible = "allwinner,sun8i-a33-display-engine" }, - { .compatible = "allwinner,sun8i-a83t-display-engine" }, - { .compatible = "allwinner,sun8i-h3-display-engine" }, -+ { .compatible = "allwinner,sun8i-r40-display-engine" }, - { .compatible = "allwinner,sun8i-v3s-display-engine" }, - { .compatible = "allwinner,sun9i-a80-display-engine" }, - { } -diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi -index c95a59aac48f..2afb079a3776 100644 ---- a/arch/arm/boot/dts/sun8i-r40.dtsi -+++ b/arch/arm/boot/dts/sun8i-r40.dtsi -@@ -102,8 +102,7 @@ - }; - - de: display-engine { -- compatible = "allwinner,sun8i-r40-display-engine", -- "allwinner,sun8i-h3-display-engine"; -+ compatible = "allwinner,sun8i-r40-display-engine"; - allwinner,pipelines = <&mixer0>, <&mixer1>; - status = "disabled"; - }; -diff --git a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c -index 8da0460e0028..9fb51940156f 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c -+++ b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c -@@ -44,15 +44,20 @@ static int sun8i_tcon_top_get_connected_ep_id(struct device_node *node, - } - - static struct clk_hw *sun8i_tcon_top_register_gate(struct device *dev, -- struct clk *parent, -+ const char *parent, - void __iomem *regs, - spinlock_t *lock, - u8 bit, int name_index) - { - const char *clk_name, *parent_name; -- int ret; -+ int ret, index; -+ -+ index = of_property_match_string(dev->of_node, "clock-names", parent); -+ if (IS_ERR_VALUE(index)) -+ return ERR_PTR(index); -+ -+ parent_name = of_clk_get_parent_name(dev->of_node, index); - -- parent_name = __clk_get_name(parent); - ret = of_property_read_string_index(dev->of_node, - "clock-output-names", name_index, - &clk_name); -@@ -69,7 +74,6 @@ static int sun8i_tcon_top_bind(struct device *dev, struct device *master, - void *data) - { - struct platform_device *pdev = to_platform_device(dev); -- struct clk *dsi, *tcon_tv0, *tcon_tv1, *tve0, *tve1; - struct clk_hw_onecell_data *clk_data; - struct sun8i_tcon_top *tcon_top; - bool mixer0_unused = false; -@@ -103,36 +107,6 @@ static int sun8i_tcon_top_bind(struct device *dev, struct device *master, - return PTR_ERR(tcon_top->bus); - } - -- dsi = devm_clk_get(dev, "dsi"); -- if (IS_ERR(dsi)) { -- dev_err(dev, "Couldn't get the dsi clock\n"); -- return PTR_ERR(dsi); -- } -- -- tcon_tv0 = devm_clk_get(dev, "tcon-tv0"); -- if (IS_ERR(tcon_tv0)) { -- dev_err(dev, "Couldn't get the tcon-tv0 clock\n"); -- return PTR_ERR(tcon_tv0); -- } -- -- tcon_tv1 = devm_clk_get(dev, "tcon-tv1"); -- if (IS_ERR(tcon_tv1)) { -- dev_err(dev, "Couldn't get the tcon-tv1 clock\n"); -- return PTR_ERR(tcon_tv1); -- } -- -- tve0 = devm_clk_get(dev, "tve0"); -- if (IS_ERR(tve0)) { -- dev_err(dev, "Couldn't get the tve0 clock\n"); -- return PTR_ERR(tve0); -- } -- -- tve1 = devm_clk_get(dev, "tve1"); -- if (IS_ERR(tve1)) { -- dev_err(dev, "Couldn't get the tve1 clock\n"); -- return PTR_ERR(tve1); -- } -- - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(dev, res); - if (IS_ERR(regs)) -@@ -203,17 +177,17 @@ static int sun8i_tcon_top_bind(struct device *dev, struct device *master, - * to TVE clock parent. - */ - clk_data->hws[CLK_TCON_TOP_TV0] = -- sun8i_tcon_top_register_gate(dev, tcon_tv0, regs, -+ sun8i_tcon_top_register_gate(dev, "tcon-tv0", regs, - &tcon_top->reg_lock, - TCON_TOP_TCON_TV0_GATE, 0); - - clk_data->hws[CLK_TCON_TOP_TV1] = -- sun8i_tcon_top_register_gate(dev, tcon_tv1, regs, -+ sun8i_tcon_top_register_gate(dev, "tcon-tv1", regs, - &tcon_top->reg_lock, - TCON_TOP_TCON_TV1_GATE, 1); - - clk_data->hws[CLK_TCON_TOP_DSI] = -- sun8i_tcon_top_register_gate(dev, dsi, regs, -+ sun8i_tcon_top_register_gate(dev, "dsi", regs, - &tcon_top->reg_lock, - TCON_TOP_TCON_DSI_GATE, 2); - -diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c -index aacc841d3dc6..3fb084f802e2 100644 ---- a/drivers/gpu/drm/sun4i/sun4i_tcon.c -+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c -@@ -811,6 +811,7 @@ sun4i_tcon_find_engine_traverse(struct sun4i_drv *drv, - * remote output id. If this for some reason can't be done, 0 - * is used as input port id. - */ -+ of_node_put(port); - port = of_graph_get_remote_port(ep); - if (!of_property_read_u32(port, "reg", ®) && reg > 0) - reg -= 1; -diff --git a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -index 288b4cbc255e..7e2451396a28 100644 ---- a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -+++ b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -@@ -147,6 +147,7 @@ Required properties: - * allwinner,sun8i-a33-tcon - * allwinner,sun8i-a83t-tcon-lcd - * allwinner,sun8i-a83t-tcon-tv -+ * allwinner,sun8i-r40-tcon-tv - * allwinner,sun8i-v3s-tcon - * allwinner,sun9i-a80-tcon-lcd - * allwinner,sun9i-a80-tcon-tv -@@ -181,7 +182,7 @@ For TCONs with channel 0, there is one more clock required: - For TCONs with channel 1, there is one more clock required: - - 'tcon-ch1': The clock driving the TCON channel 1 - --When TCON support LVDS (all TCONs except TV TCON on A83T and those found -+When TCON support LVDS (all TCONs except TV TCONs on A83T, R40 and those found - in A13, H3, H5 and V3s SoCs), you need one more reset line: - - 'lvds': The reset line driving the LVDS logic - -diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c -index 3459b9ec56c9..21dc9ebad0b4 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c -+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c -@@ -53,22 +53,14 @@ static u32 sun8i_dw_hdmi_find_possible_crtcs(struct drm_device *drm, - struct device_node *port, *ep, *remote, *remote_port; - u32 crtcs = 0; - -- port = of_graph_get_port_by_id(node, 0); -- if (!port) -- return 0; -- -- ep = of_get_next_available_child(port, NULL); -- if (!ep) -- return 0; -- -- remote = of_graph_get_remote_port_parent(ep); -+ remote = of_graph_get_remote_node(node, 0, -1); - if (!remote) - return 0; - - if (sun8i_dw_hdmi_node_is_tcon_top(remote)) { - port = of_graph_get_port_by_id(remote, 4); - if (!port) -- return 0; -+ goto crtcs_exit; - - for_each_child_of_node(port, ep) { - remote_port = of_graph_get_remote_port(ep); -@@ -81,6 +73,9 @@ static u32 sun8i_dw_hdmi_find_possible_crtcs(struct drm_device *drm, - crtcs = drm_of_find_possible_crtcs(drm, node); - } - -+crtcs_exit: -+ of_node_put(remote); -+ - return crtcs; - } - -diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi -index 2afb079a3776..1dd088d82773 100644 ---- a/arch/arm/boot/dts/sun8i-r40.dtsi -+++ b/arch/arm/boot/dts/sun8i-r40.dtsi -@@ -576,9 +576,12 @@ - #size-cells = <0>; - - tcon_top_mixer0_in: port@0 { -+ #address-cells = <1>; -+ #size-cells = <0>; - reg = <0>; - -- tcon_top_mixer0_in_mixer0: endpoint { -+ tcon_top_mixer0_in_mixer0: endpoint@0 { -+ reg = <0>; - remote-endpoint = <&mixer0_out_tcon_top>; - }; - }; -@@ -606,9 +609,12 @@ - }; - - tcon_top_mixer1_in: port@2 { -+ #address-cells = <1>; -+ #size-cells = <0>; - reg = <2>; - -- tcon_top_mixer1_in_mixer1: endpoint { -+ tcon_top_mixer1_in_mixer1: endpoint@1 { -+ reg = <1>; - remote-endpoint = <&mixer1_out_tcon_top>; - }; - }; -diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c -index ee8febb25903..11221f96746d 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_mixer.c -+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - - #include "sun4i_drv.h" - #include "sun8i_mixer.h" -@@ -322,6 +323,37 @@ static struct regmap_config sun8i_mixer_regmap_config = { - .max_register = 0xbfffc, /* guessed */ - }; - -+static int sun8i_mixer_of_get_id(struct device_node *node) -+{ -+ struct device_node *port, *ep; -+ int ret = -EINVAL; -+ -+ /* output is port 1 */ -+ port = of_graph_get_port_by_id(node, 1); -+ if (!port) -+ return -EINVAL; -+ -+ /* try finding an upstream endpoint */ -+ for_each_available_child_of_node(port, ep) { -+ struct device_node *remote; -+ u32 reg; -+ -+ remote = of_graph_get_remote_endpoint(ep); -+ if (!remote) -+ continue; -+ -+ ret = of_property_read_u32(remote, "reg", ®); -+ if (ret) -+ continue; -+ -+ ret = reg; -+ } -+ -+ of_node_put(port); -+ -+ return ret; -+} -+ - static int sun8i_mixer_bind(struct device *dev, struct device *master, - void *data) - { -@@ -353,8 +385,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master, - dev_set_drvdata(dev, mixer); - mixer->engine.ops = &sun8i_engine_ops; - mixer->engine.node = dev->of_node; -- /* The ID of the mixer currently doesn't matter */ -- mixer->engine.id = -1; -+ mixer->engine.id = sun8i_mixer_of_get_id(dev->of_node); - - mixer->cfg = of_device_get_match_data(dev); - if (!mixer->cfg) -diff --git a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c -index 9fb51940156f..c09b15b64192 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c -+++ b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c -@@ -14,6 +14,79 @@ - - #include "sun8i_tcon_top.h" - -+static bool sun8i_tcon_top_node_is_tcon_top(struct device_node *node) -+{ -+ return !!of_match_node(sun8i_tcon_top_of_table, node); -+} -+ -+int sun8i_tcon_top_set_hdmi_src(struct device *dev, int tcon) -+{ -+ struct sun8i_tcon_top *tcon_top = dev_get_drvdata(dev); -+ unsigned long flags; -+ u32 val; -+ -+ if (!sun8i_tcon_top_node_is_tcon_top(dev->of_node)) { -+ dev_err(dev, "Device is not TCON TOP!\n"); -+ return -EINVAL; -+ } -+ -+ if (tcon < 2 || tcon > 3) { -+ dev_err(dev, "TCON index must be 2 or 3!\n"); -+ return -EINVAL; -+ } -+ -+ spin_lock_irqsave(&tcon_top->reg_lock, flags); -+ -+ val = readl(tcon_top->regs + TCON_TOP_GATE_SRC_REG); -+ val &= ~TCON_TOP_HDMI_SRC_MSK; -+ val |= FIELD_PREP(TCON_TOP_HDMI_SRC_MSK, tcon - 1); -+ writel(val, tcon_top->regs + TCON_TOP_GATE_SRC_REG); -+ -+ spin_unlock_irqrestore(&tcon_top->reg_lock, flags); -+ -+ return 0; -+} -+EXPORT_SYMBOL(sun8i_tcon_top_set_hdmi_src); -+ -+int sun8i_tcon_top_de_config(struct device *dev, int mixer, int tcon) -+{ -+ struct sun8i_tcon_top *tcon_top = dev_get_drvdata(dev); -+ unsigned long flags; -+ u32 reg; -+ -+ if (!sun8i_tcon_top_node_is_tcon_top(dev->of_node)) { -+ dev_err(dev, "Device is not TCON TOP!\n"); -+ return -EINVAL; -+ } -+ -+ if (mixer > 1) { -+ dev_err(dev, "Mixer index is too high!\n"); -+ return -EINVAL; -+ } -+ -+ if (tcon > 3) { -+ dev_err(dev, "TCON index is too high!\n"); -+ return -EINVAL; -+ } -+ -+ spin_lock_irqsave(&tcon_top->reg_lock, flags); -+ -+ reg = readl(tcon_top->regs + TCON_TOP_PORT_SEL_REG); -+ if (mixer == 0) { -+ reg &= ~TCON_TOP_PORT_DE0_MSK; -+ reg |= FIELD_PREP(TCON_TOP_PORT_DE0_MSK, tcon); -+ } else { -+ reg &= ~TCON_TOP_PORT_DE1_MSK; -+ reg |= FIELD_PREP(TCON_TOP_PORT_DE1_MSK, tcon); -+ } -+ writel(reg, tcon_top->regs + TCON_TOP_PORT_SEL_REG); -+ -+ spin_unlock_irqrestore(&tcon_top->reg_lock, flags); -+ -+ return 0; -+} -+EXPORT_SYMBOL(sun8i_tcon_top_de_config); -+ - static int sun8i_tcon_top_get_connected_ep_id(struct device_node *node, - int port_id) - { -@@ -109,6 +182,7 @@ static int sun8i_tcon_top_bind(struct device *dev, struct device *master, - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(dev, res); -+ tcon_top->regs = regs; - if (IS_ERR(regs)) - return PTR_ERR(regs); - -diff --git a/drivers/gpu/drm/sun4i/sun8i_tcon_top.h b/drivers/gpu/drm/sun4i/sun8i_tcon_top.h -index 39838bbfeaee..0390584a330e 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_tcon_top.h -+++ b/drivers/gpu/drm/sun4i/sun8i_tcon_top.h -@@ -26,6 +26,7 @@ - struct sun8i_tcon_top { - struct clk *bus; - struct clk_hw_onecell_data *clk_data; -+ void __iomem *regs; - struct reset_control *rst; - - /* -@@ -37,4 +38,7 @@ struct sun8i_tcon_top { - - extern const struct of_device_id sun8i_tcon_top_of_table[]; - -+int sun8i_tcon_top_set_hdmi_src(struct device *dev, int tcon); -+int sun8i_tcon_top_de_config(struct device *dev, int mixer, int tcon); -+ - #endif /* _SUN8I_TCON_TOP_H_ */ -diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c -index 3fb084f802e2..44ec3a3d4d64 100644 ---- a/drivers/gpu/drm/sun4i/sun4i_tcon.c -+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c -@@ -35,6 +35,7 @@ - #include "sun4i_rgb.h" - #include "sun4i_tcon.h" - #include "sun6i_mipi_dsi.h" -+#include "sun8i_tcon_top.h" - #include "sunxi_engine.h" - - static struct drm_connector *sun4i_tcon_get_connector(const struct drm_encoder *encoder) -@@ -880,6 +881,36 @@ static struct sunxi_engine *sun4i_tcon_get_engine_by_id(struct sun4i_drv *drv, - return ERR_PTR(-EINVAL); - } - -+static bool sun4i_tcon_connected_to_tcon_top(struct device_node *node) -+{ -+ struct device_node *remote; -+ bool ret = false; -+ -+ remote = of_graph_get_remote_node(node, 0, -1); -+ if (remote) { -+ ret = !!of_match_node(sun8i_tcon_top_of_table, remote); -+ of_node_put(remote); -+ } -+ -+ return ret; -+} -+ -+static int sun4i_tcon_get_index(struct sun4i_drv *drv) -+{ -+ struct list_head *pos; -+ int size = 0; -+ -+ /* -+ * Because TCON is added to the list at the end of the probe -+ * (after this function is called), index of the current TCON -+ * will be same as current TCON list size. -+ */ -+ list_for_each(pos, &drv->tcon_list) -+ ++size; -+ -+ return size; -+} -+ - /* - * On SoCs with the old display pipeline design (Display Engine 1.0), - * we assumed the TCON was always tied to just one backend. However -@@ -928,8 +959,24 @@ static struct sunxi_engine *sun4i_tcon_find_engine(struct sun4i_drv *drv, - * connections between the backend and TCON? - */ - if (of_get_child_count(port) > 1) { -- /* Get our ID directly from an upstream endpoint */ -- int id = sun4i_tcon_of_get_id_from_port(port); -+ int id; -+ -+ /* -+ * When pipeline has the same number of TCONs and engines which -+ * are represented by frontends/backends (DE1) or mixers (DE2), -+ * we match them by their respective IDs. However, if pipeline -+ * contains TCON TOP, chances are that there are either more -+ * TCONs than engines (R40) or TCONs with non-consecutive ids. -+ * (H6). In that case it's easier just use TCON index in list -+ * as an id. That means that on R40, any 2 TCONs can be enabled -+ * in DT out of 4 (there are 2 mixers). Due to the design of -+ * TCON TOP, remaining 2 TCONs can't be connected to anything -+ * anyway. -+ */ -+ if (sun4i_tcon_connected_to_tcon_top(node)) -+ id = sun4i_tcon_get_index(drv); -+ else -+ id = sun4i_tcon_of_get_id_from_port(port); - - /* Get our engine by matching our ID */ - engine = sun4i_tcon_get_engine_by_id(drv, id); -diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c -index 44ec3a3d4d64..5676b7faaca0 100644 ---- a/drivers/gpu/drm/sun4i/sun4i_tcon.c -+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c -@@ -1291,6 +1291,40 @@ static int sun6i_tcon_set_mux(struct sun4i_tcon *tcon, - return 0; - } - -+static int sun8i_r40_tcon_tv_set_mux(struct sun4i_tcon *tcon, -+ const struct drm_encoder *encoder) -+{ -+ struct device_node *port, *remote; -+ struct platform_device *pdev; -+ int id, ret; -+ -+ /* find TCON TOP platform device and TCON id */ -+ -+ port = of_graph_get_port_by_id(tcon->dev->of_node, 0); -+ if (!port) -+ return -EINVAL; -+ -+ id = sun4i_tcon_of_get_id_from_port(port); -+ of_node_put(port); -+ -+ remote = of_graph_get_remote_node(tcon->dev->of_node, 0, -1); -+ if (!remote) -+ return -EINVAL; -+ -+ pdev = of_find_device_by_node(remote); -+ of_node_put(remote); -+ if (!pdev) -+ return -EINVAL; -+ -+ if (encoder->encoder_type == DRM_MODE_ENCODER_TMDS) { -+ ret = sun8i_tcon_top_set_hdmi_src(&pdev->dev, id); -+ if (ret) -+ return ret; -+ } -+ -+ return sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id); -+} -+ - static const struct sun4i_tcon_quirks sun4i_a10_quirks = { - .has_channel_0 = true, - .has_channel_1 = true, -@@ -1338,6 +1372,11 @@ static const struct sun4i_tcon_quirks sun8i_a83t_tv_quirks = { - .has_channel_1 = true, - }; - -+static const struct sun4i_tcon_quirks sun8i_r40_tv_quirks = { -+ .has_channel_1 = true, -+ .set_mux = sun8i_r40_tcon_tv_set_mux, -+}; -+ - static const struct sun4i_tcon_quirks sun8i_v3s_quirks = { - .has_channel_0 = true, - }; -@@ -1362,6 +1401,7 @@ const struct of_device_id sun4i_tcon_of_table[] = { - { .compatible = "allwinner,sun8i-a33-tcon", .data = &sun8i_a33_quirks }, - { .compatible = "allwinner,sun8i-a83t-tcon-lcd", .data = &sun8i_a83t_lcd_quirks }, - { .compatible = "allwinner,sun8i-a83t-tcon-tv", .data = &sun8i_a83t_tv_quirks }, -+ { .compatible = "allwinner,sun8i-r40-tcon-tv", .data = &sun8i_r40_tv_quirks }, - { .compatible = "allwinner,sun8i-v3s-tcon", .data = &sun8i_v3s_quirks }, - { .compatible = "allwinner,sun9i-a80-tcon-lcd", .data = &sun9i_a80_tcon_lcd_quirks }, - { .compatible = "allwinner,sun9i-a80-tcon-tv", .data = &sun9i_a80_tcon_tv_quirks }, -diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi -index 1dd088d82773..6b4fe8eeee99 100644 ---- a/arch/arm/boot/dts/sun8i-r40.dtsi -+++ b/arch/arm/boot/dts/sun8i-r40.dtsi -@@ -666,8 +666,7 @@ - }; - - tcon_tv0: lcd-controller@1c73000 { -- compatible = "allwinner,sun8i-r40-tcon-tv", -- "allwinner,sun8i-a83t-tcon-tv"; -+ compatible = "allwinner,sun8i-r40-tcon-tv"; - reg = <0x01c73000 0x1000>; - interrupts = ; - clocks = <&ccu CLK_BUS_TCON_TV0>, <&tcon_top 0>; -@@ -690,8 +689,7 @@ - }; - - tcon_tv1: lcd-controller@1c74000 { -- compatible = "allwinner,sun8i-r40-tcon-tv", -- "allwinner,sun8i-a83t-tcon-tv"; -+ compatible = "allwinner,sun8i-r40-tcon-tv"; - reg = <0x01c74000 0x1000>; - interrupts = ; - clocks = <&ccu CLK_BUS_TCON_TV1>, <&tcon_top 1>; -diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts -index 4f3d583183dc..737cf01b1acd 100644 ---- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts -+++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts -@@ -251,26 +251,6 @@ - regulator-name = "vcc-wifi"; - }; - --&tcon_top_hdmi_in_tcon_tv0 { -- remote-endpoint = <&tcon_tv0_out_tcon_top>; --}; -- --&tcon_top_mixer0_out_tcon_tv0 { -- remote-endpoint = <&tcon_tv0_in_tcon_top>; --}; -- --&tcon_tv0_in { -- tcon_tv0_in_tcon_top: endpoint { -- remote-endpoint = <&tcon_top_mixer0_out_tcon_tv0>; -- }; --}; -- --&tcon_tv0_out { -- tcon_tv0_out_tcon_top: endpoint { -- remote-endpoint = <&tcon_top_hdmi_in_tcon_tv0>; -- }; --}; -- - &uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_pb_pins>; -diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi -index 6b4fe8eeee99..e5c7e4804384 100644 ---- a/arch/arm/boot/dts/sun8i-r40.dtsi -+++ b/arch/arm/boot/dts/sun8i-r40.dtsi -@@ -601,10 +601,12 @@ - - tcon_top_mixer0_out_tcon_tv0: endpoint@2 { - reg = <2>; -+ remote-endpoint = <&tcon_tv0_in_tcon_top_mixer0>; - }; - - tcon_top_mixer0_out_tcon_tv1: endpoint@3 { - reg = <3>; -+ remote-endpoint = <&tcon_tv1_in_tcon_top_mixer0>; - }; - }; - -@@ -634,10 +636,12 @@ - - tcon_top_mixer1_out_tcon_tv0: endpoint@2 { - reg = <2>; -+ remote-endpoint = <&tcon_tv0_in_tcon_top_mixer1>; - }; - - tcon_top_mixer1_out_tcon_tv1: endpoint@3 { - reg = <3>; -+ remote-endpoint = <&tcon_tv1_in_tcon_top_mixer1>; - }; - }; - -@@ -648,10 +652,12 @@ - - tcon_top_hdmi_in_tcon_tv0: endpoint@0 { - reg = <0>; -+ remote-endpoint = <&tcon_tv0_out_tcon_top>; - }; - - tcon_top_hdmi_in_tcon_tv1: endpoint@1 { - reg = <1>; -+ remote-endpoint = <&tcon_tv1_out_tcon_top>; - }; - }; - -@@ -679,11 +685,30 @@ - #size-cells = <0>; - - tcon_tv0_in: port@0 { -+ #address-cells = <1>; -+ #size-cells = <0>; - reg = <0>; -+ -+ tcon_tv0_in_tcon_top_mixer0: endpoint@0 { -+ reg = <0>; -+ remote-endpoint = <&tcon_top_mixer0_out_tcon_tv0>; -+ }; -+ -+ tcon_tv0_in_tcon_top_mixer1: endpoint@1 { -+ reg = <1>; -+ remote-endpoint = <&tcon_top_mixer1_out_tcon_tv0>; -+ }; - }; - - tcon_tv0_out: port@1 { -+ #address-cells = <1>; -+ #size-cells = <0>; - reg = <1>; -+ -+ tcon_tv0_out_tcon_top: endpoint@1 { -+ reg = <1>; -+ remote-endpoint = <&tcon_top_hdmi_in_tcon_tv0>; -+ }; - }; - }; - }; -@@ -702,11 +727,30 @@ - #size-cells = <0>; - - tcon_tv1_in: port@0 { -+ #address-cells = <1>; -+ #size-cells = <0>; - reg = <0>; -+ -+ tcon_tv1_in_tcon_top_mixer0: endpoint@0 { -+ reg = <0>; -+ remote-endpoint = <&tcon_top_mixer0_out_tcon_tv1>; -+ }; -+ -+ tcon_tv1_in_tcon_top_mixer1: endpoint@1 { -+ reg = <1>; -+ remote-endpoint = <&tcon_top_mixer1_out_tcon_tv1>; -+ }; - }; - - tcon_tv1_out: port@1 { -+ #address-cells = <1>; -+ #size-cells = <0>; - reg = <1>; -+ -+ tcon_tv1_out_tcon_top: endpoint@1 { -+ reg = <1>; -+ remote-endpoint = <&tcon_top_hdmi_in_tcon_tv1>; -+ }; - }; - }; - }; -diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts -index 737cf01b1acd..c39b9169ea64 100644 ---- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts -+++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts -@@ -251,6 +251,10 @@ - regulator-name = "vcc-wifi"; - }; - -+&tcon_tv0 { -+ status = "okay"; -+}; -+ - &uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_pb_pins>; -diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi -index e5c7e4804384..e2cbd4f645c5 100644 ---- a/arch/arm/boot/dts/sun8i-r40.dtsi -+++ b/arch/arm/boot/dts/sun8i-r40.dtsi -@@ -679,6 +679,7 @@ - clock-names = "ahb", "tcon-ch1"; - resets = <&ccu RST_BUS_TCON_TV0>; - reset-names = "lcd"; -+ status = "disabled"; - - ports { - #address-cells = <1>; -@@ -721,6 +722,7 @@ - clock-names = "ahb", "tcon-ch1"; - resets = <&ccu RST_BUS_TCON_TV1>; - reset-names = "lcd"; -+ status = "disabled"; - - ports { - #address-cells = <1>; -diff --git a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c -index c09b15b64192..78795d6cb174 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c -+++ b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c -@@ -87,34 +87,6 @@ int sun8i_tcon_top_de_config(struct device *dev, int mixer, int tcon) - } - EXPORT_SYMBOL(sun8i_tcon_top_de_config); - --static int sun8i_tcon_top_get_connected_ep_id(struct device_node *node, -- int port_id) --{ -- struct device_node *ep, *remote, *port; -- struct of_endpoint endpoint; -- -- port = of_graph_get_port_by_id(node, port_id); -- if (!port) -- return -ENOENT; -- -- for_each_available_child_of_node(port, ep) { -- remote = of_graph_get_remote_port_parent(ep); -- if (!remote) -- continue; -- -- if (of_device_is_available(remote)) { -- of_graph_parse_endpoint(ep, &endpoint); -- -- of_node_put(remote); -- -- return endpoint.id; -- } -- -- of_node_put(remote); -- } -- -- return -ENOENT; --} - - static struct clk_hw *sun8i_tcon_top_register_gate(struct device *dev, - const char *parent, -@@ -149,11 +121,9 @@ static int sun8i_tcon_top_bind(struct device *dev, struct device *master, - struct platform_device *pdev = to_platform_device(dev); - struct clk_hw_onecell_data *clk_data; - struct sun8i_tcon_top *tcon_top; -- bool mixer0_unused = false; - struct resource *res; - void __iomem *regs; -- int ret, i, id; -- u32 val; -+ int ret, i; - - tcon_top = devm_kzalloc(dev, sizeof(*tcon_top), GFP_KERNEL); - if (!tcon_top) -@@ -198,49 +168,12 @@ static int sun8i_tcon_top_bind(struct device *dev, struct device *master, - goto err_assert_reset; - } - -- val = 0; -- -- /* check if HDMI mux output is connected */ -- if (sun8i_tcon_top_get_connected_ep_id(dev->of_node, 5) >= 0) { -- /* find HDMI input endpoint id, if it is connected at all*/ -- id = sun8i_tcon_top_get_connected_ep_id(dev->of_node, 4); -- if (id >= 0) -- val = FIELD_PREP(TCON_TOP_HDMI_SRC_MSK, id + 1); -- else -- DRM_DEBUG_DRIVER("TCON TOP HDMI input is not connected\n"); -- } else { -- DRM_DEBUG_DRIVER("TCON TOP HDMI output is not connected\n"); -- } -- -- writel(val, regs + TCON_TOP_GATE_SRC_REG); -- -- val = 0; -- -- /* process mixer0 mux output */ -- id = sun8i_tcon_top_get_connected_ep_id(dev->of_node, 1); -- if (id >= 0) { -- val = FIELD_PREP(TCON_TOP_PORT_DE0_MSK, id); -- } else { -- DRM_DEBUG_DRIVER("TCON TOP mixer0 output is not connected\n"); -- mixer0_unused = true; -- } -- -- /* process mixer1 mux output */ -- id = sun8i_tcon_top_get_connected_ep_id(dev->of_node, 3); -- if (id >= 0) { -- val |= FIELD_PREP(TCON_TOP_PORT_DE1_MSK, id); -- -- /* -- * mixer0 mux has priority over mixer1 mux. We have to -- * make sure mixer0 doesn't overtake TCON from mixer1. -- */ -- if (mixer0_unused && id == 0) -- val |= FIELD_PREP(TCON_TOP_PORT_DE0_MSK, 1); -- } else { -- DRM_DEBUG_DRIVER("TCON TOP mixer1 output is not connected\n"); -- } -- -- writel(val, regs + TCON_TOP_PORT_SEL_REG); -+ /* -+ * Default register values might have some reserved bits set, which -+ * prevents TCON TOP from working properly. Set them to 0 here. -+ */ -+ writel(0, regs + TCON_TOP_GATE_SRC_REG); -+ writel(0, regs + TCON_TOP_PORT_SEL_REG); - - /* - * TCON TOP has two muxes, which select parent clock for each TCON TV -diff --git a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -index 7e2451396a28..f8773ecb7525 100644 ---- a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -+++ b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt -@@ -101,9 +101,9 @@ DWC HDMI PHY - - Required properties: - - compatible: value must be one of: -- * allwinner,sun50i-a64-hdmi-phy - * allwinner,sun8i-a83t-hdmi-phy - * allwinner,sun8i-h3-hdmi-phy -+ * allwinner,sun50i-a64-hdmi-phy - - reg: base address and size of memory-mapped region - - clocks: phandles to the clocks feeding the HDMI PHY - * bus: the HDMI PHY interface clock diff --git a/patch/kernel/sunxi-dev/board-a64-pinebook-add-device.patch b/patch/kernel/sunxi-dev/board-a64-pinebook-add-device.patch deleted file mode 100644 index 9eb73687e..000000000 --- a/patch/kernel/sunxi-dev/board-a64-pinebook-add-device.patch +++ /dev/null @@ -1,280 +0,0 @@ -diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile -index c0f444e..3c032fb 100644 ---- a/arch/arm64/boot/dts/allwinner/Makefile -+++ b/arch/arm64/boot/dts/allwinner/Makefile -@@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-nanopi-a64.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-olinuxino.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-orangepi-win.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pine64-plus.dtb sun50i-a64-pine64.dtb -+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinebook.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb - dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-prime.dtb -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts -new file mode 100644 -index 00000000..07fc30ba ---- /dev/null -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts -@@ -0,0 +1,261 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (C) 2017 Icenowy Zheng -+ * Copyright (C) 2018 Vasily Khoruzhick -+ * -+ */ -+ -+/dts-v1/; -+ -+#include "sun50i-a64.dtsi" -+ -+#include -+#include -+#include -+ -+/ { -+ model = "Pinebook"; -+ compatible = "pine64,pinebook", "allwinner,sun50i-a64"; -+ -+ aliases { -+ serial0 = &uart0; -+ ethernet0 = &rtl8723cs; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ -+ framebuffer-lcd { -+ panel-supply = <®_dc1sw>; -+ dvdd25-supply = <®_dldo2>; -+ dvdd12-supply = <®_fldo1>; -+ }; -+ }; -+ -+ gpio_keys { -+ compatible = "gpio-keys"; -+ -+ lid_switch { -+ label = "Lid Switch"; -+ gpios = <&r_pio 0 12 GPIO_ACTIVE_LOW>; /* PL12 */ -+ linux,input-type = ; -+ linux,code = ; -+ linux,can-disable; -+ wakeup-source; -+ }; -+ }; -+ -+ reg_vcc3v3: vcc3v3 { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc3v3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ }; -+ -+ wifi_pwrseq: wifi_pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ -+ }; -+}; -+ -+&ehci0 { -+ phys = <&usbphy 0>; -+ phy-names = "usb"; -+ status = "okay"; -+}; -+ -+&ehci1 { -+ status = "okay"; -+}; -+ -+&mmc0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc0_pins>; -+ vmmc-supply = <®_dcdc1>; -+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; -+ cd-inverted; -+ disable-wp; -+ bus-width = <4>; -+ status = "okay"; -+}; -+ -+&mmc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc1_pins>; -+ vmmc-supply = <®_dldo4>; -+ vqmmc-supply = <®_eldo1>; -+ mmc-pwrseq = <&wifi_pwrseq>; -+ bus-width = <4>; -+ non-removable; -+ status = "okay"; -+ -+ rtl8723cs: wifi@1 { -+ reg = <1>; -+ }; -+}; -+ -+&mmc2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&mmc2_pins>; -+ vmmc-supply = <®_dcdc1>; -+ vqmmc-supply = <®_eldo1>; -+ bus-width = <8>; -+ non-removable; -+ cap-mmc-hw-reset; -+ mmc-hs200-1_8v; -+ status = "okay"; -+}; -+ -+&ohci0 { -+ phys = <&usbphy 0>; -+ phy-names = "usb"; -+ status = "okay"; -+}; -+ -+&ohci1 { -+ status = "okay"; -+}; -+ -+&r_rsb { -+ status = "okay"; -+ -+ axp803: pmic@3a3 { -+ compatible = "x-powers,axp803"; -+ reg = <0x3a3>; -+ interrupt-parent = <&r_intc>; -+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; -+ }; -+}; -+ -+#include "axp803.dtsi" -+ -+®_aldo1 { -+ regulator-min-microvolt = <2800000>; -+ regulator-max-microvolt = <2800000>; -+ regulator-name = "vcc-csi"; -+}; -+ -+®_aldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-pl"; -+}; -+ -+®_aldo3 { -+ regulator-always-on; -+ regulator-min-microvolt = <2700000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-pll-avcc"; -+}; -+ -+®_dc1sw { -+ regulator-name = "vcc-lcd"; -+}; -+ -+®_dcdc1 { -+ regulator-always-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-3v3"; -+}; -+ -+®_dcdc2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1300000>; -+ regulator-name = "vdd-cpux"; -+}; -+ -+/* DCDC3 is polyphased with DCDC2 */ -+ -+®_dcdc5 { -+ regulator-always-on; -+ regulator-min-microvolt = <1200000>; -+ regulator-max-microvolt = <1200000>; -+ regulator-name = "vcc-dram"; -+}; -+ -+®_dcdc6 { -+ regulator-always-on; -+ regulator-min-microvolt = <1100000>; -+ regulator-max-microvolt = <1100000>; -+ regulator-name = "vdd-sys"; -+}; -+ -+®_dldo1 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-hdmi"; -+}; -+ -+®_dldo2 { -+ regulator-min-microvolt = <2500000>; -+ regulator-max-microvolt = <2500000>; -+ regulator-name = "vcc-edp"; -+}; -+ -+®_dldo3 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "avdd-csi"; -+}; -+ -+®_dldo4 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-wifi"; -+}; -+ -+®_eldo1 { -+ regulator-always-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-name = "cpvdd"; -+}; -+ -+®_eldo3 { -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-name = "vdd-1v8-csi"; -+}; -+ -+®_fldo1 { -+ regulator-min-microvolt = <1200000>; -+ regulator-max-microvolt = <1200000>; -+ regulator-name = "vcc-1v2-hsic"; -+}; -+ -+®_fldo2 { -+ regulator-always-on; -+ regulator-min-microvolt = <1100000>; -+ regulator-max-microvolt = <1100000>; -+ regulator-name = "vdd-cpus"; -+}; -+ -+®_ldo_io0 { -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-name = "vcc-usb"; -+ status = "okay"; -+}; -+ -+®_rtc_ldo { -+ regulator-name = "vcc-rtc"; -+}; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_pins_a>; -+ status = "okay"; -+}; -+ -+&usb_otg { -+ dr_mode = "host"; -+}; -+ -+&usbphy { -+ usb0_vbus-supply = <®_ldo_io0>; -+ usb1_vbus-supply = <®_ldo_io0>; -+ status = "okay"; -+}; -\ No newline at end of file diff --git a/patch/kernel/sunxi-dev/board-a64-teres-I-DLDO3-s-name-to-start-with-vdd.patch b/patch/kernel/sunxi-dev/board-a64-teres-I-DLDO3-s-name-to-start-with-vdd.patch deleted file mode 100644 index 52aefdece..000000000 --- a/patch/kernel/sunxi-dev/board-a64-teres-I-DLDO3-s-name-to-start-with-vdd.patch +++ /dev/null @@ -1,56 +0,0 @@ -Subject: [PATCH 1/2] arm64: allwinner: a64: change TERES-I DLDO3's name to start with "vdd" - -Originally the name of the DLDO3 regulator on TERES-I is "eDP12", which -is not consistent with other regulator names. - -Change it to "vdd-edp", in order to make it more consistent. - -Signed-off-by: Icenowy Zheng ---- - arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts -index d9baab3dc96b..02fecc42440c 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts -@@ -210,7 +210,7 @@ - ®_dldo3 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; -- regulator-name = "eDP12"; -+ regulator-name = "vdd-edp"; - }; - - ®_dldo4 { - -Subject: [PATCH 2/2] arm64: allwinner: a64: allow laptops to wake up from lid - -Currently all ARM kernels will have s2idle enabled if CONFIG_SUSPEND is -present. In this case if the lid is closed, systemd-logind will enter -s2idle mode by default; however there's no possible wakeup source -defined, so the system will enter a forever idle. - -Add the lid itself as a wakeup source, thus the system can wakeup when -the lid is opened. - -Signed-off-by: Icenowy Zheng ---- -This patch is not related with the first patch, and have no dependency. - - arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 1 + - arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts -index 02fecc42440c..33f78e745815 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts -@@ -38,6 +38,7 @@ - gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */ - linux,input-type = ; - linux,code = ; -+ wakeup-source; - }; - }; - diff --git a/patch/kernel/sunxi-dev/board-pine-h6-pine-h6-0007-mmc-sunxi-add-support-for-the-MMC-controller-on-H6.patch b/patch/kernel/sunxi-dev/board-pine-h6-pine-h6-0007-mmc-sunxi-add-support-for-the-MMC-controller-on-H6.patch.1 similarity index 100% rename from patch/kernel/sunxi-dev/board-pine-h6-pine-h6-0007-mmc-sunxi-add-support-for-the-MMC-controller-on-H6.patch rename to patch/kernel/sunxi-dev/board-pine-h6-pine-h6-0007-mmc-sunxi-add-support-for-the-MMC-controller-on-H6.patch.1 diff --git a/patch/kernel/sunxi-dev/board-pine-h6-pine-h6-0008-arm64-allwinner-h6-add-device-tree-nodes-for-MMC-con.patch b/patch/kernel/sunxi-dev/board-pine-h6-pine-h6-0008-arm64-allwinner-h6-add-device-tree-nodes-for-MMC-con.patch.1 similarity index 100% rename from patch/kernel/sunxi-dev/board-pine-h6-pine-h6-0008-arm64-allwinner-h6-add-device-tree-nodes-for-MMC-con.patch rename to patch/kernel/sunxi-dev/board-pine-h6-pine-h6-0008-arm64-allwinner-h6-add-device-tree-nodes-for-MMC-con.patch.1 diff --git a/patch/kernel/sunxi-dev/board-pine-h6-pine-h6-0008-arm64-allwinner-h6-add-missing-mmc-pins.patch b/patch/kernel/sunxi-dev/board-pine-h6-pine-h6-0008-arm64-allwinner-h6-add-missing-mmc-pins.patch new file mode 100644 index 000000000..be7c9ff38 --- /dev/null +++ b/patch/kernel/sunxi-dev/board-pine-h6-pine-h6-0008-arm64-allwinner-h6-add-missing-mmc-pins.patch @@ -0,0 +1,19 @@ +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +index fd6681ab9..89e0837d7 100644 +--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +@@ -216,6 +216,14 @@ + bias-pull-up; + }; + ++ mmc1_pins: mmc1-pins { ++ pins = "PG0", "PG1", "PG2", "PG3", ++ "PG4", "PG5"; ++ function = "mmc1"; ++ drive-strength = <30>; ++ bias-pull-up; ++ }; ++ + mmc2_pins: mmc2-pins { + pins = "PC1", "PC4", "PC5", "PC6", + "PC7", "PC8", "PC9", "PC10", diff --git a/patch/kernel/sunxi-dev/camera-add-support-for-allwinner-CSI-with-tiny-fix.patch b/patch/kernel/sunxi-dev/camera-add-support-for-allwinner-CSI-with-tiny-fix.patch index d90fbdf4b..8ca076b9e 100644 --- a/patch/kernel/sunxi-dev/camera-add-support-for-allwinner-CSI-with-tiny-fix.patch +++ b/patch/kernel/sunxi-dev/camera-add-support-for-allwinner-CSI-with-tiny-fix.patch @@ -71,9 +71,9 @@ index 7f3080437be6..ace8628478ab 100644 --- a/drivers/media/platform/Makefile +++ b/drivers/media/platform/Makefile @@ -95,3 +95,5 @@ obj-$(CONFIG_VIDEO_QCOM_CAMSS) += qcom/camss-8x16/ - obj-$(CONFIG_VIDEO_QCOM_VENUS) += qcom/venus/ - obj-y += meson/ + + obj-y += cros-ec-cec/ + +obj-$(CONFIG_VIDEO_SUN6I_CSI) += sunxi/sun6i-csi/ diff --git a/drivers/media/platform/sunxi/sun6i-csi/Kconfig b/drivers/media/platform/sunxi/sun6i-csi/Kconfig diff --git a/patch/kernel/sunxi-dev/general-aufs4.18-20180820.patch b/patch/kernel/sunxi-dev/general-aufs4.19-20181029.patch similarity index 96% rename from patch/kernel/sunxi-dev/general-aufs4.18-20180820.patch rename to patch/kernel/sunxi-dev/general-aufs4.19-20181029.patch index 014aa7431..f11b030b2 100644 --- a/patch/kernel/sunxi-dev/general-aufs4.18-20180820.patch +++ b/patch/kernel/sunxi-dev/general-aufs4.19-20181029.patch @@ -1,6 +1,6 @@ diff --git a/Documentation/ABI/testing/debugfs-aufs b/Documentation/ABI/testing/debugfs-aufs new file mode 100644 -index 00000000..4a669419 +index 000000000..4a6694194 --- /dev/null +++ b/Documentation/ABI/testing/debugfs-aufs @@ -0,0 +1,55 @@ @@ -61,7 +61,7 @@ index 00000000..4a669419 + will be empty. About XINO files, see the aufs manual. diff --git a/Documentation/ABI/testing/sysfs-aufs b/Documentation/ABI/testing/sysfs-aufs new file mode 100644 -index 00000000..82f95184 +index 000000000..82f951849 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-aufs @@ -0,0 +1,31 @@ @@ -98,10 +98,10 @@ index 00000000..82f95184 + will be empty. About XINO files, see the aufs manual. diff --git a/Documentation/filesystems/aufs/README b/Documentation/filesystems/aufs/README new file mode 100644 -index 00000000..013ea14d +index 000000000..79eb50ae0 --- /dev/null +++ b/Documentation/filesystems/aufs/README -@@ -0,0 +1,393 @@ +@@ -0,0 +1,394 @@ + +Aufs4 -- advanced multi layered unification filesystem version 4.x +http://aufs.sf.net @@ -478,6 +478,7 @@ index 00000000..013ea14d +OmegaPhil made a donation (2016/1, 2018/4). +Tomasz Szewczyk made a donation (2016/4). +James Burry made a donation (2016/12). ++Carsten Rose made a donation (2018/9). + +Thank you very much. +Donations are always, including future donations, very important and @@ -497,7 +498,7 @@ index 00000000..013ea14d +# End: ; diff --git a/Documentation/filesystems/aufs/design/01intro.txt b/Documentation/filesystems/aufs/design/01intro.txt new file mode 100644 -index 00000000..aa105298 +index 000000000..aa1052982 --- /dev/null +++ b/Documentation/filesystems/aufs/design/01intro.txt @@ -0,0 +1,171 @@ @@ -674,7 +675,7 @@ index 00000000..aa105298 +about it. But currently I have implemented it in kernel space. diff --git a/Documentation/filesystems/aufs/design/02struct.txt b/Documentation/filesystems/aufs/design/02struct.txt new file mode 100644 -index 00000000..f5fb6a8a +index 000000000..f5fb6a8ad --- /dev/null +++ b/Documentation/filesystems/aufs/design/02struct.txt @@ -0,0 +1,258 @@ @@ -938,7 +939,7 @@ index 00000000..f5fb6a8a +For this purpose, use "aumvdown" command in aufs-util.git. diff --git a/Documentation/filesystems/aufs/design/03atomic_open.txt b/Documentation/filesystems/aufs/design/03atomic_open.txt new file mode 100644 -index 00000000..1b0699f8 +index 000000000..1b0699f8b --- /dev/null +++ b/Documentation/filesystems/aufs/design/03atomic_open.txt @@ -0,0 +1,85 @@ @@ -1029,7 +1030,7 @@ index 00000000..1b0699f8 + be implemented in aufs, but not all I am afraid. diff --git a/Documentation/filesystems/aufs/design/03lookup.txt b/Documentation/filesystems/aufs/design/03lookup.txt new file mode 100644 -index 00000000..80ae63bc +index 000000000..80ae63bce --- /dev/null +++ b/Documentation/filesystems/aufs/design/03lookup.txt @@ -0,0 +1,113 @@ @@ -1148,7 +1149,7 @@ index 00000000..80ae63bc + by over-mounting something (or another method). diff --git a/Documentation/filesystems/aufs/design/04branch.txt b/Documentation/filesystems/aufs/design/04branch.txt new file mode 100644 -index 00000000..0c128973 +index 000000000..0c1289737 --- /dev/null +++ b/Documentation/filesystems/aufs/design/04branch.txt @@ -0,0 +1,74 @@ @@ -1228,7 +1229,7 @@ index 00000000..0c128973 + same named entry on the upper branch. diff --git a/Documentation/filesystems/aufs/design/05wbr_policy.txt b/Documentation/filesystems/aufs/design/05wbr_policy.txt new file mode 100644 -index 00000000..cc5b7979 +index 000000000..cc5b7979c --- /dev/null +++ b/Documentation/filesystems/aufs/design/05wbr_policy.txt @@ -0,0 +1,64 @@ @@ -1298,7 +1299,7 @@ index 00000000..cc5b7979 + copyup policy. diff --git a/Documentation/filesystems/aufs/design/06dirren.dot b/Documentation/filesystems/aufs/design/06dirren.dot new file mode 100644 -index 00000000..2d62bb6d +index 000000000..2d62bb6dd --- /dev/null +++ b/Documentation/filesystems/aufs/design/06dirren.dot @@ -0,0 +1,31 @@ @@ -1335,7 +1336,7 @@ index 00000000..2d62bb6d +} diff --git a/Documentation/filesystems/aufs/design/06dirren.txt b/Documentation/filesystems/aufs/design/06dirren.txt new file mode 100644 -index 00000000..1f3cb86d +index 000000000..1f3cb86d9 --- /dev/null +++ b/Documentation/filesystems/aufs/design/06dirren.txt @@ -0,0 +1,102 @@ @@ -1443,7 +1444,7 @@ index 00000000..1f3cb86d +equivalen to udba=reval case. diff --git a/Documentation/filesystems/aufs/design/06fhsm.txt b/Documentation/filesystems/aufs/design/06fhsm.txt new file mode 100644 -index 00000000..ddfebecd +index 000000000..ddfebecdf --- /dev/null +++ b/Documentation/filesystems/aufs/design/06fhsm.txt @@ -0,0 +1,120 @@ @@ -1569,7 +1570,7 @@ index 00000000..ddfebecd +should restore the original file state after an error happens. diff --git a/Documentation/filesystems/aufs/design/06mmap.txt b/Documentation/filesystems/aufs/design/06mmap.txt new file mode 100644 -index 00000000..9a0a096b +index 000000000..9a0a096b1 --- /dev/null +++ b/Documentation/filesystems/aufs/design/06mmap.txt @@ -0,0 +1,72 @@ @@ -1647,7 +1648,7 @@ index 00000000..9a0a096b +I have to give up this "looks-smater" approach. diff --git a/Documentation/filesystems/aufs/design/06xattr.txt b/Documentation/filesystems/aufs/design/06xattr.txt new file mode 100644 -index 00000000..be441e8d +index 000000000..be441e8d3 --- /dev/null +++ b/Documentation/filesystems/aufs/design/06xattr.txt @@ -0,0 +1,96 @@ @@ -1749,7 +1750,7 @@ index 00000000..be441e8d +now, aufs implements the branch attributes to ignore the error. diff --git a/Documentation/filesystems/aufs/design/07export.txt b/Documentation/filesystems/aufs/design/07export.txt new file mode 100644 -index 00000000..bb700cb1 +index 000000000..bb700cb18 --- /dev/null +++ b/Documentation/filesystems/aufs/design/07export.txt @@ -0,0 +1,58 @@ @@ -1813,7 +1814,7 @@ index 00000000..bb700cb1 + lookup_one_len(), vfs_getattr(), encode_fh() and others. diff --git a/Documentation/filesystems/aufs/design/08shwh.txt b/Documentation/filesystems/aufs/design/08shwh.txt new file mode 100644 -index 00000000..1dad573f +index 000000000..1dad573f6 --- /dev/null +++ b/Documentation/filesystems/aufs/design/08shwh.txt @@ -0,0 +1,52 @@ @@ -1871,7 +1872,7 @@ index 00000000..1dad573f +initramfs will use it to replace the old one at the next boot. diff --git a/Documentation/filesystems/aufs/design/10dynop.txt b/Documentation/filesystems/aufs/design/10dynop.txt new file mode 100644 -index 00000000..710313c0 +index 000000000..710313c08 --- /dev/null +++ b/Documentation/filesystems/aufs/design/10dynop.txt @@ -0,0 +1,47 @@ @@ -1923,10 +1924,10 @@ index 00000000..710313c0 +Currently this approach is applied to address_space_operations for +regular files only. diff --git a/MAINTAINERS b/MAINTAINERS -index 2347889f..39c2b4c0 100644 +index b2f710eee..d21161917 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -2541,6 +2541,19 @@ F: include/linux/audit.h +@@ -2605,6 +2605,19 @@ F: include/linux/audit.h F: include/uapi/linux/audit.h F: kernel/audit* @@ -1947,10 +1948,10 @@ index 2347889f..39c2b4c0 100644 M: Miguel Ojeda Sandonis S: Maintained diff --git a/drivers/block/loop.c b/drivers/block/loop.c -index 4cb1d1be..5678bf8e 100644 +index ea9debf59..9e534a36c 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c -@@ -741,6 +741,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, +@@ -739,6 +739,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, return error; } @@ -1976,7 +1977,7 @@ index 4cb1d1be..5678bf8e 100644 static ssize_t loop_attr_show(struct device *dev, char *page, diff --git a/fs/Kconfig b/fs/Kconfig -index ac474a61..284cee95 100644 +index ac474a61b..284cee954 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -255,6 +255,7 @@ source "fs/pstore/Kconfig" @@ -1988,7 +1989,7 @@ index ac474a61..284cee95 100644 endif # MISC_FILESYSTEMS diff --git a/fs/Makefile b/fs/Makefile -index 293733f6..12d19d0d 100644 +index 293733f61..12d19d0de 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -128,3 +128,4 @@ obj-y += exofs/ # Multiple modules @@ -1998,7 +1999,7 @@ index 293733f6..12d19d0d 100644 +obj-$(CONFIG_AUFS_FS) += aufs/ diff --git a/fs/aufs/Kconfig b/fs/aufs/Kconfig new file mode 100644 -index 00000000..9f436425 +index 000000000..9f4364257 --- /dev/null +++ b/fs/aufs/Kconfig @@ -0,0 +1,199 @@ @@ -2203,7 +2204,7 @@ index 00000000..9f436425 +endif diff --git a/fs/aufs/Makefile b/fs/aufs/Makefile new file mode 100644 -index 00000000..2c819a64 +index 000000000..2c819a649 --- /dev/null +++ b/fs/aufs/Makefile @@ -0,0 +1,46 @@ @@ -2255,10 +2256,10 @@ index 00000000..2c819a64 +aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o diff --git a/fs/aufs/aufs.h b/fs/aufs/aufs.h new file mode 100644 -index 00000000..0e19d870 +index 000000000..245691743 --- /dev/null +++ b/fs/aufs/aufs.h -@@ -0,0 +1,61 @@ +@@ -0,0 +1,62 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -2308,6 +2309,7 @@ index 00000000..0e19d870 +#include "fstype.h" +#include "hbl.h" +#include "inode.h" ++#include "lcnt.h" +#include "loop.h" +#include "module.h" +#include "opts.h" @@ -2322,7 +2324,7 @@ index 00000000..0e19d870 +#endif /* __AUFS_H__ */ diff --git a/fs/aufs/branch.c b/fs/aufs/branch.c new file mode 100644 -index 00000000..61913f2b +index 000000000..2fc6dc1e3 --- /dev/null +++ b/fs/aufs/branch.c @@ -0,0 +1,1422 @@ @@ -2366,8 +2368,10 @@ index 00000000..61913f2b + au_dr_hino_free(&br->br_dirren); + au_xino_put(br); + -+ AuDebugOn(au_br_count(br)); -+ au_br_count_fin(br); ++ AuLCntZero(au_lcnt_read(&br->br_nfiles, /*do_rev*/0)); ++ au_lcnt_fin(&br->br_nfiles, /*do_sync*/0); ++ AuLCntZero(au_lcnt_read(&br->br_count, /*do_rev*/0)); ++ au_lcnt_fin(&br->br_count, /*do_sync*/0); + + wbr = br->br_wbr; + if (wbr) { @@ -2390,10 +2394,15 @@ index 00000000..61913f2b + break; + + /* recursive lock, s_umount of branch's */ ++ /* synchronize_rcu(); */ /* why? */ + lockdep_off(); + path_put(&br->br_path); + lockdep_on(); + kfree(wbr); ++ au_lcnt_wait_for_fin(&br->br_nfiles); ++ au_lcnt_wait_for_fin(&br->br_count); ++ /* I don't know why, but percpu_refcount requires this */ ++ /* synchronize_rcu(); */ + kfree(br); +} + @@ -2461,7 +2470,7 @@ index 00000000..61913f2b + add_branch = kzalloc(sizeof(*add_branch), GFP_NOFS); + if (unlikely(!add_branch)) + goto out; -+ add_branch->br_xino = au_xino_alloc(); ++ add_branch->br_xino = au_xino_alloc(/*nfile*/1); + if (unlikely(!add_branch->br_xino)) + goto out_br; + err = au_hnotify_init_br(add_branch, perm); @@ -2718,7 +2727,8 @@ index 00000000..61913f2b + br->br_perm = add->perm; + br->br_path = add->path; /* set first, path_get() later */ + spin_lock_init(&br->br_dykey_lock); -+ au_br_count_init(br); ++ au_lcnt_init(&br->br_nfiles, /*release*/NULL); ++ au_lcnt_init(&br->br_count, /*release*/NULL); + br->br_id = au_new_br_id(sb); + AuDebugOn(br->br_id < 0); + @@ -2735,12 +2745,12 @@ index 00000000..61913f2b + + if (au_opt_test(au_mntflags(sb), XINO)) { + brbase = au_sbr(sb, 0); -+ xf = au_xino_file(brbase); ++ xf = au_xino_file(brbase->br_xino, /*idx*/-1); + AuDebugOn(!xf); + h_inode = d_inode(add->path.dentry); + err = au_xino_init_br(sb, br, h_inode->i_ino, &xf->f_path); + if (unlikely(err)) { -+ AuDebugOn(au_xino_file(br)); ++ AuDebugOn(au_xino_file(br->br_xino, /*idx*/-1)); + goto out_err; + } + } @@ -2830,7 +2840,6 @@ index 00000000..61913f2b + struct dentry *root, *h_dentry; + struct inode *root_inode; + struct au_branch *add_branch; -+ struct file *xf; + + root = sb->s_root; + root_inode = d_inode(root); @@ -2869,19 +2878,6 @@ index 00000000..61913f2b + } else + au_add_nlink(root_inode, d_inode(h_dentry)); + -+ /* -+ * this test/set prevents aufs from handling unnecessary notify events -+ * of xino files, in case of re-adding a writable branch which was -+ * once detached from aufs. -+ */ -+ if (au_xino_brid(sb) < 0 -+ && au_br_writable(add_branch->br_perm) -+ && !au_test_fs_bad_xino(h_dentry->d_sb)) { -+ xf = au_xino_file(add_branch); -+ if (xf && xf->f_path.dentry->d_parent == h_dentry) -+ au_xino_brid_set(sb, add_branch->br_id); -+ } -+ +out: + return err; +} @@ -2920,7 +2916,10 @@ index 00000000..61913f2b +static struct file **au_farray_alloc(struct super_block *sb, + unsigned long long *max) +{ -+ *max = au_nfiles(sb); ++ struct au_sbinfo *sbi; ++ ++ sbi = au_sbi(sb); ++ *max = au_lcnt_read(&sbi->si_nfiles, /*do_rev*/1); + return au_array_alloc(max, au_farray_cb, sb, /*arg*/NULL); +} + @@ -3363,11 +3362,16 @@ index 00000000..61913f2b + AuVerbose(verbose, "no more branches left\n"); + goto out; + } ++ + br = au_sbr(sb, bindex); + AuDebugOn(!path_equal(&br->br_path, &del->h_path)); ++ if (unlikely(au_lcnt_read(&br->br_count, /*do_rev*/1))) { ++ AuVerbose(verbose, "br %pd2 is busy now\n", del->h_path.dentry); ++ goto out; ++ } + + br_id = br->br_id; -+ opened = au_br_count(br); ++ opened = au_lcnt_read(&br->br_nfiles, /*do_rev*/1); + if (unlikely(opened)) { + to_free = au_array_alloc(&opened, empty_cb, sb, NULL); + err = PTR_ERR(to_free); @@ -3424,8 +3428,6 @@ index 00000000..61913f2b + if (au_opt_test(mnt_flags, PLINK)) + au_plink_half_refresh(sb, br_id); + -+ if (au_xino_brid(sb) == br_id) -+ au_xino_brid_set(sb, -1); + goto out; /* success */ + +out_wh: @@ -3750,10 +3752,10 @@ index 00000000..61913f2b +} diff --git a/fs/aufs/branch.h b/fs/aufs/branch.h new file mode 100644 -index 00000000..4717a169 +index 000000000..2b0f58bb9 --- /dev/null +++ b/fs/aufs/branch.h -@@ -0,0 +1,374 @@ +@@ -0,0 +1,367 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -3784,6 +3786,7 @@ index 00000000..4717a169 +#include +#include "dirren.h" +#include "dynop.h" ++#include "lcnt.h" +#include "rwsem.h" +#include "super.h" + @@ -3791,7 +3794,9 @@ index 00000000..4717a169 + +/* a xino file */ +struct au_xino { -+ struct file *xi_file; ++ struct file **xi_file; ++ unsigned int xi_nfile; ++ + struct { + spinlock_t spin; + ino_t *array; @@ -3801,11 +3806,14 @@ index 00000000..4717a169 + wait_queue_head_t wqh; + } xi_nondir; + ++ struct mutex xi_mtx; /* protects xi_file array */ ++ /* reserved for future use */ ++ /* wait_queue_head_t xi_wq; */ ++ /* atomic_t xi_pending; */ ++ + atomic_t xi_truncating; + + struct kref xi_kref; -+ -+ /* todo: make xino files an array to support huge inode number */ +}; + +/* File-based Hierarchical Storage Management */ @@ -3864,7 +3872,8 @@ index 00000000..4717a169 + struct path br_path; + spinlock_t br_dykey_lock; + struct au_dykey *br_dykey[AuBrDynOp]; -+ struct percpu_counter br_count; ++ au_lcnt_t br_nfiles; /* opened files */ ++ au_lcnt_t br_count; /* in-use for other */ + + struct au_wbr *br_wbr; + struct au_br_fhsm *br_fhsm; @@ -3902,31 +3911,6 @@ index 00000000..4717a169 + return au_br_mnt(br)->mnt_sb; +} + -+static inline void au_br_get(struct au_branch *br) -+{ -+ percpu_counter_inc(&br->br_count); -+} -+ -+static inline void au_br_put(struct au_branch *br) -+{ -+ percpu_counter_dec(&br->br_count); -+} -+ -+static inline s64 au_br_count(struct au_branch *br) -+{ -+ return percpu_counter_sum(&br->br_count); -+} -+ -+static inline void au_br_count_init(struct au_branch *br) -+{ -+ percpu_counter_init(&br->br_count, 0, GFP_NOFS); -+} -+ -+static inline void au_br_count_fin(struct au_branch *br) -+{ -+ percpu_counter_destroy(&br->br_count); -+} -+ +static inline int au_br_rdonly(struct au_branch *br) +{ + return (sb_rdonly(au_br_sb(br)) @@ -3977,14 +3961,6 @@ index 00000000..4717a169 + return v; +} + -+static inline struct file *au_xino_file(struct au_branch *br) -+{ -+ struct au_xino *xi; -+ -+ xi = br->br_xino; -+ return xi ? xi->xi_file : NULL; -+} -+ +/* ---------------------------------------------------------------------- */ + +/* branch.c */ @@ -4008,9 +3984,17 @@ index 00000000..4717a169 +/* xino.c */ +static const loff_t au_loff_max = LLONG_MAX; + ++aufs_bindex_t au_xi_root(struct super_block *sb, struct dentry *dentry); +struct file *au_xino_create(struct super_block *sb, char *fpath, int silent); +struct file *au_xino_create2(struct super_block *sb, struct path *base, + struct file *copy_src); ++struct au_xi_new { ++ struct au_xino *xi; /* switch between xino and xigen */ ++ int idx; ++ struct path *base; ++ struct file *copy_src; ++}; ++struct file *au_xi_new(struct super_block *sb, struct au_xi_new *xinew); + +int au_xino_read(struct super_block *sb, aufs_bindex_t bindex, ino_t h_ino, + ino_t *ino); @@ -4022,11 +4006,11 @@ index 00000000..4717a169 + size_t size, loff_t *pos); + +int au_xib_trunc(struct super_block *sb); -+int au_xino_trunc(struct super_block *sb, aufs_bindex_t bindex); ++int au_xino_trunc(struct super_block *sb, aufs_bindex_t bindex, int idx_begin); + -+struct au_xino *au_xino_alloc(void); ++struct au_xino *au_xino_alloc(unsigned int nfile); +int au_xino_put(struct au_branch *br); -+void au_xino_file_set(struct au_branch *br, struct file *file); ++struct file *au_xino_file1(struct au_xino *xi); + +struct au_opt_xino; +void au_xino_clr(struct super_block *sb); @@ -4047,6 +4031,27 @@ index 00000000..4717a169 + +/* ---------------------------------------------------------------------- */ + ++/* @idx is signed to accept -1 meaning the first file */ ++static inline struct file *au_xino_file(struct au_xino *xi, int idx) ++{ ++ struct file *file; ++ ++ file = NULL; ++ if (!xi) ++ goto out; ++ ++ if (idx >= 0) { ++ if (idx < xi->xi_nfile) ++ file = xi->xi_file[idx]; ++ } else ++ file = au_xino_file1(xi); ++ ++out: ++ return file; ++} ++ ++/* ---------------------------------------------------------------------- */ ++ +/* Superblock to branch */ +static inline +aufs_bindex_t au_sbr_id(struct super_block *sb, aufs_bindex_t bindex) @@ -4066,16 +4071,6 @@ index 00000000..4717a169 + return au_br_sb(au_sbr(sb, bindex)); +} + -+static inline void au_sbr_get(struct super_block *sb, aufs_bindex_t bindex) -+{ -+ au_br_get(au_sbr(sb, bindex)); -+} -+ -+static inline void au_sbr_put(struct super_block *sb, aufs_bindex_t bindex) -+{ -+ au_br_put(au_sbr(sb, bindex)); -+} -+ +static inline int au_sbr_perm(struct super_block *sb, aufs_bindex_t bindex) +{ + return au_sbr(sb, bindex)->br_perm; @@ -4130,7 +4125,7 @@ index 00000000..4717a169 +#endif /* __AUFS_BRANCH_H__ */ diff --git a/fs/aufs/conf.mk b/fs/aufs/conf.mk new file mode 100644 -index 00000000..12782f8e +index 000000000..12782f8e0 --- /dev/null +++ b/fs/aufs/conf.mk @@ -0,0 +1,40 @@ @@ -4176,10 +4171,10 @@ index 00000000..12782f8e +-include ${srctree}/${src}/conf_priv.mk diff --git a/fs/aufs/cpup.c b/fs/aufs/cpup.c new file mode 100644 -index 00000000..93d6496a +index 000000000..a1ef90f08 --- /dev/null +++ b/fs/aufs/cpup.c -@@ -0,0 +1,1441 @@ +@@ -0,0 +1,1444 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -4629,6 +4624,7 @@ index 00000000..93d6496a + .label = &&out_src + } + }; ++ struct au_branch *br; + struct super_block *sb, *h_src_sb; + struct inode *h_src_inode; + struct task_struct *tsk = current; @@ -4666,11 +4662,13 @@ index 00000000..93d6496a + task_work_run(); + flush_delayed_fput(); + } -+ au_sbr_put(sb, file[DST].bindex); ++ br = au_sbr(sb, file[DST].bindex); ++ au_lcnt_dec(&br->br_nfiles); + +out_src: + fput(file[SRC].file); -+ au_sbr_put(sb, file[SRC].bindex); ++ br = au_sbr(sb, file[SRC].bindex); ++ au_lcnt_dec(&br->br_nfiles); +out: + return err; +} @@ -4802,7 +4800,7 @@ index 00000000..93d6496a + + /* + * strange behaviour from the users view, -+ * particularry setattr case ++ * particularly setattr case + */ + dir = d_inode(dst_parent); + if (au_ibtop(dir) == cpg->bdst) @@ -4963,7 +4961,7 @@ index 00000000..93d6496a + * in link/rename cases, @dst_parent may be different from the real one. + * basic->bsrc can be larger than basic->bdst. + * aufs doesn't touch the credential so -+ * security_inode_copy_up{,_xattr}() are unnecrssary. ++ * security_inode_copy_up{,_xattr}() are unnecessary. + */ +static int au_cpup_single(struct au_cp_generic *cpg, struct dentry *dst_parent) +{ @@ -4974,7 +4972,7 @@ index 00000000..93d6496a + struct inode *dst_inode, *h_dir, *inode, *delegated, *src_inode; + struct super_block *sb; + struct au_branch *br; -+ /* to reuduce stack size */ ++ /* to reduce stack size */ + struct { + struct au_dtime dt; + struct path h_path; @@ -5623,7 +5621,7 @@ index 00000000..93d6496a +} diff --git a/fs/aufs/cpup.h b/fs/aufs/cpup.h new file mode 100644 -index 00000000..0faad688 +index 000000000..0faad688b --- /dev/null +++ b/fs/aufs/cpup.h @@ -0,0 +1,100 @@ @@ -5729,10 +5727,10 @@ index 00000000..0faad688 +#endif /* __AUFS_CPUP_H__ */ diff --git a/fs/aufs/dbgaufs.c b/fs/aufs/dbgaufs.c new file mode 100644 -index 00000000..f269ff5e +index 000000000..13872925a --- /dev/null +++ b/fs/aufs/dbgaufs.c -@@ -0,0 +1,478 @@ +@@ -0,0 +1,519 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -5818,7 +5816,6 @@ index 00000000..f269ff5e + +out: + return err; -+ +} + +static ssize_t dbgaufs_xi_read(struct file *file, char __user *buf, @@ -5953,38 +5950,61 @@ index 00000000..f269ff5e + +static int dbgaufs_xino_open(struct inode *inode, struct file *file) +{ -+ int err; ++ int err, idx; + long l; ++ aufs_bindex_t bindex; ++ char *p, a[sizeof(DbgaufsXi_PREFIX) + 8]; + struct au_sbinfo *sbinfo; + struct super_block *sb; ++ struct au_xino *xi; + struct file *xf; + struct qstr *name; + struct au_branch *br; + + err = -ENOENT; -+ xf = NULL; + name = &file->f_path.dentry->d_name; + if (unlikely(name->len < sizeof(DbgaufsXi_PREFIX) + || memcmp(name->name, DbgaufsXi_PREFIX, + sizeof(DbgaufsXi_PREFIX) - 1))) + goto out; -+ err = kstrtol(name->name + sizeof(DbgaufsXi_PREFIX) - 1, 10, &l); ++ ++ AuDebugOn(name->len >= sizeof(a)); ++ memcpy(a, name->name, name->len); ++ a[name->len] = '\0'; ++ p = strchr(a, '-'); ++ if (p) ++ *p = '\0'; ++ err = kstrtol(a + sizeof(DbgaufsXi_PREFIX) - 1, 10, &l); + if (unlikely(err)) + goto out; ++ bindex = l; ++ idx = 0; ++ if (p) { ++ err = kstrtol(p + 1, 10, &l); ++ if (unlikely(err)) ++ goto out; ++ idx = l; ++ } + ++ err = -ENOENT; + sbinfo = inode->i_private; + sb = sbinfo->si_sb; + si_noflush_read_lock(sb); -+ if (l <= au_sbbot(sb)) { -+ br = au_sbr(sb, (aufs_bindex_t)l); -+ xf = au_xino_file(br); ++ if (unlikely(bindex < 0 || bindex > au_sbbot(sb))) ++ goto out_si; ++ br = au_sbr(sb, bindex); ++ xi = br->br_xino; ++ if (unlikely(idx >= xi->xi_nfile)) ++ goto out_si; ++ xf = au_xino_file(xi, idx); ++ if (xf) + err = dbgaufs_xi_open(xf, file, /*do_fcnt*/1, + au_xino_count(br)); -+ } else -+ err = -ENOENT; -+ si_read_unlock(sb); + ++out_si: ++ si_read_unlock(sb); +out: ++ AuTraceErr(err); + return err; +} + @@ -6025,14 +6045,20 @@ index 00000000..f269ff5e + } +} + -+static void dbgaufs_br_add(struct super_block *sb, aufs_bindex_t bindex, -+ struct dentry *parent, struct au_sbinfo *sbinfo) ++static void dbgaufs_br_do_add(struct super_block *sb, aufs_bindex_t bindex, ++ unsigned int idx, struct dentry *parent, ++ struct au_sbinfo *sbinfo) +{ + struct au_branch *br; + struct dentry *d; -+ char name[sizeof(DbgaufsXi_PREFIX) + 5]; /* "xi" bindex NULL */ ++ /* "xi" bindex(5) "-" idx(2) NULL */ ++ char name[sizeof(DbgaufsXi_PREFIX) + 8]; + -+ snprintf(name, sizeof(name), DbgaufsXi_PREFIX "%d", bindex); ++ if (!idx) ++ snprintf(name, sizeof(name), DbgaufsXi_PREFIX "%d", bindex); ++ else ++ snprintf(name, sizeof(name), DbgaufsXi_PREFIX "%d-%u", ++ bindex, idx); + br = au_sbr(sb, bindex); + if (br->br_dbgaufs) { + struct qstr qstr = QSTR_INIT(name, strlen(name)); @@ -6053,11 +6079,24 @@ index 00000000..f269ff5e + sbinfo, &dbgaufs_xino_fop); + lockdep_on(); + if (unlikely(!br->br_dbgaufs)) -+ pr_warn("failed creaiting %pd/%s, ignored.\n", ++ pr_warn("failed creating %pd/%s, ignored.\n", + parent, name); + } +} + ++static void dbgaufs_br_add(struct super_block *sb, aufs_bindex_t bindex, ++ struct dentry *parent, struct au_sbinfo *sbinfo) ++{ ++ struct au_branch *br; ++ struct au_xino *xi; ++ unsigned int u; ++ ++ br = au_sbr(sb, bindex); ++ xi = br->br_xino; ++ for (u = 0; u < xi->xi_nfile; u++) ++ dbgaufs_br_do_add(sb, bindex, u, parent, sbinfo); ++} ++ +void dbgaufs_brs_add(struct super_block *sb, aufs_bindex_t bindex, int topdown) +{ + struct au_sbinfo *sbinfo; @@ -6213,7 +6252,7 @@ index 00000000..f269ff5e +} diff --git a/fs/aufs/dbgaufs.h b/fs/aufs/dbgaufs.h new file mode 100644 -index 00000000..59d7b9d0 +index 000000000..59d7b9d08 --- /dev/null +++ b/fs/aufs/dbgaufs.h @@ -0,0 +1,53 @@ @@ -6272,7 +6311,7 @@ index 00000000..59d7b9d0 +#endif /* __DBGAUFS_H__ */ diff --git a/fs/aufs/dcsub.c b/fs/aufs/dcsub.c new file mode 100644 -index 00000000..b3082881 +index 000000000..b30828810 --- /dev/null +++ b/fs/aufs/dcsub.c @@ -0,0 +1,225 @@ @@ -6503,7 +6542,7 @@ index 00000000..b3082881 +} diff --git a/fs/aufs/dcsub.h b/fs/aufs/dcsub.h new file mode 100644 -index 00000000..c610133d +index 000000000..c610133de --- /dev/null +++ b/fs/aufs/dcsub.h @@ -0,0 +1,137 @@ @@ -6646,10 +6685,10 @@ index 00000000..c610133d +#endif /* __AUFS_DCSUB_H__ */ diff --git a/fs/aufs/debug.c b/fs/aufs/debug.c new file mode 100644 -index 00000000..5cbd936d +index 000000000..51b978b0e --- /dev/null +++ b/fs/aufs/debug.c -@@ -0,0 +1,441 @@ +@@ -0,0 +1,440 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -6952,13 +6991,14 @@ index 00000000..5cbd936d + if (!sb || IS_ERR(sb)) + goto out; + -+ dpri("s%d: {perm 0x%x, id %d, cnt %lld, wbr %p}, " ++ dpri("s%d: {perm 0x%x, id %d, wbr %p}, " + "%s, dev 0x%02x%02x, flags 0x%lx, cnt %d, active %d, " + "xino %d\n", -+ bindex, br->br_perm, br->br_id, au_br_count(br), -+ br->br_wbr, au_sbtype(sb), MAJOR(sb->s_dev), MINOR(sb->s_dev), ++ bindex, br->br_perm, br->br_id, br->br_wbr, ++ au_sbtype(sb), MAJOR(sb->s_dev), MINOR(sb->s_dev), + sb->s_flags, sb->s_count, -+ atomic_read(&sb->s_active), !!au_xino_file(br)); ++ atomic_read(&sb->s_active), ++ !!au_xino_file(br->br_xino, /*idx*/-1)); + return 0; + +out: @@ -6971,7 +7011,7 @@ index 00000000..5cbd936d + struct au_sbinfo *sbinfo; + aufs_bindex_t bindex; + int err; -+ /* to reuduce stack size */ ++ /* to reduce stack size */ + struct { + struct vfsmount mnt; + struct au_branch fake; @@ -6986,9 +7026,7 @@ index 00000000..5cbd936d + + a->mnt.mnt_sb = sb; + a->fake.br_path.mnt = &a->mnt; -+ au_br_count_init(&a->fake); + err = do_pri_br(-1, &a->fake); -+ au_br_count_fin(&a->fake); + kfree(a); + dpri("dev 0x%x\n", sb->s_dev); + if (err || !au_test_aufs(sb)) @@ -7093,7 +7131,7 @@ index 00000000..5cbd936d +} diff --git a/fs/aufs/debug.h b/fs/aufs/debug.h new file mode 100644 -index 00000000..b80bb5a9 +index 000000000..b80bb5a9a --- /dev/null +++ b/fs/aufs/debug.h @@ -0,0 +1,226 @@ @@ -7325,7 +7363,7 @@ index 00000000..b80bb5a9 +#endif /* __AUFS_DEBUG_H__ */ diff --git a/fs/aufs/dentry.c b/fs/aufs/dentry.c new file mode 100644 -index 00000000..a245117f +index 000000000..79761eae9 --- /dev/null +++ b/fs/aufs/dentry.c @@ -0,0 +1,1153 @@ @@ -7939,7 +7977,7 @@ index 00000000..a245117f + if (d_really_is_positive(dentry)) + inode = d_inode(dentry); + if (!orig_h.inode) { -+ AuDbg("nagative originally\n"); ++ AuDbg("negative originally\n"); + if (inode) { + au_hide(dentry); + goto out; @@ -8484,7 +8522,7 @@ index 00000000..a245117f +}; diff --git a/fs/aufs/dentry.h b/fs/aufs/dentry.h new file mode 100644 -index 00000000..adc2ac99 +index 000000000..adc2ac997 --- /dev/null +++ b/fs/aufs/dentry.h @@ -0,0 +1,267 @@ @@ -8757,7 +8795,7 @@ index 00000000..adc2ac99 +#endif /* __AUFS_DENTRY_H__ */ diff --git a/fs/aufs/dinfo.c b/fs/aufs/dinfo.c new file mode 100644 -index 00000000..7e56fe74 +index 000000000..7e56fe742 --- /dev/null +++ b/fs/aufs/dinfo.c @@ -0,0 +1,554 @@ @@ -9317,10 +9355,10 @@ index 00000000..7e56fe74 +} diff --git a/fs/aufs/dir.c b/fs/aufs/dir.c new file mode 100644 -index 00000000..7f386bf4 +index 000000000..48e067fe6 --- /dev/null +++ b/fs/aufs/dir.c -@@ -0,0 +1,760 @@ +@@ -0,0 +1,762 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -9911,6 +9949,7 @@ index 00000000..7f386bf4 +{ + int err; + struct file *h_file; ++ struct au_branch *br; + + h_file = au_h_open(dentry, arg->bindex, + O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_LARGEFILE, @@ -9935,7 +9974,8 @@ index 00000000..7f386bf4 + +out_put: + fput(h_file); -+ au_sbr_put(dentry->d_sb, arg->bindex); ++ br = au_sbr(dentry->d_sb, arg->bindex); ++ au_lcnt_dec(&br->br_nfiles); +out: + return err; +} @@ -10083,7 +10123,7 @@ index 00000000..7f386bf4 +}; diff --git a/fs/aufs/dir.h b/fs/aufs/dir.h new file mode 100644 -index 00000000..e7acabe0 +index 000000000..e7acabe09 --- /dev/null +++ b/fs/aufs/dir.h @@ -0,0 +1,132 @@ @@ -10221,7 +10261,7 @@ index 00000000..e7acabe0 +#endif /* __AUFS_DIR_H__ */ diff --git a/fs/aufs/dirren.c b/fs/aufs/dirren.c new file mode 100644 -index 00000000..63a4024b +index 000000000..85c77ad80 --- /dev/null +++ b/fs/aufs/dirren.c @@ -0,0 +1,1316 @@ @@ -10244,7 +10284,7 @@ index 00000000..63a4024b + */ + +/* -+ * special handling in renaming a directoy ++ * special handling in renaming a directory + * in order to support looking-up the before-renamed name on the lower readonly + * branches + */ @@ -10825,7 +10865,7 @@ index 00000000..63a4024b + unsigned char no_sio, + allocated, /* current size of *fdata */ + infonamelen, /* room size for p */ -+ whnamelen, /* length of the genarated name */ ++ whnamelen, /* length of the generated name */ + renameback; /* renamed back */ +}; + @@ -11543,7 +11583,7 @@ index 00000000..63a4024b +} diff --git a/fs/aufs/dirren.h b/fs/aufs/dirren.h new file mode 100644 -index 00000000..f5139a30 +index 000000000..f5139a30c --- /dev/null +++ b/fs/aufs/dirren.h @@ -0,0 +1,140 @@ @@ -11689,7 +11729,7 @@ index 00000000..f5139a30 +#endif /* __AUFS_DIRREN_H__ */ diff --git a/fs/aufs/dynop.c b/fs/aufs/dynop.c new file mode 100644 -index 00000000..6cc90403 +index 000000000..f2ff9f3ab --- /dev/null +++ b/fs/aufs/dynop.c @@ -0,0 +1,370 @@ @@ -11952,7 +11992,7 @@ index 00000000..6cc90403 + +/* ---------------------------------------------------------------------- */ +/* -+ * Aufs prohibits O_DIRECT by defaut even if the branch supports it. ++ * Aufs prohibits O_DIRECT by default even if the branch supports it. + * This behaviour is necessary to return an error from open(O_DIRECT) instead + * of the succeeding I/O. The dio mount option enables O_DIRECT and makes + * open(O_DIRECT) always succeed, but the succeeding I/O may return an error. @@ -12065,7 +12105,7 @@ index 00000000..6cc90403 +} diff --git a/fs/aufs/dynop.h b/fs/aufs/dynop.h new file mode 100644 -index 00000000..d4015351 +index 000000000..d4015351e --- /dev/null +++ b/fs/aufs/dynop.h @@ -0,0 +1,75 @@ @@ -12146,7 +12186,7 @@ index 00000000..d4015351 +#endif /* __AUFS_DYNOP_H__ */ diff --git a/fs/aufs/export.c b/fs/aufs/export.c new file mode 100644 -index 00000000..f64dd0a9 +index 000000000..0358fbec3 --- /dev/null +++ b/fs/aufs/export.c @@ -0,0 +1,838 @@ @@ -12774,7 +12814,7 @@ index 00000000..f64dd0a9 + + /* is the parent dir cached? */ + br = au_sbr(sb, nsi_lock.bindex); -+ au_br_get(br); ++ au_lcnt_inc(&br->br_nfiles); + dentry = decode_by_dir_ino(sb, ino, dir_ino, &nsi_lock); + if (IS_ERR(dentry)) + goto out_unlock; @@ -12798,7 +12838,7 @@ index 00000000..f64dd0a9 + dentry = ERR_PTR(-ESTALE); +out_unlock: + if (br) -+ au_br_put(br); ++ au_lcnt_dec(&br->br_nfiles); + si_read_unlock(sb); +out: + AuTraceErrPtr(dentry); @@ -12990,10 +13030,10 @@ index 00000000..f64dd0a9 +} diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c new file mode 100644 -index 00000000..abddd5f9 +index 000000000..0733ae8ac --- /dev/null +++ b/fs/aufs/f_op.c -@@ -0,0 +1,818 @@ +@@ -0,0 +1,819 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -13045,29 +13085,30 @@ index 00000000..abddd5f9 + if (unlikely(err)) + goto out; + h_file = au_h_open(dentry, bindex, flags, file, /*force_wr*/0); ++ if (IS_ERR(h_file)) { ++ err = PTR_ERR(h_file); ++ goto out; ++ } + } else { + h_dentry = h_file->f_path.dentry; + err = vfsub_test_mntns(file->f_path.mnt, h_dentry->d_sb); + if (unlikely(err)) + goto out; -+ get_file(h_file); ++ /* br ref is already inc-ed */ + } -+ if (IS_ERR(h_file)) -+ err = PTR_ERR(h_file); -+ else { -+ if ((flags & __O_TMPFILE) -+ && !(flags & O_EXCL)) { -+ h_inode = file_inode(h_file); -+ spin_lock(&h_inode->i_lock); -+ h_inode->i_state |= I_LINKABLE; -+ spin_unlock(&h_inode->i_lock); -+ } -+ au_set_fbtop(file, bindex); -+ au_set_h_fptr(file, bindex, h_file); -+ au_update_figen(file); -+ /* todo: necessary? */ -+ /* file->f_ra = h_file->f_ra; */ ++ ++ if ((flags & __O_TMPFILE) ++ && !(flags & O_EXCL)) { ++ h_inode = file_inode(h_file); ++ spin_lock(&h_inode->i_lock); ++ h_inode->i_state |= I_LINKABLE; ++ spin_unlock(&h_inode->i_lock); + } ++ au_set_fbtop(file, bindex); ++ au_set_h_fptr(file, bindex, h_file); ++ au_update_figen(file); ++ /* todo: necessary? */ ++ /* file->f_ra = h_file->f_ra; */ + +out: + return err; @@ -13131,7 +13172,7 @@ index 00000000..abddd5f9 +/* + * read and write functions acquire [fdi]_rwsem once, but release before + * mmap_sem. This is because to stop a race condition between mmap(2). -+ * Releasing these aufs-rwsem should be safe, no branch-mamagement (by keeping ++ * Releasing these aufs-rwsem should be safe, no branch-management (by keeping + * si_rwsem), no harmful copy-up should happen. Actually copy-up may happen in + * read functions after [fdi]_rwsem are released, but it should be harmless. + */ @@ -13428,7 +13469,7 @@ index 00000000..abddd5f9 + goto out; + + err = vfsub_splice_to(h_file, ppos, pipe, len, flags); -+ /* todo: necessasry? */ ++ /* todo: necessary? */ + /* file->f_ra = h_file->f_ra; */ + au_read_post(inode, h_file); + @@ -13518,7 +13559,7 @@ index 00000000..abddd5f9 + au_mtx_and_read_lock(a_dst.inode); + /* + * in order to match the order in di_write_lock2_{child,parent}(), -+ * use f_path.dentry for this comparision. ++ * use f_path.dentry for this comparison. + */ + if (src->f_path.dentry < dst->f_path.dentry) { + a_src.h_file = au_read_pre(src, /*keep_fi*/1, AuLsc_FI_1); @@ -13584,9 +13625,9 @@ index 00000000..abddd5f9 + * (Note that [fdi]i_rwsem are released before mmap_sem). + * - in mmap case + * mmap(2) -- mmap_sem -- aufs_mmap() -- si_rwsem for read -- [fdi]i_rwsem -+ * This AB-BA order is definitly bad, but is not a problem since "si_rwsem for -+ * read" allows muliple processes to acquire it and [fdi]i_rwsem are not held in -+ * file I/O. Aufs needs to stop lockdep in aufs_mmap() though. ++ * This AB-BA order is definitely bad, but is not a problem since "si_rwsem for ++ * read" allows multiple processes to acquire it and [fdi]i_rwsem are not held ++ * in file I/O. Aufs needs to stop lockdep in aufs_mmap() though. + * It means that when aufs acquires si_rwsem for write, the process should never + * acquire mmap_sem. + * @@ -13814,7 +13855,7 @@ index 00000000..abddd5f9 +}; diff --git a/fs/aufs/fhsm.c b/fs/aufs/fhsm.c new file mode 100644 -index 00000000..9162fb32 +index 000000000..fdb91f6eb --- /dev/null +++ b/fs/aufs/fhsm.c @@ -0,0 +1,427 @@ @@ -14175,7 +14216,7 @@ index 00000000..9162fb32 + if (unlikely(fd < 0)) + goto out_pid; + -+ /* succeed reglardless 'fhsm' status */ ++ /* succeed regardless 'fhsm' status */ + kobject_get(&sbinfo->si_kobj); + si_noflush_read_lock(sb); + if (au_ftest_si(sbinfo, FHSM)) @@ -14247,10 +14288,10 @@ index 00000000..9162fb32 +} diff --git a/fs/aufs/file.c b/fs/aufs/file.c new file mode 100644 -index 00000000..2de9a8d0 +index 000000000..c01b98791 --- /dev/null +++ b/fs/aufs/file.c -@@ -0,0 +1,857 @@ +@@ -0,0 +1,863 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -14336,7 +14377,7 @@ index 00000000..2de9a8d0 + } + } + flags &= ~O_CREAT; -+ au_br_get(br); ++ au_lcnt_inc(&br->br_nfiles); + h_path.dentry = h_dentry; + h_path.mnt = au_br_mnt(br); + h_file = vfsub_dentry_open(&h_path, flags); @@ -14355,7 +14396,7 @@ index 00000000..2de9a8d0 + goto out; /* success */ + +out_br: -+ au_br_put(br); ++ au_lcnt_dec(&br->br_nfiles); +out: + return h_file; +} @@ -14503,7 +14544,8 @@ index 00000000..2de9a8d0 + err = args->open(file, vfsub_file_flags(file), NULL); + else { + lockdep_off(); -+ err = args->open(file, vfsub_file_flags(file), NULL); ++ err = args->open(file, vfsub_file_flags(file), ++ args->h_file); + lockdep_on(); + } + } @@ -14537,10 +14579,12 @@ index 00000000..2de9a8d0 + int err; + aufs_bindex_t btop; + struct dentry *dentry; ++ struct au_branch *br; + struct file *h_file, *h_file_tmp; + + dentry = file->f_path.dentry; + btop = au_dbtop(dentry); ++ br = au_sbr(dentry->d_sb, btop); + h_file_tmp = NULL; + if (au_fbtop(file) == btop) { + h_file = au_hf_top(file); @@ -14548,6 +14592,7 @@ index 00000000..2de9a8d0 + return 0; /* success */ + h_file_tmp = h_file; + get_file(h_file_tmp); ++ au_lcnt_inc(&br->br_nfiles); + au_set_h_fptr(file, btop, NULL); + } + AuDebugOn(au_fi(file)->fi_hdir); @@ -14568,7 +14613,7 @@ index 00000000..2de9a8d0 + err = PTR_ERR(h_file); + if (IS_ERR(h_file)) { + if (h_file_tmp) { -+ au_sbr_get(dentry->d_sb, btop); ++ /* revert */ + au_set_h_fptr(file, btop, h_file_tmp); + h_file_tmp = NULL; + } @@ -14583,8 +14628,10 @@ index 00000000..2de9a8d0 + /* file->f_ra = h_file->f_ra; */ + +out: -+ if (h_file_tmp) ++ if (h_file_tmp) { + fput(h_file_tmp); ++ au_lcnt_dec(&br->br_nfiles); ++ } + return err; +} + @@ -15110,7 +15157,7 @@ index 00000000..2de9a8d0 +}; diff --git a/fs/aufs/file.h b/fs/aufs/file.h new file mode 100644 -index 00000000..11bc6548 +index 000000000..11bc65480 --- /dev/null +++ b/fs/aufs/file.h @@ -0,0 +1,341 @@ @@ -15457,7 +15504,7 @@ index 00000000..11bc6548 +#endif /* __AUFS_FILE_H__ */ diff --git a/fs/aufs/finfo.c b/fs/aufs/finfo.c new file mode 100644 -index 00000000..513d4822 +index 000000000..44636ce6c --- /dev/null +++ b/fs/aufs/finfo.c @@ -0,0 +1,149 @@ @@ -15491,7 +15538,7 @@ index 00000000..513d4822 + allow_write_access(hf->hf_file); + fput(hf->hf_file); + hf->hf_file = NULL; -+ au_br_put(hf->hf_br); ++ au_lcnt_dec(&hf->hf_br->br_nfiles); + hf->hf_br = NULL; +} + @@ -15570,7 +15617,7 @@ index 00000000..513d4822 +{ + struct au_finfo *finfo; + -+ au_nfiles_dec(file->f_path.dentry->d_sb); ++ au_lcnt_dec(&au_sbi(file->f_path.dentry->d_sb)->si_nfiles); + + finfo = au_fi(file); + AuDebugOn(finfo->fi_hdir); @@ -15598,7 +15645,7 @@ index 00000000..513d4822 + goto out; + + err = 0; -+ au_nfiles_inc(dentry->d_sb); ++ au_lcnt_inc(&au_sbi(dentry->d_sb)->si_nfiles); + au_rw_write_lock(&finfo->fi_rwsem); + finfo->fi_btop = -1; + finfo->fi_hdir = fidir; @@ -15612,7 +15659,7 @@ index 00000000..513d4822 +} diff --git a/fs/aufs/fstype.h b/fs/aufs/fstype.h new file mode 100644 -index 00000000..4e295869 +index 000000000..4e295869b --- /dev/null +++ b/fs/aufs/fstype.h @@ -0,0 +1,401 @@ @@ -16019,7 +16066,7 @@ index 00000000..4e295869 +#endif /* __AUFS_FSTYPE_H__ */ diff --git a/fs/aufs/hbl.h b/fs/aufs/hbl.h new file mode 100644 -index 00000000..265d7ab6 +index 000000000..265d7ab61 --- /dev/null +++ b/fs/aufs/hbl.h @@ -0,0 +1,65 @@ @@ -16090,10 +16137,10 @@ index 00000000..265d7ab6 +#endif /* __AUFS_HBL_H__ */ diff --git a/fs/aufs/hfsnotify.c b/fs/aufs/hfsnotify.c new file mode 100644 -index 00000000..920afbf0 +index 000000000..7ec50daf7 --- /dev/null +++ b/fs/aufs/hfsnotify.c -@@ -0,0 +1,290 @@ +@@ -0,0 +1,289 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -16158,8 +16205,7 @@ index 00000000..920afbf0 + * h_inode, so specify 1 to allow dups. + */ + lockdep_off(); -+ err = fsnotify_add_mark(mark, hinode->hi_inode, /*mnt*/NULL, -+ /*allow_dups*/1); ++ err = fsnotify_add_inode_mark(mark, hinode->hi_inode, /*allow_dups*/1); + lockdep_on(); + + return err; @@ -16386,10 +16432,10 @@ index 00000000..920afbf0 +}; diff --git a/fs/aufs/hfsplus.c b/fs/aufs/hfsplus.c new file mode 100644 -index 00000000..7435a46d +index 000000000..b1f59970d --- /dev/null +++ b/fs/aufs/hfsplus.c -@@ -0,0 +1,57 @@ +@@ -0,0 +1,60 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2010-2018 Junjiro R. Okajima @@ -16409,11 +16455,11 @@ index 00000000..7435a46d + */ + +/* -+ * special support for filesystems which aqucires an inode mutex ++ * special support for filesystems which acquires an inode mutex + * at final closing a file, eg, hfsplus. + * + * This trick is very simple and stupid, just to open the file before really -+ * neceeary open to tell hfsplus that this is not the final closing. ++ * necessary open to tell hfsplus that this is not the final closing. + * The caller should call au_h_open_pre() after acquiring the inode mutex, + * and au_h_open_post() after releasing it. + */ @@ -16442,14 +16488,17 @@ index 00000000..7435a46d +void au_h_open_post(struct dentry *dentry, aufs_bindex_t bindex, + struct file *h_file) +{ ++ struct au_branch *br; ++ + if (h_file) { + fput(h_file); -+ au_sbr_put(dentry->d_sb, bindex); ++ br = au_sbr(dentry->d_sb, bindex); ++ au_lcnt_dec(&br->br_nfiles); + } +} diff --git a/fs/aufs/hnotify.c b/fs/aufs/hnotify.c new file mode 100644 -index 00000000..bd4bce90 +index 000000000..452f5609c --- /dev/null +++ b/fs/aufs/hnotify.c @@ -0,0 +1,720 @@ @@ -16494,9 +16543,9 @@ index 00000000..bd4bce90 + au_cache_free_hnotify(hn); + /* + * The upper dir was removed by udba, but the same named -+ * dir left. In this case, aufs assignes a new inode ++ * dir left. In this case, aufs assigns a new inode + * number and set the monitor again. -+ * For the lower dir, the old monitnor is still left. ++ * For the lower dir, the old monitor is still left. + */ + if (err == -EEXIST) + err = 0; @@ -17175,10 +17224,10 @@ index 00000000..bd4bce90 +} diff --git a/fs/aufs/i_op.c b/fs/aufs/i_op.c new file mode 100644 -index 00000000..39458780 +index 000000000..e1210975e --- /dev/null +++ b/fs/aufs/i_op.c -@@ -0,0 +1,1460 @@ +@@ -0,0 +1,1506 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -17433,6 +17482,28 @@ index 00000000..39458780 + +/* ---------------------------------------------------------------------- */ + ++/* ++ * very dirty and complicated aufs ->atomic_open(). ++ * aufs_atomic_open() ++ * + au_aopen_or_create() ++ * + add_simple() ++ * + vfsub_atomic_open() ++ * + branch fs ->atomic_open() ++ * may call the actual 'open' for h_file ++ * + inc br_nfiles only if opened ++ * + au_aopen_no_open() or au_aopen_do_open() ++ * ++ * au_aopen_do_open() ++ * + finish_open() ++ * + au_do_aopen() ++ * + au_do_open() the body of all 'open' ++ * + au_do_open_nondir() ++ * set the passed h_file ++ * ++ * au_aopen_no_open() ++ * + finish_no_open() ++ */ ++ +struct aopen_node { + struct hlist_bl_node hblist; + struct file *file, *h_file; @@ -17461,18 +17532,50 @@ index 00000000..39458780 + return au_do_open(file, &args); +} + ++static int au_aopen_do_open(struct file *file, struct dentry *dentry, ++ struct aopen_node *aopen_node) ++{ ++ int err; ++ struct hlist_bl_head *aopen; ++ ++ AuLabel(here); ++ aopen = &au_sbi(dentry->d_sb)->si_aopen; ++ au_hbl_add(&aopen_node->hblist, aopen); ++ err = finish_open(file, dentry, au_do_aopen); ++ au_hbl_del(&aopen_node->hblist, aopen); ++ /* AuDbgFile(file); */ ++ AuDbg("%pd%s%s\n", dentry, ++ (file->f_mode & FMODE_CREATED) ? " created" : "", ++ (file->f_mode & FMODE_OPENED) ? " opened" : ""); ++ ++ AuTraceErr(err); ++ return err; ++} ++ ++static int au_aopen_no_open(struct file *file, struct dentry *dentry) ++{ ++ int err; ++ ++ AuLabel(here); ++ dget(dentry); ++ err = finish_no_open(file, dentry); ++ ++ AuTraceErr(err); ++ return err; ++} ++ +static int aufs_atomic_open(struct inode *dir, struct dentry *dentry, + struct file *file, unsigned int open_flag, -+ umode_t create_mode, int *opened) ++ umode_t create_mode) +{ -+ int err, unlocked, h_opened = *opened; ++ int err, did_open; + unsigned int lkup_flags; ++ aufs_bindex_t bindex; ++ struct super_block *sb; + struct dentry *parent, *d; -+ struct hlist_bl_head *aopen; + struct vfsub_aopen_args args = { + .open_flag = open_flag, -+ .create_mode = create_mode, -+ .opened = &h_opened ++ .create_mode = create_mode + }; + struct aopen_node aopen_node = { + .file = file @@ -17507,82 +17610,73 @@ index 00000000..39458780 + if (d_is_positive(dentry) + || d_unhashed(dentry) + || d_unlinked(dentry) -+ || !(open_flag & O_CREAT)) -+ goto out_no_open; ++ || !(open_flag & O_CREAT)) { ++ err = au_aopen_no_open(file, dentry); ++ goto out; /* success */ ++ } + -+ unlocked = 0; + err = aufs_read_lock(dentry, AuLock_DW | AuLock_FLUSH | AuLock_GEN); + if (unlikely(err)) + goto out; + ++ sb = dentry->d_sb; + parent = dentry->d_parent; /* dir is locked */ + di_write_lock_parent(parent); + err = au_lkup_dentry(dentry, /*btop*/0, AuLkup_ALLOW_NEG); -+ if (unlikely(err)) -+ goto out_unlock; ++ if (unlikely(err < 0)) ++ goto out_parent; + + AuDbgDentry(dentry); -+ if (d_is_positive(dentry)) -+ goto out_unlock; ++ if (d_is_positive(dentry)) { ++ err = au_aopen_no_open(file, dentry); ++ goto out_parent; /* success */ ++ } + -+ args.file = get_empty_filp(); ++ args.file = alloc_empty_file(file->f_flags, current_cred()); + err = PTR_ERR(args.file); + if (IS_ERR(args.file)) -+ goto out_unlock; ++ goto out_parent; + -+ args.file->f_flags = file->f_flags; ++ bindex = au_dbtop(dentry); + err = au_aopen_or_create(dir, dentry, &args); + AuTraceErr(err); + AuDbgFile(args.file); -+ if (unlikely(err < 0)) { -+ if (h_opened & FILE_OPENED) -+ fput(args.file); -+ else -+ put_filp(args.file); -+ goto out_unlock; ++ file->f_mode = args.file->f_mode & ~FMODE_OPENED; ++ did_open = !!(args.file->f_mode & FMODE_OPENED); ++ if (!did_open) { ++ fput(args.file); ++ args.file = NULL; + } + di_write_unlock(parent); + di_write_unlock(dentry); -+ unlocked = 1; -+ -+ /* some filesystems don't set FILE_CREATED while succeeded? */ -+ *opened |= FILE_CREATED; -+ if (h_opened & FILE_OPENED) -+ aopen_node.h_file = args.file; -+ else { -+ put_filp(args.file); -+ args.file = NULL; ++ if (unlikely(err < 0)) { ++ if (args.file) ++ fput(args.file); ++ goto out_sb; + } -+ aopen = &au_sbi(dir->i_sb)->si_aopen; -+ au_hbl_add(&aopen_node.hblist, aopen); -+ err = finish_open(file, dentry, au_do_aopen, opened); -+ au_hbl_del(&aopen_node.hblist, aopen); ++ ++ if (!did_open) ++ err = au_aopen_no_open(file, dentry); ++ else { ++ aopen_node.h_file = args.file; ++ err = au_aopen_do_open(file, dentry, &aopen_node); ++ } ++ if (unlikely(err < 0)) { ++ if (args.file) ++ fput(args.file); ++ if (did_open) ++ au_lcnt_dec(&args.br->br_nfiles); ++ } ++ goto out_sb; /* success */ ++ ++out_parent: ++ di_write_unlock(parent); ++ di_write_unlock(dentry); ++out_sb: ++ si_read_unlock(sb); ++out: + AuTraceErr(err); + AuDbgFile(file); -+ if (aopen_node.h_file) -+ fput(aopen_node.h_file); -+ -+out_unlock: -+ if (unlocked) -+ si_read_unlock(dentry->d_sb); -+ else { -+ di_write_unlock(parent); -+ aufs_read_unlock(dentry, AuLock_DW); -+ } -+ AuDbgDentry(dentry); -+ if (unlikely(err < 0)) -+ goto out; -+out_no_open: -+ if (err >= 0 && !(*opened & FILE_CREATED)) { -+ AuLabel(out_no_open); -+ dget(dentry); -+ err = finish_no_open(file, dentry); -+ } -+out: -+ AuDbg("%pd%s%s\n", dentry, -+ (*opened & FILE_CREATED) ? " created" : "", -+ (*opened & FILE_OPENED) ? " opened" : ""); -+ AuTraceErr(err); + return err; +} + @@ -18516,7 +18610,8 @@ index 00000000..39458780 + return (inode->i_mode & (S_IFBLK | S_IFCHR | S_IFIFO | S_IFSOCK)); +} + -+static int aufs_update_time(struct inode *inode, struct timespec64 *ts, int flags) ++static int aufs_update_time(struct inode *inode, struct timespec64 *ts, ++ int flags) +{ + int err; + aufs_bindex_t bindex; @@ -18641,10 +18736,10 @@ index 00000000..39458780 +}; diff --git a/fs/aufs/i_op_add.c b/fs/aufs/i_op_add.c new file mode 100644 -index 00000000..42abd1ad +index 000000000..97af9e5e1 --- /dev/null +++ b/fs/aufs/i_op_add.c -@@ -0,0 +1,921 @@ +@@ -0,0 +1,935 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -18894,11 +18989,12 @@ index 00000000..42abd1ad + unsigned char created; + const unsigned char try_aopen + = (arg->type == Creat && arg->u.c.try_aopen); ++ struct vfsub_aopen_args *aopen = arg->u.c.aopen; + struct dentry *wh_dentry, *parent; + struct inode *h_dir; + struct super_block *sb; + struct au_branch *br; -+ /* to reuduce stack size */ ++ /* to reduce stack size */ + struct { + struct au_dtime dt; + struct au_pin pin; @@ -18941,30 +19037,42 @@ index 00000000..42abd1ad + h_dir = au_pinned_h_dir(&a->pin); + switch (arg->type) { + case Creat: -+ err = 0; -+ if (!try_aopen || !h_dir->i_op->atomic_open) ++ if (!try_aopen || !h_dir->i_op->atomic_open) { + err = vfsub_create(h_dir, &a->h_path, arg->u.c.mode, + arg->u.c.want_excl); -+ else -+ err = vfsub_atomic_open(h_dir, a->h_path.dentry, -+ arg->u.c.aopen, br); ++ created = !err; ++ if (!err && try_aopen) ++ aopen->file->f_mode |= FMODE_CREATED; ++ } else { ++ aopen->br = br; ++ err = vfsub_atomic_open(h_dir, a->h_path.dentry, aopen); ++ AuDbg("err %d\n", err); ++ AuDbgFile(aopen->file); ++ created = err >= 0 ++ && !!(aopen->file->f_mode & FMODE_CREATED); ++ } + break; + case Symlink: + err = vfsub_symlink(h_dir, &a->h_path, arg->u.s.symname); ++ created = !err; + break; + case Mknod: + err = vfsub_mknod(h_dir, &a->h_path, arg->u.m.mode, + arg->u.m.dev); ++ created = !err; + break; + default: + BUG(); + } -+ created = !err; ++ if (unlikely(err < 0)) ++ goto out_unpin; ++ ++ err = epilog(dir, btop, wh_dentry, dentry); + if (!err) -+ err = epilog(dir, btop, wh_dentry, dentry); ++ goto out_unpin; /* success */ + + /* revert */ -+ if (unlikely(created && err && d_is_positive(a->h_path.dentry))) { ++ if (created /* && d_is_positive(a->h_path.dentry) */) { + /* no delegation since it is just created */ + rerr = vfsub_unlink(h_dir, &a->h_path, /*delegated*/NULL, + /*force*/0); @@ -18975,13 +19083,14 @@ index 00000000..42abd1ad + } + au_dtime_revert(&a->dt); + } ++ if (try_aopen && h_dir->i_op->atomic_open ++ && (aopen->file->f_mode & FMODE_OPENED)) ++ /* aopen->file is still opened */ ++ au_lcnt_dec(&aopen->br->br_nfiles); + -+ if (!err && try_aopen && !h_dir->i_op->atomic_open) -+ *arg->u.c.aopen->opened |= FILE_CREATED; -+ ++out_unpin: + au_unpin(&a->pin); + dput(wh_dentry); -+ +out_parent: + if (!try_aopen) + di_write_unlock(parent); @@ -19354,7 +19463,7 @@ index 00000000..42abd1ad + + /* + * aufs doesn't touch the credential so -+ * security_dentry_create_files_as() is unnecrssary. ++ * security_dentry_create_files_as() is unnecessary. + */ + if (au_opt_test(au_mntflags(sb), PLINK)) { + if (a->bdst < a->bsrc @@ -19568,7 +19677,7 @@ index 00000000..42abd1ad +} diff --git a/fs/aufs/i_op_del.c b/fs/aufs/i_op_del.c new file mode 100644 -index 00000000..9c49efa1 +index 000000000..343617d68 --- /dev/null +++ b/fs/aufs/i_op_del.c @@ -0,0 +1,512 @@ @@ -19723,7 +19832,7 @@ index 00000000..9c49efa1 + +/* + * decide the branch where we operate for @dentry. the branch index will be set -+ * @rbcpup. after diciding it, 'pin' it and store the timestamps of the parent ++ * @rbcpup. after deciding it, 'pin' it and store the timestamps of the parent + * dir for reverting. + * when a new whiteout is necessary, create it. + */ @@ -19879,7 +19988,7 @@ index 00000000..9c49efa1 + aufs_bindex_t bwh, bindex, btop; + struct inode *inode, *h_dir, *delegated; + struct dentry *parent, *wh_dentry; -+ /* to reuduce stack size */ ++ /* to reduce stack size */ + struct { + struct au_dtime dt; + struct au_pin pin; @@ -19981,7 +20090,7 @@ index 00000000..9c49efa1 + struct inode *inode; + struct dentry *parent, *wh_dentry, *h_dentry; + struct au_whtmp_rmdir *args; -+ /* to reuduce stack size */ ++ /* to reduce stack size */ + struct { + struct au_dtime dt; + struct au_pin pin; @@ -20086,10 +20195,10 @@ index 00000000..9c49efa1 +} diff --git a/fs/aufs/i_op_ren.c b/fs/aufs/i_op_ren.c new file mode 100644 -index 00000000..beb59d1d +index 000000000..f9e5d5d66 --- /dev/null +++ b/fs/aufs/i_op_ren.c -@@ -0,0 +1,1247 @@ +@@ -0,0 +1,1249 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -20751,7 +20860,7 @@ index 00000000..beb59d1d + * locking order + * (VFS) + * - src_dir and dir by lock_rename() -+ * - inode if exitsts ++ * - inode if exists + * (aufs) + * - lock all + * + src_dentry and dentry by aufs_read_and_write_lock2() which calls, @@ -21069,6 +21178,8 @@ index 00000000..beb59d1d + goto out; + + a->flags = _flags; ++ BUILD_BUG_ON(sizeof(a->exchange) == sizeof(u8) ++ && RENAME_EXCHANGE > U8_MAX); + a->exchange = _flags & RENAME_EXCHANGE; + a->src_dir = _src_dir; + a->src_dentry = _src_dentry; @@ -21339,7 +21450,7 @@ index 00000000..beb59d1d +} diff --git a/fs/aufs/iinfo.c b/fs/aufs/iinfo.c new file mode 100644 -index 00000000..b197398e +index 000000000..f6c512d96 --- /dev/null +++ b/fs/aufs/iinfo.c @@ -0,0 +1,286 @@ @@ -21549,7 +21660,7 @@ index 00000000..b197398e + nbr = 1; + hi = kmalloc_array(nbr, sizeof(*iinfo->ii_hinode), GFP_NOFS); + if (hi) { -+ au_ninodes_inc(sb); ++ au_lcnt_inc(&au_sbi(sb)->si_ninodes); + + iinfo->ii_hinode = hi; + for (i = 0; i < nbr; i++, hi++) @@ -21597,7 +21708,7 @@ index 00000000..b197398e + AuDebugOn(au_is_bad_inode(inode)); + + sb = inode->i_sb; -+ au_ninodes_dec(sb); ++ au_lcnt_dec(&au_sbi(sb)->si_ninodes); + if (si_pid_test(sb)) + au_xino_delete_inode(inode, unlinked); + else { @@ -21631,7 +21742,7 @@ index 00000000..b197398e +} diff --git a/fs/aufs/inode.c b/fs/aufs/inode.c new file mode 100644 -index 00000000..50ec9117 +index 000000000..50ec91179 --- /dev/null +++ b/fs/aufs/inode.c @@ -0,0 +1,528 @@ @@ -22165,7 +22276,7 @@ index 00000000..50ec9117 +} diff --git a/fs/aufs/inode.h b/fs/aufs/inode.h new file mode 100644 -index 00000000..28e61b27 +index 000000000..28e61b270 --- /dev/null +++ b/fs/aufs/inode.h @@ -0,0 +1,696 @@ @@ -22867,7 +22978,7 @@ index 00000000..28e61b27 +#endif /* __AUFS_INODE_H__ */ diff --git a/fs/aufs/ioctl.c b/fs/aufs/ioctl.c new file mode 100644 -index 00000000..b244842e +index 000000000..279bd7498 --- /dev/null +++ b/fs/aufs/ioctl.c @@ -0,0 +1,220 @@ @@ -22979,7 +23090,7 @@ index 00000000..b244842e + if (IS_ERR(h_file)) + goto out_fd; + -+ au_br_put(br); /* cf. au_h_open() */ ++ au_lcnt_dec(&br->br_nfiles); /* cf. au_h_open() */ + fd_install(fd, h_file); + err = fd; + goto out; /* success */ @@ -23091,9 +23202,201 @@ index 00000000..b244842e + return aufs_ioctl_nondir(file, cmd, (unsigned long)compat_ptr(arg)); +} +#endif +diff --git a/fs/aufs/lcnt.h b/fs/aufs/lcnt.h +new file mode 100644 +index 000000000..5e089c93f +--- /dev/null ++++ b/fs/aufs/lcnt.h +@@ -0,0 +1,186 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++/* ++ * Copyright (C) 2018 Junjiro R. Okajima ++ * ++ * This program, aufs is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program. If not, see . ++ */ ++ ++/* ++ * simple long counter wrapper ++ */ ++ ++#ifndef __AUFS_LCNT_H__ ++#define __AUFS_LCNT_H__ ++ ++#ifdef __KERNEL__ ++ ++#include "debug.h" ++ ++#define AuLCntATOMIC 1 ++#define AuLCntPCPUCNT 2 ++/* ++ * why does percpu_refcount require extra synchronize_rcu()s in ++ * au_br_do_free() ++ */ ++#define AuLCntPCPUREF 3 ++ ++/* #define AuLCntChosen AuLCntATOMIC */ ++#define AuLCntChosen AuLCntPCPUCNT ++/* #define AuLCntChosen AuLCntPCPUREF */ ++ ++#if AuLCntChosen == AuLCntATOMIC ++#include ++ ++typedef atomic_long_t au_lcnt_t; ++ ++static inline int au_lcnt_init(au_lcnt_t *cnt, void *release __maybe_unused) ++{ ++ atomic_long_set(cnt, 0); ++ return 0; ++} ++ ++static inline void au_lcnt_wait_for_fin(au_lcnt_t *cnt __maybe_unused) ++{ ++ /* empty */ ++} ++ ++static inline void au_lcnt_fin(au_lcnt_t *cnt __maybe_unused, ++ int do_sync __maybe_unused) ++{ ++ /* empty */ ++} ++ ++static inline void au_lcnt_inc(au_lcnt_t *cnt) ++{ ++ atomic_long_inc(cnt); ++} ++ ++static inline void au_lcnt_dec(au_lcnt_t *cnt) ++{ ++ atomic_long_dec(cnt); ++} ++ ++static inline long au_lcnt_read(au_lcnt_t *cnt, int do_rev __maybe_unused) ++{ ++ return atomic_long_read(cnt); ++} ++#endif ++ ++#if AuLCntChosen == AuLCntPCPUCNT ++#include ++ ++typedef struct percpu_counter au_lcnt_t; ++ ++static inline int au_lcnt_init(au_lcnt_t *cnt, void *release __maybe_unused) ++{ ++ return percpu_counter_init(cnt, 0, GFP_NOFS); ++} ++ ++static inline void au_lcnt_wait_for_fin(au_lcnt_t *cnt __maybe_unused) ++{ ++ /* empty */ ++} ++ ++static inline void au_lcnt_fin(au_lcnt_t *cnt, int do_sync __maybe_unused) ++{ ++ percpu_counter_destroy(cnt); ++} ++ ++static inline void au_lcnt_inc(au_lcnt_t *cnt) ++{ ++ percpu_counter_inc(cnt); ++} ++ ++static inline void au_lcnt_dec(au_lcnt_t *cnt) ++{ ++ percpu_counter_dec(cnt); ++} ++ ++static inline long au_lcnt_read(au_lcnt_t *cnt, int do_rev __maybe_unused) ++{ ++ s64 n; ++ ++ n = percpu_counter_sum(cnt); ++ BUG_ON(n < 0); ++ if (LONG_MAX != LLONG_MAX ++ && n > LONG_MAX) ++ AuWarn1("%s\n", "wrap-around"); ++ ++ return n; ++} ++#endif ++ ++#if AuLCntChosen == AuLCntPCPUREF ++#include ++ ++typedef struct percpu_ref au_lcnt_t; ++ ++static inline int au_lcnt_init(au_lcnt_t *cnt, percpu_ref_func_t *release) ++{ ++ if (!release) ++ release = percpu_ref_exit; ++ return percpu_ref_init(cnt, release, /*percpu mode*/0, GFP_NOFS); ++} ++ ++static inline void au_lcnt_wait_for_fin(au_lcnt_t *cnt __maybe_unused) ++{ ++ synchronize_rcu(); ++} ++ ++static inline void au_lcnt_fin(au_lcnt_t *cnt, int do_sync) ++{ ++ percpu_ref_kill(cnt); ++ if (do_sync) ++ au_lcnt_wait_for_fin(cnt); ++} ++ ++static inline void au_lcnt_inc(au_lcnt_t *cnt) ++{ ++ percpu_ref_get(cnt); ++} ++ ++static inline void au_lcnt_dec(au_lcnt_t *cnt) ++{ ++ percpu_ref_put(cnt); ++} ++ ++/* ++ * avoid calling this func as possible. ++ */ ++static inline long au_lcnt_read(au_lcnt_t *cnt, int do_rev) ++{ ++ long l; ++ ++ percpu_ref_switch_to_atomic_sync(cnt); ++ l = atomic_long_read(&cnt->count); ++ if (do_rev) ++ percpu_ref_switch_to_percpu(cnt); ++ ++ /* percpu_ref is initialized by 1 instead of 0 */ ++ return l - 1; ++} ++#endif ++ ++#ifdef CONFIG_AUFS_DEBUG ++#define AuLCntZero(val) do { \ ++ long l = val; \ ++ if (l) \ ++ AuDbg("%s = %ld\n", #val, l); \ ++} while (0) ++#else ++#define AuLCntZero(val) do {} while (0) ++#endif ++ ++#endif /* __KERNEL__ */ ++#endif /* __AUFS_LCNT_H__ */ diff --git a/fs/aufs/loop.c b/fs/aufs/loop.c new file mode 100644 -index 00000000..0c6af623 +index 000000000..0c6af623a --- /dev/null +++ b/fs/aufs/loop.c @@ -0,0 +1,148 @@ @@ -23247,7 +23550,7 @@ index 00000000..0c6af623 +} diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h new file mode 100644 -index 00000000..048a6504 +index 000000000..048a6504f --- /dev/null +++ b/fs/aufs/loop.h @@ -0,0 +1,53 @@ @@ -23306,7 +23609,7 @@ index 00000000..048a6504 +#endif /* __AUFS_LOOP_H__ */ diff --git a/fs/aufs/magic.mk b/fs/aufs/magic.mk new file mode 100644 -index 00000000..7bc9eef3 +index 000000000..7bc9eef3f --- /dev/null +++ b/fs/aufs/magic.mk @@ -0,0 +1,31 @@ @@ -23343,7 +23646,7 @@ index 00000000..7bc9eef3 +endif diff --git a/fs/aufs/module.c b/fs/aufs/module.c new file mode 100644 -index 00000000..5f5f67e6 +index 000000000..5f5f67e64 --- /dev/null +++ b/fs/aufs/module.c @@ -0,0 +1,273 @@ @@ -23622,7 +23925,7 @@ index 00000000..5f5f67e6 +module_exit(aufs_exit); diff --git a/fs/aufs/module.h b/fs/aufs/module.h new file mode 100644 -index 00000000..00076104 +index 000000000..000761049 --- /dev/null +++ b/fs/aufs/module.h @@ -0,0 +1,102 @@ @@ -23730,7 +24033,7 @@ index 00000000..00076104 +#endif /* __AUFS_MODULE_H__ */ diff --git a/fs/aufs/mvdown.c b/fs/aufs/mvdown.c new file mode 100644 -index 00000000..9603ef73 +index 000000000..9603ef739 --- /dev/null +++ b/fs/aufs/mvdown.c @@ -0,0 +1,705 @@ @@ -24441,10 +24744,10 @@ index 00000000..9603ef73 +} diff --git a/fs/aufs/opts.c b/fs/aufs/opts.c new file mode 100644 -index 00000000..e1f152a5 +index 000000000..3a8ba2867 --- /dev/null +++ b/fs/aufs/opts.c -@@ -0,0 +1,1891 @@ +@@ -0,0 +1,1877 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -25312,7 +25615,7 @@ index 00000000..e1f152a5 + mod->path = args[0].from; + p = strchr(mod->path, '='); + if (unlikely(!p)) { -+ pr_err("no permssion %s\n", args[0].from); ++ pr_err("no permission %s\n", args[0].from); + goto out; + } + @@ -25890,7 +26193,8 @@ index 00000000..e1f152a5 + + case Opt_trunc_xino_path: + case Opt_itrunc_xino: -+ err = au_xino_trunc(sb, opt->xino_itrunc.bindex); ++ err = au_xino_trunc(sb, opt->xino_itrunc.bindex, ++ /*idx_begin*/0); + if (!err) + err = 1; + break; @@ -26000,25 +26304,10 @@ index 00000000..e1f152a5 + struct au_opts *opts) +{ + int err; -+ aufs_bindex_t bbot, bindex; -+ struct dentry *root, *parent, *h_root; + + err = 0; + switch (opt->type) { + case Opt_xino: -+ au_xino_brid_set(sb, -1); -+ /* safe d_parent access */ -+ parent = opt->xino.file->f_path.dentry->d_parent; -+ root = sb->s_root; -+ bbot = au_sbbot(sb); -+ for (bindex = 0; bindex <= bbot; bindex++) { -+ h_root = au_h_dptr(root, bindex); -+ if (h_root == parent) { -+ au_xino_brid_set(sb, au_sbr_id(sb, bindex)); -+ break; -+ } -+ } -+ + err = au_xino_set(sb, &opt->xino, + !!au_ftest_opts(opts->flags, REMOUNT)); + if (unlikely(err)) @@ -26338,7 +26627,7 @@ index 00000000..e1f152a5 +} diff --git a/fs/aufs/opts.h b/fs/aufs/opts.h new file mode 100644 -index 00000000..fd167bd0 +index 000000000..fd167bd0f --- /dev/null +++ b/fs/aufs/opts.h @@ -0,0 +1,225 @@ @@ -26569,7 +26858,7 @@ index 00000000..fd167bd0 +#endif /* __AUFS_OPTS_H__ */ diff --git a/fs/aufs/plink.c b/fs/aufs/plink.c new file mode 100644 -index 00000000..aa634cbb +index 000000000..83b80ede3 --- /dev/null +++ b/fs/aufs/plink.c @@ -0,0 +1,516 @@ @@ -26974,7 +27263,7 @@ index 00000000..aa634cbb + hlist_bl_unlock(hbl); + if (!found) { + cnt = au_hbl_count(hbl); -+#define msg "unexpectedly unblanced or too many pseudo-links" ++#define msg "unexpectedly unbalanced or too many pseudo-links" + if (cnt > AUFS_PLINK_WARN) + AuWarn1(msg ", %d\n", cnt); +#undef msg @@ -27091,7 +27380,7 @@ index 00000000..aa634cbb +} diff --git a/fs/aufs/poll.c b/fs/aufs/poll.c new file mode 100644 -index 00000000..a653b6c7 +index 000000000..a653b6c74 --- /dev/null +++ b/fs/aufs/poll.c @@ -0,0 +1,51 @@ @@ -27148,7 +27437,7 @@ index 00000000..a653b6c7 +} diff --git a/fs/aufs/posix_acl.c b/fs/aufs/posix_acl.c new file mode 100644 -index 00000000..9ce21ec9 +index 000000000..9ce21ec98 --- /dev/null +++ b/fs/aufs/posix_acl.c @@ -0,0 +1,103 @@ @@ -27257,7 +27546,7 @@ index 00000000..9ce21ec9 +} diff --git a/fs/aufs/procfs.c b/fs/aufs/procfs.c new file mode 100644 -index 00000000..100dbcfe +index 000000000..100dbcfeb --- /dev/null +++ b/fs/aufs/procfs.c @@ -0,0 +1,171 @@ @@ -27434,7 +27723,7 @@ index 00000000..100dbcfe +} diff --git a/fs/aufs/rdu.c b/fs/aufs/rdu.c new file mode 100644 -index 00000000..60f4957b +index 000000000..60f4957b7 --- /dev/null +++ b/fs/aufs/rdu.c @@ -0,0 +1,382 @@ @@ -27822,7 +28111,7 @@ index 00000000..60f4957b +#endif diff --git a/fs/aufs/rwsem.h b/fs/aufs/rwsem.h new file mode 100644 -index 00000000..22ff55e6 +index 000000000..bcb538eed --- /dev/null +++ b/fs/aufs/rwsem.h @@ -0,0 +1,73 @@ @@ -27855,7 +28144,7 @@ index 00000000..22ff55e6 + +#include "debug.h" + -+/* in the futre, the name 'au_rwsem' will be totally gone */ ++/* in the future, the name 'au_rwsem' will be totally gone */ +#define au_rwsem rw_semaphore + +/* to debug easier, do not make them inlined functions */ @@ -27901,10 +28190,10 @@ index 00000000..22ff55e6 +#endif /* __AUFS_RWSEM_H__ */ diff --git a/fs/aufs/sbinfo.c b/fs/aufs/sbinfo.c new file mode 100644 -index 00000000..21dd4588 +index 000000000..a013c7517 --- /dev/null +++ b/fs/aufs/sbinfo.c -@@ -0,0 +1,312 @@ +@@ -0,0 +1,313 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -27943,10 +28232,10 @@ index 00000000..21dd4588 + AuDebugOn(!hlist_bl_empty(sbinfo->si_plink + i)); + AuDebugOn(atomic_read(&sbinfo->si_nowait.nw_len)); + -+ AuDebugOn(percpu_counter_sum(&sbinfo->si_ninodes)); -+ percpu_counter_destroy(&sbinfo->si_ninodes); -+ AuDebugOn(percpu_counter_sum(&sbinfo->si_nfiles)); -+ percpu_counter_destroy(&sbinfo->si_nfiles); ++ AuLCntZero(au_lcnt_read(&sbinfo->si_ninodes, /*do_rev*/0)); ++ au_lcnt_fin(&sbinfo->si_ninodes, /*do_sync*/0); ++ AuLCntZero(au_lcnt_read(&sbinfo->si_nfiles, /*do_rev*/0)); ++ au_lcnt_fin(&sbinfo->si_nfiles, /*do_sync*/0); + + dbgaufs_si_fin(sbinfo); + au_rw_write_lock(&sbinfo->si_rwsem); @@ -27957,6 +28246,8 @@ index 00000000..21dd4588 + mutex_destroy(&sbinfo->si_xib_mtx); + AuRwDestroy(&sbinfo->si_rwsem); + ++ au_lcnt_wait_for_fin(&sbinfo->si_ninodes); ++ /* si_nfiles is waited too */ + kfree(sbinfo); +} + @@ -27988,8 +28279,8 @@ index 00000000..21dd4588 + au_nwt_init(&sbinfo->si_nowait); + au_rw_init_wlock(&sbinfo->si_rwsem); + -+ percpu_counter_init(&sbinfo->si_ninodes, 0, GFP_NOFS); -+ percpu_counter_init(&sbinfo->si_nfiles, 0, GFP_NOFS); ++ au_lcnt_init(&sbinfo->si_ninodes, /*release*/NULL); ++ au_lcnt_init(&sbinfo->si_nfiles, /*release*/NULL); + + sbinfo->si_bbot = -1; + sbinfo->si_last_br_id = AUFS_BRANCH_MAX / 2; @@ -28007,7 +28298,6 @@ index 00000000..21dd4588 + sbinfo->si_xino_expire + = msecs_to_jiffies(AUFS_XINO_DEF_SEC * MSEC_PER_SEC); + mutex_init(&sbinfo->si_xib_mtx); -+ sbinfo->si_xino_brid = -1; + /* leave si_xib_last_pindex and si_xib_next_bit */ + + INIT_HLIST_BL_HEAD(&sbinfo->si_aopen); @@ -28219,10 +28509,10 @@ index 00000000..21dd4588 +} diff --git a/fs/aufs/super.c b/fs/aufs/super.c new file mode 100644 -index 00000000..f5a75334 +index 000000000..a09c846ea --- /dev/null +++ b/fs/aufs/super.c -@@ -0,0 +1,1043 @@ +@@ -0,0 +1,1048 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -28412,6 +28702,7 @@ index 00000000..f5a75334 + struct qstr *name; + struct file *f; + struct dentry *d, *h_root; ++ struct au_branch *br; + + AuRwMustAnyLock(&sbinfo->si_rwsem); + @@ -28422,11 +28713,12 @@ index 00000000..f5a75334 + + /* stop printing the default xino path on the first writable branch */ + h_root = NULL; -+ brid = au_xino_brid(sb); -+ if (brid >= 0) { -+ bindex = au_br_index(sb, brid); -+ h_root = au_hdentry(au_di(sb->s_root), bindex)->hd_dentry; ++ bindex = au_xi_root(sb, f->f_path.dentry); ++ if (bindex >= 0) { ++ br = au_sbr_sb(sb, bindex); ++ h_root = au_br_dentry(br); + } ++ + d = f->f_path.dentry; + name = &d->d_name; + /* safe ->d_parent because the file is unlinked */ @@ -28768,7 +29060,10 @@ index 00000000..f5a75334 + +struct inode **au_iarray_alloc(struct super_block *sb, unsigned long long *max) +{ -+ *max = au_ninodes(sb); ++ struct au_sbinfo *sbi; ++ ++ sbi = au_sbi(sb); ++ *max = au_lcnt_read(&sbi->si_ninodes, /*do_rev*/1); + return au_array_alloc(max, au_iarray_cb, sb, &sb->s_inodes); +} + @@ -29268,10 +29563,10 @@ index 00000000..f5a75334 +}; diff --git a/fs/aufs/super.h b/fs/aufs/super.h new file mode 100644 -index 00000000..d4a21be9 +index 000000000..79e47da4e --- /dev/null +++ b/fs/aufs/super.h -@@ -0,0 +1,627 @@ +@@ -0,0 +1,589 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -29302,6 +29597,7 @@ index 00000000..d4a21be9 +#include +#include +#include "hbl.h" ++#include "lcnt.h" +#include "rwsem.h" +#include "wkq.h" + @@ -29360,7 +29656,7 @@ index 00000000..d4a21be9 + struct au_nowait_tasks si_nowait; + + /* -+ * tried sb->s_umount, but failed due to the dependecy between i_mutex. ++ * tried sb->s_umount, but failed due to the dependency between i_mutex. + * rwsem for au_sbinfo is necessary. + */ + struct au_rwsem si_rwsem; @@ -29369,7 +29665,7 @@ index 00000000..d4a21be9 + * dirty approach to protect sb->sb_inodes and ->s_files (gone) from + * remount. + */ -+ struct percpu_counter si_ninodes, si_nfiles; ++ au_lcnt_t si_ninodes, si_nfiles; + + /* branch management */ + unsigned int si_generation; @@ -29406,12 +29702,14 @@ index 00000000..d4a21be9 + /* external inode number (bitmap and translation table) */ + vfs_readf_t si_xread; + vfs_writef_t si_xwrite; ++ loff_t si_ximaxent; /* max entries in a xino */ ++ + struct file *si_xib; + struct mutex si_xib_mtx; /* protect xib members */ + unsigned long *si_xib_buf; + unsigned long si_xib_last_pindex; + int si_xib_next_bit; -+ aufs_bindex_t si_xino_brid; ++ + unsigned long si_xino_jiffy; + unsigned long si_xino_expire; + /* reserved for future use */ @@ -29419,11 +29717,12 @@ index 00000000..d4a21be9 + +#ifdef CONFIG_AUFS_EXPORT + /* i_generation */ ++ /* todo: make xigen file an array to support many inode numbers */ + struct file *si_xigen; + atomic_t si_xigen_next; +#endif + -+ /* dirty trick to suppoer atomic_open */ ++ /* dirty trick to support atomic_open */ + struct hlist_bl_head si_aopen; + + /* vdir parameters */ @@ -29454,7 +29753,7 @@ index 00000000..d4a21be9 + /* + * sysfs and lifetime management. + * this is not a small structure and it may be a waste of memory in case -+ * of sysfs is disabled, particulary when many aufs-es are mounted. ++ * of sysfs is disabled, particularly when many aufs-es are mounted. + * but using sysfs is majority. + */ + struct kobject si_kobj; @@ -29842,42 +30141,6 @@ index 00000000..d4a21be9 + return au_sbi(sb)->si_generation; +} + -+static inline unsigned long long au_ninodes(struct super_block *sb) -+{ -+ s64 n = percpu_counter_sum(&au_sbi(sb)->si_ninodes); -+ -+ BUG_ON(n < 0); -+ return n; -+} -+ -+static inline void au_ninodes_inc(struct super_block *sb) -+{ -+ percpu_counter_inc(&au_sbi(sb)->si_ninodes); -+} -+ -+static inline void au_ninodes_dec(struct super_block *sb) -+{ -+ percpu_counter_dec(&au_sbi(sb)->si_ninodes); -+} -+ -+static inline unsigned long long au_nfiles(struct super_block *sb) -+{ -+ s64 n = percpu_counter_sum(&au_sbi(sb)->si_nfiles); -+ -+ BUG_ON(n < 0); -+ return n; -+} -+ -+static inline void au_nfiles_inc(struct super_block *sb) -+{ -+ percpu_counter_inc(&au_sbi(sb)->si_nfiles); -+} -+ -+static inline void au_nfiles_dec(struct super_block *sb) -+{ -+ percpu_counter_dec(&au_sbi(sb)->si_nfiles); -+} -+ +static inline struct au_branch *au_sbr(struct super_block *sb, + aufs_bindex_t bindex) +{ @@ -29885,23 +30148,17 @@ index 00000000..d4a21be9 + return au_sbi(sb)->si_branch[0 + bindex]; +} + -+static inline void au_xino_brid_set(struct super_block *sb, aufs_bindex_t brid) -+{ -+ SiMustWriteLock(sb); -+ au_sbi(sb)->si_xino_brid = brid; -+} -+ -+static inline aufs_bindex_t au_xino_brid(struct super_block *sb) ++static inline loff_t au_xi_maxent(struct super_block *sb) +{ + SiMustAnyLock(sb); -+ return au_sbi(sb)->si_xino_brid; ++ return au_sbi(sb)->si_ximaxent; +} + +#endif /* __KERNEL__ */ +#endif /* __AUFS_SUPER_H__ */ diff --git a/fs/aufs/sysaufs.c b/fs/aufs/sysaufs.c new file mode 100644 -index 00000000..cb34a53f +index 000000000..cb34a53f3 --- /dev/null +++ b/fs/aufs/sysaufs.c @@ -0,0 +1,93 @@ @@ -30000,7 +30257,7 @@ index 00000000..cb34a53f +} diff --git a/fs/aufs/sysaufs.h b/fs/aufs/sysaufs.h new file mode 100644 -index 00000000..9a64191c +index 000000000..9a64191c5 --- /dev/null +++ b/fs/aufs/sysaufs.h @@ -0,0 +1,102 @@ @@ -30108,7 +30365,7 @@ index 00000000..9a64191c +#endif /* __SYSAUFS_H__ */ diff --git a/fs/aufs/sysfs.c b/fs/aufs/sysfs.c new file mode 100644 -index 00000000..89a4cbf6 +index 000000000..89a4cbf66 --- /dev/null +++ b/fs/aufs/sysfs.c @@ -0,0 +1,373 @@ @@ -30487,7 +30744,7 @@ index 00000000..89a4cbf6 +} diff --git a/fs/aufs/sysrq.c b/fs/aufs/sysrq.c new file mode 100644 -index 00000000..b9daece7 +index 000000000..2dbf23741 --- /dev/null +++ b/fs/aufs/sysrq.c @@ -0,0 +1,160 @@ @@ -30510,7 +30767,7 @@ index 00000000..b9daece7 + */ + +/* -+ * magic sysrq hanlder ++ * magic sysrq handler + */ + +/* #include */ @@ -30653,10 +30910,10 @@ index 00000000..b9daece7 +} diff --git a/fs/aufs/vdir.c b/fs/aufs/vdir.c new file mode 100644 -index 00000000..5b78b5db +index 000000000..f83ca0689 --- /dev/null +++ b/fs/aufs/vdir.c -@@ -0,0 +1,894 @@ +@@ -0,0 +1,895 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -31143,6 +31400,7 @@ index 00000000..5b78b5db + if (au_nhash_test_known_wh(&arg->whlist, name, nlen)) + goto out; /* already whiteouted */ + ++ ino = 0; /* just to suppress a warning */ + if (shwh) + arg->err = au_wh_ino(sb, arg->bindex, h_ino, d_type, + &ino); @@ -31513,10 +31771,10 @@ index 00000000..5b78b5db + struct au_vdir *vdir_cache; + struct au_vdir_de *de; + -+ vdir_cache = au_fvdir_cache(file); + if (!seek_vdir(file, ctx)) + return 0; + ++ vdir_cache = au_fvdir_cache(file); + deblk_sz = vdir_cache->vd_deblk_sz; + while (1) { + deblk_end.deblk = vdir_cache->vd_deblk[vdir_cache->vd_last.ul]; @@ -31553,10 +31811,10 @@ index 00000000..5b78b5db +} diff --git a/fs/aufs/vfsub.c b/fs/aufs/vfsub.c new file mode 100644 -index 00000000..00f7a3cc +index 000000000..de22e6eae --- /dev/null +++ b/fs/aufs/vfsub.c -@@ -0,0 +1,895 @@ +@@ -0,0 +1,902 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -31670,9 +31928,10 @@ index 00000000..00f7a3cc + * cf. linux/fs/namei.c:do_last(), lookup_open() and atomic_open(). + */ +int vfsub_atomic_open(struct inode *dir, struct dentry *dentry, -+ struct vfsub_aopen_args *args, struct au_branch *br) ++ struct vfsub_aopen_args *args) +{ + int err; ++ struct au_branch *br = args->br; + struct file *file = args->file; + /* copied from linux/fs/namei.c:atomic_open() */ + struct dentry *const DENTRY_NOT_SET = (void *)-1UL; @@ -31684,31 +31943,37 @@ index 00000000..00f7a3cc + if (unlikely(err)) + goto out; + -+ args->file->f_path.dentry = DENTRY_NOT_SET; -+ args->file->f_path.mnt = au_br_mnt(br); ++ au_lcnt_inc(&br->br_nfiles); ++ file->f_path.dentry = DENTRY_NOT_SET; ++ file->f_path.mnt = au_br_mnt(br); ++ AuDbg("%ps\n", dir->i_op->atomic_open); + err = dir->i_op->atomic_open(dir, dentry, file, args->open_flag, -+ args->create_mode, args->opened); -+ if (err >= 0) { -+ /* some filesystems don't set FILE_CREATED while succeeded? */ -+ if (*args->opened & FILE_CREATED) -+ fsnotify_create(dir, dentry); -+ } else ++ args->create_mode); ++ if (unlikely(err < 0)) { ++ au_lcnt_dec(&br->br_nfiles); + goto out; -+ -+ -+ if (!err) { -+ /* todo: call VFS:may_open() here */ -+ err = open_check_o_direct(file); -+ /* todo: ima_file_check() too? */ -+ if (!err && (args->open_flag & __FMODE_EXEC)) -+ err = deny_write_access(file); -+ if (unlikely(err)) -+ /* note that the file is created and still opened */ -+ goto out; + } + -+ au_br_get(br); -+ fsnotify_open(file); ++ /* temporary workaround for nfsv4 branch */ ++ if (au_test_nfs(dir->i_sb)) ++ nfs_mark_for_revalidate(dir); ++ ++ if (file->f_mode & FMODE_CREATED) ++ fsnotify_create(dir, dentry); ++ if (!(file->f_mode & FMODE_OPENED)) { ++ au_lcnt_dec(&br->br_nfiles); ++ goto out; ++ } ++ ++ /* todo: call VFS:may_open() here */ ++ /* todo: ima_file_check() too? */ ++ if (!err && (args->open_flag & __FMODE_EXEC)) ++ err = deny_write_access(file); ++ if (!err) ++ fsnotify_open(file); ++ else ++ au_lcnt_dec(&br->br_nfiles); ++ /* note that the file is created and still opened */ + +out: + return err; @@ -32454,7 +32719,7 @@ index 00000000..00f7a3cc +} diff --git a/fs/aufs/vfsub.h b/fs/aufs/vfsub.h new file mode 100644 -index 00000000..18e4d853 +index 000000000..c0564abaa --- /dev/null +++ b/fs/aufs/vfsub.h @@ -0,0 +1,355 @@ @@ -32495,7 +32760,7 @@ index 00000000..18e4d853 +/* copied from linux/fs/internal.h */ +/* todo: BAD approach!! */ +extern void __mnt_drop_write(struct vfsmount *); -+extern int open_check_o_direct(struct file *f); ++extern struct file *alloc_empty_file(int, const struct cred *); + +/* ---------------------------------------------------------------------- */ + @@ -32552,15 +32817,15 @@ index 00000000..18e4d853 +int vfsub_update_h_iattr(struct path *h_path, int *did); +struct file *vfsub_dentry_open(struct path *path, int flags); +struct file *vfsub_filp_open(const char *path, int oflags, int mode); -+struct vfsub_aopen_args { -+ struct file *file; -+ unsigned int open_flag; -+ umode_t create_mode; -+ int *opened; -+}; +struct au_branch; ++struct vfsub_aopen_args { ++ struct file *file; ++ unsigned int open_flag; ++ umode_t create_mode; ++ struct au_branch *br; ++}; +int vfsub_atomic_open(struct inode *dir, struct dentry *dentry, -+ struct vfsub_aopen_args *args, struct au_branch *br); ++ struct vfsub_aopen_args *args); +int vfsub_kern_path(const char *name, unsigned int flags, struct path *path); + +struct dentry *vfsub_lookup_one_len_unlocked(const char *name, @@ -32815,7 +33080,7 @@ index 00000000..18e4d853 +#endif /* __AUFS_VFSUB_H__ */ diff --git a/fs/aufs/wbr_policy.c b/fs/aufs/wbr_policy.c new file mode 100644 -index 00000000..6e97c806 +index 000000000..6e97c806a --- /dev/null +++ b/fs/aufs/wbr_policy.c @@ -0,0 +1,830 @@ @@ -33651,7 +33916,7 @@ index 00000000..6e97c806 +}; diff --git a/fs/aufs/whout.c b/fs/aufs/whout.c new file mode 100644 -index 00000000..5244085a +index 000000000..2325c2ee5 --- /dev/null +++ b/fs/aufs/whout.c @@ -0,0 +1,1062 @@ @@ -34004,7 +34269,7 @@ index 00000000..5244085a +/* + * returns tri-state, + * minus: error, caller should print the message -+ * zero: succuess ++ * zero: success + * plus: error, caller should NOT print the message + */ +static int au_wh_init_rw_nolink(struct dentry *h_root, struct au_wbr *wbr, @@ -34257,7 +34522,7 @@ index 00000000..5244085a +out: + if (wbr) + atomic_dec(&wbr->wbr_wh_running); -+ au_br_put(a->br); ++ au_lcnt_dec(&a->br->br_count); + si_write_unlock(a->sb); + au_nwt_done(&au_sbi(a->sb)->si_nowait); + kfree(arg); @@ -34283,11 +34548,11 @@ index 00000000..5244085a + */ + arg->sb = sb; + arg->br = br; -+ au_br_get(br); ++ au_lcnt_inc(&br->br_count); + wkq_err = au_wkq_nowait(reinit_br_wh, arg, sb, /*flags*/0); + if (unlikely(wkq_err)) { + atomic_dec(&br->br_wbr->wbr_wh_running); -+ au_br_put(br); ++ au_lcnt_dec(&br->br_count); + kfree(arg); + } + do_dec = 0; @@ -34576,7 +34841,7 @@ index 00000000..5244085a +void au_whtmp_rmdir_free(struct au_whtmp_rmdir *whtmp) +{ + if (whtmp->br) -+ au_br_put(whtmp->br); ++ au_lcnt_dec(&whtmp->br->br_count); + dput(whtmp->wh_dentry); + iput(whtmp->dir); + au_nhash_wh_free(&whtmp->whlist); @@ -34709,7 +34974,7 @@ index 00000000..5244085a + sb = dir->i_sb; + args->dir = au_igrab(dir); + args->br = au_sbr(sb, bindex); -+ au_br_get(args->br); ++ au_lcnt_inc(&args->br->br_count); + args->wh_dentry = dget(wh_dentry); + wkq_err = au_wkq_nowait(call_rmdir_whtmp, args, sb, /*flags*/0); + if (unlikely(wkq_err)) { @@ -34719,7 +34984,7 @@ index 00000000..5244085a +} diff --git a/fs/aufs/whout.h b/fs/aufs/whout.h new file mode 100644 -index 00000000..2bbc38ba +index 000000000..2bbc38ba3 --- /dev/null +++ b/fs/aufs/whout.h @@ -0,0 +1,86 @@ @@ -34811,10 +35076,10 @@ index 00000000..2bbc38ba +#endif /* __AUFS_WHOUT_H__ */ diff --git a/fs/aufs/wkq.c b/fs/aufs/wkq.c new file mode 100644 -index 00000000..4788ae25 +index 000000000..55fab985c --- /dev/null +++ b/fs/aufs/wkq.c -@@ -0,0 +1,391 @@ +@@ -0,0 +1,392 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -34835,7 +35100,7 @@ index 00000000..4788ae25 + +/* + * workqueue for asynchronous/super-io operations -+ * todo: try new dredential scheme ++ * todo: try new credential scheme + */ + +#include @@ -35091,7 +35356,8 @@ index 00000000..4788ae25 + if (au_ftest_wkq(wkinfo->flags, NEST)) { + if (au_wkq_test()) { + AuWarn1("wkq from wkq, unless silly-rename on NFS," -+ " due to a dead dir by UDBA?\n"); ++ " due to a dead dir by UDBA," ++ " or async xino write?\n"); + AuDebugOn(au_ftest_wkq(wkinfo->flags, WAIT)); + } + } else @@ -35208,10 +35474,10 @@ index 00000000..4788ae25 +} diff --git a/fs/aufs/wkq.h b/fs/aufs/wkq.h new file mode 100644 -index 00000000..acfccd50 +index 000000000..2e50ed834 --- /dev/null +++ b/fs/aufs/wkq.h -@@ -0,0 +1,94 @@ +@@ -0,0 +1,89 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -35267,11 +35533,6 @@ index 00000000..acfccd50 +#define au_fclr_wkq(flags, name) \ + do { (flags) &= ~AuWkq_##name; } while (0) + -+#ifndef CONFIG_AUFS_HNOTIFY -+#undef AuWkq_NEST -+#define AuWkq_NEST 0 -+#endif -+ +/* wkq.c */ +int au_wkq_do_wait(unsigned int flags, au_wkq_func_t func, void *args); +int au_wkq_nowait(au_wkq_func_t func, void *args, struct super_block *sb, @@ -35308,7 +35569,7 @@ index 00000000..acfccd50 +#endif /* __AUFS_WKQ_H__ */ diff --git a/fs/aufs/xattr.c b/fs/aufs/xattr.c new file mode 100644 -index 00000000..70b89171 +index 000000000..70b891716 --- /dev/null +++ b/fs/aufs/xattr.c @@ -0,0 +1,356 @@ @@ -35670,10 +35931,10 @@ index 00000000..70b89171 +} diff --git a/fs/aufs/xino.c b/fs/aufs/xino.c new file mode 100644 -index 00000000..67b1a6aa +index 000000000..1236699a3 --- /dev/null +++ b/fs/aufs/xino.c -@@ -0,0 +1,1593 @@ +@@ -0,0 +1,1890 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima @@ -35749,6 +36010,28 @@ index 00000000..67b1a6aa +/* + * stop unnecessary notify events at creating xino files + */ ++ ++aufs_bindex_t au_xi_root(struct super_block *sb, struct dentry *dentry) ++{ ++ aufs_bindex_t bfound, bindex, bbot; ++ struct dentry *parent; ++ struct au_branch *br; ++ ++ bfound = -1; ++ parent = dentry->d_parent; /* safe d_parent access */ ++ bbot = au_sbbot(sb); ++ for (bindex = 0; bindex <= bbot; bindex++) { ++ br = au_sbr(sb, bindex); ++ if (au_br_dentry(br) == parent) { ++ bfound = bindex; ++ break; ++ } ++ } ++ ++ AuDbg("bfound b%d\n", bfound); ++ return bfound; ++} ++ +struct au_xino_lock_dir { + struct au_hinode *hdir; + struct dentry *parent; @@ -35783,13 +36066,10 @@ index 00000000..67b1a6aa +static void au_xino_lock_dir(struct super_block *sb, struct path *xipath, + struct au_xino_lock_dir *ldir) +{ -+ aufs_bindex_t brid, bindex; ++ aufs_bindex_t bindex; + + ldir->hdir = NULL; -+ bindex = -1; -+ brid = au_xino_brid(sb); -+ if (brid >= 0) -+ bindex = au_br_index(sb, brid); ++ bindex = au_xi_root(sb, xipath->dentry); + if (bindex >= 0) { + /* rw branch root */ + ldir->hdir = au_hi(d_inode(sb->s_root), bindex); @@ -35958,21 +36238,156 @@ index 00000000..67b1a6aa + return file; +} + ++struct file *au_xino_file1(struct au_xino *xi) ++{ ++ struct file *file; ++ unsigned int u, nfile; ++ ++ file = NULL; ++ nfile = xi->xi_nfile; ++ for (u = 0; u < nfile; u++) { ++ file = xi->xi_file[u]; ++ if (file) ++ break; ++ } ++ ++ return file; ++} ++ ++static int au_xino_file_set(struct au_xino *xi, int idx, struct file *file) ++{ ++ int err; ++ struct file *f; ++ void *p; ++ ++ if (file) ++ get_file(file); ++ ++ err = 0; ++ f = NULL; ++ if (idx < xi->xi_nfile) { ++ f = xi->xi_file[idx]; ++ if (f) ++ fput(f); ++ } else { ++ p = au_kzrealloc(xi->xi_file, ++ sizeof(*xi->xi_file) * xi->xi_nfile, ++ sizeof(*xi->xi_file) * (idx + 1), ++ GFP_NOFS, /*may_shrink*/0); ++ if (p) { ++ MtxMustLock(&xi->xi_mtx); ++ xi->xi_file = p; ++ xi->xi_nfile = idx + 1; ++ } else { ++ err = -ENOMEM; ++ if (file) ++ fput(file); ++ goto out; ++ } ++ } ++ xi->xi_file[idx] = file; ++ ++out: ++ return err; ++} ++ ++/* ++ * if @xinew->xi is not set, then create new xigen file. ++ */ ++struct file *au_xi_new(struct super_block *sb, struct au_xi_new *xinew) ++{ ++ struct file *file; ++ int err; ++ ++ SiMustAnyLock(sb); ++ ++ file = au_xino_create2(sb, xinew->base, xinew->copy_src); ++ if (IS_ERR(file)) { ++ err = PTR_ERR(file); ++ pr_err("%s[%d], err %d\n", ++ xinew->xi ? "xino" : "xigen", ++ xinew->idx, err); ++ goto out; ++ } ++ ++ if (xinew->xi) ++ err = au_xino_file_set(xinew->xi, xinew->idx, file); ++ else { ++ BUG(); ++ /* todo: make xigen file an array */ ++ /* err = au_xigen_file_set(sb, xinew->idx, file); */ ++ } ++ fput(file); ++ if (unlikely(err)) ++ file = ERR_PTR(err); ++ ++out: ++ return file; ++} ++ +/* ---------------------------------------------------------------------- */ + +/* + * truncate xino files + */ -+int au_xino_trunc(struct super_block *sb, aufs_bindex_t bindex) ++static int au_xino_do_trunc(struct super_block *sb, aufs_bindex_t bindex, ++ int idx, struct kstatfs *st) +{ + int err; -+ unsigned long jiffy; + blkcnt_t blocks; ++ struct file *file, *new_xino; ++ struct au_xi_new xinew = { ++ .idx = idx ++ }; ++ ++ err = 0; ++ xinew.xi = au_sbr(sb, bindex)->br_xino; ++ file = au_xino_file(xinew.xi, idx); ++ if (!file) ++ goto out; ++ ++ xinew.base = &file->f_path; ++ err = vfs_statfs(xinew.base, st); ++ if (unlikely(err)) { ++ AuErr1("statfs err %d, ignored\n", err); ++ err = 0; ++ goto out; ++ } ++ ++ blocks = file_inode(file)->i_blocks; ++ pr_info("begin truncating xino(b%d-%d), ib%llu, %llu/%llu free blks\n", ++ bindex, idx, (u64)blocks, st->f_bfree, st->f_blocks); ++ ++ xinew.copy_src = file; ++ new_xino = au_xi_new(sb, &xinew); ++ if (IS_ERR(new_xino)) { ++ err = PTR_ERR(new_xino); ++ pr_err("xino(b%d-%d), err %d, ignored\n", bindex, idx, err); ++ goto out; ++ } ++ ++ err = vfs_statfs(&new_xino->f_path, st); ++ if (!err) ++ pr_info("end truncating xino(b%d-%d), ib%llu, %llu/%llu free blks\n", ++ bindex, idx, (u64)file_inode(new_xino)->i_blocks, ++ st->f_bfree, st->f_blocks); ++ else { ++ AuErr1("statfs err %d, ignored\n", err); ++ err = 0; ++ } ++ ++out: ++ return err; ++} ++ ++int au_xino_trunc(struct super_block *sb, aufs_bindex_t bindex, int idx_begin) ++{ ++ int err, i; ++ unsigned long jiffy; + aufs_bindex_t bbot; + struct kstatfs *st; + struct au_branch *br; -+ struct file *new_xino, *file; -+ struct path *path; ++ struct au_xino *xi; + + err = -ENOMEM; + st = kmalloc(sizeof(*st), GFP_NOFS); @@ -35983,39 +36398,15 @@ index 00000000..67b1a6aa + bbot = au_sbbot(sb); + if (unlikely(bindex < 0 || bbot < bindex)) + goto out_st; -+ br = au_sbr(sb, bindex); -+ file = au_xino_file(br); -+ if (!file) -+ goto out_st; + -+ path = &file->f_path; -+ err = vfs_statfs(path, st); -+ if (unlikely(err)) -+ AuErr1("statfs err %d, ignored\n", err); -+ jiffy = jiffies; -+ blocks = file_inode(file)->i_blocks; -+ pr_info("begin truncating xino(b%d), ib%llu, %llu/%llu free blks\n", -+ bindex, (u64)blocks, st->f_bfree, st->f_blocks); -+ -+ new_xino = au_xino_create2(sb, path, file); -+ err = PTR_ERR(new_xino); -+ if (IS_ERR(new_xino)) { -+ pr_err("err %d, ignored\n", err); -+ goto out_st; -+ } + err = 0; -+ au_xino_file_set(br, new_xino); -+ -+ err = vfs_statfs(&new_xino->f_path, st); -+ if (!err) { -+ pr_info("end truncating xino(b%d), ib%llu, %llu/%llu free blks\n", -+ bindex, (u64)file_inode(new_xino)->i_blocks, -+ st->f_bfree, st->f_blocks); -+ if (file_inode(new_xino)->i_blocks < blocks) -+ au_sbi(sb)->si_xino_jiffy = jiffy; -+ } else -+ AuErr1("statfs err %d, ignored\n", err); -+ fput(new_xino); ++ jiffy = jiffies; ++ br = au_sbr(sb, bindex); ++ xi = br->br_xino; ++ for (i = idx_begin; !err && i < xi->xi_nfile; i++) ++ err = au_xino_do_trunc(sb, bindex, i, st); ++ if (!err) ++ au_sbi(sb)->si_xino_jiffy = jiffy; + +out_st: + kfree(st); @@ -36026,6 +36417,7 @@ index 00000000..67b1a6aa +struct xino_do_trunc_args { + struct super_block *sb; + struct au_branch *br; ++ int idx; +}; + +static void xino_do_trunc(void *_args) @@ -36034,61 +36426,76 @@ index 00000000..67b1a6aa + struct super_block *sb; + struct au_branch *br; + struct inode *dir; -+ int err; ++ int err, idx; + aufs_bindex_t bindex; + + err = 0; + sb = args->sb; + dir = d_inode(sb->s_root); + br = args->br; ++ idx = args->idx; + + si_noflush_write_lock(sb); + ii_read_lock_parent(dir); + bindex = au_br_index(sb, br->br_id); -+ err = au_xino_trunc(sb, bindex); ++ err = au_xino_trunc(sb, bindex, idx); + ii_read_unlock(dir); + if (unlikely(err)) + pr_warn("err b%d, (%d)\n", bindex, err); + atomic_dec(&br->br_xino->xi_truncating); -+ au_br_put(br); ++ au_lcnt_dec(&br->br_count); + si_write_unlock(sb); + au_nwt_done(&au_sbi(sb)->si_nowait); + kfree(args); +} + ++/* ++ * returns the index in the xi_file array whose corresponding file is necessary ++ * to truncate, or -1 which means no need to truncate. ++ */ +static int xino_trunc_test(struct super_block *sb, struct au_branch *br) +{ + int err; ++ unsigned int u; + struct kstatfs st; + struct au_sbinfo *sbinfo; ++ struct au_xino *xi; + struct file *file; + + /* todo: si_xino_expire and the ratio should be customizable */ + sbinfo = au_sbi(sb); + if (time_before(jiffies, + sbinfo->si_xino_jiffy + sbinfo->si_xino_expire)) -+ return 0; ++ return -1; + + /* truncation border */ -+ file = au_xino_file(br); -+ AuDebugOn(!file); -+ err = vfs_statfs(&file->f_path, &st); -+ if (unlikely(err)) { -+ AuErr1("statfs err %d, ignored\n", err); -+ return 0; -+ } -+ if (div64_u64(st.f_bfree * 100, st.f_blocks) >= AUFS_XINO_DEF_TRUNC) -+ return 0; ++ xi = br->br_xino; ++ for (u = 0; u < xi->xi_nfile; u++) { ++ file = au_xino_file(xi, u); ++ if (!file) ++ continue; + -+ return 1; ++ err = vfs_statfs(&file->f_path, &st); ++ if (unlikely(err)) { ++ AuErr1("statfs err %d, ignored\n", err); ++ return -1; ++ } ++ if (div64_u64(st.f_bfree * 100, st.f_blocks) ++ >= AUFS_XINO_DEF_TRUNC) ++ return u; ++ } ++ ++ return -1; +} + +static void xino_try_trunc(struct super_block *sb, struct au_branch *br) +{ ++ int idx; + struct xino_do_trunc_args *args; + int wkq_err; + -+ if (!xino_trunc_test(sb, br)) ++ idx = xino_trunc_test(sb, br); ++ if (idx < 0) + return; + + if (atomic_inc_return(&br->br_xino->xi_truncating) > 1) @@ -36101,15 +36508,16 @@ index 00000000..67b1a6aa + goto out; + } + -+ au_br_get(br); ++ au_lcnt_inc(&br->br_count); + args->sb = sb; + args->br = br; ++ args->idx = idx; + wkq_err = au_wkq_nowait(xino_do_trunc, args, sb, /*flags*/0); + if (!wkq_err) + return; /* success */ + + pr_err("wkq %d\n", wkq_err); -+ au_br_put(br); ++ au_lcnt_dec(&br->br_count); + kfree(args); + +out: @@ -36118,6 +36526,130 @@ index 00000000..67b1a6aa + +/* ---------------------------------------------------------------------- */ + ++struct au_xi_calc { ++ int idx; ++ loff_t pos; ++}; ++ ++static void au_xi_calc(struct super_block *sb, ino_t h_ino, ++ struct au_xi_calc *calc) ++{ ++ loff_t maxent; ++ ++ maxent = au_xi_maxent(sb); ++ calc->idx = div64_u64_rem(h_ino, maxent, &calc->pos); ++ calc->pos *= sizeof(ino_t); ++} ++ ++static int au_xino_do_new_async(struct super_block *sb, struct au_branch *br, ++ struct au_xi_calc *calc) ++{ ++ int err; ++ struct file *file; ++ struct au_xino *xi = br->br_xino; ++ struct au_xi_new xinew = { ++ .xi = xi ++ }; ++ ++ SiMustAnyLock(sb); ++ ++ err = 0; ++ if (!xi) ++ goto out; ++ ++ mutex_lock(&xi->xi_mtx); ++ file = au_xino_file(xi, calc->idx); ++ if (file) ++ goto out_mtx; ++ ++ file = au_xino_file(xi, /*idx*/-1); ++ AuDebugOn(!file); ++ xinew.idx = calc->idx; ++ xinew.base = &file->f_path; ++ /* xinew.copy_src = NULL; */ ++ file = au_xi_new(sb, &xinew); ++ if (IS_ERR(file)) ++ err = PTR_ERR(file); ++ ++out_mtx: ++ mutex_unlock(&xi->xi_mtx); ++out: ++ return err; ++} ++ ++struct au_xino_do_new_async_args { ++ struct super_block *sb; ++ struct au_branch *br; ++ struct au_xi_calc calc; ++ ino_t ino; ++}; ++ ++static int au_xino_do_write(vfs_writef_t write, struct file *file, ++ struct au_xi_calc *calc, ino_t ino); ++ ++static void au_xino_call_do_new_async(void *args) ++{ ++ struct au_xino_do_new_async_args *a = args; ++ struct au_branch *br; ++ struct super_block *sb; ++ struct au_sbinfo *sbi; ++ struct inode *root; ++ struct file *file; ++ int err; ++ ++ br = a->br; ++ sb = a->sb; ++ sbi = au_sbi(sb); ++ si_noflush_read_lock(sb); ++ root = d_inode(sb->s_root); ++ ii_read_lock_child(root); ++ err = au_xino_do_new_async(sb, br, &a->calc); ++ if (!err) { ++ file = au_xino_file(br->br_xino, a->calc.idx); ++ if (file) ++ err = au_xino_do_write(sbi->si_xwrite, file, &a->calc, ++ a->ino); ++ if (unlikely(err)) ++ AuIOErr("err %d\n", err); ++ } else ++ AuIOErr("err %d\n", err); ++ au_lcnt_dec(&br->br_count); ++ ii_read_unlock(root); ++ si_read_unlock(sb); ++ au_nwt_done(&sbi->si_nowait); ++ kfree(args); ++} ++ ++/* ++ * create a new xino file asynchronously ++ */ ++static int au_xino_new_async(struct super_block *sb, struct au_branch *br, ++ struct au_xi_calc *calc, ino_t ino) ++{ ++ int err; ++ struct au_xino_do_new_async_args *arg; ++ ++ err = -ENOMEM; ++ arg = kmalloc(sizeof(*arg), GFP_NOFS); ++ if (unlikely(!arg)) ++ goto out; ++ ++ arg->sb = sb; ++ arg->br = br; ++ arg->calc = *calc; ++ arg->ino = ino; ++ au_lcnt_inc(&br->br_count); ++ err = au_wkq_nowait(au_xino_call_do_new_async, arg, sb, AuWkq_NEST); ++ if (unlikely(err)) { ++ pr_err("wkq %d\n", err); ++ au_lcnt_dec(&br->br_count); ++ kfree(arg); ++ } ++ ++out: ++ return err; ++} ++ +/* + * read @ino from xinofile for the specified branch{@sb, @bindex} + * at the position of @h_ino. @@ -36127,30 +36659,23 @@ index 00000000..67b1a6aa +{ + int err; + ssize_t sz; -+ loff_t pos; -+ struct au_branch *br; -+ struct file *file; ++ struct au_xi_calc calc; + struct au_sbinfo *sbinfo; ++ struct file *file; + + *ino = 0; + if (!au_opt_test(au_mntflags(sb), XINO)) + return 0; /* no xino */ + + err = 0; -+ sbinfo = au_sbi(sb); -+ pos = h_ino; -+ if (unlikely(au_loff_max / sizeof(*ino) - 1 < pos)) { -+ AuIOErr1("too large hi%lu\n", (unsigned long)h_ino); -+ return -EFBIG; -+ } -+ pos *= sizeof(*ino); -+ -+ br = au_sbr(sb, bindex); -+ file = au_xino_file(br); -+ if (vfsub_f_size_read(file) < pos + sizeof(*ino)) ++ au_xi_calc(sb, h_ino, &calc); ++ file = au_xino_file(au_sbr(sb, bindex)->br_xino, calc.idx); ++ if (!file ++ || vfsub_f_size_read(file) < calc.pos + sizeof(*ino)) + return 0; /* no ino */ + -+ sz = xino_fread(sbinfo->si_xread, file, ino, sizeof(*ino), &pos); ++ sbinfo = au_sbi(sb); ++ sz = xino_fread(sbinfo->si_xread, file, ino, sizeof(*ino), &calc.pos); + if (sz == sizeof(*ino)) + return 0; /* success */ + @@ -36159,23 +36684,15 @@ index 00000000..67b1a6aa + err = -EIO; + AuIOErr("xino read error (%zd)\n", sz); + } -+ + return err; +} + +static int au_xino_do_write(vfs_writef_t write, struct file *file, -+ ino_t h_ino, ino_t ino) ++ struct au_xi_calc *calc, ino_t ino) +{ -+ loff_t pos; + ssize_t sz; + -+ pos = h_ino; -+ if (unlikely(au_loff_max / sizeof(ino) - 1 < pos)) { -+ AuIOErr1("too large hi%lu\n", (unsigned long)h_ino); -+ return -EFBIG; -+ } -+ pos *= sizeof(ino); -+ sz = xino_fwrite(write, file, &ino, sizeof(ino), &pos); ++ sz = xino_fwrite(write, file, &ino, sizeof(ino), &calc->pos); + if (sz == sizeof(ino)) + return 0; /* success */ + @@ -36195,26 +36712,39 @@ index 00000000..67b1a6aa +{ + int err; + unsigned int mnt_flags; ++ struct au_xi_calc calc; ++ struct file *file; + struct au_branch *br; ++ struct au_xino *xi; + -+ BUILD_BUG_ON(sizeof(long long) != sizeof(au_loff_max) -+ || ((loff_t)-1) > 0); + SiMustAnyLock(sb); + + mnt_flags = au_mntflags(sb); + if (!au_opt_test(mnt_flags, XINO)) + return 0; + ++ au_xi_calc(sb, h_ino, &calc); + br = au_sbr(sb, bindex); -+ err = au_xino_do_write(au_sbi(sb)->si_xwrite, au_xino_file(br), h_ino, -+ ino); ++ xi = br->br_xino; ++ file = au_xino_file(xi, calc.idx); ++ if (!file) { ++ /* create and write a new xino file asynchronously */ ++ err = au_xino_new_async(sb, br, &calc, ino); ++ if (!err) ++ return 0; /* success */ ++ goto out; ++ } ++ ++ err = au_xino_do_write(au_sbi(sb)->si_xwrite, file, &calc, ino); + if (!err) { ++ br = au_sbr(sb, bindex); + if (au_opt_test(mnt_flags, TRUNC_XINO) + && au_test_fs_trunc_xino(au_br_sb(br))) + xino_try_trunc(sb, br); + return 0; /* success */ + } + ++out: + AuIOErr("write failed (%d)\n", err); + return -EIO; +} @@ -36541,10 +37071,13 @@ index 00000000..67b1a6aa + +static int xib_restore(struct super_block *sb) +{ -+ int err; ++ int err, i; ++ unsigned int nfile; + aufs_bindex_t bindex, bbot; + void *page; + struct au_branch *br; ++ struct au_xino *xi; ++ struct file *file; + + err = -ENOMEM; + page = (void *)__get_free_page(GFP_NOFS); @@ -36556,7 +37089,13 @@ index 00000000..67b1a6aa + for (bindex = 0; !err && bindex <= bbot; bindex++) + if (!bindex || is_sb_shared(sb, bindex, bindex - 1) < 0) { + br = au_sbr(sb, bindex); -+ err = do_xib_restore(sb, au_xino_file(br), page); ++ xi = br->br_xino; ++ nfile = xi->xi_nfile; ++ for (i = 0; i < nfile; i++) { ++ file = au_xino_file(xi, i); ++ if (file) ++ err = do_xib_restore(sb, file, page); ++ } + } else + AuDbg("skip shared b%d\n", bindex); + free_page((unsigned long)page); @@ -36615,26 +37154,35 @@ index 00000000..67b1a6aa + +/* ---------------------------------------------------------------------- */ + -+struct au_xino *au_xino_alloc(void) ++struct au_xino *au_xino_alloc(unsigned int nfile) +{ + struct au_xino *xi; + + xi = kzalloc(sizeof(*xi), GFP_NOFS); + if (unlikely(!xi)) + goto out; ++ xi->xi_nfile = nfile; ++ xi->xi_file = kcalloc(nfile, sizeof(*xi->xi_file), GFP_NOFS); ++ if (unlikely(!xi->xi_file)) ++ goto out_free; + + xi->xi_nondir.total = 8; /* initial size */ + xi->xi_nondir.array = kcalloc(xi->xi_nondir.total, sizeof(ino_t), + GFP_NOFS); + if (unlikely(!xi->xi_nondir.array)) -+ goto out_free; ++ goto out_file; + + spin_lock_init(&xi->xi_nondir.spin); + init_waitqueue_head(&xi->xi_nondir.wqh); ++ mutex_init(&xi->xi_mtx); ++ /* init_waitqueue_head(&xi->xi_wq); */ ++ /* atomic_set(&xi->xi_pending, 0); */ + atomic_set(&xi->xi_truncating, 0); + kref_init(&xi->xi_kref); + goto out; /* success */ + ++out_file: ++ kfree(xi->xi_file); +out_free: + kfree(xi); + xi = NULL; @@ -36642,20 +37190,21 @@ index 00000000..67b1a6aa + return xi; +} + -+static int au_xino_init(struct au_branch *br, struct file *file) ++static int au_xino_init(struct au_branch *br, int idx, struct file *file) +{ + int err; + struct au_xino *xi; + + err = 0; -+ xi = au_xino_alloc(); ++ xi = au_xino_alloc(idx + 1); + if (unlikely(!xi)) { + err = -ENOMEM; + goto out; + } + -+ get_file(file); -+ xi->xi_file = file; ++ if (file) ++ get_file(file); ++ xi->xi_file[idx] = file; + AuDebugOn(br->br_xino); + br->br_xino = xi; + @@ -36669,10 +37218,13 @@ index 00000000..67b1a6aa + int i; + + xi = container_of(kref, struct au_xino, xi_kref); -+ if (xi->xi_file) -+ fput(xi->xi_file); ++ for (i = 0; i < xi->xi_nfile; i++) ++ if (xi->xi_file[i]) ++ fput(xi->xi_file[i]); + for (i = xi->xi_nondir.total - 1; i >= 0; i--) + AuDebugOn(xi->xi_nondir.array[i]); ++ mutex_destroy(&xi->xi_mtx); ++ kfree(xi->xi_file); + kfree(xi->xi_nondir.array); + kfree(xi); +} @@ -36692,21 +37244,6 @@ index 00000000..67b1a6aa + return ret; +} + -+void au_xino_file_set(struct au_branch *br, struct file *file) -+{ -+ struct au_xino *xi; -+ struct file *f; -+ -+ if (file) -+ get_file(file); -+ xi = br->br_xino; -+ AuDebugOn(!xi); -+ f = xi->xi_file; -+ if (f) -+ fput(f); -+ xi->xi_file = file; -+} -+ +/* ---------------------------------------------------------------------- */ + +/* @@ -36736,6 +37273,7 @@ index 00000000..67b1a6aa + loff_t pos; + struct au_sbinfo *sbinfo; + struct file *file; ++ struct super_block *xi_sb; + + SiMustWriteLock(sb); + @@ -36749,6 +37287,15 @@ index 00000000..67b1a6aa + sbinfo->si_xib = file; + sbinfo->si_xread = vfs_readf(file); + sbinfo->si_xwrite = vfs_writef(file); ++ xi_sb = file_inode(file)->i_sb; ++ sbinfo->si_ximaxent = xi_sb->s_maxbytes; ++ if (unlikely(sbinfo->si_ximaxent < PAGE_SIZE)) { ++ err = -EIO; ++ pr_err("s_maxbytes(%llu) on %s is too small\n", ++ (u64)sbinfo->si_ximaxent, au_sbtype(xi_sb)); ++ goto out_unset; ++ } ++ sbinfo->si_ximaxent /= sizeof(ino_t); + + err = -ENOMEM; + if (!sbinfo->si_xib_buf) @@ -36822,32 +37369,42 @@ index 00000000..67b1a6aa + struct au_xino_do_set_br *args) +{ + int err; ++ struct au_xi_calc calc; + struct file *file; ++ struct au_branch *br; ++ struct au_xi_new xinew = { ++ .base = path ++ }; + -+ if (args->bshared >= 0) { ++ br = args->br; ++ xinew.xi = br->br_xino; ++ au_xi_calc(sb, args->h_ino, &calc); ++ xinew.copy_src = au_xino_file(xinew.xi, calc.idx); ++ if (args->bshared >= 0) + /* shared xino */ -+ au_xino_set_br_shared(sb, args->br, args->bshared); -+ file = au_xino_file(args->br); -+ goto out_ino; /* success */ ++ au_xino_set_br_shared(sb, br, args->bshared); ++ else if (!xinew.xi) { ++ /* new xino */ ++ err = au_xino_init(br, calc.idx, xinew.copy_src); ++ if (unlikely(err)) ++ goto out; + } + -+ /* new xino */ -+ file = au_xino_create2(sb, path, au_xino_file(args->br)); ++ /* force re-creating */ ++ xinew.xi = br->br_xino; ++ xinew.idx = calc.idx; ++ mutex_lock(&xinew.xi->xi_mtx); ++ file = au_xi_new(sb, &xinew); ++ mutex_unlock(&xinew.xi->xi_mtx); + err = PTR_ERR(file); + if (IS_ERR(file)) + goto out; -+ if (!args->br->br_xino) { -+ err = au_xino_init(args->br, file); -+ fput(file); -+ if (unlikely(err)) -+ goto out; -+ } else { -+ au_xino_file_set(args->br, file); -+ fput(file); -+ } ++ AuDebugOn(!file); ++ ++ err = au_xino_do_write(args->writef, file, &calc, AUFS_ROOT_INO); ++ if (unlikely(err)) ++ au_xino_put(br); + -+out_ino: -+ err = au_xino_do_write(args->writef, file, args->h_ino, AUFS_ROOT_INO); +out: + AuTraceErr(err); + return err; @@ -36886,7 +37443,6 @@ index 00000000..67b1a6aa + xino_clear_xib(sb); + xino_clear_br(sb); + dbgaufs_brs_del(sb, 0); -+ au_xino_brid_set(sb, -1); + sbinfo = au_sbi(sb); + /* lvalue, do not call au_mntflags() */ + au_opt_clr(sbinfo->si_mntflags, XINO); @@ -36983,8 +37539,6 @@ index 00000000..67b1a6aa + strcat(p, "/" AUFS_XINO_FNAME); + AuDbg("%s\n", p); + file = au_xino_create(sb, p, /*silent*/0); -+ if (!IS_ERR(file)) -+ au_xino_brid_set(sb, br->br_id); + } + free_page((unsigned long)page); + } else { @@ -36998,8 +37552,6 @@ index 00000000..67b1a6aa + fput(file); + file = ERR_PTR(-EINVAL); + } -+ if (!IS_ERR(file)) -+ au_xino_brid_set(sb, -1); + } + +out: @@ -37108,6 +37660,8 @@ index 00000000..67b1a6aa + struct inode *h_inode; + struct au_branch *br; + vfs_writef_t xwrite; ++ struct au_xi_calc calc; ++ struct file *file; + + AuDebugOn(au_is_bad_inode(inode)); + @@ -37143,8 +37697,12 @@ index 00000000..67b1a6aa + continue; + + br = au_sbr(sb, bi); -+ err = au_xino_do_write(xwrite, au_xino_file(br), -+ h_inode->i_ino, /*ino*/0); ++ au_xi_calc(sb, h_inode->i_ino, &calc); ++ file = au_xino_file(br->br_xino, calc.idx); ++ if (IS_ERR_OR_NULL(file)) ++ continue; ++ ++ err = au_xino_do_write(xwrite, file, &calc, /*ino*/0); + if (!err && try_trunc + && au_test_fs_trunc_xino(au_br_sb(br))) + xino_try_trunc(sb, br); @@ -37268,10 +37826,10 @@ index 00000000..67b1a6aa + return err; +} diff --git a/fs/dcache.c b/fs/dcache.c -index ceb7b491..e3f500a5 100644 +index 2e7e8d85e..328a13662 100644 --- a/fs/dcache.c +++ b/fs/dcache.c -@@ -1237,7 +1237,7 @@ enum d_walk_ret { +@@ -1238,7 +1238,7 @@ enum d_walk_ret { * * The @enter() callbacks are called with d_lock held. */ @@ -37280,7 +37838,7 @@ index ceb7b491..e3f500a5 100644 enum d_walk_ret (*enter)(void *, struct dentry *)) { struct dentry *this_parent; -@@ -1342,6 +1342,7 @@ static void d_walk(struct dentry *parent, void *data, +@@ -1343,6 +1343,7 @@ static void d_walk(struct dentry *parent, void *data, seq = 1; goto again; } @@ -37288,7 +37846,7 @@ index ceb7b491..e3f500a5 100644 struct check_mount { struct vfsmount *mnt; -@@ -2890,6 +2891,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2) +@@ -2837,6 +2838,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2) write_sequnlock(&rename_lock); } @@ -37297,7 +37855,7 @@ index ceb7b491..e3f500a5 100644 /** * d_ancestor - search for an ancestor diff --git a/fs/exec.c b/fs/exec.c -index bdd0eace..edd34057 100644 +index 1ebf6e5a5..a72c29465 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -109,6 +109,7 @@ bool path_noexec(const struct path *path) @@ -37309,7 +37867,7 @@ index bdd0eace..edd34057 100644 #ifdef CONFIG_USELIB /* diff --git a/fs/fcntl.c b/fs/fcntl.c -index 12273b6e..0237ad7a 100644 +index 4137d9653..77513097f 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -32,7 +32,7 @@ @@ -37339,18 +37897,18 @@ index 12273b6e..0237ad7a 100644 static void f_modown(struct file *filp, struct pid *pid, enum pid_type type, int force) diff --git a/fs/file_table.c b/fs/file_table.c -index 7ec0b3e5..819ee070 100644 +index e49af4caf..569020fd1 100644 --- a/fs/file_table.c +++ b/fs/file_table.c -@@ -147,6 +147,7 @@ struct file *get_empty_filp(void) +@@ -161,6 +161,7 @@ struct file *alloc_empty_file(int flags, const struct cred *cred) } return ERR_PTR(-ENFILE); } -+EXPORT_SYMBOL_GPL(get_empty_filp); ++EXPORT_SYMBOL_GPL(alloc_empty_file); - /** - * alloc_file - allocate and initialize a 'struct file' -@@ -257,6 +258,7 @@ void flush_delayed_fput(void) + /* + * Variant of alloc_empty_file() that doesn't check and modify nr_files. +@@ -323,6 +324,7 @@ void flush_delayed_fput(void) { delayed_fput(NULL); } @@ -37358,27 +37916,19 @@ index 7ec0b3e5..819ee070 100644 static DECLARE_DELAYED_WORK(delayed_fput_work, delayed_fput); -@@ -299,6 +301,7 @@ void __fput_sync(struct file *file) +@@ -365,6 +367,7 @@ void __fput_sync(struct file *file) } EXPORT_SYMBOL(fput); +EXPORT_SYMBOL_GPL(__fput_sync); - void put_filp(struct file *file) - { -@@ -307,6 +310,7 @@ void put_filp(struct file *file) - file_free(file); - } - } -+EXPORT_SYMBOL_GPL(put_filp); - void __init files_init(void) { diff --git a/fs/inode.c b/fs/inode.c -index 8c86c809..169811b8 100644 +index 42f6d25f3..69d4a6cde 100644 --- a/fs/inode.c +++ b/fs/inode.c -@@ -1649,7 +1649,7 @@ EXPORT_SYMBOL(generic_update_time); +@@ -1657,7 +1657,7 @@ EXPORT_SYMBOL(generic_update_time); * This does the actual work of updating an inodes time or version. Must have * had called mnt_want_write() before calling this. */ @@ -37387,7 +37937,7 @@ index 8c86c809..169811b8 100644 { int (*update_time)(struct inode *, struct timespec64 *, int); -@@ -1658,6 +1658,7 @@ static int update_time(struct inode *inode, struct timespec64 *time, int flags) +@@ -1666,6 +1666,7 @@ static int update_time(struct inode *inode, struct timespec64 *time, int flags) return update_time(inode, time, flags); } @@ -37396,10 +37946,10 @@ index 8c86c809..169811b8 100644 /** * touch_atime - update the access time diff --git a/fs/namespace.c b/fs/namespace.c -index bd2f4c68..c5364581 100644 +index 99186556f..c49803ce0 100644 --- a/fs/namespace.c +++ b/fs/namespace.c -@@ -517,6 +517,7 @@ void __mnt_drop_write(struct vfsmount *mnt) +@@ -437,6 +437,7 @@ void __mnt_drop_write(struct vfsmount *mnt) mnt_dec_writers(real_mount(mnt)); preempt_enable(); } @@ -37407,7 +37957,7 @@ index bd2f4c68..c5364581 100644 /** * mnt_drop_write - give up write access to a mount -@@ -855,6 +856,13 @@ static inline int check_mnt(struct mount *mnt) +@@ -770,6 +771,13 @@ static inline int check_mnt(struct mount *mnt) return mnt->mnt_ns == current->nsproxy->mnt_ns; } @@ -37421,7 +37971,7 @@ index bd2f4c68..c5364581 100644 /* * vfsmount lock must be held for write */ -@@ -1911,6 +1919,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg, +@@ -1826,6 +1834,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg, } return 0; } @@ -37430,18 +37980,18 @@ index bd2f4c68..c5364581 100644 static void cleanup_group_ids(struct mount *mnt, struct mount *end) { diff --git a/fs/notify/group.c b/fs/notify/group.c -index aa5468f2..b38d2241 100644 +index c03b83662..817f22c6e 100644 --- a/fs/notify/group.c +++ b/fs/notify/group.c -@@ -22,6 +22,7 @@ - #include +@@ -23,6 +23,7 @@ #include #include + #include +#include #include #include "fsnotify.h" -@@ -109,6 +110,7 @@ void fsnotify_get_group(struct fsnotify_group *group) +@@ -112,6 +113,7 @@ void fsnotify_get_group(struct fsnotify_group *group) { refcount_inc(&group->refcnt); } @@ -37449,7 +37999,7 @@ index aa5468f2..b38d2241 100644 /* * Drop a reference to a group. Free it if it's through. -@@ -118,6 +120,7 @@ void fsnotify_put_group(struct fsnotify_group *group) +@@ -121,6 +123,7 @@ void fsnotify_put_group(struct fsnotify_group *group) if (refcount_dec_and_test(&group->refcnt)) fsnotify_final_destroy_group(group); } @@ -37457,7 +38007,7 @@ index aa5468f2..b38d2241 100644 /* * Create a new fsnotify_group and hold a reference for the group returned. -@@ -147,6 +150,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops) +@@ -150,6 +153,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops) return group; } @@ -37466,10 +38016,10 @@ index aa5468f2..b38d2241 100644 int fsnotify_fasync(int fd, struct file *file, int on) { diff --git a/fs/notify/mark.c b/fs/notify/mark.c -index 61f4c5fa..855c6558 100644 +index 59cdb2782..ce365c73f 100644 --- a/fs/notify/mark.c +++ b/fs/notify/mark.c -@@ -245,6 +245,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark) +@@ -263,6 +263,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark) queue_delayed_work(system_unbound_wq, &reaper_work, FSNOTIFY_REAPER_DELAY); } @@ -37477,7 +38027,7 @@ index 61f4c5fa..855c6558 100644 /* * Get mark reference when we found the mark via lockless traversal of object -@@ -399,6 +400,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark, +@@ -417,6 +418,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark, mutex_unlock(&group->mark_mutex); fsnotify_free_mark(mark); } @@ -37485,7 +38035,7 @@ index 61f4c5fa..855c6558 100644 /* * Sorting function for lists of fsnotify marks. -@@ -624,6 +626,7 @@ int fsnotify_add_mark(struct fsnotify_mark *mark, struct inode *inode, +@@ -632,6 +634,7 @@ int fsnotify_add_mark(struct fsnotify_mark *mark, fsnotify_connp_t *connp, mutex_unlock(&group->mark_mutex); return ret; } @@ -37493,7 +38043,7 @@ index 61f4c5fa..855c6558 100644 /* * Given a list of marks, find the mark associated with given group. If found -@@ -747,6 +750,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark, +@@ -754,6 +757,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark, fsnotify_get_group(group); mark->group = group; } @@ -37502,7 +38052,7 @@ index 61f4c5fa..855c6558 100644 /* * Destroy all marks in destroy_list, waits for SRCU period to finish before diff --git a/fs/open.c b/fs/open.c -index d0e955b5..527bc1a0 100644 +index 0285ce7db..cb81623a8 100644 --- a/fs/open.c +++ b/fs/open.c @@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs, @@ -37513,19 +38063,11 @@ index d0e955b5..527bc1a0 100644 long vfs_truncate(const struct path *path, loff_t length) { -@@ -723,6 +724,7 @@ SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group) - { - return ksys_fchown(fd, user, group); - } -+EXPORT_SYMBOL_GPL(open_check_o_direct); - - int open_check_o_direct(struct file *f) - { diff --git a/fs/proc/base.c b/fs/proc/base.c -index aaffc0c3..ab729415 100644 +index 7e9f07bf2..3ab590110 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c -@@ -2004,7 +2004,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path) +@@ -2016,7 +2016,7 @@ static int map_files_get_link(struct dentry *dentry, struct path *path) down_read(&mm->mmap_sem); vma = find_exact_vma(mm, vm_start, vm_end); if (vma && vma->vm_file) { @@ -37535,7 +38077,7 @@ index aaffc0c3..ab729415 100644 rc = 0; } diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c -index 3b63be64..fb9913bf 100644 +index 3b63be64e..fb9913bf3 100644 --- a/fs/proc/nommu.c +++ b/fs/proc/nommu.c @@ -45,7 +45,10 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region) @@ -37551,10 +38093,10 @@ index 3b63be64..fb9913bf 100644 ino = inode->i_ino; } diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c -index dfd73a46..ed2ce103 100644 +index 5ea1d64cb..7865a4707 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c -@@ -306,7 +306,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid) +@@ -305,7 +305,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma) const char *name = NULL; if (file) { @@ -37566,7 +38108,7 @@ index dfd73a46..ed2ce103 100644 dev = inode->i_sb->s_dev; ino = inode->i_ino; pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT; -@@ -1734,7 +1737,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) +@@ -1727,7 +1730,7 @@ static int show_numa_map(struct seq_file *m, void *v) struct proc_maps_private *proc_priv = &numa_priv->proc_maps; struct vm_area_struct *vma = v; struct numa_maps *md = &numa_priv->md; @@ -37576,10 +38118,10 @@ index dfd73a46..ed2ce103 100644 struct mm_walk walk = { .hugetlb_entry = gather_hugetlb_stats, diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c -index 5b62f57b..dfb4a3bd 100644 +index 0b63d68de..400d1c594 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c -@@ -156,7 +156,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma, +@@ -155,7 +155,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma) file = vma->vm_file; if (file) { @@ -37592,7 +38134,7 @@ index 5b62f57b..dfb4a3bd 100644 ino = inode->i_ino; pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT; diff --git a/fs/read_write.c b/fs/read_write.c -index 153f8f69..36f52f4e 100644 +index 8a2737f0d..d9cb9690e 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -459,6 +459,7 @@ ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) @@ -37643,7 +38185,7 @@ index 153f8f69..36f52f4e 100644 static inline loff_t file_pos_read(struct file *file) { diff --git a/fs/splice.c b/fs/splice.c -index b3daa971..a5e3bcba 100644 +index b3daa971f..a5e3bcba0 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -838,8 +838,8 @@ EXPORT_SYMBOL(generic_splice_sendpage); @@ -37684,7 +38226,7 @@ index b3daa971..a5e3bcba 100644 /** * splice_direct_to_actor - splices data directly between two non-pipes diff --git a/fs/sync.c b/fs/sync.c -index b54e0541..ffd7ea43 100644 +index b54e0541a..ffd7ea438 100644 --- a/fs/sync.c +++ b/fs/sync.c @@ -28,7 +28,7 @@ @@ -37705,10 +38247,10 @@ index b54e0541..ffd7ea43 100644 /* * Write out and wait upon all dirty data associated with this diff --git a/fs/xattr.c b/fs/xattr.c -index f9cb1db1..000b62b1 100644 +index 0d6a6a4af..7ce4701b7 100644 --- a/fs/xattr.c +++ b/fs/xattr.c -@@ -296,6 +296,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value, +@@ -295,6 +295,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value, *xattr_value = value; return error; } @@ -37716,23 +38258,11 @@ index f9cb1db1..000b62b1 100644 ssize_t __vfs_getxattr(struct dentry *dentry, struct inode *inode, const char *name, -diff --git a/include/linux/file.h b/include/linux/file.h -index 279720db..76e38ead 100644 ---- a/include/linux/file.h -+++ b/include/linux/file.h -@@ -20,6 +20,7 @@ struct dentry; - struct path; - extern struct file *alloc_file(const struct path *, fmode_t mode, - const struct file_operations *fop); -+extern struct file *get_empty_filp(void); - - static inline void fput_light(struct file *file, int fput_needed) - { diff --git a/include/linux/fs.h b/include/linux/fs.h -index 805bf228..0d0d247f 100644 +index 897eae8fa..7fb92a99e 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h -@@ -1273,6 +1273,7 @@ extern void fasync_free(struct fasync_struct *); +@@ -1286,6 +1286,7 @@ extern void fasync_free(struct fasync_struct *); /* can be called from interrupts */ extern void kill_fasync(struct fasync_struct **, int, int); @@ -37740,7 +38270,7 @@ index 805bf228..0d0d247f 100644 extern void __f_setown(struct file *filp, struct pid *, enum pid_type, int force); extern int f_setown(struct file *filp, unsigned long arg, int force); extern void f_delown(struct file *filp); -@@ -1733,6 +1734,7 @@ struct file_operations { +@@ -1747,6 +1748,7 @@ struct file_operations { ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); int (*check_flags)(int); @@ -37748,7 +38278,7 @@ index 805bf228..0d0d247f 100644 int (*flock) (struct file *, int, struct file_lock *); ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); -@@ -1803,6 +1805,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, +@@ -1818,6 +1820,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, struct iovec *fast_pointer, struct iovec **ret_pointer); @@ -37761,7 +38291,7 @@ index 805bf228..0d0d247f 100644 extern ssize_t __vfs_read(struct file *, char __user *, size_t, loff_t *); extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *); -@@ -2218,6 +2226,7 @@ extern int current_umask(void); +@@ -2243,6 +2251,7 @@ extern int current_umask(void); extern void ihold(struct inode * inode); extern void iput(struct inode *); extern int generic_update_time(struct inode *, struct timespec64 *, int); @@ -37769,7 +38299,7 @@ index 805bf228..0d0d247f 100644 /* /sys/fs */ extern struct kobject *fs_kobj; -@@ -2505,6 +2514,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb) +@@ -2530,6 +2539,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb) return false; } #endif @@ -37778,7 +38308,7 @@ index 805bf228..0d0d247f 100644 extern const struct file_operations def_blk_fops; extern const struct file_operations def_chr_fops; diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h -index 6fc77d4d..27e76f0c 100644 +index b0d0b51c4..f73ffaa01 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h @@ -313,6 +313,8 @@ static inline int lockdep_match_key(struct lockdep_map *lock, @@ -37799,10 +38329,10 @@ index 6fc77d4d..27e76f0c 100644 #define lockdep_assert_held(l) do { (void)(l); } while (0) diff --git a/include/linux/mm.h b/include/linux/mm.h -index 68a51216..d7dd9860 100644 +index 0416a7204..4a298a926 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h -@@ -1448,6 +1448,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, +@@ -1440,6 +1440,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, unmap_mapping_range(mapping, holebegin, holelen, 0); } @@ -37832,10 +38362,10 @@ index 68a51216..d7dd9860 100644 void *buf, int len, unsigned int gup_flags); extern int access_remote_vm(struct mm_struct *mm, unsigned long addr, diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h -index 99ce070e..8babe351 100644 +index 5ed8f6292..012297540 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h -@@ -236,6 +236,7 @@ struct vm_region { +@@ -239,6 +239,7 @@ struct vm_region { unsigned long vm_top; /* region allocated to here */ unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */ struct file *vm_file; /* the backing file or NULL */ @@ -37843,7 +38373,7 @@ index 99ce070e..8babe351 100644 int vm_usage; /* region usage count (access under nommu_region_sem) */ bool vm_icache_flushed : 1; /* true if the icache has been flushed for -@@ -310,6 +311,7 @@ struct vm_area_struct { +@@ -313,6 +314,7 @@ struct vm_area_struct { unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE units */ struct file * vm_file; /* File we map to (can be NULL). */ @@ -37852,7 +38382,7 @@ index 99ce070e..8babe351 100644 atomic_long_t swap_readahead_info; diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h -index 35942084..24f5fd1a 100644 +index 35942084c..24f5fd1a7 100644 --- a/include/linux/mnt_namespace.h +++ b/include/linux/mnt_namespace.h @@ -6,11 +6,14 @@ @@ -37871,7 +38401,7 @@ index 35942084..24f5fd1a 100644 extern const struct file_operations proc_mountinfo_operations; extern const struct file_operations proc_mountstats_operations; diff --git a/include/linux/splice.h b/include/linux/splice.h -index 74b4911a..19789fbe 100644 +index 74b4911ac..19789fbea 100644 --- a/include/linux/splice.h +++ b/include/linux/splice.h @@ -87,4 +87,10 @@ extern void splice_shrink_spd(struct splice_pipe_desc *); @@ -37887,7 +38417,7 @@ index 74b4911a..19789fbe 100644 #endif diff --git a/include/uapi/linux/aufs_type.h b/include/uapi/linux/aufs_type.h new file mode 100644 -index 00000000..15c3eafa +index 000000000..8958f874b --- /dev/null +++ b/include/uapi/linux/aufs_type.h @@ -0,0 +1,448 @@ @@ -37933,7 +38463,7 @@ index 00000000..15c3eafa + +#include + -+#define AUFS_VERSION "4.18-20180820" ++#define AUFS_VERSION "4.19-20181029" + +/* todo? move this to linux-2.6.19/include/magic.h */ +#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's') @@ -38340,10 +38870,10 @@ index 00000000..15c3eafa + +#endif /* __AUFS_TYPE_H__ */ diff --git a/kernel/fork.c b/kernel/fork.c -index 1b27babc..382f45de 100644 +index f0b584795..fa562c364 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -504,7 +504,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, +@@ -505,7 +505,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, struct inode *inode = file_inode(file); struct address_space *mapping = file->f_mapping; @@ -38353,7 +38883,7 @@ index 1b27babc..382f45de 100644 atomic_dec(&inode->i_writecount); i_mmap_lock_write(mapping); diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c -index 5fa4d313..4f58215d 100644 +index dd13f865a..7ac19efda 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -140,7 +140,7 @@ static struct lock_list list_entries[MAX_LOCKDEP_ENTRIES]; @@ -38375,7 +38905,7 @@ index 5fa4d313..4f58215d 100644 #ifdef CONFIG_LOCK_STAT static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], cpu_lock_stats); diff --git a/kernel/task_work.c b/kernel/task_work.c -index 0fef3956..83fb1ecf 100644 +index 0fef39566..83fb1ecfc 100644 --- a/kernel/task_work.c +++ b/kernel/task_work.c @@ -116,3 +116,4 @@ void task_work_run(void) @@ -38384,10 +38914,10 @@ index 0fef3956..83fb1ecf 100644 } +EXPORT_SYMBOL_GPL(task_work_run); diff --git a/mm/Makefile b/mm/Makefile -index 8716bdab..68afd6dd 100644 +index 26ef77a38..b2869af1e 100644 --- a/mm/Makefile +++ b/mm/Makefile -@@ -39,7 +39,7 @@ obj-y := filemap.o mempool.o oom_kill.o \ +@@ -39,7 +39,7 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \ mm_init.o mmu_context.o percpu.o slab_common.o \ compaction.o vmacache.o \ interval_tree.o list_lru.o workingset.o \ @@ -38397,7 +38927,7 @@ index 8716bdab..68afd6dd 100644 obj-y += init-mm.o diff --git a/mm/filemap.c b/mm/filemap.c -index 52517f28..250f675d 100644 +index 52517f28e..250f675dc 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -2700,7 +2700,7 @@ vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf) @@ -38410,7 +38940,7 @@ index 52517f28..250f675d 100644 if (page->mapping != inode->i_mapping) { unlock_page(page); diff --git a/mm/mmap.c b/mm/mmap.c -index 17bbf4d3..a31c3e12 100644 +index f7cd9cb96..515e88a19 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -180,7 +180,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma) @@ -38431,7 +38961,7 @@ index 17bbf4d3..a31c3e12 100644 } if (next->anon_vma) anon_vma_merge(vma, next); -@@ -1820,8 +1820,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr, +@@ -1821,8 +1821,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr, return addr; unmap_and_free_vma: @@ -38441,7 +38971,7 @@ index 17bbf4d3..a31c3e12 100644 /* Undo any partial mapping done by a device driver. */ unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end); -@@ -2640,7 +2640,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2641,7 +2641,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, goto out_free_mpol; if (new->vm_file) @@ -38450,7 +38980,7 @@ index 17bbf4d3..a31c3e12 100644 if (new->vm_ops && new->vm_ops->open) new->vm_ops->open(new); -@@ -2659,7 +2659,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, +@@ -2660,7 +2660,7 @@ int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma, if (new->vm_ops && new->vm_ops->close) new->vm_ops->close(new); if (new->vm_file) @@ -38459,7 +38989,7 @@ index 17bbf4d3..a31c3e12 100644 unlink_anon_vmas(new); out_free_mpol: mpol_put(vma_policy(new)); -@@ -2821,7 +2821,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, +@@ -2822,7 +2822,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, struct vm_area_struct *vma; unsigned long populate = 0; unsigned long ret = -EINVAL; @@ -38468,7 +38998,7 @@ index 17bbf4d3..a31c3e12 100644 pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.rst.\n", current->comm, current->pid); -@@ -2896,10 +2896,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, +@@ -2897,10 +2897,27 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, } } @@ -38497,7 +39027,7 @@ index 17bbf4d3..a31c3e12 100644 out: up_write(&mm->mmap_sem); if (populate) -@@ -3207,7 +3224,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, +@@ -3206,7 +3223,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, if (anon_vma_clone(new_vma, vma)) goto out_free_mempol; if (new_vma->vm_file) @@ -38507,10 +39037,10 @@ index 17bbf4d3..a31c3e12 100644 new_vma->vm_ops->open(new_vma); vma_link(mm, new_vma, prev, rb_link, rb_parent); diff --git a/mm/nommu.c b/mm/nommu.c -index 9fc9e433..25d4c492 100644 +index e4aac3321..b27b200f1 100644 --- a/mm/nommu.c +++ b/mm/nommu.c -@@ -629,7 +629,7 @@ static void __put_nommu_region(struct vm_region *region) +@@ -625,7 +625,7 @@ static void __put_nommu_region(struct vm_region *region) up_write(&nommu_region_sem); if (region->vm_file) @@ -38519,7 +39049,7 @@ index 9fc9e433..25d4c492 100644 /* IO memory and memory shared directly out of the pagecache * from ramfs/tmpfs mustn't be released here */ -@@ -767,7 +767,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma) +@@ -763,7 +763,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma) if (vma->vm_ops && vma->vm_ops->close) vma->vm_ops->close(vma); if (vma->vm_file) @@ -38528,7 +39058,7 @@ index 9fc9e433..25d4c492 100644 put_nommu_region(vma->vm_region); vm_area_free(vma); } -@@ -1290,7 +1290,7 @@ unsigned long do_mmap(struct file *file, +@@ -1286,7 +1286,7 @@ unsigned long do_mmap(struct file *file, goto error_just_free; } } @@ -38537,7 +39067,7 @@ index 9fc9e433..25d4c492 100644 kmem_cache_free(vm_region_jar, region); region = pregion; result = start; -@@ -1365,7 +1365,7 @@ unsigned long do_mmap(struct file *file, +@@ -1361,7 +1361,7 @@ unsigned long do_mmap(struct file *file, up_write(&nommu_region_sem); error: if (region->vm_file) @@ -38548,7 +39078,7 @@ index 9fc9e433..25d4c492 100644 fput(vma->vm_file); diff --git a/mm/prfile.c b/mm/prfile.c new file mode 100644 -index 00000000..a27ac368 +index 000000000..a27ac3688 --- /dev/null +++ b/mm/prfile.c @@ -0,0 +1,86 @@ @@ -38639,7 +39169,7 @@ index 00000000..a27ac368 +} +#endif /* !CONFIG_MMU */ diff --git a/security/commoncap.c b/security/commoncap.c -index f4c33abd..70563f11 100644 +index 2e489d6a3..1e146dafe 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -1336,12 +1336,14 @@ int cap_mmap_addr(unsigned long addr) @@ -38658,7 +39188,7 @@ index f4c33abd..70563f11 100644 #ifdef CONFIG_SECURITY diff --git a/security/device_cgroup.c b/security/device_cgroup.c -index cd97929f..424fd230 100644 +index cd97929fa..424fd2308 100644 --- a/security/device_cgroup.c +++ b/security/device_cgroup.c @@ -8,6 +8,7 @@ @@ -38675,10 +39205,10 @@ index cd97929f..424fd230 100644 } +EXPORT_SYMBOL_GPL(__devcgroup_check_permission); diff --git a/security/security.c b/security/security.c -index 68f46d84..3bc13488 100644 +index 736e78da1..b3145394c 100644 --- a/security/security.c +++ b/security/security.c -@@ -537,6 +537,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry) +@@ -542,6 +542,7 @@ int security_path_rmdir(const struct path *dir, struct dentry *dentry) return 0; return call_int_hook(path_rmdir, 0, dir, dentry); } @@ -38686,7 +39216,7 @@ index 68f46d84..3bc13488 100644 int security_path_unlink(const struct path *dir, struct dentry *dentry) { -@@ -553,6 +554,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry, +@@ -558,6 +559,7 @@ int security_path_symlink(const struct path *dir, struct dentry *dentry, return 0; return call_int_hook(path_symlink, 0, dir, dentry, old_name); } @@ -38694,7 +39224,7 @@ index 68f46d84..3bc13488 100644 int security_path_link(struct dentry *old_dentry, const struct path *new_dir, struct dentry *new_dentry) -@@ -561,6 +563,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir, +@@ -566,6 +568,7 @@ int security_path_link(struct dentry *old_dentry, const struct path *new_dir, return 0; return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry); } @@ -38702,7 +39232,7 @@ index 68f46d84..3bc13488 100644 int security_path_rename(const struct path *old_dir, struct dentry *old_dentry, const struct path *new_dir, struct dentry *new_dentry, -@@ -588,6 +591,7 @@ int security_path_truncate(const struct path *path) +@@ -593,6 +596,7 @@ int security_path_truncate(const struct path *path) return 0; return call_int_hook(path_truncate, 0, path); } @@ -38710,7 +39240,7 @@ index 68f46d84..3bc13488 100644 int security_path_chmod(const struct path *path, umode_t mode) { -@@ -595,6 +599,7 @@ int security_path_chmod(const struct path *path, umode_t mode) +@@ -600,6 +604,7 @@ int security_path_chmod(const struct path *path, umode_t mode) return 0; return call_int_hook(path_chmod, 0, path, mode); } @@ -38718,7 +39248,7 @@ index 68f46d84..3bc13488 100644 int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) { -@@ -602,6 +607,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) +@@ -607,6 +612,7 @@ int security_path_chown(const struct path *path, kuid_t uid, kgid_t gid) return 0; return call_int_hook(path_chown, 0, path, uid, gid); } @@ -38726,7 +39256,7 @@ index 68f46d84..3bc13488 100644 int security_path_chroot(const struct path *path) { -@@ -687,6 +693,7 @@ int security_inode_readlink(struct dentry *dentry) +@@ -692,6 +698,7 @@ int security_inode_readlink(struct dentry *dentry) return 0; return call_int_hook(inode_readlink, 0, dentry); } @@ -38734,7 +39264,7 @@ index 68f46d84..3bc13488 100644 int security_inode_follow_link(struct dentry *dentry, struct inode *inode, bool rcu) -@@ -702,6 +709,7 @@ int security_inode_permission(struct inode *inode, int mask) +@@ -707,6 +714,7 @@ int security_inode_permission(struct inode *inode, int mask) return 0; return call_int_hook(inode_permission, 0, inode, mask); } @@ -38742,7 +39272,7 @@ index 68f46d84..3bc13488 100644 int security_inode_setattr(struct dentry *dentry, struct iattr *attr) { -@@ -873,6 +881,7 @@ int security_file_permission(struct file *file, int mask) +@@ -878,6 +886,7 @@ int security_file_permission(struct file *file, int mask) return fsnotify_perm(file, mask); } @@ -38750,7 +39280,7 @@ index 68f46d84..3bc13488 100644 int security_file_alloc(struct file *file) { -@@ -932,6 +941,7 @@ int security_mmap_file(struct file *file, unsigned long prot, +@@ -937,6 +946,7 @@ int security_mmap_file(struct file *file, unsigned long prot, return ret; return ima_file_mmap(file, prot); } diff --git a/patch/kernel/sunxi-dev/general-ov5640-support-5M-2542x1944-resolution.patch b/patch/kernel/sunxi-dev/general-ov5640-support-5M-2542x1944-resolution.patch deleted file mode 100644 index a1b8c7704..000000000 --- a/patch/kernel/sunxi-dev/general-ov5640-support-5M-2542x1944-resolution.patch +++ /dev/null @@ -1,211 +0,0 @@ -From 05a8864b512a6555c92e693a0cfaf4af177105f4 Mon Sep 17 00:00:00 2001 -From: wuweidong <625769020@qq.com> -Date: Mon, 26 Mar 2018 18:57:58 +0800 -Subject: [PATCH 45/60] media: ov5640: Support 5M(2542x1944) resolution - ---- - drivers/media/i2c/ov5640.c | 153 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 153 insertions(+) - -diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c -index e2dd352224c7..aa204e50c045 100644 ---- a/drivers/media/i2c/ov5640.c -+++ b/drivers/media/i2c/ov5640.c -@@ -105,6 +105,8 @@ enum ov5640_mode_id { - enum ov5640_frame_rate { - OV5640_15_FPS = 0, - OV5640_30_FPS, -+ OV5640_7P5_FPS, -+ OV5640_5_FPS, - OV5640_NUM_FRAMERATES, - }; - -@@ -132,6 +134,8 @@ MODULE_PARM_DESC(virtual_channel, - static const int ov5640_framerates[] = { - [OV5640_15_FPS] = 15, - [OV5640_30_FPS] = 30, -+ [OV5640_7P5_FPS] = 7, -+ [OV5640_5_FPS] = 5, - }; - - /* regulator supplies */ -@@ -703,6 +707,42 @@ static const struct reg_value ov5640_setting_15fps_1080P_1920_1080[] = { - {0x4005, 0x1a, 0, 0}, {0x3008, 0x02, 0, 0}, {0x3503, 0, 0, 0}, - }; - -+static const struct reg_value ov5640_setting_7p5_fps_1080P_1920_1080[] = { -+ {0x3008, 0x42, 0, 0}, -+ {0x3035, 0x21, 0, 0}, {0x3036, 0x54, 0, 0}, {0x3c07, 0x08, 0, 0}, -+ {0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0}, -+ {0x3820, 0x40, 0, 0}, {0x3821, 0x06, 0, 0}, {0x3814, 0x11, 0, 0}, -+ {0x3815, 0x11, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0}, -+ {0x3802, 0x00, 0, 0}, {0x3803, 0x00, 0, 0}, {0x3804, 0x0a, 0, 0}, -+ {0x3805, 0x3f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9f, 0, 0}, -+ {0x3808, 0x0a, 0, 0}, {0x3809, 0x20, 0, 0}, {0x380a, 0x07, 0, 0}, -+ {0x380b, 0x98, 0, 0}, {0x380c, 0x0b, 0, 0}, {0x380d, 0x1c, 0, 0}, -+ {0x380e, 0x07, 0, 0}, {0x380f, 0xb0, 0, 0}, {0x3810, 0x00, 0, 0}, -+ {0x3811, 0x10, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x04, 0, 0}, -+ {0x3618, 0x04, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x21, 0, 0}, -+ {0x3709, 0x12, 0, 0}, {0x370c, 0x00, 0, 0}, {0x3a02, 0x03, 0, 0}, -+ {0x3a03, 0xd8, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0x27, 0, 0}, -+ {0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x03, 0, 0}, -+ {0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0}, -+ {0x4001, 0x02, 0, 0}, {0x4004, 0x06, 0, 0}, {0x4713, 0x03, 0, 0}, -+ {0x4407, 0x04, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0}, -+ {0x3824, 0x02, 0, 0}, {0x5001, 0x83, 0, 0}, {0x3035, 0x41, 0, 0}, -+ {0x3036, 0x54, 0, 1}, {0x3c07, 0x07, 0, 0}, {0x3c08, 0x00, 0, 0}, -+ {0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0}, -+ {0x3800, 0x01, 0, 0}, {0x3801, 0x50, 0, 0}, {0x3802, 0x01, 0, 0}, -+ {0x3803, 0xb2, 0, 0}, {0x3804, 0x08, 0, 0}, {0x3805, 0xef, 0, 0}, -+ {0x3806, 0x05, 0, 0}, {0x3807, 0xf1, 0, 0}, {0x3808, 0x07, 0, 0}, -+ {0x3809, 0x80, 0, 0}, {0x380a, 0x04, 0, 0}, {0x380b, 0x38, 0, 0}, -+ {0x380c, 0x09, 0, 0}, {0x380d, 0xc4, 0, 0}, {0x380e, 0x04, 0, 0}, -+ {0x380f, 0x60, 0, 0}, {0x3612, 0x2b, 0, 0}, {0x3708, 0x64, 0, 0}, -+ {0x3a02, 0x04, 0, 0}, {0x3a03, 0x60, 0, 0}, {0x3a08, 0x01, 0, 0}, -+ {0x3a09, 0x50, 0, 0}, {0x3a0a, 0x01, 0, 0}, {0x3a0b, 0x18, 0, 0}, -+ {0x3a0e, 0x03, 0, 0}, {0x3a0d, 0x04, 0, 0}, {0x3a14, 0x04, 0, 0}, -+ {0x3a15, 0x60, 0, 0}, {0x4713, 0x02, 0, 0}, {0x4407, 0x04, 0, 0}, -+ {0x460b, 0x37, 0, 0}, {0x460c, 0x20, 0, 0}, {0x3824, 0x04, 0, 0}, -+ {0x4005, 0x1a, 0, 0}, {0x3008, 0x02, 0, 0}, {0x3503, 0, 0, 0}, -+}; -+ - static const struct reg_value ov5640_setting_15fps_QSXGA_2592_1944[] = { - {0x3820, 0x40, 0, 0}, {0x3821, 0x06, 0, 0}, - {0x3035, 0x21, 0, 0}, {0x3036, 0x54, 0, 0}, {0x3c07, 0x08, 0, 0}, -@@ -725,6 +765,103 @@ static const struct reg_value ov5640_setting_15fps_QSXGA_2592_1944[] = { - {0x3824, 0x02, 0, 0}, {0x5001, 0x83, 0, 70}, - }; - -+static const struct reg_value ov5640_setting_5_fps_QSXGA_2592_1944[] = { -+ // YUV 2592x1944 5fps -+ // Input Clock = 24Mhz, PCLK = 56MHz -+ {0x3035, 0x21, 0, 0}, -+ // PLL -+ {0x3036, 0x46, 0, 0}, -+ // PLL -+ {0x3c07, 0x07, 0, 0}, -+ // lightm eter 1 threshold[7:0] -+ {0x3820, 0x40, 0, 0}, -+ // flip -+ {0x3821, 0x06, 0, 0}, -+ // mirror -+ {0x3814, 0x11, 0, 0}, -+ // timing X inc -+ {0x3815, 0x11, 0, 0}, -+ // timing Y inc -+ {0x3800, 0x00, 0, 0}, -+ // HS -+ {0x3801, 0x00, 0, 0}, -+ // HS -+ {0x3802, 0x00, 0, 0}, -+ // VS -+ {0x3803, 0x00, 0, 0}, -+ // VS -+ {0x3804, 0x0a, 0, 0}, -+ // HW {HE) -+ {0x3805, 0x3f, 0, 0}, -+ // HW {HE) -+ {0x3806, 0x07, 0, 0}, -+ // VH {VE) -+ {0x3807, 0x9f, 0, 0}, -+ // VH {VE) -+ {0x3808, 0x0a, 0, 0}, -+ // DVPHO -+ {0x3809, 0x20, 0, 0}, -+ // DVPHO -+ {0x380a, 0x07, 0, 0}, -+ // DVPVO -+ {0x380b, 0x98, 0, 0}, -+ // DVPVO -+ {0x380c, 0x0b, 0, 0}, -+ // HTS -+ {0x380d, 0x1c, 0, 0}, -+ // HTS -+ {0x380e, 0x07, 0, 0}, -+ // VTS -+ {0x380f, 0xb0, 0, 0}, -+ // VTS -+ {0x3813, 0x04, 0, 0}, -+ // timing V offset -+ {0x3618, 0x04, 0, 0}, -+ {0x3612, 0x2b, 0, 0}, -+ {0x3709, 0x12, 0, 0}, -+ {0x370c, 0x00, 0, 0}, -+ // banding filters are calculated automatically in camera driver -+ //{0x3a02, 0x07, 0, 0}, -+ // 60Hz max exposure -+ //{0x3a03, 0xae, 0, 0}, -+ // 60Hz max exposure -+ //{0x3a08, 0x01, 0, 0}, -+ // B50 step -+ //{0x3a09, 0x27, 0, 0}, -+ // B50 step -+ //{0x3a0a, 0x00, 0, 0}, -+ // B60 step -+ //{0x3a0b, 0xf6, 0, 0}, -+ // B60 step -+ //{0x3a0e, 0x06, 0, 0}, -+ // 50Hz max band -+ //{0x3a0d, 0x08, 0, 0}, -+ // 60Hz max band -+ //{0x3a14, 0x07, 0, 0}, -+ // 50Hz max exposure -+ //{0x3a15, 0xae, 0, 0}, -+ // 50Hz max exposure -+ {0x4004, 0x06, 0, 0}, -+ // BLC line number -+ {0x3002, 0x1c, 0, 0}, -+ // reset JFIFO, SFIFO, JPG -+ {0x3006, 0xc3, 0, 0}, -+ // disable clock of JPEG2x, JPEG -+ {0x4713, 0x02, 0, 0}, -+ // JPEG mode 3 -+ {0x4407, 0x0c, 0, 0}, -+ // Quantization sacle -+ {0x460b, 0x37, 0, 0}, -+ {0x460c, 0x20, 0, 0}, -+ {0x4837, 0x2c, 0, 0}, -+ // MIPI global timing -+ {0x3824, 0x01, 0, 0}, -+ // PCLK manual divider -+ {0x5001, 0x83, 0, 0}, -+ // SDE on, CMX on, AWB on -+ {0x3503, 0x03, 0, 0}, -+}; -+ - /* power-on sensor init reg table */ - static const struct ov5640_mode_info ov5640_mode_init_data = { - 0, SUBSAMPLING, 640, 480, ov5640_init_setting_30fps_VGA, -@@ -909,6 +909,14 @@ ov5640_mode_data[OV5640_NUM_FRAMERATES][OV5640_NUM_MODES] = { - ov5640_setting_30fps_1080P_1920_1080, - ARRAY_SIZE(ov5640_setting_30fps_1080P_1920_1080)}, - {OV5640_MODE_QSXGA_2592_1944, -1, 0, 0, 0, 0, NULL, 0}, -+ }, { -+ {OV5640_MODE_1080P_1920_1080, SCALING, 1920, 1080, -+ ov5640_setting_7p5_fps_1080P_1920_1080, -+ ARRAY_SIZE(ov5640_setting_7p5_fps_1080P_1920_1080)} -+ }, { -+ {OV5640_MODE_1080P_1920_1080, SCALING, 2592, 1944, -+ ov5640_setting_5_fps_QSXGA_2592_1944, -+ ARRAY_SIZE(ov5640_setting_5_fps_QSXGA_2592_1944)} - }, - }; - -@@ -1376,6 +1521,14 @@ ov5640_find_mode(struct ov5640_dev *sensor, enum ov5640_frame_rate fr, - const struct ov5640_mode_info *mode = NULL; - int i; - -+ printk("%s fps=%d width=%d height=%d nearest=%d\n", __func__, fr, width, height, nearest); -+ -+ if (width >= 2592 && height >= 1944) -+ fr = OV5640_5_FPS; -+ else if (width >= 1920 && height >= 1080) -+ fr = OV5640_7P5_FPS; -+ else -+ fr = OV5640_30_FPS; - for (i = OV5640_NUM_MODES - 1; i >= 0; i--) { - mode = &ov5640_mode_data[fr][i]; - --- -2.17.1 - diff --git a/patch/kernel/sunxi-dev/general-packaging-4.17-next.patch.disabled b/patch/kernel/sunxi-dev/general-packaging-4.17-next.patch.disabled deleted file mode 100644 index 0a5179007..000000000 --- a/patch/kernel/sunxi-dev/general-packaging-4.17-next.patch.disabled +++ /dev/null @@ -1,221 +0,0 @@ -diff --git a/scripts/package/builddeb b/scripts/package/builddeb -index 90c9a8a..3c79b90 100755 ---- a/scripts/package/builddeb -+++ b/scripts/package/builddeb -@@ -29,6 +29,27 @@ create_package() { - # in case we are in a restrictive umask environment like 0077 - chmod -R a+rX "$pdir" - -+ # Create preinstall and post install script to remove dtb -+ if [[ "$1" == *dtb* ]]; then -+ echo "if [ -d /boot/dtb-$version ]; then mv /boot/dtb-$version /boot/dtb-$version.old; fi" >> $pdir/DEBIAN/preinst -+ echo "if [ -d /boot/dtb.old ]; then rm -rf /boot/dtb.old; fi" >> $pdir/DEBIAN/preinst -+ echo "if [ -d /boot/dtb ]; then mv /boot/dtb /boot/dtb.old; fi" >> $pdir/DEBIAN/preinst -+ echo "exit 0" >> $pdir/DEBIAN/preinst -+ chmod 775 $pdir/DEBIAN/preinst -+ -+ echo "if [ -d /boot/dtb-$version.old ]; then rm -rf /boot/dtb-$version.old; fi" >> $pdir/DEBIAN/postinst -+ echo "ln -sf dtb-$version /boot/dtb > /dev/null 2>&1 || mv /boot/dtb-$version /boot/dtb" >> $pdir/DEBIAN/postinst -+ echo "exit 0" >> $pdir/DEBIAN/postinst -+ chmod 775 $pdir/DEBIAN/postinst -+ fi -+ -+ # Create postinstall script for headers -+ if [[ "$1" == *headers* ]]; then -+ echo "cd /usr/src/linux-headers-$version; echo \"Compiling headers - please wait ...\"; find -type f -exec touch {} + ; make -s scripts >/dev/null 2>&1" >> $pdir/DEBIAN/postinst -+ echo "exit 0" >> $pdir/DEBIAN/postinst -+ chmod 775 $pdir/DEBIAN/postinst -+ fi -+ - # Create the package - dpkg-gencontrol -p$pname -P"$pdir" - dpkg --build "$pdir" .. -@@ -39,9 +60,11 @@ tmpdir="$objtree/debian/tmp" - kernel_headers_dir="$objtree/debian/hdrtmp" - libc_headers_dir="$objtree/debian/headertmp" - dbg_dir="$objtree/debian/dbgtmp" --packagename=linux-image-$version --kernel_headers_packagename=linux-headers-$version --libc_headers_packagename=linux-libc-dev -+dtb_dir="$objtree/debian/dtbtmp" -+packagename=linux-image-next"$LOCALVERSION" -+kernel_headers_packagename=linux-headers-next"$LOCALVERSION" -+dtb_packagename=linux-dtb-next"$LOCALVERSION" -+libc_headers_packagename=linux-libc-dev-next"$LOCALVERSION" - dbg_packagename=$packagename-dbg - - if [ "$ARCH" = "um" ] ; then -@@ -52,6 +75,15 @@ fi - # XXX: have each arch Makefile export a variable of the canonical image install - # path instead - case $ARCH in -+aarch64|arm64) -+ image_name=Image -+ installed_image_path="boot/vmlinuz-$version" -+ -+ ;; -+arm*) -+ image_name=zImage -+ installed_image_path="boot/vmlinuz-$version" -+ ;; - um) - installed_image_path="usr/bin/linux-$version" - ;; -@@ -65,7 +97,9 @@ esac - BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_INFO=y' $KCONFIG_CONFIG || true)" - - # Setup the directory structure --rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files -+rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" "$dtb_dir" $objtree/debian/files -+mkdir -m 755 -p "$dtb_dir/DEBIAN" -+mkdir -p "$dtb_dir/boot/dtb-$version" "$dtb_dir/usr/share/doc/$dtb_packagename" - mkdir -m 755 -p "$tmpdir/DEBIAN" - mkdir -p "$tmpdir/lib" "$tmpdir/boot" - mkdir -p "$kernel_headers_dir/lib/modules/$version/" -@@ -118,6 +152,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then - fi - fi - -+if grep -q '^CONFIG_OF=y' $KCONFIG_CONFIG ; then -+ #mkdir -p "$tmpdir/boot/dtb" -+ INSTALL_DTBS_PATH="$dtb_dir/boot/dtb-$version" $MAKE KBUILD_SRC= dtbs_install -+fi -+ - if [ "$ARCH" != "um" ]; then - $MAKE headers_check KBUILD_SRC= - $MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr" -@@ -137,7 +176,7 @@ fi - for script in postinst postrm preinst prerm ; do - mkdir -p "$tmpdir$debhookdir/$script.d" - cat < "$tmpdir/DEBIAN/$script" --#!/bin/sh -+#!/bin/bash - - set -e - -@@ -153,9 +192,60 @@ EOF - chmod 755 "$tmpdir/DEBIAN/$script" - done - -+## -+## Create sym link to kernel image -+## -+sed -e "s/set -e//g" -i $tmpdir/DEBIAN/postinst -+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/postinst -+cat >> $tmpdir/DEBIAN/postinst < /dev/null 2>&1 -+ cp /boot/uImage /tmp/uImage -+ sync -+ mountpoint -q /boot || mount /boot -+ cp /tmp/uImage /boot/uImage -+ rm -f /$installed_image_path -+else -+ ln -sf $(basename $installed_image_path) /boot/$image_name || mv /$installed_image_path /boot/$image_name -+fi -+touch /boot/.next -+exit 0 -+EOT -+ -+## -+## FAT install workaround -+## -+sed -e "s/set -e//g" -i $tmpdir/DEBIAN/preinst -+sed -e "s/exit 0//g" -i $tmpdir/DEBIAN/preinst -+cat >> $tmpdir/DEBIAN/preinst <> $tmpdir/DEBIAN/preinst -+ - # Build kernel header package - (cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl) > "$objtree/debian/hdrsrcfiles" - (cd $srctree; find arch/*/include include scripts -type f -o -type l) >> "$objtree/debian/hdrsrcfiles" -+(cd $srctree; find security/*/include -type f) >> "$objtree/debian/hdrsrcfiles" - (cd $srctree; find arch/$SRCARCH -name module.lds -o -name Kbuild.platforms -o -name Platform) >> "$objtree/debian/hdrsrcfiles" - (cd $srctree; find $(find arch/$SRCARCH -name include -o -name scripts -type d) -type f) >> "$objtree/debian/hdrsrcfiles" - if grep -q '^CONFIG_STACK_VALIDATION=y' $KCONFIG_CONFIG ; then -@@ -167,15 +257,19 @@ if grep -q '^CONFIG_GCC_PLUGINS=y' $KCONFIG_CONFIG ; then - fi - destdir=$kernel_headers_dir/usr/src/linux-headers-$version - mkdir -p "$destdir" -+(cd $destdir; patch -p1 < /tmp/headers-debian-byteshift.patch) - (cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd $destdir; tar -xf -) - (cd $objtree; tar -c -f - -T -) < "$objtree/debian/hdrobjfiles" | (cd $destdir; tar -xf -) - (cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be - ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build" - rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles" - -+(cd $destdir; make M=scripts clean) -+ - if [ "$ARCH" != "um" ]; then - create_package "$kernel_headers_packagename" "$kernel_headers_dir" -- create_package "$libc_headers_packagename" "$libc_headers_dir" -+ # create_package "$libc_headers_packagename" "$libc_headers_dir" -+ create_package "$dtb_packagename" "$dtb_dir" - fi - - create_package "$packagename" "$tmpdir" -diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian -index 6adb3a1..00e12eb 100755 ---- a/scripts/package/mkdebian -+++ b/scripts/package/mkdebian -@@ -61,10 +61,12 @@ else - packageversion=$version-$revision - fi - sourcename=$KDEB_SOURCENAME --packagename=linux-image-$version --kernel_headers_packagename=linux-headers-$version -+packagename=linux-image-next$LOCALVERSION -+kernel_headers_packagename=linux-headers-next$LOCALVERSION -+dtb_packagename=linux-dtb-next$LOCALVERSION - dbg_packagename=$packagename-dbg - debarch= -+image_name= - set_debarch - - if [ "$ARCH" = "um" ] ; then -@@ -168,6 +170,11 @@ Architecture: $debarch - Description: Linux kernel debugging symbols for $version - This package will come in handy if you need to debug the kernel. It provides - all the necessary debug symbols for the kernel and its modules. -+ -+Package: $dtb_packagename -+Architecture: $debarch -+Description: Linux DTB, version $version -+ This package contains device blobs from the Linux kernel, version $version - EOF - - cat < debian/rules -diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile -index f839ecd9..cd276162 100644 ---- a/arch/arm64/Makefile -+++ b/arch/arm64/Makefile -@@ -103,7 +103,7 @@ core-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a - - # Default target when executing plain make - boot := arch/arm64/boot --KBUILD_IMAGE := $(boot)/Image.gz -+KBUILD_IMAGE := $(boot)/Image - KBUILD_DTBS := dtbs - - all: Image.gz $(KBUILD_DTBS) diff --git a/patch/kernel/sunxi-dev/nand-disable-badblock-check-for-migration.patch.disabled b/patch/kernel/sunxi-dev/nand-disable-badblock-check-for-migration.patch similarity index 82% rename from patch/kernel/sunxi-dev/nand-disable-badblock-check-for-migration.patch.disabled rename to patch/kernel/sunxi-dev/nand-disable-badblock-check-for-migration.patch index dfb6fd998..d60d42d08 100644 --- a/patch/kernel/sunxi-dev/nand-disable-badblock-check-for-migration.patch.disabled +++ b/patch/kernel/sunxi-dev/nand-disable-badblock-check-for-migration.patch @@ -1,7 +1,7 @@ -diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c +diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index 77533f7..8b3b184 100644 ---- a/drivers/mtd/nand/nand_base.c -+++ b/drivers/mtd/nand/nand_base.c +--- a/drivers/mtd/nand/raw/nand_base.c ++++ b/drivers/mtd/nand/raw/nand_base.c @@ -532,11 +532,7 @@ static int nand_block_checkbad(struct mtd_info *mtd, loff_t ofs, int allowbbt) { struct nand_chip *chip = mtd_to_nand(mtd); diff --git a/patch/kernel/sunxi-dev/p-board-h6-add-THS.patch b/patch/kernel/sunxi-dev/p-board-h6-add-THS.patch index 631a40f83..1aec82190 100644 --- a/patch/kernel/sunxi-dev/p-board-h6-add-THS.patch +++ b/patch/kernel/sunxi-dev/p-board-h6-add-THS.patch @@ -49,236 +49,6 @@ index b6f2d6b2ecae..2e97173c9204 100644 2.17.1 -From cc6843c51ec07b6c2ec961b4baa1d5967e0bdb3b Mon Sep 17 00:00:00 2001 -From: Chen-Yu Tsai -Date: Fri, 13 Jul 2018 00:04:48 +0800 -Subject: [PATCH 09/45] dt-bindings: mfd: axp20x: Add "self-working" mode for - AXP806 - -The AXP806 has three operation modes: - - - master mode: The PMIC is the first or only AXP PMIC in the system, - but is not in charge of power management, i.e. only - provides regulator functions. - - - slave mode: The PMIC is the second AXP PMIC in the system, chained - to the first, or master, one. - - - self-working mode: The PMIC is the only AXP PMIC in the system, and - is in charge of power sequencing. - -The functional differences between these modes can be found in the -"Control and Operation" chapter of the AXP806 (in Chinese) and AXP805 -(in English) datasheets. These include how the PMIC responds to external -signals, whether it takes an external voltage reference or uses its own, -and whether the EN/PWRON pin functions as an enable switch or power button. - -We already support both slave and master mode. This patch adds a property -for describing the self-working mode, and reworks the description for -the mode properties. - -Signed-off-by: Chen-Yu Tsai -Reviewed-by: Rob Herring -Reviewed-by: Icenowy Zheng -Tested-by: Icenowy Zheng -Acked-by: Maxime Ripard -Signed-off-by: Lee Jones ---- - Documentation/devicetree/bindings/mfd/axp20x.txt | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt b/Documentation/devicetree/bindings/mfd/axp20x.txt -index d1762f3b30af..eaaf79c01e1e 100644 ---- a/Documentation/devicetree/bindings/mfd/axp20x.txt -+++ b/Documentation/devicetree/bindings/mfd/axp20x.txt -@@ -45,8 +45,11 @@ Optional properties: - board is driving OTG VBus or not. - (axp221 / axp223 / axp803/ axp813 only) - --- x-powers,master-mode: Boolean (axp806 only). Set this when the PMIC is -- wired for master mode. The default is slave mode. -+- x-powers,self-working-mode and -+ x-powers,master-mode: Boolean (axp806 only). Set either of these when the -+ PMIC is wired for self-working mode or master mode. -+ If neither is set then slave mode is assumed. -+ This corresponds to how the MODESET pin is wired. - - - -supply: a phandle to the regulator supply node. May be omitted if - inputs are unregulated, such as using the IPSOUT output --- -2.17.1 - - -From 1ff51a1fb79a61f822f1551c994274c0cfcdf131 Mon Sep 17 00:00:00 2001 -From: Chen-Yu Tsai -Date: Fri, 13 Jul 2018 00:04:49 +0800 -Subject: [PATCH 10/45] mfd: axp20x: Add self-working mode support for AXP806 - -The AXP806 can operate in a standalone "self-working" mode, in which it -is also responsible for power control of the overall system. This mode -is similar to the master mode, but the EN/PWRON pin functions as a power -button, instead of a level-triggered enable switch. - -This patch adds code checking for the new "x-powers,self-working-mode" -property, and a separate mfd_cell list that includes the power button -(PEK) sub-device. - -Signed-off-by: Chen-Yu Tsai -Reviewed-by: Icenowy Zheng -Tested-by: Icenowy Zheng -Acked-by: Maxime Ripard -Signed-off-by: Lee Jones ---- - drivers/mfd/axp20x.c | 28 +++++++++++++++++++++++++--- - 1 file changed, 25 insertions(+), 3 deletions(-) - -diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c -index 9a2ef3d9b8f8..0be511dd93d0 100644 ---- a/drivers/mfd/axp20x.c -+++ b/drivers/mfd/axp20x.c -@@ -221,6 +221,11 @@ static const struct resource axp803_pek_resources[] = { - DEFINE_RES_IRQ_NAMED(AXP803_IRQ_PEK_FAL_EDGE, "PEK_DBF"), - }; - -+static const struct resource axp806_pek_resources[] = { -+ DEFINE_RES_IRQ_NAMED(AXP806_IRQ_POK_RISE, "PEK_DBR"), -+ DEFINE_RES_IRQ_NAMED(AXP806_IRQ_POK_FALL, "PEK_DBF"), -+}; -+ - static const struct resource axp809_pek_resources[] = { - DEFINE_RES_IRQ_NAMED(AXP809_IRQ_PEK_RIS_EDGE, "PEK_DBR"), - DEFINE_RES_IRQ_NAMED(AXP809_IRQ_PEK_FAL_EDGE, "PEK_DBF"), -@@ -730,6 +735,15 @@ static const struct mfd_cell axp803_cells[] = { - { .name = "axp20x-regulator" }, - }; - -+static const struct mfd_cell axp806_self_working_cells[] = { -+ { -+ .name = "axp221-pek", -+ .num_resources = ARRAY_SIZE(axp806_pek_resources), -+ .resources = axp806_pek_resources, -+ }, -+ { .name = "axp20x-regulator" }, -+}; -+ - static const struct mfd_cell axp806_cells[] = { - { - .id = 2, -@@ -842,8 +856,14 @@ int axp20x_match_device(struct axp20x_dev *axp20x) - axp20x->regmap_irq_chip = &axp803_regmap_irq_chip; - break; - case AXP806_ID: -- axp20x->nr_cells = ARRAY_SIZE(axp806_cells); -- axp20x->cells = axp806_cells; -+ if (of_property_read_bool(axp20x->dev->of_node, -+ "x-powers,self-working-mode")) { -+ axp20x->nr_cells = ARRAY_SIZE(axp806_self_working_cells); -+ axp20x->cells = axp806_self_working_cells; -+ } else { -+ axp20x->nr_cells = ARRAY_SIZE(axp806_cells); -+ axp20x->cells = axp806_cells; -+ } - axp20x->regmap_cfg = &axp806_regmap_config; - axp20x->regmap_irq_chip = &axp806_regmap_irq_chip; - break; -@@ -901,7 +921,9 @@ int axp20x_device_probe(struct axp20x_dev *axp20x) - */ - if (axp20x->variant == AXP806_ID) { - if (of_property_read_bool(axp20x->dev->of_node, -- "x-powers,master-mode")) -+ "x-powers,master-mode") || -+ of_property_read_bool(axp20x->dev->of_node, -+ "x-powers,self-working-mode")) - regmap_write(axp20x->regmap, AXP806_REG_ADDR_EXT, - AXP806_REG_ADDR_EXT_ADDR_MASTER_MODE); - else --- -2.17.1 - - -From 8a19d87150e9afb44194407be651669fa02344fe Mon Sep 17 00:00:00 2001 -From: Chen-Yu Tsai -Date: Fri, 13 Jul 2018 00:04:50 +0800 -Subject: [PATCH 11/45] mfd: axp20x: Support AXP806 in I2C mode - -The Pine64 H64 board uses an AXP806 PMIC in I2C and self-working mode. -The H64 SoC does not have the usual RSB controller. - -This patch adds AXP806 to the list of devices supported in I2C mode. -In theory, all RSB-based PMICs can also be used in I2C mode. - -Signed-off-by: Chen-Yu Tsai -Reviewed-by: Icenowy Zheng -Tested-by: Icenowy Zheng -Acked-by: Maxime Ripard -Signed-off-by: Lee Jones ---- - drivers/mfd/axp20x-i2c.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/drivers/mfd/axp20x-i2c.c b/drivers/mfd/axp20x-i2c.c -index d35a5fe6c950..a7b7c5423ea5 100644 ---- a/drivers/mfd/axp20x-i2c.c -+++ b/drivers/mfd/axp20x-i2c.c -@@ -65,6 +65,7 @@ static const struct of_device_id axp20x_i2c_of_match[] = { - { .compatible = "x-powers,axp202", .data = (void *)AXP202_ID }, - { .compatible = "x-powers,axp209", .data = (void *)AXP209_ID }, - { .compatible = "x-powers,axp221", .data = (void *)AXP221_ID }, -+ { .compatible = "x-powers,axp806", .data = (void *)AXP806_ID }, - { }, - }; - MODULE_DEVICE_TABLE(of, axp20x_i2c_of_match); -@@ -74,6 +75,7 @@ static const struct i2c_device_id axp20x_i2c_id[] = { - { "axp202", 0 }, - { "axp209", 0 }, - { "axp221", 0 }, -+ { "axp806", 0 }, - { }, - }; - MODULE_DEVICE_TABLE(i2c, axp20x_i2c_id); --- - - -From bb10f5dd2933681507d316b8c84b183f678dcf31 Mon Sep 17 00:00:00 2001 -From: Icenowy Zheng -Date: Thu, 26 Jul 2018 12:41:27 +0800 -Subject: [PATCH 36/45] arm64: allwinner: dts: h6: fix Pine H64 MMC bus width - -Currently the enabled MMC controllers on Pine H64 do not have bus-width -set, which make them fall back to 1-bit mode and become quite slow. - -Fix this by add the corresponding bus-width properties. - -Fixes: ecbd611882a1 ("arm64: allwinner: h6: enable MMC0/2 on Pine H64") -Signed-off-by: Icenowy Zheng ---- - arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts -index bf0a88294ae4..3c74cbed319b 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts -@@ -97,6 +97,7 @@ - pinctrl-0 = <&mmc0_pins>; - vmmc-supply = <®_cldo1>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; -+ bus-width = <4>; - status = "okay"; - }; - -@@ -107,6 +108,7 @@ - vqmmc-supply = <®_bldo2>; - non-removable; - cap-mmc-hw-reset; -+ bus-width = <8>; - status = "okay"; - }; - --- -2.17.1 - - From 6bfc6aab9a9cd82578a7e782c83d04f4cf7fe6c4 Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Fri, 27 Jul 2018 16:22:01 +0800 @@ -839,9 +609,9 @@ index 8e3c47c7c797..cf125ebd1c7b 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -10,6 +10,7 @@ - #include - #include + #include #include + #include +#include / { diff --git a/patch/kernel/sunxi-dev/v2-drm-sun4i-Implement-zpos-for-DE2.patch b/patch/kernel/sunxi-dev/v2-drm-sun4i-Implement-zpos-for-DE2.patch deleted file mode 100644 index af5f1b70e..000000000 --- a/patch/kernel/sunxi-dev/v2-drm-sun4i-Implement-zpos-for-DE2.patch +++ /dev/null @@ -1,333 +0,0 @@ -Initial implementation of DE2 planes only supported fixed zpos. - -Expand implementation with configurable zpos property. - -Implementation background: -Channel in DE2 driver represents one DRM plane, whereas pipe is just -mapped channel to known Z position. Pipe 0 will always be at the bottom, -pipe 1 just above pipe 0 and so on. If, for example, channel 1 is mapped -at pipe 0 and channel 0 at pipe 1, whatever is on channel 0 will appear -on top. - -Before this commit, channel id was used for addressing channel related -registers (prefixed with SUN8I_MIXER_CHAN_UI_ or SUN8I_MIXER_CHAN_VI_) -and pipe registers (prefixed with SUN8I_MIXER_BLEND_). Additionally, -register SUN8I_MIXER_BLEND_ROUTE, which takes care for mapping channels -to pipes had fixed value. It mapped channel 0 to pipe 0, 1 to 1 and so -on. Consequence of all that was fixed Z order of planes. - -With this commit, pipe registers are using zpos property as index and -channel related registers still use channel id as index. Pipe mapping -register is now set dynamically too and pipe enable register is rebuild -every time to make sure only active pipes are enabled. - -Testing was done to confirm that there is no issues if bottom plane -contains pixels with alpha value < 0xff and if it doesn't whole screen. - -Tested-by: Paul Kocialkowski -Signed-off-by: Jernej Skrabec ---- -Patch is based on linux-next (next-20180706). - -Changes from v1: -- added tested-by tag -- expand commit message with detailed explanation - - drivers/gpu/drm/sun4i/sun8i_mixer.c | 15 +++++++-- - drivers/gpu/drm/sun4i/sun8i_mixer.h | 4 +++ - drivers/gpu/drm/sun4i/sun8i_ui_layer.c | 45 ++++++++++++++++---------- - drivers/gpu/drm/sun4i/sun8i_vi_layer.c | 45 ++++++++++++++++---------- - 4 files changed, 72 insertions(+), 37 deletions(-) - -diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c -index ee8febb25903..0747a9a69654 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_mixer.c -+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c -@@ -260,6 +260,17 @@ const struct de2_fmt_info *sun8i_mixer_format_info(u32 format) - return NULL; - } - -+static void sun8i_mixer_atomic_begin(struct sunxi_engine *engine, -+ struct drm_crtc_state *old_state) -+{ -+ /* -+ * Disable all pipes at the beginning. They will be enabled -+ * again if needed in plane update callback. -+ */ -+ regmap_update_bits(engine->regs, SUN8I_MIXER_BLEND_PIPE_CTL, -+ SUN8I_MIXER_BLEND_PIPE_CTL_EN_MSK, 0); -+} -+ - static void sun8i_mixer_commit(struct sunxi_engine *engine) - { - DRM_DEBUG_DRIVER("Committing changes\n"); -@@ -311,6 +322,7 @@ static struct drm_plane **sun8i_layers_init(struct drm_device *drm, - } - - static const struct sunxi_engine_ops sun8i_engine_ops = { -+ .atomic_begin = sun8i_mixer_atomic_begin, - .commit = sun8i_mixer_commit, - .layers_init = sun8i_layers_init, - }; -@@ -432,9 +444,6 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master, - regmap_write(mixer->engine.regs, SUN8I_MIXER_BLEND_ATTR_FCOLOR(0), - SUN8I_MIXER_BLEND_COLOR_BLACK); - -- /* Fixed zpos for now */ -- regmap_write(mixer->engine.regs, SUN8I_MIXER_BLEND_ROUTE, 0x43210); -- - plane_cnt = mixer->cfg->vi_num + mixer->cfg->ui_num; - for (i = 0; i < plane_cnt; i++) - regmap_write(mixer->engine.regs, SUN8I_MIXER_BLEND_MODE(i), -diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.h b/drivers/gpu/drm/sun4i/sun8i_mixer.h -index f34e70c42adf..406c42e752d7 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_mixer.h -+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.h -@@ -44,6 +44,7 @@ - #define SUN8I_MIXER_BLEND_CK_MIN(x) (0x10e0 + 0x04 * (x)) - #define SUN8I_MIXER_BLEND_OUTCTL 0x10fc - -+#define SUN8I_MIXER_BLEND_PIPE_CTL_EN_MSK GENMASK(12, 8) - #define SUN8I_MIXER_BLEND_PIPE_CTL_EN(pipe) BIT(8 + pipe) - #define SUN8I_MIXER_BLEND_PIPE_CTL_FC_EN(pipe) BIT(pipe) - /* colors are always in AARRGGBB format */ -@@ -51,6 +52,9 @@ - /* The following numbers are some still unknown magic numbers */ - #define SUN8I_MIXER_BLEND_MODE_DEF 0x03010301 - -+#define SUN8I_MIXER_BLEND_ROUTE_PIPE_MSK(n) (0xf << ((n) << 2)) -+#define SUN8I_MIXER_BLEND_ROUTE_PIPE_SHIFT(n) ((n) << 2) -+ - #define SUN8I_MIXER_BLEND_OUTCTL_INTERLACED BIT(1) - - #define SUN8I_MIXER_FBFMT_ARGB8888 0 -diff --git a/drivers/gpu/drm/sun4i/sun8i_ui_layer.c b/drivers/gpu/drm/sun4i/sun8i_ui_layer.c -index 9a540330cb79..518e1921f47e 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_ui_layer.c -+++ b/drivers/gpu/drm/sun4i/sun8i_ui_layer.c -@@ -27,7 +27,7 @@ - #include "sun8i_ui_scaler.h" - - static void sun8i_ui_layer_enable(struct sun8i_mixer *mixer, int channel, -- int overlay, bool enable) -+ int overlay, bool enable, unsigned int zpos) - { - u32 val; - -@@ -43,18 +43,24 @@ static void sun8i_ui_layer_enable(struct sun8i_mixer *mixer, int channel, - SUN8I_MIXER_CHAN_UI_LAYER_ATTR(channel, overlay), - SUN8I_MIXER_CHAN_UI_LAYER_ATTR_EN, val); - -- if (enable) -- val = SUN8I_MIXER_BLEND_PIPE_CTL_EN(channel); -- else -- val = 0; -+ if (enable) { -+ val = SUN8I_MIXER_BLEND_PIPE_CTL_EN(zpos); - -- regmap_update_bits(mixer->engine.regs, -- SUN8I_MIXER_BLEND_PIPE_CTL, -- SUN8I_MIXER_BLEND_PIPE_CTL_EN(channel), val); -+ regmap_update_bits(mixer->engine.regs, -+ SUN8I_MIXER_BLEND_PIPE_CTL, val, val); -+ -+ val = channel << SUN8I_MIXER_BLEND_ROUTE_PIPE_SHIFT(zpos); -+ -+ regmap_update_bits(mixer->engine.regs, -+ SUN8I_MIXER_BLEND_ROUTE, -+ SUN8I_MIXER_BLEND_ROUTE_PIPE_MSK(zpos), -+ val); -+ } - } - - static int sun8i_ui_layer_update_coord(struct sun8i_mixer *mixer, int channel, -- int overlay, struct drm_plane *plane) -+ int overlay, struct drm_plane *plane, -+ unsigned int zpos) - { - struct drm_plane_state *state = plane->state; - u32 src_w, src_h, dst_w, dst_h; -@@ -137,10 +143,10 @@ static int sun8i_ui_layer_update_coord(struct sun8i_mixer *mixer, int channel, - state->dst.x1, state->dst.y1); - DRM_DEBUG_DRIVER("Layer destination size W: %d H: %d\n", dst_w, dst_h); - regmap_write(mixer->engine.regs, -- SUN8I_MIXER_BLEND_ATTR_COORD(channel), -+ SUN8I_MIXER_BLEND_ATTR_COORD(zpos), - SUN8I_MIXER_COORD(state->dst.x1, state->dst.y1)); - regmap_write(mixer->engine.regs, -- SUN8I_MIXER_BLEND_ATTR_INSIZE(channel), -+ SUN8I_MIXER_BLEND_ATTR_INSIZE(zpos), - outsize); - - return 0; -@@ -238,28 +244,30 @@ static void sun8i_ui_layer_atomic_disable(struct drm_plane *plane, - struct sun8i_ui_layer *layer = plane_to_sun8i_ui_layer(plane); - struct sun8i_mixer *mixer = layer->mixer; - -- sun8i_ui_layer_enable(mixer, layer->channel, layer->overlay, false); -+ sun8i_ui_layer_enable(mixer, layer->channel, layer->overlay, false, 0); - } - - static void sun8i_ui_layer_atomic_update(struct drm_plane *plane, - struct drm_plane_state *old_state) - { - struct sun8i_ui_layer *layer = plane_to_sun8i_ui_layer(plane); -+ unsigned int zpos = plane->state->normalized_zpos; - struct sun8i_mixer *mixer = layer->mixer; - - if (!plane->state->visible) { - sun8i_ui_layer_enable(mixer, layer->channel, -- layer->overlay, false); -+ layer->overlay, false, 0); - return; - } - - sun8i_ui_layer_update_coord(mixer, layer->channel, -- layer->overlay, plane); -+ layer->overlay, plane, zpos); - sun8i_ui_layer_update_formats(mixer, layer->channel, - layer->overlay, plane); - sun8i_ui_layer_update_buffer(mixer, layer->channel, - layer->overlay, plane); -- sun8i_ui_layer_enable(mixer, layer->channel, layer->overlay, true); -+ sun8i_ui_layer_enable(mixer, layer->channel, layer->overlay, -+ true, zpos); - } - - static struct drm_plane_helper_funcs sun8i_ui_layer_helper_funcs = { -@@ -307,6 +315,7 @@ struct sun8i_ui_layer *sun8i_ui_layer_init_one(struct drm_device *drm, - enum drm_plane_type type = DRM_PLANE_TYPE_OVERLAY; - int channel = mixer->cfg->vi_num + index; - struct sun8i_ui_layer *layer; -+ unsigned int plane_cnt; - int ret; - - layer = devm_kzalloc(drm->dev, sizeof(*layer), GFP_KERNEL); -@@ -327,8 +336,10 @@ struct sun8i_ui_layer *sun8i_ui_layer_init_one(struct drm_device *drm, - return ERR_PTR(ret); - } - -- /* fixed zpos for now */ -- ret = drm_plane_create_zpos_immutable_property(&layer->plane, channel); -+ plane_cnt = mixer->cfg->ui_num + mixer->cfg->vi_num; -+ -+ ret = drm_plane_create_zpos_property(&layer->plane, channel, -+ 0, plane_cnt - 1); - if (ret) { - dev_err(drm->dev, "Couldn't add zpos property\n"); - return ERR_PTR(ret); -diff --git a/drivers/gpu/drm/sun4i/sun8i_vi_layer.c b/drivers/gpu/drm/sun4i/sun8i_vi_layer.c -index 5877f8ef5895..17e0d00cfd8a 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_vi_layer.c -+++ b/drivers/gpu/drm/sun4i/sun8i_vi_layer.c -@@ -21,7 +21,7 @@ - #include "sun8i_vi_scaler.h" - - static void sun8i_vi_layer_enable(struct sun8i_mixer *mixer, int channel, -- int overlay, bool enable) -+ int overlay, bool enable, unsigned int zpos) - { - u32 val; - -@@ -37,18 +37,24 @@ static void sun8i_vi_layer_enable(struct sun8i_mixer *mixer, int channel, - SUN8I_MIXER_CHAN_VI_LAYER_ATTR(channel, overlay), - SUN8I_MIXER_CHAN_VI_LAYER_ATTR_EN, val); - -- if (enable) -- val = SUN8I_MIXER_BLEND_PIPE_CTL_EN(channel); -- else -- val = 0; -+ if (enable) { -+ val = SUN8I_MIXER_BLEND_PIPE_CTL_EN(zpos); - -- regmap_update_bits(mixer->engine.regs, -- SUN8I_MIXER_BLEND_PIPE_CTL, -- SUN8I_MIXER_BLEND_PIPE_CTL_EN(channel), val); -+ regmap_update_bits(mixer->engine.regs, -+ SUN8I_MIXER_BLEND_PIPE_CTL, val, val); -+ -+ val = channel << SUN8I_MIXER_BLEND_ROUTE_PIPE_SHIFT(zpos); -+ -+ regmap_update_bits(mixer->engine.regs, -+ SUN8I_MIXER_BLEND_ROUTE, -+ SUN8I_MIXER_BLEND_ROUTE_PIPE_MSK(zpos), -+ val); -+ } - } - - static int sun8i_vi_layer_update_coord(struct sun8i_mixer *mixer, int channel, -- int overlay, struct drm_plane *plane) -+ int overlay, struct drm_plane *plane, -+ unsigned int zpos) - { - struct drm_plane_state *state = plane->state; - const struct drm_format_info *format = state->fb->format; -@@ -130,10 +136,10 @@ static int sun8i_vi_layer_update_coord(struct sun8i_mixer *mixer, int channel, - state->dst.x1, state->dst.y1); - DRM_DEBUG_DRIVER("Layer destination size W: %d H: %d\n", dst_w, dst_h); - regmap_write(mixer->engine.regs, -- SUN8I_MIXER_BLEND_ATTR_COORD(channel), -+ SUN8I_MIXER_BLEND_ATTR_COORD(zpos), - SUN8I_MIXER_COORD(state->dst.x1, state->dst.y1)); - regmap_write(mixer->engine.regs, -- SUN8I_MIXER_BLEND_ATTR_INSIZE(channel), -+ SUN8I_MIXER_BLEND_ATTR_INSIZE(zpos), - outsize); - - return 0; -@@ -266,28 +272,30 @@ static void sun8i_vi_layer_atomic_disable(struct drm_plane *plane, - struct sun8i_vi_layer *layer = plane_to_sun8i_vi_layer(plane); - struct sun8i_mixer *mixer = layer->mixer; - -- sun8i_vi_layer_enable(mixer, layer->channel, layer->overlay, false); -+ sun8i_vi_layer_enable(mixer, layer->channel, layer->overlay, false, 0); - } - - static void sun8i_vi_layer_atomic_update(struct drm_plane *plane, - struct drm_plane_state *old_state) - { - struct sun8i_vi_layer *layer = plane_to_sun8i_vi_layer(plane); -+ unsigned int zpos = plane->state->normalized_zpos; - struct sun8i_mixer *mixer = layer->mixer; - - if (!plane->state->visible) { - sun8i_vi_layer_enable(mixer, layer->channel, -- layer->overlay, false); -+ layer->overlay, false, 0); - return; - } - - sun8i_vi_layer_update_coord(mixer, layer->channel, -- layer->overlay, plane); -+ layer->overlay, plane, zpos); - sun8i_vi_layer_update_formats(mixer, layer->channel, - layer->overlay, plane); - sun8i_vi_layer_update_buffer(mixer, layer->channel, - layer->overlay, plane); -- sun8i_vi_layer_enable(mixer, layer->channel, layer->overlay, true); -+ sun8i_vi_layer_enable(mixer, layer->channel, layer->overlay, -+ true, zpos); - } - - static struct drm_plane_helper_funcs sun8i_vi_layer_helper_funcs = { -@@ -351,6 +359,7 @@ struct sun8i_vi_layer *sun8i_vi_layer_init_one(struct drm_device *drm, - int index) - { - struct sun8i_vi_layer *layer; -+ unsigned int plane_cnt; - int ret; - - layer = devm_kzalloc(drm->dev, sizeof(*layer), GFP_KERNEL); -@@ -368,8 +377,10 @@ struct sun8i_vi_layer *sun8i_vi_layer_init_one(struct drm_device *drm, - return ERR_PTR(ret); - } - -- /* fixed zpos for now */ -- ret = drm_plane_create_zpos_immutable_property(&layer->plane, index); -+ plane_cnt = mixer->cfg->ui_num + mixer->cfg->vi_num; -+ -+ ret = drm_plane_create_zpos_property(&layer->plane, index, -+ 0, plane_cnt - 1); - if (ret) { - dev_err(drm->dev, "Couldn't add zpos property\n"); - return ERR_PTR(ret); diff --git a/patch/kernel/sunxi-dev/v2-drm-sun4i-sun8i-Avoid-clearing-blending-order-at-each-atomic-commit.patch b/patch/kernel/sunxi-dev/v2-drm-sun4i-sun8i-Avoid-clearing-blending-order-at-each-atomic-commit.patch deleted file mode 100644 index d7ffbdc53..000000000 --- a/patch/kernel/sunxi-dev/v2-drm-sun4i-sun8i-Avoid-clearing-blending-order-at-each-atomic-commit.patch +++ /dev/null @@ -1,178 +0,0 @@ -diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c b/drivers/gpu/drm/sun4i/sun8i_mixer.c -index 8e81c24d736e..12cb7183ce51 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_mixer.c -+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c -@@ -260,17 +260,6 @@ const struct de2_fmt_info *sun8i_mixer_format_info(u32 format) - return NULL; - } - --static void sun8i_mixer_atomic_begin(struct sunxi_engine *engine, -- struct drm_crtc_state *old_state) --{ -- /* -- * Disable all pipes at the beginning. They will be enabled -- * again if needed in plane update callback. -- */ -- regmap_update_bits(engine->regs, SUN8I_MIXER_BLEND_PIPE_CTL, -- SUN8I_MIXER_BLEND_PIPE_CTL_EN_MSK, 0); --} -- - static void sun8i_mixer_commit(struct sunxi_engine *engine) - { - DRM_DEBUG_DRIVER("Committing changes\n"); -@@ -322,7 +311,6 @@ static struct drm_plane **sun8i_layers_init(struct drm_device *drm, - } - - static const struct sunxi_engine_ops sun8i_engine_ops = { -- .atomic_begin = sun8i_mixer_atomic_begin, - .commit = sun8i_mixer_commit, - .layers_init = sun8i_layers_init, - }; -@@ -449,6 +437,9 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master, - regmap_write(mixer->engine.regs, SUN8I_MIXER_BLEND_MODE(i), - SUN8I_MIXER_BLEND_MODE_DEF); - -+ regmap_update_bits(mixer->engine.regs, SUN8I_MIXER_BLEND_PIPE_CTL, -+ SUN8I_MIXER_BLEND_PIPE_CTL_EN_MSK, 0); -+ - return 0; - - err_disable_bus_clk: -diff --git a/drivers/gpu/drm/sun4i/sun8i_ui_layer.c b/drivers/gpu/drm/sun4i/sun8i_ui_layer.c -index 518e1921f47e..28c15c6ef1ef 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_ui_layer.c -+++ b/drivers/gpu/drm/sun4i/sun8i_ui_layer.c -@@ -27,7 +27,8 @@ - #include "sun8i_ui_scaler.h" - - static void sun8i_ui_layer_enable(struct sun8i_mixer *mixer, int channel, -- int overlay, bool enable, unsigned int zpos) -+ int overlay, bool enable, unsigned int zpos, -+ unsigned int old_zpos) - { - u32 val; - -@@ -43,6 +44,18 @@ static void sun8i_ui_layer_enable(struct sun8i_mixer *mixer, int channel, - SUN8I_MIXER_CHAN_UI_LAYER_ATTR(channel, overlay), - SUN8I_MIXER_CHAN_UI_LAYER_ATTR_EN, val); - -+ if (!enable || zpos != old_zpos) { -+ regmap_update_bits(mixer->engine.regs, -+ SUN8I_MIXER_BLEND_PIPE_CTL, -+ SUN8I_MIXER_BLEND_PIPE_CTL_EN(old_zpos), -+ 0); -+ -+ regmap_update_bits(mixer->engine.regs, -+ SUN8I_MIXER_BLEND_ROUTE, -+ SUN8I_MIXER_BLEND_ROUTE_PIPE_MSK(old_zpos), -+ 0); -+ } -+ - if (enable) { - val = SUN8I_MIXER_BLEND_PIPE_CTL_EN(zpos); - -@@ -242,9 +255,11 @@ static void sun8i_ui_layer_atomic_disable(struct drm_plane *plane, - struct drm_plane_state *old_state) - { - struct sun8i_ui_layer *layer = plane_to_sun8i_ui_layer(plane); -+ unsigned int old_zpos = old_state->normalized_zpos; - struct sun8i_mixer *mixer = layer->mixer; - -- sun8i_ui_layer_enable(mixer, layer->channel, layer->overlay, false, 0); -+ sun8i_ui_layer_enable(mixer, layer->channel, layer->overlay, false, 0, -+ old_zpos); - } - - static void sun8i_ui_layer_atomic_update(struct drm_plane *plane, -@@ -252,11 +267,12 @@ static void sun8i_ui_layer_atomic_update(struct drm_plane *plane, - { - struct sun8i_ui_layer *layer = plane_to_sun8i_ui_layer(plane); - unsigned int zpos = plane->state->normalized_zpos; -+ unsigned int old_zpos = old_state->normalized_zpos; - struct sun8i_mixer *mixer = layer->mixer; - - if (!plane->state->visible) { - sun8i_ui_layer_enable(mixer, layer->channel, -- layer->overlay, false, 0); -+ layer->overlay, false, 0, old_zpos); - return; - } - -@@ -267,7 +283,7 @@ static void sun8i_ui_layer_atomic_update(struct drm_plane *plane, - sun8i_ui_layer_update_buffer(mixer, layer->channel, - layer->overlay, plane); - sun8i_ui_layer_enable(mixer, layer->channel, layer->overlay, -- true, zpos); -+ true, zpos, old_zpos); - } - - static struct drm_plane_helper_funcs sun8i_ui_layer_helper_funcs = { -diff --git a/drivers/gpu/drm/sun4i/sun8i_vi_layer.c b/drivers/gpu/drm/sun4i/sun8i_vi_layer.c -index 17e0d00cfd8a..f4fe97813f94 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_vi_layer.c -+++ b/drivers/gpu/drm/sun4i/sun8i_vi_layer.c -@@ -21,7 +21,8 @@ - #include "sun8i_vi_scaler.h" - - static void sun8i_vi_layer_enable(struct sun8i_mixer *mixer, int channel, -- int overlay, bool enable, unsigned int zpos) -+ int overlay, bool enable, unsigned int zpos, -+ unsigned int old_zpos) - { - u32 val; - -@@ -37,6 +38,18 @@ static void sun8i_vi_layer_enable(struct sun8i_mixer *mixer, int channel, - SUN8I_MIXER_CHAN_VI_LAYER_ATTR(channel, overlay), - SUN8I_MIXER_CHAN_VI_LAYER_ATTR_EN, val); - -+ if (!enable || zpos != old_zpos) { -+ regmap_update_bits(mixer->engine.regs, -+ SUN8I_MIXER_BLEND_PIPE_CTL, -+ SUN8I_MIXER_BLEND_PIPE_CTL_EN(old_zpos), -+ 0); -+ -+ regmap_update_bits(mixer->engine.regs, -+ SUN8I_MIXER_BLEND_ROUTE, -+ SUN8I_MIXER_BLEND_ROUTE_PIPE_MSK(old_zpos), -+ 0); -+ } -+ - if (enable) { - val = SUN8I_MIXER_BLEND_PIPE_CTL_EN(zpos); - -@@ -270,9 +283,11 @@ static void sun8i_vi_layer_atomic_disable(struct drm_plane *plane, - struct drm_plane_state *old_state) - { - struct sun8i_vi_layer *layer = plane_to_sun8i_vi_layer(plane); -+ unsigned int old_zpos = old_state->normalized_zpos; - struct sun8i_mixer *mixer = layer->mixer; - -- sun8i_vi_layer_enable(mixer, layer->channel, layer->overlay, false, 0); -+ sun8i_vi_layer_enable(mixer, layer->channel, layer->overlay, false, 0, -+ old_zpos); - } - - static void sun8i_vi_layer_atomic_update(struct drm_plane *plane, -@@ -280,11 +295,12 @@ static void sun8i_vi_layer_atomic_update(struct drm_plane *plane, - { - struct sun8i_vi_layer *layer = plane_to_sun8i_vi_layer(plane); - unsigned int zpos = plane->state->normalized_zpos; -+ unsigned int old_zpos = old_state->normalized_zpos; - struct sun8i_mixer *mixer = layer->mixer; - - if (!plane->state->visible) { - sun8i_vi_layer_enable(mixer, layer->channel, -- layer->overlay, false, 0); -+ layer->overlay, false, 0, old_zpos); - return; - } - -@@ -295,7 +311,7 @@ static void sun8i_vi_layer_atomic_update(struct drm_plane *plane, - sun8i_vi_layer_update_buffer(mixer, layer->channel, - layer->overlay, plane); - sun8i_vi_layer_enable(mixer, layer->channel, layer->overlay, -- true, zpos); -+ true, zpos, old_zpos); - } - - static struct drm_plane_helper_funcs sun8i_vi_layer_helper_funcs = { diff --git a/patch/kernel/sunxi-dev/v3-drm-sun4i-fix-build-failure-with-CONFIG_DRM_SUN8I_MIXER-m.patch b/patch/kernel/sunxi-dev/v3-drm-sun4i-fix-build-failure-with-CONFIG_DRM_SUN8I_MIXER-m.patch deleted file mode 100644 index 4681867dd..000000000 --- a/patch/kernel/sunxi-dev/v3-drm-sun4i-fix-build-failure-with-CONFIG_DRM_SUN8I_MIXER-m.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff --git a/drivers/gpu/drm/sun4i/Kconfig b/drivers/gpu/drm/sun4i/Kconfig -index 156a865c3e6d..c2c042287c19 100644 ---- a/drivers/gpu/drm/sun4i/Kconfig -+++ b/drivers/gpu/drm/sun4i/Kconfig -@@ -68,4 +68,11 @@ config DRM_SUN8I_MIXER - graphics mixture and feed graphics to TCON, If M is - selected the module will be called sun8i-mixer. - -+config DRM_SUN8I_TCON_TOP -+ tristate -+ default DRM_SUN4I if DRM_SUN8I_MIXER!=n -+ help -+ TCON TOP is responsible for configuring display pipeline for -+ HTMI, TVE and LCD. -+ - endif -diff --git a/drivers/gpu/drm/sun4i/Makefile b/drivers/gpu/drm/sun4i/Makefile -index cd27d02c94e2..0eb38ac8e86e 100644 ---- a/drivers/gpu/drm/sun4i/Makefile -+++ b/drivers/gpu/drm/sun4i/Makefile -@@ -41,3 +41,4 @@ obj-$(CONFIG_DRM_SUN4I_HDMI) += sun4i-drm-hdmi.o - obj-$(CONFIG_DRM_SUN6I_DSI) += sun6i-dsi.o - obj-$(CONFIG_DRM_SUN8I_DW_HDMI) += sun8i-drm-hdmi.o - obj-$(CONFIG_DRM_SUN8I_MIXER) += sun8i-mixer.o -+obj-$(CONFIG_DRM_SUN8I_TCON_TOP) += sun8i_tcon_top.o -\ No newline at end of file -diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c -index a15feb807393..03ffbcc98dd0 100644 ---- a/drivers/gpu/drm/sun4i/sun4i_drv.c -+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c -@@ -216,7 +216,8 @@ static bool sun4i_drv_node_is_tcon_with_ch0(struct device_node *node) - - static bool sun4i_drv_node_is_tcon_top(struct device_node *node) - { -- return !!of_match_node(sun8i_tcon_top_of_table, node); -+ return IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) && -+ !!of_match_node(sun8i_tcon_top_of_table, node); - } - - static int compare_of(struct device *dev, void *data) -diff --git a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c -index 21dc9ebad0b4..e184cb17690b 100644 ---- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c -+++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c -@@ -44,7 +44,8 @@ sun8i_dw_hdmi_mode_valid(struct drm_connector *connector, - - static bool sun8i_dw_hdmi_node_is_tcon_top(struct device_node *node) - { -- return !!of_match_node(sun8i_tcon_top_of_table, node); -+ return IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) && -+ !!of_match_node(sun8i_tcon_top_of_table, node); - } - - static u32 sun8i_dw_hdmi_find_possible_crtcs(struct drm_device *drm, diff --git a/patch/kernel/sunxi-dev/wifi-2002-02-rtl8188eu.patch b/patch/kernel/sunxi-dev/wifi-2002-02-rtl8188eu.patch index 7ec8024fe..d356c74bf 100644 --- a/patch/kernel/sunxi-dev/wifi-2002-02-rtl8188eu.patch +++ b/patch/kernel/sunxi-dev/wifi-2002-02-rtl8188eu.patch @@ -301875,7 +301875,7 @@ new file mode 100644 index 0000000000000..324b45bd223fd --- /dev/null +++ b/drivers/net/wireless/rtl8188eu/include/wifi.h -@@ -0,0 +1,1103 @@ +@@ -0,0 +1,1105 @@ +/****************************************************************************** + * + * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved. @@ -302608,7 +302608,9 @@ index 0000000000000..324b45bd223fd + * According to IEEE802.11n spec size varies from 8K to 64K (in powers of 2) + */ +#define IEEE80211_MIN_AMPDU_BUF 0x8 ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,19,0)) +#define IEEE80211_MAX_AMPDU_BUF 0x40 ++#endif + +/* Spatial Multiplexing Power Save Modes */ +#define WLAN_HT_CAP_SM_PS_STATIC 0 @@ -311898,7 +311900,7 @@ new file mode 100644 index 0000000000000..fadf117a54b6a --- /dev/null +++ b/drivers/net/wireless/rtl8188eu/os_dep/os_intfs.c -@@ -0,0 +1,1273 @@ +@@ -0,0 +1,1276 @@ +/****************************************************************************** + * + * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. @@ -312553,7 +312555,10 @@ index 0000000000000..fadf117a54b6a +} + +static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)) ++ ,struct net_device *sb_dev ++ ,select_queue_fallback_t fallback ++#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)) + ,void *unused + ,select_queue_fallback_t fallback +#elif (LINUX_VERSION_CODE == KERNEL_VERSION(3, 13, 0)) diff --git a/patch/kernel/sunxi-dev/wifi-brcmfmac-define-more-bits-for-the-flags-of-struct-brcmf_sta_info_le.patch b/patch/kernel/sunxi-dev/wifi-brcmfmac-define-more-bits-for-the-flags-of-struct-brcmf_sta_info_le.patch deleted file mode 100644 index ad4422652..000000000 --- a/patch/kernel/sunxi-dev/wifi-brcmfmac-define-more-bits-for-the-flags-of-struct-brcmf_sta_info_le.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h -index 4b290705e3e6..9b3a58e89dd1 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h -@@ -32,11 +32,30 @@ - #define BRCMF_BSS_INFO_VERSION 109 /* curr ver of brcmf_bss_info_le struct */ - #define BRCMF_BSS_RSSI_ON_CHANNEL 0x0002 - --#define BRCMF_STA_WME 0x00000002 /* WMM association */ --#define BRCMF_STA_AUTHE 0x00000008 /* Authenticated */ --#define BRCMF_STA_ASSOC 0x00000010 /* Associated */ --#define BRCMF_STA_AUTHO 0x00000020 /* Authorized */ --#define BRCMF_STA_SCBSTATS 0x00004000 /* Per STA debug stats */ -+#define BRCMF_STA_BRCM 0x00000001 /* Running a Broadcom driver */ -+#define BRCMF_STA_WME 0x00000002 /* WMM association */ -+#define BRCMF_STA_NONERP 0x00000004 /* No ERP */ -+#define BRCMF_STA_AUTHE 0x00000008 /* Authenticated */ -+#define BRCMF_STA_ASSOC 0x00000010 /* Associated */ -+#define BRCMF_STA_AUTHO 0x00000020 /* Authorized */ -+#define BRCMF_STA_WDS 0x00000040 /* Wireless Distribution System */ -+#define BRCMF_STA_WDS_LINKUP 0x00000080 /* WDS traffic/probes flowing properly */ -+#define BRCMF_STA_PS 0x00000100 /* STA is in power save mode from AP's viewpoint */ -+#define BRCMF_STA_APSD_BE 0x00000200 /* APSD delv/trigger for AC_BE is default enabled */ -+#define BRCMF_STA_APSD_BK 0x00000400 /* APSD delv/trigger for AC_BK is default enabled */ -+#define BRCMF_STA_APSD_VI 0x00000800 /* APSD delv/trigger for AC_VI is default enabled */ -+#define BRCMF_STA_APSD_VO 0x00001000 /* APSD delv/trigger for AC_VO is default enabled */ -+#define BRCMF_STA_N_CAP 0x00002000 /* STA 802.11n capable */ -+#define BRCMF_STA_SCBSTATS 0x00004000 /* Per STA debug stats */ -+#define BRCMF_STA_AMPDU_CAP 0x00008000 /* STA AMPDU capable */ -+#define BRCMF_STA_AMSDU_CAP 0x00010000 /* STA AMSDU capable */ -+#define BRCMF_STA_MIMO_PS 0x00020000 /* mimo ps mode is enabled */ -+#define BRCMF_STA_MIMO_RTS 0x00040000 /* send rts in mimo ps mode */ -+#define BRCMF_STA_RIFS_CAP 0x00080000 /* rifs enabled */ -+#define BRCMF_STA_VHT_CAP 0x00100000 /* STA VHT(11ac) capable */ -+#define BRCMF_STA_WPS 0x00200000 /* WPS state */ -+#define BRCMF_STA_DWDS_CAP 0x01000000 /* DWDS CAP */ -+#define BRCMF_STA_DWDS 0x02000000 /* DWDS active */ - - /* size of brcmf_scan_params not including variable length array */ - #define BRCMF_SCAN_PARAMS_FIXED_SIZE 64 diff --git a/patch/kernel/sunxi-dev/wifi-brcmfmac-update-STA-info-struct-to-the-v5.patch b/patch/kernel/sunxi-dev/wifi-brcmfmac-update-STA-info-struct-to-the-v5.patch deleted file mode 100644 index 6a61922db..000000000 --- a/patch/kernel/sunxi-dev/wifi-brcmfmac-update-STA-info-struct-to-the-v5.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h -index 9b3a58e89dd1..d5bb81e88762 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h -@@ -174,6 +174,8 @@ - #define BRCMF_MFP_CAPABLE 1 - #define BRCMF_MFP_REQUIRED 2 - -+#define BRCMF_VHT_CAP_MCS_MAP_NSS_MAX 8 -+ - /* MAX_CHUNK_LEN is the maximum length for data passing to firmware in each - * ioctl. It is relatively small because firmware has small maximum size input - * playload restriction for ioctls. -@@ -550,6 +552,8 @@ struct brcmf_sta_info_le { - /* w/hi bit set if basic */ - __le32 in; /* seconds elapsed since associated */ - __le32 listen_interval_inms; /* Min Listen interval in ms for STA */ -+ -+ /* Fields valid for ver >= 3 */ - __le32 tx_pkts; /* # of packets transmitted */ - __le32 tx_failures; /* # of packets failed */ - __le32 rx_ucast_pkts; /* # of unicast packets received */ -@@ -558,6 +562,8 @@ struct brcmf_sta_info_le { - __le32 rx_rate; /* Rate of last successful rx frame */ - __le32 rx_decrypt_succeeds; /* # of packet decrypted successfully */ - __le32 rx_decrypt_failures; /* # of packet decrypted failed */ -+ -+ /* Fields valid for ver >= 4 */ - __le32 tx_tot_pkts; /* # of tx pkts (ucast + mcast) */ - __le32 rx_tot_pkts; /* # of data packets recvd (uni + mcast) */ - __le32 tx_mcast_pkts; /* # of mcast pkts txed */ -@@ -594,6 +600,14 @@ struct brcmf_sta_info_le { - */ - __le32 rx_pkts_retried; /* # rx with retry bit set */ - __le32 tx_rate_fallback; /* lowest fallback TX rate */ -+ -+ /* Fields valid for ver >= 5 */ -+ struct { -+ __le32 count; /* # rates in this set */ -+ u8 rates[BRCMF_MAXRATES_IN_SET]; /* rates in 500kbps units w/hi bit set if basic */ -+ u8 mcs[BRCMF_MCSSET_LEN]; /* supported mcs index bit map */ -+ __le16 vht_mcs[BRCMF_VHT_CAP_MCS_MAP_NSS_MAX]; /* supported mcs index bit map per nss */ -+ } rateset_adv; - }; - - struct brcmf_chanspec_list { diff --git a/patch/kernel/sunxi-dev/wifi-brcmfmac-v4.patch b/patch/kernel/sunxi-dev/wifi-brcmfmac-v4.patch deleted file mode 100644 index df07d6ce2..000000000 --- a/patch/kernel/sunxi-dev/wifi-brcmfmac-v4.patch +++ /dev/null @@ -1,181 +0,0 @@ -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c -index 800a423c7bc2..a78b9bae44e0 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c -@@ -48,6 +48,7 @@ static const struct brcmf_feat_fwcap brcmf_fwcap_map[] = { - { BRCMF_FEAT_MBSS, "mbss" }, - { BRCMF_FEAT_MCHAN, "mchan" }, - { BRCMF_FEAT_P2P, "p2p" }, -+ { BRCMF_FEAT_MONITOR, "monitor" }, - }; - - #ifdef DEBUG -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h -index d1193825e559..3415d5d4d6b5 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h -@@ -33,6 +33,7 @@ - * MFP: 802.11w Management Frame Protection. - * GSCAN: enhanced scan offload feature. - * FWSUP: Firmware supplicant. -+ * MONITOR: firmware can pass monitor packets to host. - */ - #define BRCMF_FEAT_LIST \ - BRCMF_FEAT_DEF(MBSS) \ -@@ -48,7 +49,8 @@ - BRCMF_FEAT_DEF(WOWL_ARP_ND) \ - BRCMF_FEAT_DEF(MFP) \ - BRCMF_FEAT_DEF(GSCAN) \ -- BRCMF_FEAT_DEF(FWSUP) -+ BRCMF_FEAT_DEF(FWSUP) \ -+ BRCMF_FEAT_DEF(MONITOR) - - /* - * Quirks: -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c -index a78b9bae44e0..4db4d444407a 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c -@@ -49,6 +49,7 @@ static const struct brcmf_feat_fwcap brcmf_fwcap_map[] = { - { BRCMF_FEAT_MCHAN, "mchan" }, - { BRCMF_FEAT_P2P, "p2p" }, - { BRCMF_FEAT_MONITOR, "monitor" }, -+ { BRCMF_FEAT_MONITOR_FMT_RADIOTAP, "rtap" }, - }; - - #ifdef DEBUG -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h -index 3415d5d4d6b5..0b4974df353a 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h -@@ -34,6 +34,7 @@ - * GSCAN: enhanced scan offload feature. - * FWSUP: Firmware supplicant. - * MONITOR: firmware can pass monitor packets to host. -+ * MONITOR_FMT_RADIOTAP: firmware provides monitor packets with radiotap header - */ - #define BRCMF_FEAT_LIST \ - BRCMF_FEAT_DEF(MBSS) \ -@@ -50,7 +51,8 @@ - BRCMF_FEAT_DEF(MFP) \ - BRCMF_FEAT_DEF(GSCAN) \ - BRCMF_FEAT_DEF(FWSUP) \ -- BRCMF_FEAT_DEF(MONITOR) -+ BRCMF_FEAT_DEF(MONITOR) \ -+ BRCMF_FEAT_DEF(MONITOR_FMT_RADIOTAP) - - /* - * Quirks: -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c -index 72954fd6df3b..b1f702faff4f 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -404,6 +405,30 @@ void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb) - netif_rx_ni(skb); - } - -+void brcmf_netif_mon_rx(struct brcmf_if *ifp, struct sk_buff *skb) -+{ -+ if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MONITOR_FMT_RADIOTAP)) { -+ /* Do nothing */ -+ } else { -+ struct ieee80211_radiotap_header *radiotap; -+ -+ /* TODO: use RX status to fill some radiotap data */ -+ radiotap = skb_push(skb, sizeof(*radiotap)); -+ memset(radiotap, 0, sizeof(*radiotap)); -+ radiotap->it_len = cpu_to_le16(sizeof(*radiotap)); -+ -+ /* TODO: 4 bytes with receive status? */ -+ skb->len -= 4; -+ } -+ -+ skb->dev = ifp->ndev; -+ skb_reset_mac_header(skb); -+ skb->pkt_type = PACKET_OTHERHOST; -+ skb->protocol = htons(ETH_P_802_2); -+ -+ brcmf_netif_rx(ifp, skb); -+} -+ - static int brcmf_rx_hdrpull(struct brcmf_pub *drvr, struct sk_buff *skb, - struct brcmf_if **ifp) - { -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h -index 401f50458686..dcf6e27cc16f 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h -@@ -121,6 +121,7 @@ struct brcmf_pub { - - struct brcmf_if *iflist[BRCMF_MAX_IFS]; - s32 if2bss[BRCMF_MAX_IFS]; -+ struct brcmf_if *mon_if; - - struct mutex proto_block; - unsigned char proto_buf[BRCMF_DCMD_MAXLEN]; -@@ -216,6 +217,7 @@ void brcmf_txflowblock_if(struct brcmf_if *ifp, - enum brcmf_netif_stop_reason reason, bool state); - void brcmf_txfinalize(struct brcmf_if *ifp, struct sk_buff *txp, bool success); - void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb); -+void brcmf_netif_mon_rx(struct brcmf_if *ifp, struct sk_buff *skb); - void brcmf_net_setcarrier(struct brcmf_if *ifp, bool on); - int __init brcmf_core_init(void); - void __exit brcmf_core_exit(void); -diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c -index c40ba8855cd5..4e8397a0cbc8 100644 ---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c -+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c -@@ -69,6 +69,8 @@ - #define BRCMF_MSGBUF_MAX_EVENTBUF_POST 8 - - #define BRCMF_MSGBUF_PKT_FLAGS_FRAME_802_3 0x01 -+#define BRCMF_MSGBUF_PKT_FLAGS_FRAME_802_11 0x02 -+#define BRCMF_MSGBUF_PKT_FLAGS_FRAME_MASK 0x07 - #define BRCMF_MSGBUF_PKT_FLAGS_PRIO_SHIFT 5 - - #define BRCMF_MSGBUF_TX_FLUSH_CNT1 32 -@@ -1128,6 +1130,7 @@ brcmf_msgbuf_process_rx_complete(struct brcmf_msgbuf *msgbuf, void *buf) - struct sk_buff *skb; - u16 data_offset; - u16 buflen; -+ u16 flags; - u32 idx; - struct brcmf_if *ifp; - -@@ -1137,6 +1140,7 @@ brcmf_msgbuf_process_rx_complete(struct brcmf_msgbuf *msgbuf, void *buf) - data_offset = le16_to_cpu(rx_complete->data_offset); - buflen = le16_to_cpu(rx_complete->data_len); - idx = le32_to_cpu(rx_complete->msg.request_id); -+ flags = le16_to_cpu(rx_complete->flags); - - skb = brcmf_msgbuf_get_pktid(msgbuf->drvr->bus_if->dev, - msgbuf->rx_pktids, idx); -@@ -1150,6 +1154,20 @@ brcmf_msgbuf_process_rx_complete(struct brcmf_msgbuf *msgbuf, void *buf) - - skb_trim(skb, buflen); - -+ if ((flags & BRCMF_MSGBUF_PKT_FLAGS_FRAME_MASK) == -+ BRCMF_MSGBUF_PKT_FLAGS_FRAME_802_11) { -+ ifp = msgbuf->drvr->mon_if; -+ -+ if (!ifp) { -+ brcmf_err("Received unexpected monitor pkt\n"); -+ brcmu_pkt_buf_free_skb(skb); -+ return; -+ } -+ -+ brcmf_netif_mon_rx(ifp, skb); -+ return; -+ } -+ - ifp = brcmf_get_ifp(msgbuf->drvr, rx_complete->msg.ifidx); - if (!ifp || !ifp->ndev) { - brcmf_err("Received pkt for invalid ifidx %d\n", diff --git a/patch/kernel/sunxi-dev/wifi-3001-add-realtek-8189es-kconfig-makefile.patch b/patch/kernel/sunxi-dev/wireless_need_adjustement_for_4.19_TBD/wifi-3001-add-realtek-8189es-kconfig-makefile.patch similarity index 100% rename from patch/kernel/sunxi-dev/wifi-3001-add-realtek-8189es-kconfig-makefile.patch rename to patch/kernel/sunxi-dev/wireless_need_adjustement_for_4.19_TBD/wifi-3001-add-realtek-8189es-kconfig-makefile.patch diff --git a/patch/kernel/sunxi-dev/wifi-3002-add-realtek-8189es.patch b/patch/kernel/sunxi-dev/wireless_need_adjustement_for_4.19_TBD/wifi-3002-add-realtek-8189es.patch similarity index 100% rename from patch/kernel/sunxi-dev/wifi-3002-add-realtek-8189es.patch rename to patch/kernel/sunxi-dev/wireless_need_adjustement_for_4.19_TBD/wifi-3002-add-realtek-8189es.patch diff --git a/patch/kernel/sunxi-dev/wifi-4001-add-realtek-8723cs-kconfig-makefile.patch b/patch/kernel/sunxi-dev/wireless_need_adjustement_for_4.19_TBD/wifi-4001-add-realtek-8723cs-kconfig-makefile.patch similarity index 100% rename from patch/kernel/sunxi-dev/wifi-4001-add-realtek-8723cs-kconfig-makefile.patch rename to patch/kernel/sunxi-dev/wireless_need_adjustement_for_4.19_TBD/wifi-4001-add-realtek-8723cs-kconfig-makefile.patch diff --git a/patch/kernel/sunxi-dev/wifi-4002-add-realtek-8723cs.patch b/patch/kernel/sunxi-dev/wireless_need_adjustement_for_4.19_TBD/wifi-4002-add-realtek-8723cs.patch similarity index 100% rename from patch/kernel/sunxi-dev/wifi-4002-add-realtek-8723cs.patch rename to patch/kernel/sunxi-dev/wireless_need_adjustement_for_4.19_TBD/wifi-4002-add-realtek-8723cs.patch diff --git a/patch/kernel/sunxi-dev/wifi-add-realtek-8189fs.patch b/patch/kernel/sunxi-dev/wireless_need_adjustement_for_4.19_TBD/wifi-add-realtek-8189fs.patch similarity index 100% rename from patch/kernel/sunxi-dev/wifi-add-realtek-8189fs.patch rename to patch/kernel/sunxi-dev/wireless_need_adjustement_for_4.19_TBD/wifi-add-realtek-8189fs.patch