* memcpy regression @ 2015-09-04 13:33 Michal Sojka 2015-09-04 13:57 ` Christophe LEROY 0 siblings, 1 reply; 16+ messages in thread From: Michal Sojka @ 2015-09-04 13:33 UTC (permalink / raw) To: LEROY Christophe; +Cc: Scott Wood, linuxppc-dev Dear Christophe, my MPC5200-based system stopped booting recently. I bisected the problem to your commit below. If I revert that commit (on top of 807249d3ada1ff28a47c4054ca4edd479421b671 = v4.2-6663-g807249d), my system boots again. commit 0b05e2d671c40cfb57e66e4e402320d6e056b2f8 Author: LEROY Christophe <christophe.leroy@c-s.fr> Date: Tue May 19 12:07:55 2015 +0200 powerpc/32: cacheable_memcpy becomes memcpy cacheable_memcpy uses dcbz instruction and is more efficient than memcpy when the destination is in RAM. If the destination is in an io area, memcpy_toio() is normally used, not memcpy This patch renames memcpy as generic_memcpy, and renames cacheable_memcpy as memcpy On MPC885, we get approximatly 7% increase of the transfer rate on an FTP reception Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Scott Wood <scottwood@freescale.com> Best regards, -Michal Sojka ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: memcpy regression 2015-09-04 13:33 memcpy regression Michal Sojka @ 2015-09-04 13:57 ` Christophe LEROY 2015-09-04 14:35 ` Michal Sojka 0 siblings, 1 reply; 16+ messages in thread From: Christophe LEROY @ 2015-09-04 13:57 UTC (permalink / raw) To: Michal Sojka; +Cc: Scott Wood, linuxppc-dev Le 04/09/2015 15:33, Michal Sojka a écrit : > Dear Christophe, > > my MPC5200-based system stopped booting recently. I bisected the problem > to your commit below. If I revert that commit (on top of > 807249d3ada1ff28a47c4054ca4edd479421b671 = v4.2-6663-g807249d), my > system boots again. > > Do you use mainline code only, or do you have home-made code ? memcpy() is not supposed to be used on non-cacheable memory. memcpy_toio() is the function to use when copying to non-cacheble area. When I submitted the patch, I looked for erroneous use of memcpy() and memset(). I found one wrong use of memset() that I changed to memset_io() but I didn't find any misuse of memcpy(). But I may have missed one. Christophe ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: memcpy regression 2015-09-04 13:57 ` Christophe LEROY @ 2015-09-04 14:35 ` Michal Sojka 2015-09-04 18:10 ` christophe leroy 0 siblings, 1 reply; 16+ messages in thread From: Michal Sojka @ 2015-09-04 14:35 UTC (permalink / raw) To: Christophe LEROY; +Cc: Scott Wood, linuxppc-dev [-- Attachment #1: Type: text/plain, Size: 1097 bytes --] On Fri, Sep 04 2015, Christophe LEROY wrote: > Le 04/09/2015 15:33, Michal Sojka a écrit : >> Dear Christophe, >> >> my MPC5200-based system stopped booting recently. I bisected the problem >> to your commit below. If I revert that commit (on top of >> 807249d3ada1ff28a47c4054ca4edd479421b671 = v4.2-6663-g807249d), my >> system boots again. >> >> > > Do you use mainline code only, or do you have home-made code ? I use mainline only sources with non-mainline device-tree. > memcpy() is not supposed to be used on non-cacheable memory. > memcpy_toio() is the function to use when copying to non-cacheble area. > > When I submitted the patch, I looked for erroneous use of memcpy() and > memset(). > I found one wrong use of memset() that I changed to memset_io() but I > didn't find any misuse of memcpy(). > But I may have missed one. I attach my .config, if it helps. I have there CONFIG_PPC_MPC52xx=y CONFIG_PPC_MPC5200_SIMPLE=y so arch/powerpc/platforms/52xx is probably the directory to look. Do you see any mempcy misuse there? Thanks, -Michal [-- Attachment #2: .config --] [-- Type: application/octet-stream, Size: 31757 bytes --] # # Automatically generated file; DO NOT EDIT. # Linux/powerpc 4.2.0 Kernel Configuration # # CONFIG_PPC64 is not set # # Processor support # CONFIG_PPC_BOOK3S_32=y # CONFIG_PPC_85xx is not set # CONFIG_PPC_8xx is not set # CONFIG_40x is not set # CONFIG_44x is not set # CONFIG_E200 is not set CONFIG_PPC_BOOK3S=y CONFIG_6xx=y CONFIG_PPC_FPU=y # CONFIG_ALTIVEC is not set CONFIG_PPC_STD_MMU=y CONFIG_PPC_STD_MMU_32=y # CONFIG_PPC_MM_SLICES is not set CONFIG_PPC_HAVE_PMU_SUPPORT=y # CONFIG_SMP is not set # CONFIG_PPC_DOORBELL is not set CONFIG_VDSO32=y CONFIG_CPU_BIG_ENDIAN=y CONFIG_PPC32=y CONFIG_32BIT=y CONFIG_WORD_SIZE=32 # CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set # CONFIG_ARCH_DMA_ADDR_T_64BIT is not set CONFIG_MMU=y # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set # CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK is not set CONFIG_NR_IRQS=512 CONFIG_STACKTRACE_SUPPORT=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_ARCH_HAS_ILOG2_U32=y CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_HAS_DMA_SET_COHERENT_MASK=y CONFIG_PPC=y # CONFIG_GENERIC_CSUM is not set CONFIG_EARLY_PRINTK=y CONFIG_PANIC_TIMEOUT=180 CONFIG_GENERIC_NVRAM=y CONFIG_SCHED_OMIT_FRAME_POINTER=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y # CONFIG_PPC_UDBG_16550 is not set # CONFIG_GENERIC_TBSYNC is not set CONFIG_AUDIT_ARCH=y # CONFIG_EPAPR_BOOT is not set CONFIG_DEFAULT_UIMAGE=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y # CONFIG_PPC_DCR_NATIVE is not set # CONFIG_PPC_DCR_MMIO is not set CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_PGTABLE_LEVELS=2 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_IRQ_WORK=y # # General setup # CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_CROSS_COMPILE="" # CONFIG_COMPILE_TEST is not set CONFIG_LOCALVERSION="" # CONFIG_LOCALVERSION_AUTO is not set CONFIG_DEFAULT_HOSTNAME="(none)" # CONFIG_SYSVIPC is not set # CONFIG_POSIX_MQUEUE is not set # CONFIG_CROSS_MEMORY_ATTACH is not set # CONFIG_FHANDLE is not set # CONFIG_USELIB is not set # CONFIG_AUDIT is not set CONFIG_HAVE_ARCH_AUDITSYSCALL=y # # IRQ subsystem # CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_IRQ_SHOW_LEVEL=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y CONFIG_GENERIC_TIME_VSYSCALL_OLD=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CMOS_UPDATE=y # # Timers subsystem # CONFIG_HZ_PERIODIC=y # CONFIG_NO_HZ_IDLE is not set # CONFIG_NO_HZ is not set # CONFIG_HIGH_RES_TIMERS is not set # # CPU/Task time and stats accounting # CONFIG_TICK_CPU_ACCOUNTING=y # # RCU Subsystem # CONFIG_TINY_RCU=y # CONFIG_RCU_EXPERT is not set CONFIG_SRCU=y # CONFIG_TASKS_RCU is not set # CONFIG_RCU_STALL_COMMON is not set # CONFIG_TREE_RCU_TRACE is not set # CONFIG_RCU_EXPEDITE_BOOT is not set # CONFIG_BUILD_BIN2C is not set # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=17 # CONFIG_CGROUPS is not set # CONFIG_CHECKPOINT_RESTORE is not set # CONFIG_SCHED_AUTOGROUP is not set # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" CONFIG_RD_GZIP=y CONFIG_RD_BZIP2=y # CONFIG_RD_LZMA is not set # CONFIG_RD_XZ is not set # CONFIG_RD_LZO is not set # CONFIG_RD_LZ4 is not set # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_ANON_INODES=y CONFIG_SYSCTL_EXCEPTION_TRACE=y CONFIG_BPF=y CONFIG_EXPERT=y # CONFIG_MULTIUSER is not set # CONFIG_SGETMASK_SYSCALL is not set # CONFIG_SYSFS_SYSCALL is not set # CONFIG_KALLSYMS is not set CONFIG_PRINTK=y # CONFIG_BUG is not set # CONFIG_BASE_FULL is not set # CONFIG_FUTEX is not set # CONFIG_EPOLL is not set CONFIG_SIGNALFD=y # CONFIG_TIMERFD is not set # CONFIG_EVENTFD is not set # CONFIG_BPF_SYSCALL is not set # CONFIG_SHMEM is not set # CONFIG_AIO is not set # CONFIG_ADVISE_SYSCALLS is not set # CONFIG_PCI_QUIRKS is not set CONFIG_EMBEDDED=y CONFIG_HAVE_PERF_EVENTS=y # # Kernel Performance Events And Counters # # CONFIG_PERF_EVENTS is not set # CONFIG_VM_EVENT_COUNTERS is not set # CONFIG_COMPAT_BRK is not set # CONFIG_SLAB is not set CONFIG_SLUB=y # CONFIG_SLOB is not set # CONFIG_PROFILING is not set CONFIG_HAVE_OPROFILE=y # CONFIG_JUMP_LABEL is not set # CONFIG_UPROBES is not set # CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y CONFIG_ARCH_USE_BUILTIN_BSWAP=y CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_DMA_ATTRS=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_CLK=y CONFIG_HAVE_DMA_API_DEBUG=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y CONFIG_SECCOMP_FILTER=y # CONFIG_CC_STACKPROTECTOR is not set CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_MODULES_USE_ELF_RELA=y CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y CONFIG_ARCH_HAS_ELF_RANDOMIZE=y CONFIG_CLONE_BACKWARDS=y CONFIG_OLD_SIGSUSPEND=y CONFIG_OLD_SIGACTION=y # # GCOV-based kernel profiling # CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set CONFIG_BASE_SMALL=1 # CONFIG_MODULES is not set # CONFIG_BLOCK is not set 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_FREEZER is not set # CONFIG_PPC_XICS is not set # CONFIG_PPC_ICP_NATIVE is not set # CONFIG_PPC_ICP_HV is not set # CONFIG_PPC_ICS_RTAS is not set # CONFIG_GE_FPGA is not set # # Platform support # # CONFIG_PPC_CHRP is not set # CONFIG_PPC_MPC512x is not set CONFIG_PPC_MPC52xx=y CONFIG_PPC_MPC5200_SIMPLE=y # CONFIG_PPC_EFIKA is not set # CONFIG_PPC_LITE5200 is not set # CONFIG_PPC_MEDIA5200 is not set # CONFIG_PPC_MPC5200_BUGFIX is not set # CONFIG_PPC_MPC5200_LPBFIFO is not set # CONFIG_PPC_PMAC is not set # CONFIG_PPC_CELL is not set # CONFIG_PPC_CELL_NATIVE is not set # CONFIG_PPC_82xx is not set # CONFIG_PQ2ADS is not set # CONFIG_PPC_83xx is not set # CONFIG_PPC_86xx is not set # CONFIG_EMBEDDED6xx is not set # CONFIG_AMIGAONE is not set # CONFIG_KVM_GUEST is not set # CONFIG_EPAPR_PARAVIRT is not set # CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set # CONFIG_IPIC is not set # CONFIG_MPIC is not set # CONFIG_PPC_EPAPR_HV_PIC is not set # CONFIG_MPIC_WEIRD is not set # CONFIG_PPC_I8259 is not set # CONFIG_PPC_RTAS is not set # CONFIG_MMIO_NVRAM is not set # CONFIG_MPIC_U3_HT_IRQS is not set # CONFIG_PPC_MPC106 is not set # CONFIG_PPC_970_NAP is not set # CONFIG_PPC_P7_NAP is not set # # CPU Frequency scaling # # CONFIG_CPU_FREQ is not set # # CPUIdle driver # # # CPU Idle # # CONFIG_CPU_IDLE is not set # CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set # CONFIG_TAU is not set # CONFIG_FSL_ULI1575 is not set # CONFIG_SIMPLE_GPIO is not set # # Kernel options # # CONFIG_HIGHMEM is not set # CONFIG_HZ_100 is not set CONFIG_HZ_250=y # CONFIG_HZ_300 is not set # CONFIG_HZ_1000 is not set CONFIG_HZ=250 # CONFIG_SCHED_HRTICK is not set CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_SCRIPT is not set # CONFIG_HAVE_AOUT is not set # CONFIG_BINFMT_MISC is not set # CONFIG_COREDUMP is not set # CONFIG_IOMMU_HELPER is not set # CONFIG_SWIOTLB is not set CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_ARCH_HAS_WALK_MEMORY=y CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y # CONFIG_KEXEC is not set # CONFIG_CRASH_DUMP is not set CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_HAVE_MEMBLOCK=y CONFIG_HAVE_MEMBLOCK_NODE_MAP=y CONFIG_HAVE_GENERIC_RCU_GUP=y CONFIG_NO_BOOTMEM=y # CONFIG_HAVE_BOOTMEM_INFO_NODE is not set CONFIG_PAGEFLAGS_EXTENDED=y CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_COMPACTION is not set # CONFIG_MIGRATION is not set # CONFIG_PHYS_ADDR_T_64BIT is not set CONFIG_ZONE_DMA_FLAG=1 CONFIG_VIRT_TO_BUS=y # CONFIG_KSM is not set CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 CONFIG_NEED_PER_CPU_KM=y # CONFIG_CLEANCACHE is not set # CONFIG_CMA is not set # CONFIG_ZPOOL is not set # CONFIG_ZBUD is not set # CONFIG_ZSMALLOC is not set CONFIG_PPC_4K_PAGES=y CONFIG_FORCE_MAX_ZONEORDER=11 # CONFIG_PPC_COPRO_BASE is not set # CONFIG_CMDLINE_BOOL is not set CONFIG_EXTRA_TARGETS="" # CONFIG_PM is not set CONFIG_SECCOMP=y CONFIG_ISA_DMA_API=y # # Bus options # CONFIG_ZONE_DMA=y # CONFIG_NEED_DMA_MAP_STATE is not set CONFIG_NEED_SG_DMA_LENGTH=y CONFIG_GENERIC_ISA_DMA=y # CONFIG_PPC_INDIRECT_PCI is not set CONFIG_PPC_PCI_CHOICE=y CONFIG_PCI=y CONFIG_PCI_DOMAINS=y CONFIG_PCI_SYSCALL=y # CONFIG_PCIEPORTBUS is not set # CONFIG_PCI_MSI is not set # CONFIG_PCI_DEBUG is not set # CONFIG_PCI_REALLOC_ENABLE_AUTO is not set # CONFIG_PCI_STUB is not set # CONFIG_PCI_IOV is not set # CONFIG_PCI_PRI is not set # CONFIG_PCI_PASID is not set # # PCI host controller drivers # # CONFIG_PCCARD is not set # CONFIG_HAS_RAPIDIO is not set # CONFIG_RAPIDIO is not set # CONFIG_NONSTATIC_KERNEL is not set # # Advanced setup # # CONFIG_ADVANCED_OPTIONS is not set # # Default settings for advanced configuration options are used # CONFIG_LOWMEM_SIZE=0x30000000 CONFIG_PAGE_OFFSET=0xc0000000 CONFIG_KERNEL_START=0xc0000000 CONFIG_PHYSICAL_START=0x00000000 CONFIG_TASK_SIZE=0xc0000000 # CONFIG_ARCH_RANDOM is not set CONFIG_NET=y # # Networking options # CONFIG_PACKET=y # CONFIG_PACKET_DIAG is not set # CONFIG_UNIX is not set # CONFIG_XFRM_USER is not set # CONFIG_NET_KEY is not set CONFIG_INET=y # CONFIG_IP_MULTICAST is not set # CONFIG_IP_ADVANCED_ROUTER is not set # CONFIG_IP_PNP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE_DEMUX is not set # CONFIG_NET_IP_TUNNEL is not set # CONFIG_SYN_COOKIES is not set # CONFIG_NET_UDP_TUNNEL is not set # CONFIG_NET_FOU is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set # CONFIG_INET_XFRM_TUNNEL is not set # CONFIG_INET_TUNNEL is not set # CONFIG_INET_XFRM_MODE_TRANSPORT is not set # CONFIG_INET_XFRM_MODE_TUNNEL is not set # CONFIG_INET_XFRM_MODE_BEET is not set # CONFIG_INET_LRO is not set # CONFIG_INET_DIAG is not set # CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_TCP_MD5SIG is not set # CONFIG_IPV6 is not set # CONFIG_NETWORK_SECMARK is not set # CONFIG_NET_PTP_CLASSIFY is not set # CONFIG_NETWORK_PHY_TIMESTAMPING is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set # CONFIG_NETFILTER_ADVANCED is not set # # Core Netfilter Configuration # # CONFIG_NETFILTER_INGRESS is not set # CONFIG_NETFILTER_NETLINK_LOG is not set # CONFIG_NF_CONNTRACK is not set # CONFIG_NF_TABLES is not set # CONFIG_NETFILTER_XTABLES is not set # CONFIG_IP_SET is not set # CONFIG_IP_VS is not set # # IP: Netfilter Configuration # # CONFIG_NF_DEFRAG_IPV4 is not set # CONFIG_NF_DUP_IPV4 is not set # CONFIG_NF_LOG_ARP is not set # CONFIG_NF_LOG_IPV4 is not set # CONFIG_NF_REJECT_IPV4 is not set # CONFIG_IP_NF_IPTABLES is not set # CONFIG_IP_DCCP is not set # CONFIG_IP_SCTP is not set # CONFIG_RDS is not set # CONFIG_TIPC is not set # CONFIG_ATM is not set # CONFIG_L2TP is not set # CONFIG_BRIDGE is not set CONFIG_HAVE_NET_DSA=y # CONFIG_VLAN_8021Q is not set # CONFIG_DECNET is not set # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_PHONET is not set # CONFIG_IEEE802154 is not set # CONFIG_NET_SCHED is not set # CONFIG_DCB is not set # CONFIG_BATMAN_ADV is not set # CONFIG_OPENVSWITCH is not set # CONFIG_VSOCKETS is not set # CONFIG_NETLINK_MMAP is not set # CONFIG_NETLINK_DIAG is not set # CONFIG_MPLS is not set # CONFIG_HSR is not set # CONFIG_NET_SWITCHDEV is not set CONFIG_NET_RX_BUSY_POLL=y # # Network testing # # CONFIG_NET_PKTGEN is not set # CONFIG_HAMRADIO is not set CONFIG_CAN=y CONFIG_CAN_RAW=y # CONFIG_CAN_BCM is not set CONFIG_CAN_GW=y # # CAN Device Drivers # CONFIG_CAN_VCAN=y # CONFIG_CAN_SLCAN is not set CONFIG_CAN_DEV=y CONFIG_CAN_CALC_BITTIMING=y # CONFIG_CAN_FLEXCAN is not set # CONFIG_CAN_GRCAN is not set CONFIG_CAN_MSCAN=y CONFIG_CAN_MPC5XXX=y # CONFIG_CAN_SJA1000 is not set # CONFIG_CAN_C_CAN is not set # CONFIG_CAN_M_CAN is not set # CONFIG_CAN_CC770 is not set # CONFIG_CAN_SOFTING is not set # CONFIG_CAN_DEBUG_DEVICES is not set # CONFIG_IRDA is not set # CONFIG_BT is not set # CONFIG_AF_RXRPC is not set # CONFIG_WIRELESS is not set # CONFIG_WIMAX is not set # CONFIG_RFKILL is not set # CONFIG_NET_9P is not set # CONFIG_CAIF is not set # CONFIG_CEPH_LIB is not set # CONFIG_NFC is not set # CONFIG_LWTUNNEL is not set CONFIG_HAVE_BPF_JIT=y # # Device Drivers # # # Generic Driver Options # # CONFIG_UEVENT_HELPER is not set # CONFIG_DEVTMPFS is not set # CONFIG_STANDALONE is not set # CONFIG_PREVENT_FIRMWARE_BUILD is not set # CONFIG_FW_LOADER is not set # CONFIG_ALLOW_DEV_COREDUMP is not set # CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DEVRES is not set # CONFIG_SYS_HYPERVISOR is not set # CONFIG_GENERIC_CPU_DEVICES is not set # CONFIG_DMA_SHARED_BUFFER is not set # # Bus devices # # CONFIG_CONNECTOR is not set # CONFIG_MTD is not set CONFIG_DTC=y CONFIG_OF=y # CONFIG_OF_UNITTEST is not set CONFIG_OF_FLATTREE=y CONFIG_OF_EARLY_FLATTREE=y CONFIG_OF_ADDRESS=y CONFIG_OF_ADDRESS_PCI=y CONFIG_OF_IRQ=y CONFIG_OF_NET=y CONFIG_OF_MDIO=y CONFIG_OF_PCI=y CONFIG_OF_PCI_IRQ=y CONFIG_OF_RESERVED_MEM=y # CONFIG_OF_OVERLAY is not set CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y # CONFIG_PARPORT is not set # # Misc devices # # CONFIG_DUMMY_IRQ is not set # CONFIG_PHANTOM is not set # CONFIG_SGI_IOC4 is not set # CONFIG_TIFM_CORE is not set # CONFIG_ENCLOSURE_SERVICES is not set # CONFIG_HP_ILO is not set # CONFIG_SRAM is not set # CONFIG_C2PORT is not set # # EEPROM support # # CONFIG_EEPROM_93CX6 is not set # CONFIG_CB710_CORE is not set # # Texas Instruments shared transport line discipline # # # Altera FPGA firmware download module # # # Intel MIC Bus Driver # # # SCIF Bus Driver # # # Intel MIC Host Driver # # # Intel MIC Card Driver # # # SCIF Driver # # CONFIG_ECHO is not set # CONFIG_CXL_BASE is not set # CONFIG_CXL_KERNEL_API is not set # CONFIG_CXL_EEH is not set CONFIG_HAVE_IDE=y # # SCSI device support # CONFIG_SCSI_MOD=y # CONFIG_SCSI_DMA is not set # CONFIG_SCSI_NETLINK is not set # CONFIG_FUSION is not set # # IEEE 1394 (FireWire) support # # CONFIG_FIREWIRE is not set # CONFIG_FIREWIRE_NOSY is not set # CONFIG_MACINTOSH_DRIVERS is not set CONFIG_NETDEVICES=y # CONFIG_NET_CORE is not set # CONFIG_ARCNET is not set # # CAIF transport drivers # # # Distributed Switch Architecture drivers # # CONFIG_NET_DSA_MV88E6XXX is not set # CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set CONFIG_ETHERNET=y # CONFIG_NET_VENDOR_3COM is not set # CONFIG_NET_VENDOR_ADAPTEC is not set # CONFIG_NET_VENDOR_AGERE is not set # CONFIG_NET_VENDOR_ALTEON is not set # CONFIG_ALTERA_TSE is not set # CONFIG_NET_VENDOR_AMD is not set # CONFIG_NET_VENDOR_ARC is not set # CONFIG_NET_VENDOR_ATHEROS is not set # CONFIG_NET_CADENCE is not set # CONFIG_NET_VENDOR_BROADCOM is not set # CONFIG_NET_VENDOR_BROCADE is not set # CONFIG_NET_VENDOR_CAVIUM is not set # CONFIG_NET_VENDOR_CHELSIO is not set # CONFIG_NET_VENDOR_CISCO is not set # CONFIG_DNET is not set # CONFIG_NET_VENDOR_DEC is not set # CONFIG_NET_VENDOR_DLINK is not set # CONFIG_NET_VENDOR_EMULEX is not set # CONFIG_NET_VENDOR_EZCHIP is not set # CONFIG_NET_VENDOR_EXAR is not set CONFIG_NET_VENDOR_FREESCALE=y CONFIG_FEC_MPC52xx=y CONFIG_FEC_MPC52xx_MDIO=y # CONFIG_FSL_PQ_MDIO is not set # CONFIG_FSL_XGMAC_MDIO is not set # CONFIG_GIANFAR is not set # CONFIG_NET_VENDOR_HP is not set # CONFIG_NET_VENDOR_INTEL is not set # CONFIG_IP1000 is not set # CONFIG_JME is not set # CONFIG_NET_VENDOR_MARVELL is not set # CONFIG_NET_VENDOR_MELLANOX is not set # CONFIG_NET_VENDOR_MICREL is not set # CONFIG_NET_VENDOR_MYRI is not set # CONFIG_FEALNX is not set # CONFIG_NET_VENDOR_NATSEMI is not set # CONFIG_NET_VENDOR_NVIDIA is not set # CONFIG_NET_VENDOR_OKI is not set # CONFIG_ETHOC is not set # CONFIG_NET_PACKET_ENGINE is not set # CONFIG_NET_VENDOR_QLOGIC is not set # CONFIG_NET_VENDOR_QUALCOMM is not set # CONFIG_NET_VENDOR_REALTEK is not set # CONFIG_NET_VENDOR_RENESAS is not set # CONFIG_NET_VENDOR_RDC is not set # CONFIG_NET_VENDOR_ROCKER is not set # CONFIG_NET_VENDOR_SAMSUNG is not set # CONFIG_NET_VENDOR_SEEQ is not set # CONFIG_NET_VENDOR_SILAN is not set # CONFIG_NET_VENDOR_SIS is not set # CONFIG_SFC is not set # CONFIG_NET_VENDOR_SMSC is not set # CONFIG_NET_VENDOR_STMICRO is not set # CONFIG_NET_VENDOR_SUN is not set # CONFIG_NET_VENDOR_SYNOPSYS is not set # CONFIG_NET_VENDOR_TEHUTI is not set # CONFIG_NET_VENDOR_TI is not set # CONFIG_NET_VENDOR_VIA is not set # CONFIG_NET_VENDOR_WIZNET is not set # CONFIG_NET_VENDOR_XILINX is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set CONFIG_PHYLIB=y # # MII PHY device drivers # # CONFIG_AQUANTIA_PHY is not set # CONFIG_AT803X_PHY is not set # CONFIG_AMD_PHY is not set # CONFIG_MARVELL_PHY is not set # CONFIG_DAVICOM_PHY is not set # CONFIG_QSEMI_PHY is not set # CONFIG_LXT_PHY is not set # CONFIG_CICADA_PHY is not set # CONFIG_VITESSE_PHY is not set # CONFIG_TERANETICS_PHY is not set # CONFIG_SMSC_PHY is not set # CONFIG_BROADCOM_PHY is not set # CONFIG_BCM7XXX_PHY is not set # CONFIG_BCM87XX_PHY is not set # CONFIG_ICPLUS_PHY is not set # CONFIG_REALTEK_PHY is not set # CONFIG_NATIONAL_PHY is not set # CONFIG_STE10XP is not set # CONFIG_LSI_ET1011C_PHY is not set # CONFIG_MICREL_PHY is not set # CONFIG_DP83867_PHY is not set # CONFIG_FIXED_PHY is not set # CONFIG_MDIO_BITBANG is not set # CONFIG_MDIO_BUS_MUX_MMIOREG is not set # CONFIG_MDIO_BCM_UNIMAC is not set # CONFIG_PPP is not set # CONFIG_SLIP is not set # # Host-side USB support is needed for USB Network Adapter support # # CONFIG_WLAN is not set # # Enable WiMAX (Networking options) to see the WiMAX drivers # # CONFIG_WAN is not set # CONFIG_VMXNET3 is not set # CONFIG_ISDN is not set # # Input device support # # CONFIG_INPUT is not set # # Hardware I/O ports # # CONFIG_SERIO is not set CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y # CONFIG_GAMEPORT is not set # # Character devices # CONFIG_TTY=y # CONFIG_VT is not set # CONFIG_UNIX98_PTYS is not set # CONFIG_LEGACY_PTYS is not set # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_NOZOMI is not set # CONFIG_N_GSM is not set # CONFIG_TRACE_SINK is not set # CONFIG_PPC_EPAPR_HV_BYTECHAN is not set # CONFIG_DEVMEM is not set # CONFIG_DEVKMEM is not set # # Serial drivers # # CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # # CONFIG_SERIAL_UARTLITE is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_SERIAL_MPC52xx=y CONFIG_SERIAL_MPC52xx_CONSOLE=y CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 # CONFIG_SERIAL_JSM is not set # CONFIG_SERIAL_SCCNXP is not set # CONFIG_SERIAL_ALTERA_JTAGUART is not set # CONFIG_SERIAL_ALTERA_UART is not set # CONFIG_SERIAL_XILINX_PS_UART is not set # CONFIG_SERIAL_ARC is not set # CONFIG_SERIAL_RP2 is not set # CONFIG_SERIAL_FSL_LPUART is not set # CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set # CONFIG_TTY_PRINTK is not set # CONFIG_HVC_UDBG is not set # CONFIG_IPMI_HANDLER is not set # CONFIG_HW_RANDOM is not set # CONFIG_NVRAM is not set # CONFIG_GEN_RTC is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set # CONFIG_TCG_TPM is not set CONFIG_DEVPORT=y # CONFIG_XILLYBUS is not set # # I2C support # # CONFIG_I2C is not set # CONFIG_SPI is not set # CONFIG_SPMI is not set # CONFIG_HSI is not set # # PPS support # # CONFIG_PPS is not set # # PPS generators support # # # PTP clock support # # CONFIG_PTP_1588_CLOCK is not set # # Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. # CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y # CONFIG_GPIOLIB is not set # CONFIG_W1 is not set # CONFIG_POWER_SUPPLY is not set # CONFIG_POWER_AVS is not set # CONFIG_HWMON is not set # CONFIG_THERMAL is not set # CONFIG_WATCHDOG is not set CONFIG_SSB_POSSIBLE=y # # Sonics Silicon Backplane # # CONFIG_SSB is not set CONFIG_BCMA_POSSIBLE=y # # Broadcom specific AMBA # # CONFIG_BCMA is not set # # Multifunction device drivers # # CONFIG_MFD_CORE is not set # CONFIG_MFD_ATMEL_HLCDC is not set # CONFIG_MFD_CROS_EC is not set # CONFIG_MFD_HI6421_PMIC is not set # CONFIG_HTC_PASIC3 is not set # CONFIG_LPC_ICH is not set # CONFIG_LPC_SCH is not set # CONFIG_MFD_JANZ_CMODIO is not set # CONFIG_MFD_KEMPLD is not set # CONFIG_MFD_MT6397 is not set # CONFIG_MFD_RDC321X is not set # CONFIG_MFD_RTSX_PCI is not set # CONFIG_MFD_SM501 is not set # CONFIG_ABX500_CORE is not set # CONFIG_MFD_SYSCON is not set # CONFIG_MFD_TI_AM335X_TSCADC is not set # CONFIG_MFD_TMIO is not set # CONFIG_MFD_VX855 is not set # CONFIG_REGULATOR is not set # CONFIG_MEDIA_SUPPORT is not set # # Graphics support # # CONFIG_AGP is not set # CONFIG_VGA_ARB is not set # # Direct Rendering Manager # # CONFIG_DRM is not set # # Frame buffer Devices # # CONFIG_FB is not set # CONFIG_BACKLIGHT_LCD_SUPPORT is not set # CONFIG_VGASTATE is not set # CONFIG_SOUND is not set # CONFIG_USB_OHCI_LITTLE_ENDIAN is not set # CONFIG_USB_SUPPORT is not set # CONFIG_UWB is not set # CONFIG_MMC is not set # CONFIG_MEMSTICK is not set # CONFIG_NEW_LEDS is not set # CONFIG_ACCESSIBILITY is not set # CONFIG_INFINIBAND is not set CONFIG_EDAC_ATOMIC_SCRUB=y CONFIG_EDAC_SUPPORT=y # CONFIG_EDAC is not set # CONFIG_RTC_CLASS is not set CONFIG_DMADEVICES=y # CONFIG_DMADEVICES_DEBUG is not set # # DMA Devices # # CONFIG_IDMA64 is not set # CONFIG_DW_DMAC is not set # CONFIG_DW_DMAC_PCI is not set # CONFIG_HSU_DMA_PCI is not set CONFIG_PPC_BESTCOMM=y CONFIG_PPC_BESTCOMM_FEC=y # CONFIG_FSL_EDMA is not set CONFIG_DMA_ENGINE=y CONFIG_DMA_OF=y # # DMA Clients # # CONFIG_ASYNC_TX_DMA is not set # CONFIG_DMATEST is not set # CONFIG_AUXDISPLAY is not set # CONFIG_UIO is not set # CONFIG_VIRT_DRIVERS is not set # # Virtio drivers # # CONFIG_VIRTIO_PCI is not set # CONFIG_VIRTIO_MMIO is not set # # Microsoft Hyper-V guest support # # CONFIG_STAGING is not set # CONFIG_CHROME_PLATFORMS is not set CONFIG_CLKDEV_LOOKUP=y CONFIG_HAVE_CLK_PREPARE=y CONFIG_COMMON_CLK=y # # Common Clock Framework # # CONFIG_COMMON_CLK_PXA is not set # # Hardware Spinlock drivers # # # Clock Source drivers # # CONFIG_ATMEL_PIT is not set # CONFIG_SH_TIMER_CMT is not set # CONFIG_SH_TIMER_MTU2 is not set # CONFIG_SH_TIMER_TMU is not set # CONFIG_EM_TIMER_STI is not set # CONFIG_MAILBOX is not set # CONFIG_IOMMU_SUPPORT is not set # # Remoteproc drivers # # CONFIG_STE_MODEM_RPROC is not set # # Rpmsg drivers # # # SOC (System On Chip) specific Drivers # # CONFIG_SUNXI_SRAM is not set # CONFIG_SOC_TI is not set # CONFIG_PM_DEVFREQ is not set # CONFIG_EXTCON is not set # CONFIG_MEMORY is not set # CONFIG_IIO is not set # CONFIG_NTB is not set # CONFIG_VME_BUS is not set # CONFIG_PWM is not set CONFIG_IRQCHIP=y # CONFIG_IPACK_BUS is not set # CONFIG_RESET_CONTROLLER is not set # CONFIG_FMC is not set # # PHY Subsystem # # CONFIG_GENERIC_PHY is not set # CONFIG_PHY_PXA_28NM_HSIC is not set # CONFIG_PHY_PXA_28NM_USB2 is not set # CONFIG_BCM_KONA_USB2_PHY is not set # CONFIG_POWERCAP is not set # CONFIG_MCB is not set # # Performance monitor support # # CONFIG_RAS is not set # CONFIG_THUNDERBOLT is not set # # Android # # CONFIG_ANDROID is not set # CONFIG_NVMEM is not set # # File systems # # CONFIG_FS_POSIX_ACL is not set # CONFIG_FILE_LOCKING is not set # CONFIG_FSNOTIFY is not set # CONFIG_DNOTIFY is not set # CONFIG_INOTIFY_USER is not set # CONFIG_FANOTIFY is not set # CONFIG_QUOTA is not set # CONFIG_QUOTACTL is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_FUSE_FS is not set # CONFIG_OVERLAY_FS is not set # # Caches # # CONFIG_FSCACHE is not set # # Pseudo filesystems # CONFIG_PROC_FS=y # CONFIG_PROC_KCORE is not set # CONFIG_PROC_SYSCTL is not set # CONFIG_PROC_PAGE_MONITOR is not set # CONFIG_PROC_CHILDREN is not set # CONFIG_KERNFS is not set # CONFIG_SYSFS is not set # CONFIG_HUGETLB_PAGE is not set # CONFIG_CONFIGFS_FS is not set # CONFIG_MISC_FILESYSTEMS is not set # CONFIG_NETWORK_FILESYSTEMS is not set # CONFIG_NLS is not set # CONFIG_BINARY_PRINTF is not set # # Library routines # CONFIG_BITREVERSE=y # CONFIG_HAVE_ARCH_BITREVERSE is not set CONFIG_GENERIC_STRNCPY_FROM_USER=y CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_NET_UTILS=y CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_IO=y # CONFIG_CRC_CCITT is not set # CONFIG_CRC16 is not set # CONFIG_CRC_T10DIF is not set # CONFIG_CRC_ITU_T is not set CONFIG_CRC32=y # CONFIG_CRC32_SELFTEST is not set CONFIG_CRC32_SLICEBY8=y # CONFIG_CRC32_SLICEBY4 is not set # CONFIG_CRC32_SARWATE is not set # CONFIG_CRC32_BIT is not set # CONFIG_CRC7 is not set # CONFIG_LIBCRC32C is not set # CONFIG_CRC8 is not set # CONFIG_AUDIT_ARCH_COMPAT_GENERIC is not set # CONFIG_RANDOM32_SELFTEST is not set CONFIG_ZLIB_INFLATE=y # CONFIG_XZ_DEC is not set # CONFIG_XZ_DEC_BCJ is not set CONFIG_DECOMPRESS_GZIP=y CONFIG_DECOMPRESS_BZIP2=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y CONFIG_HAS_DMA=y CONFIG_NLATTR=y CONFIG_GENERIC_ATOMIC64=y CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y # CONFIG_CORDIC is not set # CONFIG_DDR is not set CONFIG_LIBFDT=y # CONFIG_SG_SPLIT is not set CONFIG_ARCH_HAS_SG_CHAIN=y # # Kernel hacking # # # printk and dmesg options # # CONFIG_PRINTK_TIME is not set CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 # # Compile-time checks and compiler options # # CONFIG_DEBUG_INFO is not set # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set 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 is not set # CONFIG_HEADERS_CHECK is not set # CONFIG_DEBUG_SECTION_MISMATCH is not set # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set # CONFIG_MAGIC_SYSRQ is not set CONFIG_DEBUG_KERNEL=y # # Memory Debugging # # CONFIG_PAGE_EXTENSION is not set # CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_DEBUG_OBJECTS 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_DEBUG_MEMORY_INIT is not set CONFIG_HAVE_DEBUG_STACKOVERFLOW=y # CONFIG_DEBUG_STACKOVERFLOW is not set # CONFIG_DEBUG_SHIRQ is not set # # Debug Lockups and Hangs # # CONFIG_LOCKUP_DETECTOR is not set # CONFIG_DETECT_HUNG_TASK is not set # CONFIG_PANIC_ON_OOPS is not set CONFIG_PANIC_ON_OOPS_VALUE=0 # CONFIG_SCHED_DEBUG is not set # CONFIG_SCHED_INFO is not set # CONFIG_SCHEDSTATS is not set # CONFIG_SCHED_STACK_END_CHECK is not set # CONFIG_DEBUG_TIMEKEEPING is not set # CONFIG_TIMER_STATS is not set # # Lock Debugging (spinlocks, mutexes, etc...) # # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_MUTEXES is not set # CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set # CONFIG_DEBUG_LOCK_ALLOC is not set # CONFIG_PROVE_LOCKING is not set # CONFIG_LOCK_STAT 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_STACKTRACE is not set # CONFIG_DEBUG_KOBJECT is not set # 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_PROVE_RCU is not set # CONFIG_SPARSE_RCU_POINTER is not set # CONFIG_TORTURE_TEST is not set # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_RCU_TRACE is not set # CONFIG_RCU_EQS_DEBUG is not set # CONFIG_NOTIFIER_ERROR_INJECTION is not set # CONFIG_FAULT_INJECTION is not set # CONFIG_LATENCYTOP is not set 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_TRACING_SUPPORT=y # CONFIG_FTRACE is not set # # Runtime Testing # # CONFIG_TEST_LIST_SORT is not set # CONFIG_BACKTRACE_SELF_TEST is not set # CONFIG_RBTREE_TEST 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_RHASHTABLE is not set # CONFIG_DMA_API_DEBUG is not set # CONFIG_TEST_UDELAY is not set # CONFIG_MEMTEST is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y # CONFIG_KGDB is not set # CONFIG_PPC_DISABLE_WERROR is not set CONFIG_PPC_WERROR=y # CONFIG_STRICT_MM_TYPECHECKS is not set CONFIG_PRINT_STACK_DEPTH=64 # CONFIG_CODE_PATCHING_SELFTEST is not set # CONFIG_FTR_FIXUP_SELFTEST is not set # CONFIG_MSI_BITMAP_SELFTEST is not set # CONFIG_XMON is not set # CONFIG_BDI_SWITCH is not set # CONFIG_BOOTX_TEXT is not set # CONFIG_PPC_EARLY_DEBUG is not set # CONFIG_STRICT_DEVMEM is not set # # Security options # # CONFIG_KEYS is not set # CONFIG_SECURITY_DMESG_RESTRICT is not set # CONFIG_SECURITYFS is not set CONFIG_DEFAULT_SECURITY_DAC=y CONFIG_DEFAULT_SECURITY="" CONFIG_CRYPTO=y # # Crypto core or helper # CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_ALGAPI2=y # CONFIG_CRYPTO_RSA is not set # CONFIG_CRYPTO_MANAGER is not set # CONFIG_CRYPTO_MANAGER2 is not set # CONFIG_CRYPTO_USER is not set # CONFIG_CRYPTO_GF128MUL is not set # CONFIG_CRYPTO_NULL is not set # CONFIG_CRYPTO_CRYPTD is not set # CONFIG_CRYPTO_MCRYPTD is not set # CONFIG_CRYPTO_AUTHENC is not set # # Authenticated Encryption with Associated Data # # CONFIG_CRYPTO_CCM is not set # CONFIG_CRYPTO_GCM is not set # CONFIG_CRYPTO_CHACHA20POLY1305 is not set # CONFIG_CRYPTO_SEQIV is not set # CONFIG_CRYPTO_ECHAINIV is not set # # Block modes # # CONFIG_CRYPTO_CBC is not set # CONFIG_CRYPTO_CTR is not set # CONFIG_CRYPTO_CTS is not set # CONFIG_CRYPTO_ECB is not set # CONFIG_CRYPTO_LRW is not set # CONFIG_CRYPTO_PCBC is not set # CONFIG_CRYPTO_XTS is not set # # Hash modes # # CONFIG_CRYPTO_CMAC is not set # CONFIG_CRYPTO_HMAC is not set # CONFIG_CRYPTO_XCBC is not set # CONFIG_CRYPTO_VMAC is not set # # Digest # # CONFIG_CRYPTO_CRC32C is not set # CONFIG_CRYPTO_CRC32 is not set # CONFIG_CRYPTO_CRCT10DIF is not set # CONFIG_CRYPTO_GHASH is not set # CONFIG_CRYPTO_POLY1305 is not set # CONFIG_CRYPTO_MD4 is not set # CONFIG_CRYPTO_MD5 is not set # CONFIG_CRYPTO_MD5_PPC is not set # CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_RMD128 is not set # CONFIG_CRYPTO_RMD160 is not set # CONFIG_CRYPTO_RMD256 is not set # CONFIG_CRYPTO_RMD320 is not set # CONFIG_CRYPTO_SHA1 is not set # CONFIG_CRYPTO_SHA1_PPC is not set # CONFIG_CRYPTO_SHA256 is not set # CONFIG_CRYPTO_SHA512 is not set # CONFIG_CRYPTO_TGR192 is not set # CONFIG_CRYPTO_WP512 is not set # # Ciphers # CONFIG_CRYPTO_AES=y # CONFIG_CRYPTO_ANUBIS is not set # CONFIG_CRYPTO_ARC4 is not set # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_CAMELLIA is not set # CONFIG_CRYPTO_CAST5 is not set # CONFIG_CRYPTO_CAST6 is not set # CONFIG_CRYPTO_DES is not set # CONFIG_CRYPTO_FCRYPT is not set # CONFIG_CRYPTO_KHAZAD is not set # CONFIG_CRYPTO_SALSA20 is not set # CONFIG_CRYPTO_CHACHA20 is not set # CONFIG_CRYPTO_SEED is not set # CONFIG_CRYPTO_SERPENT is not set # CONFIG_CRYPTO_TEA is not set # CONFIG_CRYPTO_TWOFISH is not set # # Compression # # CONFIG_CRYPTO_DEFLATE is not set # CONFIG_CRYPTO_ZLIB is not set # CONFIG_CRYPTO_LZO is not set # CONFIG_CRYPTO_842 is not set # CONFIG_CRYPTO_LZ4 is not set # CONFIG_CRYPTO_LZ4HC is not set # # Random Number Generation # # CONFIG_CRYPTO_ANSI_CPRNG is not set # CONFIG_CRYPTO_DRBG_MENU is not set # CONFIG_CRYPTO_JITTERENTROPY is not set # CONFIG_CRYPTO_USER_API_HASH is not set # CONFIG_CRYPTO_USER_API_SKCIPHER is not set # CONFIG_CRYPTO_USER_API_RNG is not set # CONFIG_CRYPTO_USER_API_AEAD is not set # CONFIG_CRYPTO_HW is not set CONFIG_PPC_LIB_RHEAP=y # CONFIG_VIRTUALIZATION is not set ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: memcpy regression 2015-09-04 14:35 ` Michal Sojka @ 2015-09-04 18:10 ` christophe leroy 2015-09-04 19:49 ` Michal Sojka 0 siblings, 1 reply; 16+ messages in thread From: christophe leroy @ 2015-09-04 18:10 UTC (permalink / raw) To: Michal Sojka; +Cc: Scott Wood, linuxppc-dev Le 04/09/2015 16:35, Michal Sojka a écrit : > On Fri, Sep 04 2015, Christophe LEROY wrote: >> Le 04/09/2015 15:33, Michal Sojka a écrit : >>> Dear Christophe, >>> >>> my MPC5200-based system stopped booting recently. I bisected the problem >>> to your commit below. If I revert that commit (on top of >>> 807249d3ada1ff28a47c4054ca4edd479421b671 = v4.2-6663-g807249d), my >>> system boots again. >>> >>> >> Do you use mainline code only, or do you have home-made code ? > I use mainline only sources with non-mainline device-tree. > >> memcpy() is not supposed to be used on non-cacheable memory. >> memcpy_toio() is the function to use when copying to non-cacheble area. >> >> When I submitted the patch, I looked for erroneous use of memcpy() and >> memset(). >> I found one wrong use of memset() that I changed to memset_io() but I >> didn't find any misuse of memcpy(). >> But I may have missed one. > I attach my .config, if it helps. I have there > > CONFIG_PPC_MPC52xx=y > CONFIG_PPC_MPC5200_SIMPLE=y > > so arch/powerpc/platforms/52xx is probably the directory to look. Do you > see any mempcy misuse there? I only found one suspect use of memcpy() in arch/powerpc/platforms/52xx/ It is in mpc52xx_pm.c but it's linked to CONFIG_PM which is not selected by your .config I'll check in the drivers selected by your .config In parallele, are you able to try with CONFIG_PPC_EARLY_DEBUG in order to try and locate the blocking point ? Christophe --- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: memcpy regression 2015-09-04 18:10 ` christophe leroy @ 2015-09-04 19:49 ` Michal Sojka 2015-09-05 0:08 ` Michal Sojka 0 siblings, 1 reply; 16+ messages in thread From: Michal Sojka @ 2015-09-04 19:49 UTC (permalink / raw) To: christophe leroy; +Cc: Scott Wood, linuxppc-dev On 4.9.2015 20:10, christophe leroy wrote: > > > Le 04/09/2015 16:35, Michal Sojka a écrit : >> On Fri, Sep 04 2015, Christophe LEROY wrote: >>> Le 04/09/2015 15:33, Michal Sojka a écrit : >>>> Dear Christophe, >>>> >>>> my MPC5200-based system stopped booting recently. I bisected the >>>> problem >>>> to your commit below. If I revert that commit (on top of >>>> 807249d3ada1ff28a47c4054ca4edd479421b671 = v4.2-6663-g807249d), my >>>> system boots again. >>>> >>>> >>> Do you use mainline code only, or do you have home-made code ? >> I use mainline only sources with non-mainline device-tree. >> >>> memcpy() is not supposed to be used on non-cacheable memory. >>> memcpy_toio() is the function to use when copying to non-cacheble area. >>> >>> When I submitted the patch, I looked for erroneous use of memcpy() and >>> memset(). >>> I found one wrong use of memset() that I changed to memset_io() but I >>> didn't find any misuse of memcpy(). >>> But I may have missed one. >> I attach my .config, if it helps. I have there >> >> CONFIG_PPC_MPC52xx=y >> CONFIG_PPC_MPC5200_SIMPLE=y >> >> so arch/powerpc/platforms/52xx is probably the directory to look. Do you >> see any mempcy misuse there? > I only found one suspect use of memcpy() in arch/powerpc/platforms/52xx/ > It is in mpc52xx_pm.c but it's linked to CONFIG_PM which is not > selected by your .config > I'll check in the drivers selected by your .config > > In parallele, are you able to try with CONFIG_PPC_EARLY_DEBUG in order > to try and locate the blocking point ? I don't get any output from the system even with CONFIG_PPC_EARLY_DEBUG. -Michal ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: memcpy regression 2015-09-04 19:49 ` Michal Sojka @ 2015-09-05 0:08 ` Michal Sojka 2015-09-06 8:18 ` christophe leroy 0 siblings, 1 reply; 16+ messages in thread From: Michal Sojka @ 2015-09-05 0:08 UTC (permalink / raw) To: christophe leroy; +Cc: Scott Wood, linuxppc-dev On 4.9.2015 21:49, Michal Sojka wrote: > On 4.9.2015 20:10, christophe leroy wrote: >> >> >> Le 04/09/2015 16:35, Michal Sojka a écrit : >>> On Fri, Sep 04 2015, Christophe LEROY wrote: >>>> Le 04/09/2015 15:33, Michal Sojka a écrit : >>>>> Dear Christophe, >>>>> >>>>> my MPC5200-based system stopped booting recently. I bisected the >>>>> problem >>>>> to your commit below. If I revert that commit (on top of >>>>> 807249d3ada1ff28a47c4054ca4edd479421b671 = v4.2-6663-g807249d), my >>>>> system boots again. >>>>> >>>>> >>>> Do you use mainline code only, or do you have home-made code ? >>> I use mainline only sources with non-mainline device-tree. >>> >>>> memcpy() is not supposed to be used on non-cacheable memory. >>>> memcpy_toio() is the function to use when copying to non-cacheble >>>> area. >>>> >>>> When I submitted the patch, I looked for erroneous use of memcpy() and >>>> memset(). >>>> I found one wrong use of memset() that I changed to memset_io() but I >>>> didn't find any misuse of memcpy(). >>>> But I may have missed one. >>> I attach my .config, if it helps. I have there >>> >>> CONFIG_PPC_MPC52xx=y >>> CONFIG_PPC_MPC5200_SIMPLE=y >>> >>> so arch/powerpc/platforms/52xx is probably the directory to look. Do >>> you >>> see any mempcy misuse there? >> I only found one suspect use of memcpy() in arch/powerpc/platforms/52xx/ >> It is in mpc52xx_pm.c but it's linked to CONFIG_PM which is not >> selected by your .config >> I'll check in the drivers selected by your .config >> >> In parallele, are you able to try with CONFIG_PPC_EARLY_DEBUG in >> order to try and locate the blocking point ? > I don't get any output from the system even with CONFIG_PPC_EARLY_DEBUG. Hmm, there is no udbg console for MPC5200. I hacked something up and the earliest place I was able to initialize it is after early_init_devtree() in setup_32.c. Even with this console, I got no output when the problematic patch was applied. So the problem is somewhere earlier. -Michal ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: memcpy regression 2015-09-05 0:08 ` Michal Sojka @ 2015-09-06 8:18 ` christophe leroy 2015-09-06 19:05 ` Michal Sojka 0 siblings, 1 reply; 16+ messages in thread From: christophe leroy @ 2015-09-06 8:18 UTC (permalink / raw) To: Michal Sojka; +Cc: Scott Wood, linuxppc-dev Le 05/09/2015 02:08, Michal Sojka a écrit : > On 4.9.2015 21:49, Michal Sojka wrote: >> On 4.9.2015 20:10, christophe leroy wrote: >>> >>> >>> Le 04/09/2015 16:35, Michal Sojka a écrit : >>>> On Fri, Sep 04 2015, Christophe LEROY wrote: >>>>> Le 04/09/2015 15:33, Michal Sojka a écrit : >>>>>> Dear Christophe, >>>>>> >>>>>> my MPC5200-based system stopped booting recently. I bisected the >>>>>> problem >>>>>> to your commit below. If I revert that commit (on top of >>>>>> 807249d3ada1ff28a47c4054ca4edd479421b671 = v4.2-6663-g807249d), my >>>>>> system boots again. >>>>>> >>>>>> >>>>> Do you use mainline code only, or do you have home-made code ? >>>> I use mainline only sources with non-mainline device-tree. >>>> >>>>> memcpy() is not supposed to be used on non-cacheable memory. >>>>> memcpy_toio() is the function to use when copying to non-cacheble >>>>> area. >>>>> >>>>> When I submitted the patch, I looked for erroneous use of memcpy() >>>>> and >>>>> memset(). >>>>> I found one wrong use of memset() that I changed to memset_io() but I >>>>> didn't find any misuse of memcpy(). >>>>> But I may have missed one. >>>> I attach my .config, if it helps. I have there >>>> >>>> CONFIG_PPC_MPC52xx=y >>>> CONFIG_PPC_MPC5200_SIMPLE=y >>>> >>>> so arch/powerpc/platforms/52xx is probably the directory to look. >>>> Do you >>>> see any mempcy misuse there? >>> I only found one suspect use of memcpy() in >>> arch/powerpc/platforms/52xx/ >>> It is in mpc52xx_pm.c but it's linked to CONFIG_PM which is not >>> selected by your .config >>> I'll check in the drivers selected by your .config >>> >>> In parallele, are you able to try with CONFIG_PPC_EARLY_DEBUG in >>> order to try and locate the blocking point ? >> I don't get any output from the system even with CONFIG_PPC_EARLY_DEBUG. > > Hmm, there is no udbg console for MPC5200. I hacked something up and > the earliest place I was able to initialize it is after > early_init_devtree() in setup_32.c. Even with this console, I got no > output when the problematic patch was applied. So the problem is > somewhere earlier. > In early_init() in setup_32.c, there is the following comment: /* First zero the BSS -- use memset_io, some platforms don't have caches on yet */ In that case, when does cache get activated ? In move_device_tree(), called from early_init_devtree(), there is a call to memcpy(). Can you try replacing it by memcpy_io() ? Christophe --- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: memcpy regression 2015-09-06 8:18 ` christophe leroy @ 2015-09-06 19:05 ` Michal Sojka 2015-09-06 21:01 ` Michal Sojka 0 siblings, 1 reply; 16+ messages in thread From: Michal Sojka @ 2015-09-06 19:05 UTC (permalink / raw) To: christophe leroy; +Cc: Scott Wood, linuxppc-dev On Sun, Sep 06 2015, christophe leroy wrote: > Le 05/09/2015 02:08, Michal Sojka a =C3=A9crit : >> On 4.9.2015 21:49, Michal Sojka wrote: >>> On 4.9.2015 20:10, christophe leroy wrote: >>>> >>>> >>>> Le 04/09/2015 16:35, Michal Sojka a =C3=A9crit : >>>>> On Fri, Sep 04 2015, Christophe LEROY wrote: >>>>>> Le 04/09/2015 15:33, Michal Sojka a =C3=A9crit : >>>>>>> Dear Christophe, >>>>>>> >>>>>>> my MPC5200-based system stopped booting recently. I bisected the=20 >>>>>>> problem >>>>>>> to your commit below. If I revert that commit (on top of >>>>>>> 807249d3ada1ff28a47c4054ca4edd479421b671 =3D v4.2-6663-g807249d), my >>>>>>> system boots again. >>>>>>> >>>>>>> >>>>>> Do you use mainline code only, or do you have home-made code ? >>>>> I use mainline only sources with non-mainline device-tree. >>>>> >>>>>> memcpy() is not supposed to be used on non-cacheable memory. >>>>>> memcpy_toio() is the function to use when copying to non-cacheble=20 >>>>>> area. >>>>>> >>>>>> When I submitted the patch, I looked for erroneous use of memcpy()=20 >>>>>> and >>>>>> memset(). >>>>>> I found one wrong use of memset() that I changed to memset_io() but I >>>>>> didn't find any misuse of memcpy(). >>>>>> But I may have missed one. >>>>> I attach my .config, if it helps. I have there >>>>> >>>>> CONFIG_PPC_MPC52xx=3Dy >>>>> CONFIG_PPC_MPC5200_SIMPLE=3Dy >>>>> >>>>> so arch/powerpc/platforms/52xx is probably the directory to look.=20 >>>>> Do you >>>>> see any mempcy misuse there? >>>> I only found one suspect use of memcpy() in=20 >>>> arch/powerpc/platforms/52xx/ >>>> It is in mpc52xx_pm.c but it's linked to CONFIG_PM which is not=20 >>>> selected by your .config >>>> I'll check in the drivers selected by your .config >>>> >>>> In parallele, are you able to try with CONFIG_PPC_EARLY_DEBUG in=20 >>>> order to try and locate the blocking point ? >>> I don't get any output from the system even with CONFIG_PPC_EARLY_DEBUG. >> >> Hmm, there is no udbg console for MPC5200. I hacked something up and=20 >> the earliest place I was able to initialize it is after=20 >> early_init_devtree() in setup_32.c. Even with this console, I got no=20 >> output when the problematic patch was applied. So the problem is=20 >> somewhere earlier. >> > > In early_init() in setup_32.c, there is the following comment: > /* First zero the BSS -- use memset_io, some platforms don't have caches= =20 > on yet */ > > In that case, when does cache get activated ? > > In move_device_tree(), called from early_init_devtree(), there is a call= =20 > to memcpy(). > Can you try replacing it by memcpy_io() ? I tried replacing it by memcpy_toio(), memcpy_fromio() and by generic_memcpy(). Nothing helped :( -Michal ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: memcpy regression 2015-09-06 19:05 ` Michal Sojka @ 2015-09-06 21:01 ` Michal Sojka 2015-09-07 1:14 ` Michael Ellerman 0 siblings, 1 reply; 16+ messages in thread From: Michal Sojka @ 2015-09-06 21:01 UTC (permalink / raw) To: christophe leroy; +Cc: Scott Wood, linuxppc-dev On Sun, Sep 06 2015, Michal Sojka wrote: > On Sun, Sep 06 2015, christophe leroy wrote: >> Le 05/09/2015 02:08, Michal Sojka a =C3=A9crit : >>> On 4.9.2015 21:49, Michal Sojka wrote: >>>> On 4.9.2015 20:10, christophe leroy wrote: >>>>> >>>>> >>>>> Le 04/09/2015 16:35, Michal Sojka a =C3=A9crit : >>>>>> On Fri, Sep 04 2015, Christophe LEROY wrote: >>>>>>> Le 04/09/2015 15:33, Michal Sojka a =C3=A9crit : >>>>>>>> Dear Christophe, >>>>>>>> >>>>>>>> my MPC5200-based system stopped booting recently. I bisected the=20 >>>>>>>> problem >>>>>>>> to your commit below. If I revert that commit (on top of >>>>>>>> 807249d3ada1ff28a47c4054ca4edd479421b671 =3D v4.2-6663-g807249d), = my >>>>>>>> system boots again. >>>>>>>> >>>>>>>> >>>>>>> Do you use mainline code only, or do you have home-made code ? >>>>>> I use mainline only sources with non-mainline device-tree. >>>>>> >>>>>>> memcpy() is not supposed to be used on non-cacheable memory. >>>>>>> memcpy_toio() is the function to use when copying to non-cacheble=20 >>>>>>> area. >>>>>>> >>>>>>> When I submitted the patch, I looked for erroneous use of memcpy()= =20 >>>>>>> and >>>>>>> memset(). >>>>>>> I found one wrong use of memset() that I changed to memset_io() but= I >>>>>>> didn't find any misuse of memcpy(). >>>>>>> But I may have missed one. >>>>>> I attach my .config, if it helps. I have there >>>>>> >>>>>> CONFIG_PPC_MPC52xx=3Dy >>>>>> CONFIG_PPC_MPC5200_SIMPLE=3Dy >>>>>> >>>>>> so arch/powerpc/platforms/52xx is probably the directory to look.=20 >>>>>> Do you >>>>>> see any mempcy misuse there? >>>>> I only found one suspect use of memcpy() in=20 >>>>> arch/powerpc/platforms/52xx/ >>>>> It is in mpc52xx_pm.c but it's linked to CONFIG_PM which is not=20 >>>>> selected by your .config >>>>> I'll check in the drivers selected by your .config >>>>> >>>>> In parallele, are you able to try with CONFIG_PPC_EARLY_DEBUG in=20 >>>>> order to try and locate the blocking point ? >>>> I don't get any output from the system even with CONFIG_PPC_EARLY_DEBU= G. >>> >>> Hmm, there is no udbg console for MPC5200. I hacked something up and=20 >>> the earliest place I was able to initialize it is after=20 >>> early_init_devtree() in setup_32.c. Even with this console, I got no=20 >>> output when the problematic patch was applied. So the problem is=20 >>> somewhere earlier. >>> >> >> In early_init() in setup_32.c, there is the following comment: >> /* First zero the BSS -- use memset_io, some platforms don't have caches= =20 >> on yet */ >> >> In that case, when does cache get activated ? >> >> In move_device_tree(), called from early_init_devtree(), there is a call= =20 >> to memcpy(). >> Can you try replacing it by memcpy_io() ? > > I tried replacing it by memcpy_toio(), memcpy_fromio() and by > generic_memcpy(). Nothing helped :( I found the problem. The compiler replaces an assignment with a call to memcpy. The following patch fixes the problem for me. However, I'm not sure whether this is the real solution. I guess the compiler is free to generate a call to memcpy wherever it wants so other compilers or other optimization levels may need fixes at other places. What do others think? -Michal ---------------8<---------------------- From: Michal Sojka <sojkam1@fel.cvut.cz> Date: Sun, 6 Sep 2015 22:44:55 +0200 Subject: [PATCH] powerpc: Fix unbootable system after memcpy optimization This fixes the problem caused by commit 0b05e2d671c40cfb57e66e4e402320d6e056b2f8. On MPC5200, when using the following version of GCC: powerpc-603e-linux-gnu-gcc (OSELAS.Toolchain-2012.12.1) 4.7.2 the system was ubootable. Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz> --- arch/powerpc/kernel/cputable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 7d80bfd..c2f1fba 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c @@ -2121,7 +2121,7 @@ static struct cpu_spec * __init setup_cpu_spec(unsign= ed long offset, old =3D *t; =20 /* Copy everything, then do fixups */ - *t =3D *s; + memcpy_toio(t, s, sizeof(struct cpu_spec)); =20 /* * If we are overriding a previous value derived from the real --=20 2.5.0 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: memcpy regression 2015-09-06 21:01 ` Michal Sojka @ 2015-09-07 1:14 ` Michael Ellerman 2015-09-07 7:08 ` Christophe LEROY 0 siblings, 1 reply; 16+ messages in thread From: Michael Ellerman @ 2015-09-07 1:14 UTC (permalink / raw) To: Michal Sojka; +Cc: christophe leroy, Scott Wood, linuxppc-dev Hi Michal, Thanks for finding the problem. On Sun, 2015-09-06 at 23:01 +0200, Michal Sojka wrote: > > I found the problem. The compiler replaces an assignment with a call to > memcpy. The following patch fixes the problem for me. However, I'm not > sure whether this is the real solution. I guess the compiler is free to > generate a call to memcpy wherever it wants so other compilers or other > optimization levels may need fixes at other places. What do others > think? I think you're right that it's not a good solution, the compiler could generate other calls to memcpy depending on various factors, and people will add new code that causes memcpy to get called and it will break your platform. Christophe, am I right that the problem here is that your new memcpy() doesn't work until later in boot when caches are enabled? cheers ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: memcpy regression 2015-09-07 1:14 ` Michael Ellerman @ 2015-09-07 7:08 ` Christophe LEROY 2015-09-07 8:40 ` Michael Ellerman 0 siblings, 1 reply; 16+ messages in thread From: Christophe LEROY @ 2015-09-07 7:08 UTC (permalink / raw) To: Michael Ellerman, Michal Sojka; +Cc: Scott Wood, linuxppc-dev, Paul Mackerras Hi Michael Le 07/09/2015 03:14, Michael Ellerman a écrit : > Hi Michal, > > Thanks for finding the problem. > > On Sun, 2015-09-06 at 23:01 +0200, Michal Sojka wrote: >> I found the problem. The compiler replaces an assignment with a call to >> memcpy. The following patch fixes the problem for me. However, I'm not >> sure whether this is the real solution. I guess the compiler is free to >> generate a call to memcpy wherever it wants so other compilers or other >> optimization levels may need fixes at other places. What do others >> think? > I think you're right that it's not a good solution, the compiler could generate > other calls to memcpy depending on various factors, and people will add new > code that causes memcpy to get called and it will break your platform. > > Christophe, am I right that the problem here is that your new memcpy() doesn't > work until later in boot when caches are enabled? > > That's right, memset() and memcpy() are for setting/copying data into cacheable RAM. They are using dczb instruction in order to avoid wasting time loading the cacheline with data that will be overwritten. memset_io() and memcpy_toio() are the functions to use when using not cacheable memory. The issue identified by Michal is in function setup_cpu_spec() which is called by identify_cpu(). identify_cpu() is called from early_init(). In the begining of early_init(), there is (code from Paul in 2005) /* First zero the BSS -- use memset_io, some platforms don't have * caches on yet */ memset_io((void __iomem *)PTRRELOC(&__bss_start), 0, __bss_stop - __bss_start); It shows that it is already expected that the cache is not active yet and standard memset() shall not be used yet. That's the same with memcpy(). I think GCC uses memcpy() in well known situations like initialising structures or copying structures. Shouldn't we just avoid this kind of actions in the very few early init functions ? Christophe ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: memcpy regression 2015-09-07 7:08 ` Christophe LEROY @ 2015-09-07 8:40 ` Michael Ellerman 2015-09-07 9:45 ` Michal Sojka 0 siblings, 1 reply; 16+ messages in thread From: Michael Ellerman @ 2015-09-07 8:40 UTC (permalink / raw) To: Christophe LEROY; +Cc: Michal Sojka, Scott Wood, linuxppc-dev, Paul Mackerras On Mon, 2015-09-07 at 09:08 +0200, Christophe LEROY wrote: > Hi Michael > > Le 07/09/2015 03:14, Michael Ellerman a écrit : > > On Sun, 2015-09-06 at 23:01 +0200, Michal Sojka wrote: > >> I found the problem. The compiler replaces an assignment with a call to > >> memcpy. The following patch fixes the problem for me. However, I'm not > >> sure whether this is the real solution. I guess the compiler is free to > >> generate a call to memcpy wherever it wants so other compilers or other > >> optimization levels may need fixes at other places. What do others > >> think? > > I think you're right that it's not a good solution, the compiler could generate > > other calls to memcpy depending on various factors, and people will add new > > code that causes memcpy to get called and it will break your platform. > > > > Christophe, am I right that the problem here is that your new memcpy() doesn't > > work until later in boot when caches are enabled? > > That's right, memset() and memcpy() are for setting/copying data into > cacheable RAM. > They are using dczb instruction in order to avoid wasting time loading > the cacheline with data that will be overwritten. > > memset_io() and memcpy_toio() are the functions to use when using not > cacheable memory. > > The issue identified by Michal is in function setup_cpu_spec() which is > called by identify_cpu(). identify_cpu() is called from early_init(). > In the begining of early_init(), there is (code from Paul in 2005) > > /* First zero the BSS -- use memset_io, some platforms don't have > * caches on yet */ > memset_io((void __iomem *)PTRRELOC(&__bss_start), 0, > __bss_stop - __bss_start); > > It shows that it is already expected that the cache is not active yet > and standard memset() shall not be used yet. That's the same with memcpy(). Thanks for the explanation. > I think GCC uses memcpy() in well known situations like initialising > structures or copying structures. > Shouldn't we just avoid this kind of actions in the very few early init > functions ? Which are the "very few" early init functions? Can you make a list, for 32-bit and 64-bit? And can we keep it updated over time and not introduce regressions? cheers ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: memcpy regression 2015-09-07 8:40 ` Michael Ellerman @ 2015-09-07 9:45 ` Michal Sojka 2015-09-07 10:59 ` David Laight 0 siblings, 1 reply; 16+ messages in thread From: Michal Sojka @ 2015-09-07 9:45 UTC (permalink / raw) To: Michael Ellerman, Christophe LEROY Cc: Scott Wood, linuxppc-dev, Paul Mackerras On 7.9.2015 10:40, Michael Ellerman wrote: > On Mon, 2015-09-07 at 09:08 +0200, Christophe LEROY wrote: >> Hi Michael >> >> Le 07/09/2015 03:14, Michael Ellerman a écrit : >>> On Sun, 2015-09-06 at 23:01 +0200, Michal Sojka wrote: >>>> I found the problem. The compiler replaces an assignment with a call to >>>> memcpy. The following patch fixes the problem for me. However, I'm not >>>> sure whether this is the real solution. I guess the compiler is free to >>>> generate a call to memcpy wherever it wants so other compilers or other >>>> optimization levels may need fixes at other places. What do others >>>> think? >>> I think you're right that it's not a good solution, the compiler could generate >>> other calls to memcpy depending on various factors, and people will add new >>> code that causes memcpy to get called and it will break your platform. >>> >>> Christophe, am I right that the problem here is that your new memcpy() doesn't >>> work until later in boot when caches are enabled? >> That's right, memset() and memcpy() are for setting/copying data into >> cacheable RAM. >> They are using dczb instruction in order to avoid wasting time loading >> the cacheline with data that will be overwritten. >> >> memset_io() and memcpy_toio() are the functions to use when using not >> cacheable memory. >> >> The issue identified by Michal is in function setup_cpu_spec() which is >> called by identify_cpu(). identify_cpu() is called from early_init(). >> In the begining of early_init(), there is (code from Paul in 2005) >> >> /* First zero the BSS -- use memset_io, some platforms don't have >> * caches on yet */ >> memset_io((void __iomem *)PTRRELOC(&__bss_start), 0, >> __bss_stop - __bss_start); >> >> It shows that it is already expected that the cache is not active yet >> and standard memset() shall not be used yet. That's the same with memcpy(). > Thanks for the explanation. > >> I think GCC uses memcpy() in well known situations like initialising >> structures or copying structures. >> Shouldn't we just avoid this kind of actions in the very few early init >> functions ? > Which are the "very few" early init functions? Can you make a list, for 32-bit > and 64-bit? And can we keep it updated over time and not introduce regressions? > If the code that runs without caches is concentrated in few files, we may either modify the buildsystem to check whether there is a call to memcpy from these files (e.g. by using nm) or these files can be "prelinked" with special version of memcpy that doesn't require caches. Would any of these be acceptable? -Michal ^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: memcpy regression 2015-09-07 9:45 ` Michal Sojka @ 2015-09-07 10:59 ` David Laight 2015-09-08 3:54 ` Michael Ellerman 0 siblings, 1 reply; 16+ messages in thread From: David Laight @ 2015-09-07 10:59 UTC (permalink / raw) To: 'Michal Sojka', Michael Ellerman, Christophe LEROY Cc: Scott Wood, Paul Mackerras, linuxppc-dev@lists.ozlabs.org RnJvbTogTWljaGFsIFNvamthDQo+ID4+IEkgdGhpbmsgR0NDIHVzZXMgbWVtY3B5KCkgaW4gd2Vs bCBrbm93biBzaXR1YXRpb25zIGxpa2UgaW5pdGlhbGlzaW5nDQo+ID4+IHN0cnVjdHVyZXMgb3Ig Y29weWluZyBzdHJ1Y3R1cmVzLg0KPiA+PiBTaG91bGRuJ3Qgd2UganVzdCBhdm9pZCB0aGlzIGtp bmQgb2YgYWN0aW9ucyBpbiB0aGUgdmVyeSBmZXcgZWFybHkgaW5pdA0KPiA+PiBmdW5jdGlvbnMg Pw0KPiA+IFdoaWNoIGFyZSB0aGUgInZlcnkgZmV3IiBlYXJseSBpbml0IGZ1bmN0aW9ucz8gQ2Fu IHlvdSBtYWtlIGEgbGlzdCwgZm9yIDMyLWJpdA0KPiA+IGFuZCA2NC1iaXQ/IEFuZCBjYW4gd2Ug a2VlcCBpdCB1cGRhdGVkIG92ZXIgdGltZSBhbmQgbm90IGludHJvZHVjZSByZWdyZXNzaW9ucz8N Cj4gPg0KPiBJZiB0aGUgY29kZSB0aGF0IHJ1bnMgd2l0aG91dCBjYWNoZXMgaXMgY29uY2VudHJh dGVkIGluIGZldyBmaWxlcywgd2UNCj4gbWF5IGVpdGhlciBtb2RpZnkgdGhlIGJ1aWxkc3lzdGVt IHRvIGNoZWNrIHdoZXRoZXIgdGhlcmUgaXMgYSBjYWxsIHRvDQo+IG1lbWNweSBmcm9tIHRoZXNl IGZpbGVzIChlLmcuIGJ5IHVzaW5nIG5tKSBvciB0aGVzZSBmaWxlcyBjYW4gYmUNCj4gInByZWxp bmtlZCIgd2l0aCBzcGVjaWFsIHZlcnNpb24gb2YgbWVtY3B5IHRoYXQgZG9lc24ndCByZXF1aXJl IGNhY2hlcy4NCj4gV291bGQgYW55IG9mIHRoZXNlIGJlIGFjY2VwdGFibGU/DQoNCldoYXQgYWJv dXQgcnVuLXRpbWUgcGF0Y2hpbmcgbWVtY3B5KCkgYWZ0ZXIgdGhlIGNhY2hlcyBhcmUgaW5pdGlh bGlzZWQ/DQoNCglEYXZpZA0KDQo= ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: memcpy regression 2015-09-07 10:59 ` David Laight @ 2015-09-08 3:54 ` Michael Ellerman 2015-09-08 8:59 ` David Laight 0 siblings, 1 reply; 16+ messages in thread From: Michael Ellerman @ 2015-09-08 3:54 UTC (permalink / raw) To: David Laight Cc: 'Michal Sojka', Christophe LEROY, Scott Wood, Paul Mackerras, linuxppc-dev@lists.ozlabs.org On Mon, 2015-09-07 at 10:59 +0000, David Laight wrote: > From: Michal Sojka > > >> I think GCC uses memcpy() in well known situations like initialising > > >> structures or copying structures. > > >> Shouldn't we just avoid this kind of actions in the very few early init > > >> functions ? > > > Which are the "very few" early init functions? Can you make a list, for 32-bit > > > and 64-bit? And can we keep it updated over time and not introduce regressions? > > > > > If the code that runs without caches is concentrated in few files, we > > may either modify the buildsystem to check whether there is a call to > > memcpy from these files (e.g. by using nm) or these files can be > > "prelinked" with special version of memcpy that doesn't require caches. > > Would any of these be acceptable? > > What about run-time patching memcpy() after the caches are initialised? Yeah, that's the solution we use on 64-bit. It also means you can have cpu specific optimisations, which can be patched in or out using the cpu feature patching. cheers ^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: memcpy regression 2015-09-08 3:54 ` Michael Ellerman @ 2015-09-08 8:59 ` David Laight 0 siblings, 0 replies; 16+ messages in thread From: David Laight @ 2015-09-08 8:59 UTC (permalink / raw) To: 'Michael Ellerman' Cc: 'Michal Sojka', Christophe LEROY, Scott Wood, Paul Mackerras, linuxppc-dev@lists.ozlabs.org PiA+IFdoYXQgYWJvdXQgcnVuLXRpbWUgcGF0Y2hpbmcgbWVtY3B5KCkgYWZ0ZXIgdGhlIGNhY2hl cyBhcmUgaW5pdGlhbGlzZWQ/DQo+IA0KPiBZZWFoLCB0aGF0J3MgdGhlIHNvbHV0aW9uIHdlIHVz ZSBvbiA2NC1iaXQuDQo+IA0KPiBJdCBhbHNvIG1lYW5zIHlvdSBjYW4gaGF2ZSBjcHUgc3BlY2lm aWMgb3B0aW1pc2F0aW9ucywgd2hpY2ggY2FuIGJlIHBhdGNoZWQgaW4NCj4gb3Igb3V0IHVzaW5n IHRoZSBjcHUgZmVhdHVyZSBwYXRjaGluZy4NCg0KSSd2ZSBub3RpY2VkIHg4NiBkb2luZyB0aGF0 Lg0KRm9yIG5ld2VyIEludGVsIHBhcnRzIGl0IHBhdGNoZXMgaW4gJ3JlcCBtb3ZzYicgYnV0IHVu Zm9ydHVuYXRlbHkNCm1lbWNweV9pbyBpcyBhbHdheXMgI2RlZmluZWQgdG8gbWVtY3B5Lg0KDQpG b3IgdW5jYWNoZWQgdGFyZ2V0cyB0aGUgaGFyZHdhcmUgY2FuJ3Qgb3B0aW1pc2UgcmVwIG1vdnNi IC0gc28geW91DQplbmQgdXAgd2l0aCBieXRlIGFjY2Vzc2VzLg0KVGhlc2Ugd29yayBjYW4gYmUg cmF0aGVyIHNsb3dlciB0aGFuIGV4cGVjdGVkLg0KDQpUaGlzIGFsc28gYWZmZWN0cyB1c2Vyc3Bh Y2UgY29waWVzIHRvIG1tYXAoKWVkIFBDSWUgc3BhY2UuDQoNCglEYXZpZA0K ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2015-09-08 9:00 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-09-04 13:33 memcpy regression Michal Sojka 2015-09-04 13:57 ` Christophe LEROY 2015-09-04 14:35 ` Michal Sojka 2015-09-04 18:10 ` christophe leroy 2015-09-04 19:49 ` Michal Sojka 2015-09-05 0:08 ` Michal Sojka 2015-09-06 8:18 ` christophe leroy 2015-09-06 19:05 ` Michal Sojka 2015-09-06 21:01 ` Michal Sojka 2015-09-07 1:14 ` Michael Ellerman 2015-09-07 7:08 ` Christophe LEROY 2015-09-07 8:40 ` Michael Ellerman 2015-09-07 9:45 ` Michal Sojka 2015-09-07 10:59 ` David Laight 2015-09-08 3:54 ` Michael Ellerman 2015-09-08 8:59 ` David Laight
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).