* kernel unaligned accesses on IA64 in IDE
@ 2008-08-19 22:56 Nishanth Aravamudan
2008-08-20 1:39 ` Peter Chubb
2008-08-20 14:35 ` Robin Holt
0 siblings, 2 replies; 27+ messages in thread
From: Nishanth Aravamudan @ 2008-08-19 22:56 UTC (permalink / raw)
To: tony.luck, bzolnier; +Cc: linux-ia64, linux-ide
Hi Tony, Bart,
As mentioned in the cpu_clock() thread, I am seeing (consistently) 5
unaligned accesses in the bootlogs on a 2-node IA64 box:
[ 32.593534] kernel unaligned access to 0xe000000644220466, ip=0xa000000100516fa1
[ 32.601171] kernel unaligned access to 0xe00000064422046e, ip=0xa000000100516fa1
[ 35.333273] kernel unaligned access to 0xe00000064451693e, ip=0xa000000100516fa1
[ 35.340912] kernel unaligned access to 0xe000000644516942, ip=0xa000000100516fa1
[ 35.348557] kernel unaligned access to 0xe000000644516946, ip=0xa000000100516fa1
Looking in the corresponding System.map, I see:
a000000100516940 T ide_input_data
a000000100516ec0 T ide_output_data
a000000100517340 T ide_execute_command
a000000100517420 t atapi_reset_pollfunc
That implies that ide_output_data() is the source of unaligned access?
How should I go about debugging this further? .config is below.
Thanks,
Nish
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.27-rc3-autokern1
# Tue Aug 19 14:06:15 2008
#
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_BSD_PROCESS_ACCT=y
# CONFIG_BSD_PROCESS_ACCT_V3 is not set
# CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=17
# CONFIG_CGROUPS is not set
# CONFIG_GROUP_SCHED is not set
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
# CONFIG_RELAY is not set
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_IPC_NS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
CONFIG_SYSCTL_SYSCALL=y
CONFIG_SYSCTL_SYSCALL_CHECK=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_COMPAT_BRK=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLUB_DEBUG=y
# CONFIG_SLAB is not set
CONFIG_SLUB=y
# CONFIG_SLOB is not set
CONFIG_PROFILING=y
# CONFIG_MARKERS is not set
CONFIG_OPROFILE=y
CONFIG_HAVE_OPROFILE=y
CONFIG_KPROBES=y
# CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set
CONFIG_KRETPROBES=y
# CONFIG_HAVE_IOREMAP_PROT is not set
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
# CONFIG_HAVE_ARCH_TRACEHOOK is not set
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_USE_GENERIC_SMP_HELPERS=y
# CONFIG_HAVE_CLK is not set
CONFIG_PROC_PAGE_MONITOR=y
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
# CONFIG_BLK_DEV_IO_TRACE is not set
CONFIG_BLK_DEV_BSG=y
# CONFIG_BLK_DEV_INTEGRITY is not set
CONFIG_BLOCK_COMPAT=y
#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_DEFAULT_AS is not set
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"
CONFIG_CLASSIC_RCU=y
#
# Processor type and features
#
CONFIG_IA64=y
CONFIG_64BIT=y
CONFIG_ZONE_DMA=y
CONFIG_QUICKLIST=y
CONFIG_MMU=y
CONFIG_SWIOTLB=y
CONFIG_IOMMU_HELPER=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_DMI=y
CONFIG_EFI=y
CONFIG_GENERIC_IOMAP=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_IA64_UNCACHED_ALLOCATOR=y
CONFIG_AUDIT_ARCH=y
CONFIG_IA64_GENERIC=y
# CONFIG_IA64_DIG is not set
# CONFIG_IA64_HP_ZX1 is not set
# CONFIG_IA64_HP_ZX1_SWIOTLB is not set
# CONFIG_IA64_SGI_SN2 is not set
# CONFIG_IA64_SGI_UV is not set
# CONFIG_IA64_HP_SIM is not set
# CONFIG_ITANIUM is not set
CONFIG_MCKINLEY=y
# CONFIG_IA64_PAGE_SIZE_4KB is not set
# CONFIG_IA64_PAGE_SIZE_8KB is not set
CONFIG_IA64_PAGE_SIZE_16KB=y
# CONFIG_IA64_PAGE_SIZE_64KB is not set
CONFIG_PGTABLE_3=y
# CONFIG_PGTABLE_4 is not set
CONFIG_HZ=250
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
# CONFIG_SCHED_HRTICK is not set
CONFIG_IA64_L1_CACHE_SHIFT=7
CONFIG_IA64_CYCLONE=y
CONFIG_IOSAPIC=y
CONFIG_FORCE_MAX_ZONEORDER=17
# CONFIG_VIRT_CPU_ACCOUNTING is not set
CONFIG_SMP=y
CONFIG_NR_CPUS=8
# CONFIG_HOTPLUG_CPU is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
# CONFIG_SCHED_SMT is not set
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
CONFIG_SELECT_MEMORY_MODEL=y
# CONFIG_FLATMEM_MANUAL is not set
CONFIG_DISCONTIGMEM_MANUAL=y
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_DISCONTIGMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_NEED_MULTIPLE_NODES=y
# CONFIG_SPARSEMEM_STATIC is not set
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_MIGRATION=y
CONFIG_RESOURCES_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_NR_QUICK=1
CONFIG_VIRT_TO_BUS=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
CONFIG_NUMA=y
CONFIG_NODES_SHIFT=10
CONFIG_ARCH_POPULATES_NODE_MAP=y
CONFIG_VIRTUAL_MEM_MAP=y
CONFIG_HOLES_IN_ZONE=y
CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
CONFIG_HAVE_ARCH_NODEDATA_EXTENSION=y
CONFIG_IA32_SUPPORT=y
CONFIG_COMPAT=y
CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
# CONFIG_IA64_MCA_RECOVERY is not set
CONFIG_PERFMON=y
# CONFIG_IA64_PALINFO is not set
# CONFIG_IA64_MC_ERR_INJECT is not set
CONFIG_SGI_SN=y
# CONFIG_IA64_ESI is not set
# CONFIG_IA64_HP_AML_NFW is not set
#
# SN Devices
#
# CONFIG_SGI_IOC3 is not set
#
# Firmware Drivers
#
# CONFIG_FIRMWARE_MEMMAP is not set
CONFIG_EFI_VARS=y
CONFIG_EFI_PCDP=y
CONFIG_DMIID=y
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
#
# Power management and ACPI
#
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
CONFIG_ACPI=y
CONFIG_ACPI_PROCFS=y
CONFIG_ACPI_PROCFS_POWER=y
CONFIG_ACPI_SYSFS_POWER=y
CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_FAN=y
# CONFIG_ACPI_DOCK is not set
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_THERMAL=y
CONFIG_ACPI_NUMA=y
# CONFIG_ACPI_CUSTOM_DSDT is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_EC=y
# CONFIG_ACPI_PCI_SLOT is not set
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_ACPI_CONTAINER=y
#
# CPU Frequency scaling
#
# CONFIG_CPU_FREQ is not set
#
# Bus options (PCI, PCMCIA)
#
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCI_SYSCALL=y
# CONFIG_PCIEPORTBUS is not set
CONFIG_ARCH_SUPPORTS_MSI=y
CONFIG_PCI_MSI=y
CONFIG_PCI_LEGACY=y
# CONFIG_PCI_DEBUG is not set
# CONFIG_HOTPLUG_PCI is not set
# CONFIG_PCCARD is not set
CONFIG_NET=y
#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_FIB_HASH=y
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_ARPD is not set
CONFIG_SYN_COOKIES=y
# 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_NETFILTER is not set
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# 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_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_SCHED is not set
#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NET_TCPPROBE is not set
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set
#
# Wireless
#
# CONFIG_CFG80211 is not set
# CONFIG_WIRELESS_EXT is not set
# CONFIG_MAC80211 is not set
# CONFIG_IEEE80211 is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set
#
# Device Drivers
#
#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_CONNECTOR is not set
# CONFIG_MTD is not set
# CONFIG_PARPORT is not set
CONFIG_PNP=y
# CONFIG_PNP_DEBUG is not set
#
# Protocols
#
CONFIG_PNPACPI=y
CONFIG_BLK_DEV=y
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_UB is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=32768
# CONFIG_BLK_DEV_XIP is not set
CONFIG_CDROM_PKTCDVD=y
CONFIG_CDROM_PKTCDVD_BUFFERS=8
CONFIG_CDROM_PKTCDVD_WCACHE=y
# CONFIG_ATA_OVER_ETH is not set
# CONFIG_BLK_DEV_HD is not set
CONFIG_MISC_DEVICES=y
# CONFIG_PHANTOM is not set
# CONFIG_EEPROM_93CX6 is not set
# CONFIG_SGI_IOC4 is not set
# CONFIG_TIFM_CORE is not set
# CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_SGI_XP is not set
# CONFIG_HP_ILO is not set
# CONFIG_SGI_GRU is not set
CONFIG_HAVE_IDE=y
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
#
# Please see Documentation/ide/ide.txt for help/info on IDE drives
#
CONFIG_IDE_TIMINGS=y
# CONFIG_BLK_DEV_IDE_SATA is not set
# CONFIG_BLK_DEV_IDEDISK is not set
# CONFIG_IDEDISK_MULTI_MODE is not set
CONFIG_BLK_DEV_IDECD=y
CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
CONFIG_BLK_DEV_IDEACPI=y
CONFIG_IDE_TASK_IOCTL=y
CONFIG_IDE_PROC_FS=y
#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=y
# CONFIG_BLK_DEV_PLATFORM is not set
# CONFIG_BLK_DEV_IDEPNP is not set
CONFIG_BLK_DEV_IDEDMA_SFF=y
#
# PCI IDE chipsets support
#
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_PCIBUS_ORDER=y
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=y
# CONFIG_BLK_DEV_OPTI621 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_JMICRON is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_IT8213 is not set
# CONFIG_BLK_DEV_IT821X is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
CONFIG_BLK_DEV_VIA82CXXX=y
# CONFIG_BLK_DEV_TC86C001 is not set
CONFIG_BLK_DEV_IDEDMA=y
#
# SCSI device support
#
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
# CONFIG_SCSI_TGT is not set
# CONFIG_SCSI_NETLINK is not set
CONFIG_SCSI_PROC_FS=y
#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
# CONFIG_BLK_DEV_SR is not set
CONFIG_CHR_DEV_SG=y
# CONFIG_CHR_DEV_SCH is not set
#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
# CONFIG_SCSI_SCAN_ASYNC is not set
CONFIG_SCSI_WAIT_SCAN=m
#
# SCSI Transports
#
CONFIG_SCSI_SPI_ATTRS=y
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_MVSAS is not set
# CONFIG_SCSI_STEX is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_QLA_FC is not set
# CONFIG_SCSI_QLA_ISCSI is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_SRP is not set
# CONFIG_SCSI_DH is not set
# CONFIG_ATA is not set
# CONFIG_MD is not set
CONFIG_FUSION=y
CONFIG_FUSION_SPI=y
# CONFIG_FUSION_FC is not set
# CONFIG_FUSION_SAS is not set
CONFIG_FUSION_MAX_SGE=128
# CONFIG_FUSION_CTL is not set
# CONFIG_FUSION_LOGGING is not set
#
# IEEE 1394 (FireWire) support
#
#
# Enable only one of the two stacks, unless you know what you are doing
#
# CONFIG_FIREWIRE is not set
# CONFIG_IEEE1394 is not set
# CONFIG_I2O is not set
CONFIG_NETDEVICES=y
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_VETH is not set
# CONFIG_NET_SB1000 is not set
# CONFIG_ARCNET is not set
CONFIG_PHYLIB=y
#
# MII PHY device drivers
#
# 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_SMSC_PHY is not set
# CONFIG_BROADCOM_PHY is not set
# CONFIG_ICPLUS_PHY is not set
# CONFIG_REALTEK_PHY is not set
# CONFIG_FIXED_PHY is not set
# CONFIG_MDIO_BITBANG is not set
# CONFIG_NET_ETHERNET is not set
CONFIG_NETDEV_1000=y
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
# CONFIG_E1000 is not set
# CONFIG_E1000E is not set
# CONFIG_IP1000 is not set
# CONFIG_IGB is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SIS190 is not set
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
# CONFIG_VIA_VELOCITY is not set
CONFIG_TIGON3=y
# CONFIG_BNX2 is not set
# CONFIG_QLA3XXX is not set
# CONFIG_ATL1 is not set
# CONFIG_ATL1E is not set
# CONFIG_NETDEV_10000 is not set
# CONFIG_TR is not set
#
# Wireless LAN
#
# CONFIG_WLAN_PRE80211 is not set
# CONFIG_WLAN_80211 is not set
# CONFIG_IWLWIFI_LEDS is not set
#
# USB Network Adapters
#
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET is not set
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_NET_FC is not set
CONFIG_NETCONSOLE=y
# CONFIG_NETCONSOLE_DYNAMIC is not set
CONFIG_NETPOLL=y
# CONFIG_NETPOLL_TRAP is not set
CONFIG_NET_POLL_CONTROLLER=y
# CONFIG_ISDN is not set
# CONFIG_PHONE is not set
#
# Input device support
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
# CONFIG_INPUT_POLLDEV is not set
#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set
#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_LIFEBOOK=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set
#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
# CONFIG_GAMEPORT is not set
#
# Character devices
#
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
CONFIG_DEVKMEM=y
CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_COMPUTONE is not set
# CONFIG_ROCKETPORT is not set
# CONFIG_CYCLADES is not set
# CONFIG_DIGIEPCA is not set
# CONFIG_MOXA_INTELLIO is not set
# CONFIG_MOXA_SMARTIO is not set
# CONFIG_ISI is not set
# CONFIG_SYNCLINKMP is not set
# CONFIG_SYNCLINK_GT is not set
# CONFIG_N_HDLC is not set
# CONFIG_RISCOM8 is not set
# CONFIG_SPECIALIX is not set
# CONFIG_SX is not set
# CONFIG_RIO is not set
# CONFIG_STALDRV is not set
# CONFIG_NOZOMI is not set
# CONFIG_SGI_SNSC is not set
# CONFIG_SGI_TIOCX is not set
#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_PNP=y
CONFIG_SERIAL_8250_NR_UARTS=6
CONFIG_SERIAL_8250_RUNTIME_UARTS=6
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
CONFIG_SERIAL_8250_RSA=y
#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_SGI_L1_CONSOLE is not set
# CONFIG_SERIAL_JSM is not set
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
# CONFIG_IPMI_HANDLER is not set
# CONFIG_HW_RANDOM is not set
CONFIG_EFI_RTC=y
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_HPET is not set
# CONFIG_HANGCHECK_TIMER is not set
# CONFIG_MMTIMER is not set
# CONFIG_TCG_TPM is not set
CONFIG_DEVPORT=y
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_HELPER_AUTO=y
#
# I2C Hardware Bus support
#
#
# PC SMBus host controller drivers
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_ISCH is not set
# CONFIG_I2C_PIIX4 is not set
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VIA is not set
CONFIG_I2C_VIAPRO=y
#
# I2C system bus drivers (mostly embedded / system-on-chip)
#
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_SIMTEC is not set
#
# External I2C/SMBus adapter drivers
#
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_TAOS_EVM is not set
# CONFIG_I2C_TINY_USB is not set
#
# Graphics adapter I2C/DDC channel drivers
#
# CONFIG_I2C_VOODOO3 is not set
#
# Other I2C/SMBus bus drivers
#
# CONFIG_I2C_PCA_PLATFORM is not set
# CONFIG_I2C_STUB is not set
#
# Miscellaneous I2C Chip support
#
# CONFIG_DS1682 is not set
# CONFIG_AT24 is not set
# CONFIG_SENSORS_EEPROM is not set
# CONFIG_SENSORS_PCF8574 is not set
# CONFIG_PCF8575 is not set
# CONFIG_SENSORS_PCA9539 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_SENSORS_MAX6875 is not set
# CONFIG_SENSORS_TSL2550 is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set
# CONFIG_SPI is not set
# CONFIG_W1 is not set
CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
# CONFIG_PDA_POWER is not set
# CONFIG_BATTERY_DS2760 is not set
CONFIG_HWMON=y
# CONFIG_HWMON_VID is not set
# CONFIG_SENSORS_AD7414 is not set
# CONFIG_SENSORS_AD7418 is not set
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ADM1025 is not set
# CONFIG_SENSORS_ADM1026 is not set
# CONFIG_SENSORS_ADM1029 is not set
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ADM9240 is not set
# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_ADT7473 is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_I5K_AMB is not set
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
# CONFIG_SENSORS_F75375S is not set
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_LM63 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM87 is not set
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_LM92 is not set
# CONFIG_SENSORS_LM93 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX6650 is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_SIS5595 is not set
# CONFIG_SENSORS_DME1737 is not set
# CONFIG_SENSORS_SMSC47M1 is not set
# CONFIG_SENSORS_SMSC47M192 is not set
# CONFIG_SENSORS_SMSC47B397 is not set
# CONFIG_SENSORS_ADS7828 is not set
# CONFIG_SENSORS_THMC50 is not set
CONFIG_SENSORS_VIA686A=y
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_SENSORS_VT8231 is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83791D is not set
# CONFIG_SENSORS_W83792D is not set
# CONFIG_SENSORS_W83793 is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SENSORS_W83L786NG is not set
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_HWMON_DEBUG_CHIP is not set
CONFIG_THERMAL=y
# CONFIG_THERMAL_HWMON is not set
# CONFIG_WATCHDOG is not set
#
# Sonics Silicon Backplane
#
CONFIG_SSB_POSSIBLE=y
# CONFIG_SSB is not set
#
# Multifunction device drivers
#
# CONFIG_MFD_CORE is not set
# CONFIG_MFD_SM501 is not set
# CONFIG_HTC_PASIC3 is not set
# CONFIG_MFD_TMIO is not set
#
# Multimedia devices
#
#
# Multimedia core support
#
# CONFIG_VIDEO_DEV is not set
# CONFIG_DVB_CORE is not set
# CONFIG_VIDEO_MEDIA is not set
#
# Multimedia drivers
#
# CONFIG_DAB is not set
#
# Graphics support
#
# CONFIG_AGP is not set
# CONFIG_DRM is not set
# CONFIG_VGASTATE is not set
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
# CONFIG_FB is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set
#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
CONFIG_VGACON_SOFT_SCROLLBACK=y
CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
CONFIG_DUMMY_CONSOLE=y
# CONFIG_SOUND is not set
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
# CONFIG_HID_DEBUG is not set
# CONFIG_HIDRAW is not set
#
# USB Input Devices
#
CONFIG_USB_HID=y
# CONFIG_USB_HIDINPUT_POWERBOOK is not set
# CONFIG_HID_FF is not set
CONFIG_USB_HIDDEV=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set
# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
# CONFIG_USB_DYNAMIC_MINORS is not set
# CONFIG_USB_SUSPEND is not set
# CONFIG_USB_OTG is not set
#
# USB Host Controller Drivers
#
# CONFIG_USB_C67X00_HCD is not set
# CONFIG_USB_EHCI_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_ISP1760_HCD is not set
# CONFIG_USB_OHCI_HCD is not set
CONFIG_USB_UHCI_HCD=y
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set
#
# USB Device Class drivers
#
# CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set
# CONFIG_USB_WDM is not set
#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
#
#
# may also be needed; see USB_STORAGE Help for more information
#
CONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_DPCM is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
# CONFIG_USB_LIBUSUAL is not set
#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set
# CONFIG_USB_MON is not set
#
# USB port drivers
#
# CONFIG_USB_SERIAL is not set
#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_BERRY_CHARGE is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_PHIDGET is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_USB_APPLEDISPLAY is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
# CONFIG_USB_TEST is not set
# CONFIG_USB_ISIGHTFW is not set
# CONFIG_USB_GADGET 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_RTC_CLASS is not set
# CONFIG_DMADEVICES is not set
# CONFIG_UIO is not set
CONFIG_MSPEC=y
#
# File systems
#
# CONFIG_EXT2_FS is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
# CONFIG_EXT4DEV_FS is not set
CONFIG_JBD=y
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
CONFIG_FS_POSIX_ACL=y
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
CONFIG_DNOTIFY=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_FUSE_FS is not set
#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_UDF_FS=y
CONFIG_UDF_NLS=y
#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
# CONFIG_MSDOS_FS is not set
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
# CONFIG_NTFS_FS is not set
#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y
# CONFIG_CONFIGFS_FS is not set
#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
CONFIG_CRAMFS=y
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_OMFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
CONFIG_ROMFS_FS=y
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
CONFIG_NFS_V4=y
# CONFIG_NFSD is not set
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=y
CONFIG_SUNRPC_GSS=y
CONFIG_RPCSEC_GSS_KRB5=y
# CONFIG_RPCSEC_GSS_SPKM3 is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
# CONFIG_OSF_PARTITION is not set
# CONFIG_AMIGA_PARTITION is not set
# CONFIG_ATARI_PARTITION is not set
# CONFIG_MAC_PARTITION is not set
CONFIG_MSDOS_PARTITION=y
# CONFIG_BSD_DISKLABEL is not set
# CONFIG_MINIX_SUBPARTITION is not set
# CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_UNIXWARE_DISKLABEL is not set
# CONFIG_LDM_PARTITION is not set
CONFIG_SGI_PARTITION=y
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_KARMA_PARTITION is not set
CONFIG_EFI_PARTITION=y
# CONFIG_SYSV68_PARTITION is not set
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
CONFIG_NLS_ISO8859_15=y
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
CONFIG_NLS_UTF8=y
# CONFIG_DLM is not set
CONFIG_HAVE_KVM=y
CONFIG_VIRTUALIZATION=y
# CONFIG_KVM is not set
#
# Library routines
#
CONFIG_BITREVERSE=y
# CONFIG_GENERIC_FIND_FIRST_BIT is not set
# CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set
CONFIG_CRC_T10DIF=y
CONFIG_CRC_ITU_T=y
CONFIG_CRC32=y
# CONFIG_CRC7 is not set
CONFIG_LIBCRC32C=y
CONFIG_ZLIB_INFLATE=y
CONFIG_GENERIC_ALLOCATOR=y
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_PENDING_IRQ=y
CONFIG_IRQ_PER_CPU=y
#
# HP Simulator drivers
#
# CONFIG_HP_SIMETH is not set
# CONFIG_HP_SIMSERIAL is not set
# CONFIG_HP_SIMSCSI is not set
#
# Kernel hacking
#
CONFIG_PRINTK_TIME=y
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_FRAME_WARN=2048
CONFIG_MAGIC_SYSRQ=y
# CONFIG_UNUSED_SYMBOLS is not set
# CONFIG_DEBUG_FS is not set
# CONFIG_HEADERS_CHECK is not set
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SHIRQ is not set
CONFIG_DETECT_SOFTLOCKUP=y
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
# CONFIG_SCHED_DEBUG is not set
# CONFIG_SCHEDSTATS is not set
# CONFIG_TIMER_STATS is not set
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_SLUB_STATS is not set
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_MUTEXES is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_WRITECOUNT is not set
CONFIG_DEBUG_MEMORY_INIT=y
# CONFIG_DEBUG_LIST is not set
# CONFIG_DEBUG_SG is not set
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_KPROBES_SANITY_TEST is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_LKDTM is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_SAMPLES is not set
CONFIG_IA64_GRANULE_16MB=y
# CONFIG_IA64_GRANULE_64MB is not set
CONFIG_IA64_PRINT_HAZARDS=y
# CONFIG_DISABLE_VHPT is not set
# CONFIG_IA64_DEBUG_CMPXCHG is not set
# CONFIG_IA64_DEBUG_IRQ is not set
CONFIG_SYSVIPC_COMPAT=y
#
# Security options
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_CRYPTO=y
#
# Crypto core or helper
#
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_MANAGER=y
# CONFIG_CRYPTO_GF128MUL is not set
CONFIG_CRYPTO_NULL=y
# CONFIG_CRYPTO_CRYPTD is not set
# CONFIG_CRYPTO_AUTHENC is not set
# CONFIG_CRYPTO_TEST is not set
#
# Authenticated Encryption with Associated Data
#
# CONFIG_CRYPTO_CCM is not set
# CONFIG_CRYPTO_GCM is not set
# CONFIG_CRYPTO_SEQIV is not set
#
# Block modes
#
CONFIG_CRYPTO_CBC=y
# 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_HMAC=y
# CONFIG_CRYPTO_XCBC is not set
#
# Digest
#
# CONFIG_CRYPTO_CRC32C is not set
CONFIG_CRYPTO_MD4=y
CONFIG_CRYPTO_MD5=y
# 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=y
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
# 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=y
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
CONFIG_CRYPTO_DES=y
# CONFIG_CRYPTO_FCRYPT is not set
# CONFIG_CRYPTO_KHAZAD is not set
# CONFIG_CRYPTO_SALSA20 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_LZO is not set
# CONFIG_CRYPTO_HW is not set
--
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-19 22:56 kernel unaligned accesses on IA64 in IDE Nishanth Aravamudan
@ 2008-08-20 1:39 ` Peter Chubb
2008-08-21 21:28 ` Nishanth Aravamudan
2008-08-20 14:35 ` Robin Holt
1 sibling, 1 reply; 27+ messages in thread
From: Peter Chubb @ 2008-08-20 1:39 UTC (permalink / raw)
To: Nishanth Aravamudan; +Cc: tony.luck, bzolnier, linux-ia64, linux-ide
>>>>> "Nishanth" == Nishanth Aravamudan <nacc@us.ibm.com> writes:
Nishanth> Hi Tony, Bart, As mentioned in the cpu_clock() thread, I am
Nishanth> seeing (consistently) 5 unaligned accesses in the bootlogs
Nishanth> on a 2-node IA64 box:
First thing to do is to work out more precisely where the unaligned
access is happening. I suggest you recompile your kernel with debug
info, and use GDB to find the actual line number of the unaligned access.
--
Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au ERTOS within National ICT Australia
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-19 22:56 kernel unaligned accesses on IA64 in IDE Nishanth Aravamudan
2008-08-20 1:39 ` Peter Chubb
@ 2008-08-20 14:35 ` Robin Holt
2008-08-21 21:31 ` Nishanth Aravamudan
1 sibling, 1 reply; 27+ messages in thread
From: Robin Holt @ 2008-08-20 14:35 UTC (permalink / raw)
To: Nishanth Aravamudan; +Cc: tony.luck, bzolnier, linux-ia64, linux-ide
On Tue, Aug 19, 2008 at 03:56:06PM -0700, Nishanth Aravamudan wrote:
> Hi Tony, Bart,
>
> As mentioned in the cpu_clock() thread, I am seeing (consistently) 5
> unaligned accesses in the bootlogs on a 2-node IA64 box:
>
> [ 32.593534] kernel unaligned access to 0xe000000644220466, ip=0xa000000100516fa1
> [ 32.601171] kernel unaligned access to 0xe00000064422046e, ip=0xa000000100516fa1
> [ 35.333273] kernel unaligned access to 0xe00000064451693e, ip=0xa000000100516fa1
> [ 35.340912] kernel unaligned access to 0xe000000644516942, ip=0xa000000100516fa1
> [ 35.348557] kernel unaligned access to 0xe000000644516946, ip=0xa000000100516fa1
>
> Looking in the corresponding System.map, I see:
>
> a000000100516940 T ide_input_data
> a000000100516ec0 T ide_output_data
> a000000100517340 T ide_execute_command
> a000000100517420 t atapi_reset_pollfunc
I compiled your .config with commit ??? and got ide_output_data at
a000000100516ae0 so the offending instruction is at a000000100516bc1
a000000100516bc0: 08 a8 00 4c 18 10 [MMI] ld8 r21=[r38]
a000000100516bc6: d0 22 90 20 28 c0 ld4 r45=[r36],4
a000000100516bcc: 05 28 01 84 mov r46=r37
Those look reasonable.
That seems to be coming from include/asm/io.h:280
static inline void
__outsl (unsigned long port, const void *src, unsigned long count)
{
const unsigned int *sp = src;
while (count--)
platform_outl(*sp++, port);
}
which is really outsl and that is only used on line 339:
outsl(data_addr, buf, len / 4);
With as little as I know about what I am doing, I would probably add a
printk immediately after the outsl line and dump out data_addr, buf, and
len to see what those values are. I expect either data_addr is not
aligned on an 8 byte boundary or buf is not aligned on a 4 byte
boundary.
Keep in mind that I may have completely messed up my analysis and I am
pursuing the wrong line entirely.
Good Luck,
Robin
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-20 1:39 ` Peter Chubb
@ 2008-08-21 21:28 ` Nishanth Aravamudan
0 siblings, 0 replies; 27+ messages in thread
From: Nishanth Aravamudan @ 2008-08-21 21:28 UTC (permalink / raw)
To: Peter Chubb; +Cc: tony.luck, bzolnier, linux-ia64, linux-ide
On 20.08.2008 [11:39:22 +1000], Peter Chubb wrote:
> >>>>> "Nishanth" == Nishanth Aravamudan <nacc@us.ibm.com> writes:
>
> Nishanth> Hi Tony, Bart, As mentioned in the cpu_clock() thread, I am
> Nishanth> seeing (consistently) 5 unaligned accesses in the bootlogs
> Nishanth> on a 2-node IA64 box:
>
> First thing to do is to work out more precisely where the unaligned
> access is happening. I suggest you recompile your kernel with debug
> info, and use GDB to find the actual line number of the unaligned access.
Sorry if this is not what you were asking for, but it seems like my
results are similar to Robin's, that outsl in ide_output_data() is the
problem?
[ 32.602116] kernel unaligned access to 0xe000000644678466, ip=0xa0000001005174d1
[ 32.609744] kernel unaligned access to 0xe00000064467846e, ip=0xa0000001005174d1
[ 35.346388] kernel unaligned access to 0xe0000013041d693e, ip=0xa0000001005174d1
[ 35.354016] kernel unaligned access to 0xe0000013041d6942, ip=0xa000000100517531
[ 35.361633] kernel unaligned access to 0xe0000013041d6946, ip=0xa0000001005174d1
(gdb) l *0xa0000001005174d1
0xa0000001005174d1 is in ide_output_data (/usr/local/autobench/var/tmp/build/arch/ia64/include/asm/io.h:280).
275 __outsl (unsigned long port, const void *src, unsigned long count)
276 {
277 const unsigned int *sp = src;
278
279 while (count--)
280 platform_outl(*sp++, port);
281 }
282
283 /*
284 * Unfortunately, some platforms are broken and do not follow the IA-64 architecture
(gdb) l *0xa000000100517531
0xa000000100517531 is in ide_output_data (/usr/local/autobench/var/tmp/build/arch/ia64/include/asm/io.h:280).
275 __outsl (unsigned long port, const void *src, unsigned long count)
276 {
277 const unsigned int *sp = src;
278
279 while (count--)
280 platform_outl(*sp++, port);
281 }
282
283 /*
284 * Unfortunately, some platforms are broken and do not follow the IA-64 architecture
(gdb) disassemble 0xa0000001005174d1
Dump of assembler code for function ide_output_data:
...
0xa0000001005174d0 <ide_output_data+1040>: [MMI] ld8 r20=[r38]
0xa0000001005174d1 <ide_output_data+1041>: ld4 r45=[r37],4
0xa0000001005174d2 <ide_output_data+1042>: mov r46=r32
0xa0000001005174e0 <ide_output_data+1056>: [MII] nop.m 0x0
0xa0000001005174e1 <ide_output_data+1057>: adds r36=-1,r36;;
0xa0000001005174e2 <ide_output_data+1058>: nop.i 0x0
0xa0000001005174f0 <ide_output_data+1072>: [MMI] ld8 r21=[r20],8;;
0xa0000001005174f1 <ide_output_data+1073>: nop.m 0x0
0xa0000001005174f2 <ide_output_data+1074>: mov b6=r21
0xa000000100517500 <ide_output_data+1088>: [MIB] ld8 r1=[r20]
0xa000000100517501 <ide_output_data+1089>: nop.i 0x0
0xa000000100517502 <ide_output_data+1090>: br.call.sptk.many b0=b6;;
0xa000000100517510 <ide_output_data+1104>: [MMI] mov r46=r32
0xa000000100517511 <ide_output_data+1105>: nop.m 0x0
0xa000000100517512 <ide_output_data+1106>: cmp.eq p9,p8=-1,r36
0xa000000100517520 <ide_output_data+1120>: [MMB] mov r1=r42
0xa000000100517521 <ide_output_data+1121>: adds r36=-1,r36
0xa000000100517522 <ide_output_data+1122>: (p09) br.cond.dpnt.few 0xa0000001005171b0 <ide_output_data+240>
0xa000000100517530 <ide_output_data+1136>: [MMI] ld8 r20=[r38]
0xa000000100517531 <ide_output_data+1137>: ld4 r45=[r37],4
0xa000000100517532 <ide_output_data+1138>: nop.i 0x0;;
...
Thanks,
Nish
--
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-20 14:35 ` Robin Holt
@ 2008-08-21 21:31 ` Nishanth Aravamudan
2008-08-21 21:54 ` Robin Holt
0 siblings, 1 reply; 27+ messages in thread
From: Nishanth Aravamudan @ 2008-08-21 21:31 UTC (permalink / raw)
To: Robin Holt; +Cc: tony.luck, bzolnier, linux-ia64, linux-ide
On 20.08.2008 [09:35:31 -0500], Robin Holt wrote:
> On Tue, Aug 19, 2008 at 03:56:06PM -0700, Nishanth Aravamudan wrote:
> > Hi Tony, Bart,
> >
> > As mentioned in the cpu_clock() thread, I am seeing (consistently) 5
> > unaligned accesses in the bootlogs on a 2-node IA64 box:
> >
> > [ 32.593534] kernel unaligned access to 0xe000000644220466, ip=0xa000000100516fa1
> > [ 32.601171] kernel unaligned access to 0xe00000064422046e, ip=0xa000000100516fa1
> > [ 35.333273] kernel unaligned access to 0xe00000064451693e, ip=0xa000000100516fa1
> > [ 35.340912] kernel unaligned access to 0xe000000644516942, ip=0xa000000100516fa1
> > [ 35.348557] kernel unaligned access to 0xe000000644516946, ip=0xa000000100516fa1
> >
> > Looking in the corresponding System.map, I see:
> >
> > a000000100516940 T ide_input_data
> > a000000100516ec0 T ide_output_data
> > a000000100517340 T ide_execute_command
> > a000000100517420 t atapi_reset_pollfunc
>
> I compiled your .config with commit ??? and got ide_output_data at
> a000000100516ae0 so the offending instruction is at a000000100516bc1
>
> a000000100516bc0: 08 a8 00 4c 18 10 [MMI] ld8 r21=[r38]
> a000000100516bc6: d0 22 90 20 28 c0 ld4 r45=[r36],4
> a000000100516bcc: 05 28 01 84 mov r46=r37
>
> Those look reasonable.
See my reply to Peter, but this seems the same as my results.
> That seems to be coming from include/asm/io.h:280
>
> static inline void
> __outsl (unsigned long port, const void *src, unsigned long count)
> {
> const unsigned int *sp = src;
>
> while (count--)
> platform_outl(*sp++, port);
> }
>
> which is really outsl and that is only used on line 339:
> outsl(data_addr, buf, len / 4);
As does this.
> With as little as I know about what I am doing, I would probably add a
> printk immediately after the outsl line and dump out data_addr, buf,
> and len to see what those values are. I expect either data_addr is
> not aligned on an 8 byte boundary or buf is not aligned on a 4 byte
> boundary.
Here's what I got, I put the printk() before the outsl() line, as I
don't believe the arguments are being manipulated?
[ 32.597792] outsl(496, e000000644678466, 3)
[ 32.602116] kernel unaligned access to 0xe000000644678466, ip=0xa0000001005174d1
[ 32.609744] kernel unaligned access to 0xe00000064467846e, ip=0xa0000001005174d1
[ 35.342053] outsl(496, e0000013041d693e, 3)
[ 35.346388] kernel unaligned access to 0xe0000013041d693e, ip=0xa0000001005174d1
[ 35.354016] kernel unaligned access to 0xe0000013041d6942, ip=0xa000000100517531
[ 35.361633] kernel unaligned access to 0xe0000013041d6946, ip=0xa0000001005174d1
[ 32.648053] outsl(496, e000000644678466, 3)
[ 35.377343] outsl(496, e0000013041d693e, 3)
[ 35.383999] outsl(496, e000001303fbd9c6, 3)
[ 35.398650] outsl(496, e0000013041d693e, 3)
[ 35.405287] outsl(496, e000001303fbd9c6, 3)
[ 35.410586] outsl(496, e0000013041d693e, 3)
[ 35.417489] outsl(496, e000001303fbd9c6, 3)
[ 35.444091] outsl(496, e000001303fbd2a6, 3)
[ 35.449121] outsl(496, e0000013041d693e, 3)
[ 35.455748] outsl(496, e000001303fbd2a6, 3)
[ 35.470427] outsl(496, e0000013041d693e, 3)
[ 35.477141] outsl(496, e000001303fbd2a6, 3)
[ 35.482305] outsl(496, e0000013041d693e, 3)
[ 35.488964] outsl(496, e000001303fbd2a6, 3)
[ 35.494232] outsl(496, e0000013041d693e, 3)
[ 35.500912] outsl(496, e000001303fbd2a6, 3)
Thanks,
Nish
--
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-21 21:31 ` Nishanth Aravamudan
@ 2008-08-21 21:54 ` Robin Holt
2008-08-22 0:39 ` Nishanth Aravamudan
0 siblings, 1 reply; 27+ messages in thread
From: Robin Holt @ 2008-08-21 21:54 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: Robin Holt, tony.luck, bzolnier, linux-ia64, linux-ide
> [ 32.597792] outsl(496, e000000644678466, 3)
^^^^^^^^^^^^^^^^
This is expected to be an unsigned int * and typecast to that in outsl.
Looks like the buffer being passed in is not properly aligned. Time to
go look at the caller. Make sure buf is defined as an array of at least
int size. That should make this aligned on a 4 byte boundary instead of
the 2 byte boundary it is on now.
You can cheat at finding the callers by putting
WARN_ON(buf & 0x3);
printk...
Good Luck,
Robin
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-21 21:54 ` Robin Holt
@ 2008-08-22 0:39 ` Nishanth Aravamudan
2008-08-22 1:11 ` Robin Holt
2008-08-22 10:15 ` Bartlomiej Zolnierkiewicz
0 siblings, 2 replies; 27+ messages in thread
From: Nishanth Aravamudan @ 2008-08-22 0:39 UTC (permalink / raw)
To: Robin Holt; +Cc: tony.luck, bzolnier, linux-ia64, linux-ide
On 21.08.2008 [16:54:26 -0500], Robin Holt wrote:
> > [ 32.597792] outsl(496, e000000644678466, 3)
> ^^^^^^^^^^^^^^^^
>
> This is expected to be an unsigned int * and typecast to that in outsl.
> Looks like the buffer being passed in is not properly aligned. Time to
> go look at the caller. Make sure buf is defined as an array of at least
> int size. That should make this aligned on a 4 byte boundary instead of
> the 2 byte boundary it is on now.
>
> You can cheat at finding the callers by putting
> WARN_ON(buf & 0x3);
> printk...
So I tried this and it gets quite hairy quickly (I think) because what's
unaligned is an IDE command buffer? There is a lot of pointer passing
and I get lost since I don't know the IDE/elevator code very well.
Here's the stack trace I'm looking at:
[ 5.018347] [<a000000100015420>] show_stack+0x80/0xa0
[ 5.018348] sp=e00000130307f930 bsp=e0000013030793b8
[ 5.031782] [<a000000100015470>] dump_stack+0x30/0x60
[ 5.031783] sp=e00000130307fb00 bsp=e0000013030793a0
[ 5.045223] [<a000000100094ff0>] warn_on_slowpath+0x90/0xe0
[ 5.045225] sp=e00000130307fb00 bsp=e000001303079378
[ 5.059201] [<a000000100517480>] ide_output_data+0x3c0/0x540
[ 5.059204] sp=e00000130307fbf0 bsp=e000001303079310
[ 5.073248] [<a0000001005309e0>] cdrom_transfer_packet_command+0x2c0/0x340
[ 5.073249] sp=e00000130307fbf0 bsp=e0000013030792d0
[ 5.088519] [<a000000100530ac0>] cdrom_do_newpc_cont+0x60/0x80
[ 5.088522] sp=e00000130307fc00 bsp=e0000013030792b0
[ 5.102739] [<a00000010052f1a0>] ide_cd_do_request+0x980/0x1420
[ 5.102742] sp=e00000130307fc00 bsp=e000001303079238
[ 5.117064] [<a00000010050fe00>] ide_do_request+0xca0/0x1d00
[ 5.117066] sp=e00000130307fc00 bsp=e0000013030791a0
[ 5.131105] [<a000000100511580>] do_ide_request+0x40/0x60
[ 5.131107] sp=e00000130307fc30 bsp=e000001303079180
[ 5.144897] [<a000000100384780>] elv_insert+0x280/0x5c0
[ 5.144900] sp=e00000130307fc30 bsp=e000001303079148
[ 5.158507] [<a000000100384c40>] __elv_add_request+0x180/0x240
[ 5.158509] sp=e00000130307fc30 bsp=e000001303079110
[ 5.172733] [<a000000100391730>] blk_execute_rq_nowait+0xd0/0x1e0
[ 5.172734] sp=e00000130307fc30 bsp=e0000013030790d0
[ 5.187220] [<a000000100391910>] blk_execute_rq+0xd0/0x240
[ 5.187221] sp=e00000130307fc30 bsp=e000001303079090
[ 5.201091] [<a000000100531f70>] ide_cd_queue_pc+0x130/0x2e0
[ 5.201093] sp=e00000130307fcc0 bsp=e000001303078fd0
[ 5.215137] [<a0000001005342f0>] ide_cdrom_packet+0x130/0x180
[ 5.215139] sp=e00000130307fd00 bsp=e000001303078f78
[ 5.229281] [<a000000100593080>] cdrom_mode_sense+0xc0/0xe0
[ 5.229283] sp=e00000130307fd10 bsp=e000001303078f40
[ 5.243239] [<a00000010052d9c0>] ide_cdrom_get_capabilities+0x80/0xc0
[ 5.243240] sp=e00000130307fd10 bsp=e000001303078f10
[ 5.258084] [<a000000100533890>] ide_cd_probe+0x810/0xf40
[ 5.258086] sp=e00000130307fd50 bsp=e000001303078e90
[ 5.273709] [<a00000010050a510>] generic_ide_probe+0x70/0xa0
[ 5.273711] sp=e00000130307fdc0 bsp=e000001303078e70
[ 5.287774] [<a0000001004bdaf0>] driver_probe_device+0x190/0x3a0
[ 5.287775] sp=e00000130307fdc0 bsp=e000001303078e28
[ 5.302163] [<a0000001004bdd80>] __driver_attach+0x80/0xe0
[ 5.302164] sp=e00000130307fdc0 bsp=e000001303078de8
[ 5.316032] [<a0000001004bc5a0>] bus_for_each_dev+0xc0/0x140
[ 5.316034] sp=e00000130307fdc0 bsp=e000001303078db0
[ 5.330072] [<a0000001004bd700>] driver_attach+0x40/0x60
[ 5.330074] sp=e00000130307fde0 bsp=e000001303078d90
[ 5.343761] [<a0000001004bd290>] bus_add_driver+0x370/0x4a0
[ 5.343763] sp=e00000130307fde0 bsp=e000001303078d48
[ 5.357720] [<a0000001004be3d0>] driver_register+0xd0/0x340
[ 5.357721] sp=e00000130307fde0 bsp=e000001303078d00
[ 5.371693] [<a0000001009a3ea0>] ide_cdrom_init+0x20/0x40
[ 5.371695] sp=e00000130307fde0 bsp=e000001303078ce8
[ 5.385475] [<a00000010000a5a0>] do_one_initcall+0x60/0x380
[ 5.385477] sp=e00000130307fde0 bsp=e000001303078ca8
[ 5.399445] [<a0000001009645b0>] kernel_init+0x370/0x420
[ 5.399447] sp=e00000130307fe20 bsp=e000001303078c68
[ 5.413148] [<a000000100013590>] kernel_thread_helper+0xd0/0x100
[ 5.413149] sp=e00000130307fe30 bsp=e000001303078c40
[ 5.427547] [<a00000010000a4c0>] start_kernel_thread+0x20/0x40
[ 5.427548] sp=e00000130307fe30 bsp=e000001303078c40
We are trying to send a sense command to the device and the buffer we
use (which is rq->cmd) is what is unaligned, I believe. I'm not sure how
useful I can be going forward...
Thanks,
Nish
--
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 0:39 ` Nishanth Aravamudan
@ 2008-08-22 1:11 ` Robin Holt
2008-08-22 16:45 ` Nishanth Aravamudan
2008-08-22 10:15 ` Bartlomiej Zolnierkiewicz
1 sibling, 1 reply; 27+ messages in thread
From: Robin Holt @ 2008-08-22 1:11 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: Robin Holt, tony.luck, bzolnier, linux-ia64, linux-ide
Nish,
Sounds like the callers to ide_output_data need to be doing some better
alignment of their structures. The thing that is confusing me is, I
believe, my own assumption. Do you know when this problem first occurred?
I have assumed it is very recent, but that does not appear to be the
case.
Thanks,
Robin
On Thu, Aug 21, 2008 at 05:39:06PM -0700, Nishanth Aravamudan wrote:
> On 21.08.2008 [16:54:26 -0500], Robin Holt wrote:
> > > [ 32.597792] outsl(496, e000000644678466, 3)
> > ^^^^^^^^^^^^^^^^
> >
> > This is expected to be an unsigned int * and typecast to that in outsl.
> > Looks like the buffer being passed in is not properly aligned. Time to
> > go look at the caller. Make sure buf is defined as an array of at least
> > int size. That should make this aligned on a 4 byte boundary instead of
> > the 2 byte boundary it is on now.
> >
> > You can cheat at finding the callers by putting
> > WARN_ON(buf & 0x3);
> > printk...
>
> So I tried this and it gets quite hairy quickly (I think) because what's
> unaligned is an IDE command buffer? There is a lot of pointer passing
> and I get lost since I don't know the IDE/elevator code very well.
>
> Here's the stack trace I'm looking at:
>
> [ 5.018347] [<a000000100015420>] show_stack+0x80/0xa0
> [ 5.018348] sp=e00000130307f930 bsp=e0000013030793b8
> [ 5.031782] [<a000000100015470>] dump_stack+0x30/0x60
> [ 5.031783] sp=e00000130307fb00 bsp=e0000013030793a0
> [ 5.045223] [<a000000100094ff0>] warn_on_slowpath+0x90/0xe0
> [ 5.045225] sp=e00000130307fb00 bsp=e000001303079378
> [ 5.059201] [<a000000100517480>] ide_output_data+0x3c0/0x540
> [ 5.059204] sp=e00000130307fbf0 bsp=e000001303079310
> [ 5.073248] [<a0000001005309e0>] cdrom_transfer_packet_command+0x2c0/0x340
> [ 5.073249] sp=e00000130307fbf0 bsp=e0000013030792d0
> [ 5.088519] [<a000000100530ac0>] cdrom_do_newpc_cont+0x60/0x80
> [ 5.088522] sp=e00000130307fc00 bsp=e0000013030792b0
> [ 5.102739] [<a00000010052f1a0>] ide_cd_do_request+0x980/0x1420
> [ 5.102742] sp=e00000130307fc00 bsp=e000001303079238
> [ 5.117064] [<a00000010050fe00>] ide_do_request+0xca0/0x1d00
> [ 5.117066] sp=e00000130307fc00 bsp=e0000013030791a0
> [ 5.131105] [<a000000100511580>] do_ide_request+0x40/0x60
> [ 5.131107] sp=e00000130307fc30 bsp=e000001303079180
> [ 5.144897] [<a000000100384780>] elv_insert+0x280/0x5c0
> [ 5.144900] sp=e00000130307fc30 bsp=e000001303079148
> [ 5.158507] [<a000000100384c40>] __elv_add_request+0x180/0x240
> [ 5.158509] sp=e00000130307fc30 bsp=e000001303079110
> [ 5.172733] [<a000000100391730>] blk_execute_rq_nowait+0xd0/0x1e0
> [ 5.172734] sp=e00000130307fc30 bsp=e0000013030790d0
> [ 5.187220] [<a000000100391910>] blk_execute_rq+0xd0/0x240
> [ 5.187221] sp=e00000130307fc30 bsp=e000001303079090
> [ 5.201091] [<a000000100531f70>] ide_cd_queue_pc+0x130/0x2e0
> [ 5.201093] sp=e00000130307fcc0 bsp=e000001303078fd0
> [ 5.215137] [<a0000001005342f0>] ide_cdrom_packet+0x130/0x180
> [ 5.215139] sp=e00000130307fd00 bsp=e000001303078f78
> [ 5.229281] [<a000000100593080>] cdrom_mode_sense+0xc0/0xe0
> [ 5.229283] sp=e00000130307fd10 bsp=e000001303078f40
> [ 5.243239] [<a00000010052d9c0>] ide_cdrom_get_capabilities+0x80/0xc0
> [ 5.243240] sp=e00000130307fd10 bsp=e000001303078f10
> [ 5.258084] [<a000000100533890>] ide_cd_probe+0x810/0xf40
> [ 5.258086] sp=e00000130307fd50 bsp=e000001303078e90
> [ 5.273709] [<a00000010050a510>] generic_ide_probe+0x70/0xa0
> [ 5.273711] sp=e00000130307fdc0 bsp=e000001303078e70
> [ 5.287774] [<a0000001004bdaf0>] driver_probe_device+0x190/0x3a0
> [ 5.287775] sp=e00000130307fdc0 bsp=e000001303078e28
> [ 5.302163] [<a0000001004bdd80>] __driver_attach+0x80/0xe0
> [ 5.302164] sp=e00000130307fdc0 bsp=e000001303078de8
> [ 5.316032] [<a0000001004bc5a0>] bus_for_each_dev+0xc0/0x140
> [ 5.316034] sp=e00000130307fdc0 bsp=e000001303078db0
> [ 5.330072] [<a0000001004bd700>] driver_attach+0x40/0x60
> [ 5.330074] sp=e00000130307fde0 bsp=e000001303078d90
> [ 5.343761] [<a0000001004bd290>] bus_add_driver+0x370/0x4a0
> [ 5.343763] sp=e00000130307fde0 bsp=e000001303078d48
> [ 5.357720] [<a0000001004be3d0>] driver_register+0xd0/0x340
> [ 5.357721] sp=e00000130307fde0 bsp=e000001303078d00
> [ 5.371693] [<a0000001009a3ea0>] ide_cdrom_init+0x20/0x40
> [ 5.371695] sp=e00000130307fde0 bsp=e000001303078ce8
> [ 5.385475] [<a00000010000a5a0>] do_one_initcall+0x60/0x380
> [ 5.385477] sp=e00000130307fde0 bsp=e000001303078ca8
> [ 5.399445] [<a0000001009645b0>] kernel_init+0x370/0x420
> [ 5.399447] sp=e00000130307fe20 bsp=e000001303078c68
> [ 5.413148] [<a000000100013590>] kernel_thread_helper+0xd0/0x100
> [ 5.413149] sp=e00000130307fe30 bsp=e000001303078c40
> [ 5.427547] [<a00000010000a4c0>] start_kernel_thread+0x20/0x40
> [ 5.427548] sp=e00000130307fe30 bsp=e000001303078c40
>
> We are trying to send a sense command to the device and the buffer we
> use (which is rq->cmd) is what is unaligned, I believe. I'm not sure how
> useful I can be going forward...
>
> Thanks,
> Nish
>
> --
> Nishanth Aravamudan <nacc@us.ibm.com>
> IBM Linux Technology Center
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 0:39 ` Nishanth Aravamudan
2008-08-22 1:11 ` Robin Holt
@ 2008-08-22 10:15 ` Bartlomiej Zolnierkiewicz
2008-08-22 10:55 ` Boris Petkov
1 sibling, 1 reply; 27+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-08-22 10:15 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: Robin Holt, tony.luck, linux-ia64, linux-ide, Borislav Petkov,
FUJITA Tomonori
On Friday 22 August 2008, Nishanth Aravamudan wrote:
> On 21.08.2008 [16:54:26 -0500], Robin Holt wrote:
> > > [ 32.597792] outsl(496, e000000644678466, 3)
> > ^^^^^^^^^^^^^^^^
> >
> > This is expected to be an unsigned int * and typecast to that in outsl.
> > Looks like the buffer being passed in is not properly aligned. Time to
> > go look at the caller. Make sure buf is defined as an array of at least
> > int size. That should make this aligned on a 4 byte boundary instead of
> > the 2 byte boundary it is on now.
> >
> > You can cheat at finding the callers by putting
> > WARN_ON(buf & 0x3);
> > printk...
>
> So I tried this and it gets quite hairy quickly (I think) because what's
> unaligned is an IDE command buffer? There is a lot of pointer passing
> and I get lost since I don't know the IDE/elevator code very well.
>
> Here's the stack trace I'm looking at:
>
> [ 5.018347] [<a000000100015420>] show_stack+0x80/0xa0
> [ 5.018348] sp=e00000130307f930 bsp=e0000013030793b8
> [ 5.031782] [<a000000100015470>] dump_stack+0x30/0x60
> [ 5.031783] sp=e00000130307fb00 bsp=e0000013030793a0
> [ 5.045223] [<a000000100094ff0>] warn_on_slowpath+0x90/0xe0
> [ 5.045225] sp=e00000130307fb00 bsp=e000001303079378
> [ 5.059201] [<a000000100517480>] ide_output_data+0x3c0/0x540
> [ 5.059204] sp=e00000130307fbf0 bsp=e000001303079310
> [ 5.073248] [<a0000001005309e0>] cdrom_transfer_packet_command+0x2c0/0x340
> [ 5.073249] sp=e00000130307fbf0 bsp=e0000013030792d0
> [ 5.088519] [<a000000100530ac0>] cdrom_do_newpc_cont+0x60/0x80
> [ 5.088522] sp=e00000130307fc00 bsp=e0000013030792b0
> [ 5.102739] [<a00000010052f1a0>] ide_cd_do_request+0x980/0x1420
> [ 5.102742] sp=e00000130307fc00 bsp=e000001303079238
> [ 5.117064] [<a00000010050fe00>] ide_do_request+0xca0/0x1d00
> [ 5.117066] sp=e00000130307fc00 bsp=e0000013030791a0
> [ 5.131105] [<a000000100511580>] do_ide_request+0x40/0x60
> [ 5.131107] sp=e00000130307fc30 bsp=e000001303079180
> [ 5.144897] [<a000000100384780>] elv_insert+0x280/0x5c0
> [ 5.144900] sp=e00000130307fc30 bsp=e000001303079148
> [ 5.158507] [<a000000100384c40>] __elv_add_request+0x180/0x240
> [ 5.158509] sp=e00000130307fc30 bsp=e000001303079110
> [ 5.172733] [<a000000100391730>] blk_execute_rq_nowait+0xd0/0x1e0
> [ 5.172734] sp=e00000130307fc30 bsp=e0000013030790d0
> [ 5.187220] [<a000000100391910>] blk_execute_rq+0xd0/0x240
> [ 5.187221] sp=e00000130307fc30 bsp=e000001303079090
> [ 5.201091] [<a000000100531f70>] ide_cd_queue_pc+0x130/0x2e0
> [ 5.201093] sp=e00000130307fcc0 bsp=e000001303078fd0
> [ 5.215137] [<a0000001005342f0>] ide_cdrom_packet+0x130/0x180
> [ 5.215139] sp=e00000130307fd00 bsp=e000001303078f78
> [ 5.229281] [<a000000100593080>] cdrom_mode_sense+0xc0/0xe0
> [ 5.229283] sp=e00000130307fd10 bsp=e000001303078f40
> [ 5.243239] [<a00000010052d9c0>] ide_cdrom_get_capabilities+0x80/0xc0
> [ 5.243240] sp=e00000130307fd10 bsp=e000001303078f10
> [ 5.258084] [<a000000100533890>] ide_cd_probe+0x810/0xf40
> [ 5.258086] sp=e00000130307fd50 bsp=e000001303078e90
> [ 5.273709] [<a00000010050a510>] generic_ide_probe+0x70/0xa0
> [ 5.273711] sp=e00000130307fdc0 bsp=e000001303078e70
> [ 5.287774] [<a0000001004bdaf0>] driver_probe_device+0x190/0x3a0
> [ 5.287775] sp=e00000130307fdc0 bsp=e000001303078e28
> [ 5.302163] [<a0000001004bdd80>] __driver_attach+0x80/0xe0
> [ 5.302164] sp=e00000130307fdc0 bsp=e000001303078de8
> [ 5.316032] [<a0000001004bc5a0>] bus_for_each_dev+0xc0/0x140
> [ 5.316034] sp=e00000130307fdc0 bsp=e000001303078db0
> [ 5.330072] [<a0000001004bd700>] driver_attach+0x40/0x60
> [ 5.330074] sp=e00000130307fde0 bsp=e000001303078d90
> [ 5.343761] [<a0000001004bd290>] bus_add_driver+0x370/0x4a0
> [ 5.343763] sp=e00000130307fde0 bsp=e000001303078d48
> [ 5.357720] [<a0000001004be3d0>] driver_register+0xd0/0x340
> [ 5.357721] sp=e00000130307fde0 bsp=e000001303078d00
> [ 5.371693] [<a0000001009a3ea0>] ide_cdrom_init+0x20/0x40
> [ 5.371695] sp=e00000130307fde0 bsp=e000001303078ce8
> [ 5.385475] [<a00000010000a5a0>] do_one_initcall+0x60/0x380
> [ 5.385477] sp=e00000130307fde0 bsp=e000001303078ca8
> [ 5.399445] [<a0000001009645b0>] kernel_init+0x370/0x420
> [ 5.399447] sp=e00000130307fe20 bsp=e000001303078c68
> [ 5.413148] [<a000000100013590>] kernel_thread_helper+0xd0/0x100
> [ 5.413149] sp=e00000130307fe30 bsp=e000001303078c40
> [ 5.427547] [<a00000010000a4c0>] start_kernel_thread+0x20/0x40
> [ 5.427548] sp=e00000130307fe30 bsp=e000001303078c40
>
> We are trying to send a sense command to the device and the buffer we
> use (which is rq->cmd) is what is unaligned, I believe. I'm not sure how
> useful I can be going forward...
Borislav/Fujita, any ideas what is going wrong with ide-cd?
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 10:15 ` Bartlomiej Zolnierkiewicz
@ 2008-08-22 10:55 ` Boris Petkov
2008-08-22 16:45 ` Nishanth Aravamudan
0 siblings, 1 reply; 27+ messages in thread
From: Boris Petkov @ 2008-08-22 10:55 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: Nishanth Aravamudan, Robin Holt, tony.luck, linux-ia64, linux-ide,
FUJITA Tomonori
On Fri, Aug 22, 2008 at 12:15 PM, Bartlomiej Zolnierkiewicz
<bzolnier@gmail.com> wrote:
> On Friday 22 August 2008, Nishanth Aravamudan wrote:
>> On 21.08.2008 [16:54:26 -0500], Robin Holt wrote:
>> > > [ 32.597792] outsl(496, e000000644678466, 3)
>> > ^^^^^^^^^^^^^^^^
>> >
>> > This is expected to be an unsigned int * and typecast to that in outsl.
>> > Looks like the buffer being passed in is not properly aligned. Time to
>> > go look at the caller. Make sure buf is defined as an array of at least
>> > int size. That should make this aligned on a 4 byte boundary instead of
>> > the 2 byte boundary it is on now.
>> >
>> > You can cheat at finding the callers by putting
>> > WARN_ON(buf & 0x3);
>> > printk...
>>
>> So I tried this and it gets quite hairy quickly (I think) because what's
>> unaligned is an IDE command buffer? There is a lot of pointer passing
>> and I get lost since I don't know the IDE/elevator code very well.
>>
>> Here's the stack trace I'm looking at:
>>
>> [ 5.018347] [<a000000100015420>] show_stack+0x80/0xa0
>> [ 5.018348] sp=e00000130307f930 bsp=e0000013030793b8
>> [ 5.031782] [<a000000100015470>] dump_stack+0x30/0x60
>> [ 5.031783] sp=e00000130307fb00 bsp=e0000013030793a0
>> [ 5.045223] [<a000000100094ff0>] warn_on_slowpath+0x90/0xe0
>> [ 5.045225] sp=e00000130307fb00 bsp=e000001303079378
>> [ 5.059201] [<a000000100517480>] ide_output_data+0x3c0/0x540
>> [ 5.059204] sp=e00000130307fbf0 bsp=e000001303079310
>> [ 5.073248] [<a0000001005309e0>] cdrom_transfer_packet_command+0x2c0/0x340
>> [ 5.073249] sp=e00000130307fbf0 bsp=e0000013030792d0
>> [ 5.088519] [<a000000100530ac0>] cdrom_do_newpc_cont+0x60/0x80
>> [ 5.088522] sp=e00000130307fc00 bsp=e0000013030792b0
>> [ 5.102739] [<a00000010052f1a0>] ide_cd_do_request+0x980/0x1420
>> [ 5.102742] sp=e00000130307fc00 bsp=e000001303079238
>> [ 5.117064] [<a00000010050fe00>] ide_do_request+0xca0/0x1d00
>> [ 5.117066] sp=e00000130307fc00 bsp=e0000013030791a0
>> [ 5.131105] [<a000000100511580>] do_ide_request+0x40/0x60
>> [ 5.131107] sp=e00000130307fc30 bsp=e000001303079180
>> [ 5.144897] [<a000000100384780>] elv_insert+0x280/0x5c0
>> [ 5.144900] sp=e00000130307fc30 bsp=e000001303079148
>> [ 5.158507] [<a000000100384c40>] __elv_add_request+0x180/0x240
>> [ 5.158509] sp=e00000130307fc30 bsp=e000001303079110
>> [ 5.172733] [<a000000100391730>] blk_execute_rq_nowait+0xd0/0x1e0
>> [ 5.172734] sp=e00000130307fc30 bsp=e0000013030790d0
>> [ 5.187220] [<a000000100391910>] blk_execute_rq+0xd0/0x240
>> [ 5.187221] sp=e00000130307fc30 bsp=e000001303079090
>> [ 5.201091] [<a000000100531f70>] ide_cd_queue_pc+0x130/0x2e0
>> [ 5.201093] sp=e00000130307fcc0 bsp=e000001303078fd0
>> [ 5.215137] [<a0000001005342f0>] ide_cdrom_packet+0x130/0x180
>> [ 5.215139] sp=e00000130307fd00 bsp=e000001303078f78
>> [ 5.229281] [<a000000100593080>] cdrom_mode_sense+0xc0/0xe0
>> [ 5.229283] sp=e00000130307fd10 bsp=e000001303078f40
>> [ 5.243239] [<a00000010052d9c0>] ide_cdrom_get_capabilities+0x80/0xc0
>> [ 5.243240] sp=e00000130307fd10 bsp=e000001303078f10
>> [ 5.258084] [<a000000100533890>] ide_cd_probe+0x810/0xf40
>> [ 5.258086] sp=e00000130307fd50 bsp=e000001303078e90
>> [ 5.273709] [<a00000010050a510>] generic_ide_probe+0x70/0xa0
>> [ 5.273711] sp=e00000130307fdc0 bsp=e000001303078e70
>> [ 5.287774] [<a0000001004bdaf0>] driver_probe_device+0x190/0x3a0
>> [ 5.287775] sp=e00000130307fdc0 bsp=e000001303078e28
>> [ 5.302163] [<a0000001004bdd80>] __driver_attach+0x80/0xe0
>> [ 5.302164] sp=e00000130307fdc0 bsp=e000001303078de8
>> [ 5.316032] [<a0000001004bc5a0>] bus_for_each_dev+0xc0/0x140
>> [ 5.316034] sp=e00000130307fdc0 bsp=e000001303078db0
>> [ 5.330072] [<a0000001004bd700>] driver_attach+0x40/0x60
>> [ 5.330074] sp=e00000130307fde0 bsp=e000001303078d90
>> [ 5.343761] [<a0000001004bd290>] bus_add_driver+0x370/0x4a0
>> [ 5.343763] sp=e00000130307fde0 bsp=e000001303078d48
>> [ 5.357720] [<a0000001004be3d0>] driver_register+0xd0/0x340
>> [ 5.357721] sp=e00000130307fde0 bsp=e000001303078d00
>> [ 5.371693] [<a0000001009a3ea0>] ide_cdrom_init+0x20/0x40
>> [ 5.371695] sp=e00000130307fde0 bsp=e000001303078ce8
>> [ 5.385475] [<a00000010000a5a0>] do_one_initcall+0x60/0x380
>> [ 5.385477] sp=e00000130307fde0 bsp=e000001303078ca8
>> [ 5.399445] [<a0000001009645b0>] kernel_init+0x370/0x420
>> [ 5.399447] sp=e00000130307fe20 bsp=e000001303078c68
>> [ 5.413148] [<a000000100013590>] kernel_thread_helper+0xd0/0x100
>> [ 5.413149] sp=e00000130307fe30 bsp=e000001303078c40
>> [ 5.427547] [<a00000010000a4c0>] start_kernel_thread+0x20/0x40
>> [ 5.427548] sp=e00000130307fe30 bsp=e000001303078c40
>>
>> We are trying to send a sense command to the device and the buffer we
>> use (which is rq->cmd) is what is unaligned, I believe. I'm not sure how
>> useful I can be going forward...
>
> Borislav/Fujita, any ideas what is going wrong with ide-cd?
>
I think its the following:
ide_cdrom_get_capabilities() allocates a struct packet_command cgc on the stack
in order to do cdrom_mode_sense() later on. Since that cmd is not 4byte aligned
as we've seen above and we don't do the alignment check in ide_cd_queue_pc()
similar to cdrom_do_block_pc() (see 0b6abc17700a7843b165c677da0ac94522f83083),
we bust the transfer later.
I'll cook up something later when I have the time...
--
Regards/Gruss,
Boris
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 1:11 ` Robin Holt
@ 2008-08-22 16:45 ` Nishanth Aravamudan
0 siblings, 0 replies; 27+ messages in thread
From: Nishanth Aravamudan @ 2008-08-22 16:45 UTC (permalink / raw)
To: Robin Holt; +Cc: tony.luck, bzolnier, linux-ia64, linux-ide
On 21.08.2008 [20:11:12 -0500], Robin Holt wrote:
> Nish,
>
> Sounds like the callers to ide_output_data need to be doing some
> better alignment of their structures. The thing that is confusing me
> is, I believe, my own assumption. Do you know when this problem first
> occurred? I have assumed it is very recent, but that does not appear
> to be the case.
Sorry about that misleading, it was unintentional. I was unable to get
serial console output on this box (well, actually, successfully boot it
in our test grid), because of CONFIG_PRINTK_TIME breakage that was
recently resolved with Tony & Peter Z.'s help.
However, I saw these "unaligned access" messages on the first successful
boot and hadn't seen them before, so I thought I should report them. I
should have been more specific that I was not sure this was a
regression, but simply didn't have data for kernels before 2.6.27-rc3. I
could go and generate that, but it seems like the IDE folks may have an
idea of what is the problem.
Sorry again,
Nish
>
> Thanks,
> Robin
>
>
> On Thu, Aug 21, 2008 at 05:39:06PM -0700, Nishanth Aravamudan wrote:
> > On 21.08.2008 [16:54:26 -0500], Robin Holt wrote:
> > > > [ 32.597792] outsl(496, e000000644678466, 3)
> > > ^^^^^^^^^^^^^^^^
> > >
> > > This is expected to be an unsigned int * and typecast to that in outsl.
> > > Looks like the buffer being passed in is not properly aligned. Time to
> > > go look at the caller. Make sure buf is defined as an array of at least
> > > int size. That should make this aligned on a 4 byte boundary instead of
> > > the 2 byte boundary it is on now.
> > >
> > > You can cheat at finding the callers by putting
> > > WARN_ON(buf & 0x3);
> > > printk...
> >
> > So I tried this and it gets quite hairy quickly (I think) because what's
> > unaligned is an IDE command buffer? There is a lot of pointer passing
> > and I get lost since I don't know the IDE/elevator code very well.
> >
> > Here's the stack trace I'm looking at:
> >
> > [ 5.018347] [<a000000100015420>] show_stack+0x80/0xa0
> > [ 5.018348] sp=e00000130307f930 bsp=e0000013030793b8
> > [ 5.031782] [<a000000100015470>] dump_stack+0x30/0x60
> > [ 5.031783] sp=e00000130307fb00 bsp=e0000013030793a0
> > [ 5.045223] [<a000000100094ff0>] warn_on_slowpath+0x90/0xe0
> > [ 5.045225] sp=e00000130307fb00 bsp=e000001303079378
> > [ 5.059201] [<a000000100517480>] ide_output_data+0x3c0/0x540
> > [ 5.059204] sp=e00000130307fbf0 bsp=e000001303079310
> > [ 5.073248] [<a0000001005309e0>] cdrom_transfer_packet_command+0x2c0/0x340
> > [ 5.073249] sp=e00000130307fbf0 bsp=e0000013030792d0
> > [ 5.088519] [<a000000100530ac0>] cdrom_do_newpc_cont+0x60/0x80
> > [ 5.088522] sp=e00000130307fc00 bsp=e0000013030792b0
> > [ 5.102739] [<a00000010052f1a0>] ide_cd_do_request+0x980/0x1420
> > [ 5.102742] sp=e00000130307fc00 bsp=e000001303079238
> > [ 5.117064] [<a00000010050fe00>] ide_do_request+0xca0/0x1d00
> > [ 5.117066] sp=e00000130307fc00 bsp=e0000013030791a0
> > [ 5.131105] [<a000000100511580>] do_ide_request+0x40/0x60
> > [ 5.131107] sp=e00000130307fc30 bsp=e000001303079180
> > [ 5.144897] [<a000000100384780>] elv_insert+0x280/0x5c0
> > [ 5.144900] sp=e00000130307fc30 bsp=e000001303079148
> > [ 5.158507] [<a000000100384c40>] __elv_add_request+0x180/0x240
> > [ 5.158509] sp=e00000130307fc30 bsp=e000001303079110
> > [ 5.172733] [<a000000100391730>] blk_execute_rq_nowait+0xd0/0x1e0
> > [ 5.172734] sp=e00000130307fc30 bsp=e0000013030790d0
> > [ 5.187220] [<a000000100391910>] blk_execute_rq+0xd0/0x240
> > [ 5.187221] sp=e00000130307fc30 bsp=e000001303079090
> > [ 5.201091] [<a000000100531f70>] ide_cd_queue_pc+0x130/0x2e0
> > [ 5.201093] sp=e00000130307fcc0 bsp=e000001303078fd0
> > [ 5.215137] [<a0000001005342f0>] ide_cdrom_packet+0x130/0x180
> > [ 5.215139] sp=e00000130307fd00 bsp=e000001303078f78
> > [ 5.229281] [<a000000100593080>] cdrom_mode_sense+0xc0/0xe0
> > [ 5.229283] sp=e00000130307fd10 bsp=e000001303078f40
> > [ 5.243239] [<a00000010052d9c0>] ide_cdrom_get_capabilities+0x80/0xc0
> > [ 5.243240] sp=e00000130307fd10 bsp=e000001303078f10
> > [ 5.258084] [<a000000100533890>] ide_cd_probe+0x810/0xf40
> > [ 5.258086] sp=e00000130307fd50 bsp=e000001303078e90
> > [ 5.273709] [<a00000010050a510>] generic_ide_probe+0x70/0xa0
> > [ 5.273711] sp=e00000130307fdc0 bsp=e000001303078e70
> > [ 5.287774] [<a0000001004bdaf0>] driver_probe_device+0x190/0x3a0
> > [ 5.287775] sp=e00000130307fdc0 bsp=e000001303078e28
> > [ 5.302163] [<a0000001004bdd80>] __driver_attach+0x80/0xe0
> > [ 5.302164] sp=e00000130307fdc0 bsp=e000001303078de8
> > [ 5.316032] [<a0000001004bc5a0>] bus_for_each_dev+0xc0/0x140
> > [ 5.316034] sp=e00000130307fdc0 bsp=e000001303078db0
> > [ 5.330072] [<a0000001004bd700>] driver_attach+0x40/0x60
> > [ 5.330074] sp=e00000130307fde0 bsp=e000001303078d90
> > [ 5.343761] [<a0000001004bd290>] bus_add_driver+0x370/0x4a0
> > [ 5.343763] sp=e00000130307fde0 bsp=e000001303078d48
> > [ 5.357720] [<a0000001004be3d0>] driver_register+0xd0/0x340
> > [ 5.357721] sp=e00000130307fde0 bsp=e000001303078d00
> > [ 5.371693] [<a0000001009a3ea0>] ide_cdrom_init+0x20/0x40
> > [ 5.371695] sp=e00000130307fde0 bsp=e000001303078ce8
> > [ 5.385475] [<a00000010000a5a0>] do_one_initcall+0x60/0x380
> > [ 5.385477] sp=e00000130307fde0 bsp=e000001303078ca8
> > [ 5.399445] [<a0000001009645b0>] kernel_init+0x370/0x420
> > [ 5.399447] sp=e00000130307fe20 bsp=e000001303078c68
> > [ 5.413148] [<a000000100013590>] kernel_thread_helper+0xd0/0x100
> > [ 5.413149] sp=e00000130307fe30 bsp=e000001303078c40
> > [ 5.427547] [<a00000010000a4c0>] start_kernel_thread+0x20/0x40
> > [ 5.427548] sp=e00000130307fe30 bsp=e000001303078c40
> >
> > We are trying to send a sense command to the device and the buffer we
> > use (which is rq->cmd) is what is unaligned, I believe. I'm not sure how
> > useful I can be going forward...
> >
> > Thanks,
> > Nish
> >
> > --
> > Nishanth Aravamudan <nacc@us.ibm.com>
> > IBM Linux Technology Center
--
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 10:55 ` Boris Petkov
@ 2008-08-22 16:45 ` Nishanth Aravamudan
2008-08-22 17:29 ` Boris Petkov
0 siblings, 1 reply; 27+ messages in thread
From: Nishanth Aravamudan @ 2008-08-22 16:45 UTC (permalink / raw)
To: Boris Petkov
Cc: Bartlomiej Zolnierkiewicz, Robin Holt, tony.luck, linux-ia64,
linux-ide, FUJITA Tomonori
On 22.08.2008 [12:55:25 +0200], Boris Petkov wrote:
> On Fri, Aug 22, 2008 at 12:15 PM, Bartlomiej Zolnierkiewicz
> <bzolnier@gmail.com> wrote:
> > On Friday 22 August 2008, Nishanth Aravamudan wrote:
> >> On 21.08.2008 [16:54:26 -0500], Robin Holt wrote:
> >> > > [ 32.597792] outsl(496, e000000644678466, 3)
> >> > ^^^^^^^^^^^^^^^^
> >> >
> >> > This is expected to be an unsigned int * and typecast to that in outsl.
> >> > Looks like the buffer being passed in is not properly aligned. Time to
> >> > go look at the caller. Make sure buf is defined as an array of at least
> >> > int size. That should make this aligned on a 4 byte boundary instead of
> >> > the 2 byte boundary it is on now.
> >> >
> >> > You can cheat at finding the callers by putting
> >> > WARN_ON(buf & 0x3);
> >> > printk...
> >>
> >> So I tried this and it gets quite hairy quickly (I think) because what's
> >> unaligned is an IDE command buffer? There is a lot of pointer passing
> >> and I get lost since I don't know the IDE/elevator code very well.
> >>
> >> Here's the stack trace I'm looking at:
> >>
> >> [ 5.018347] [<a000000100015420>] show_stack+0x80/0xa0
> >> [ 5.018348] sp=e00000130307f930 bsp=e0000013030793b8
> >> [ 5.031782] [<a000000100015470>] dump_stack+0x30/0x60
> >> [ 5.031783] sp=e00000130307fb00 bsp=e0000013030793a0
> >> [ 5.045223] [<a000000100094ff0>] warn_on_slowpath+0x90/0xe0
> >> [ 5.045225] sp=e00000130307fb00 bsp=e000001303079378
> >> [ 5.059201] [<a000000100517480>] ide_output_data+0x3c0/0x540
> >> [ 5.059204] sp=e00000130307fbf0 bsp=e000001303079310
> >> [ 5.073248] [<a0000001005309e0>] cdrom_transfer_packet_command+0x2c0/0x340
> >> [ 5.073249] sp=e00000130307fbf0 bsp=e0000013030792d0
> >> [ 5.088519] [<a000000100530ac0>] cdrom_do_newpc_cont+0x60/0x80
> >> [ 5.088522] sp=e00000130307fc00 bsp=e0000013030792b0
> >> [ 5.102739] [<a00000010052f1a0>] ide_cd_do_request+0x980/0x1420
> >> [ 5.102742] sp=e00000130307fc00 bsp=e000001303079238
> >> [ 5.117064] [<a00000010050fe00>] ide_do_request+0xca0/0x1d00
> >> [ 5.117066] sp=e00000130307fc00 bsp=e0000013030791a0
> >> [ 5.131105] [<a000000100511580>] do_ide_request+0x40/0x60
> >> [ 5.131107] sp=e00000130307fc30 bsp=e000001303079180
> >> [ 5.144897] [<a000000100384780>] elv_insert+0x280/0x5c0
> >> [ 5.144900] sp=e00000130307fc30 bsp=e000001303079148
> >> [ 5.158507] [<a000000100384c40>] __elv_add_request+0x180/0x240
> >> [ 5.158509] sp=e00000130307fc30 bsp=e000001303079110
> >> [ 5.172733] [<a000000100391730>] blk_execute_rq_nowait+0xd0/0x1e0
> >> [ 5.172734] sp=e00000130307fc30 bsp=e0000013030790d0
> >> [ 5.187220] [<a000000100391910>] blk_execute_rq+0xd0/0x240
> >> [ 5.187221] sp=e00000130307fc30 bsp=e000001303079090
> >> [ 5.201091] [<a000000100531f70>] ide_cd_queue_pc+0x130/0x2e0
> >> [ 5.201093] sp=e00000130307fcc0 bsp=e000001303078fd0
> >> [ 5.215137] [<a0000001005342f0>] ide_cdrom_packet+0x130/0x180
> >> [ 5.215139] sp=e00000130307fd00 bsp=e000001303078f78
> >> [ 5.229281] [<a000000100593080>] cdrom_mode_sense+0xc0/0xe0
> >> [ 5.229283] sp=e00000130307fd10 bsp=e000001303078f40
> >> [ 5.243239] [<a00000010052d9c0>] ide_cdrom_get_capabilities+0x80/0xc0
> >> [ 5.243240] sp=e00000130307fd10 bsp=e000001303078f10
> >> [ 5.258084] [<a000000100533890>] ide_cd_probe+0x810/0xf40
> >> [ 5.258086] sp=e00000130307fd50 bsp=e000001303078e90
> >> [ 5.273709] [<a00000010050a510>] generic_ide_probe+0x70/0xa0
> >> [ 5.273711] sp=e00000130307fdc0 bsp=e000001303078e70
> >> [ 5.287774] [<a0000001004bdaf0>] driver_probe_device+0x190/0x3a0
> >> [ 5.287775] sp=e00000130307fdc0 bsp=e000001303078e28
> >> [ 5.302163] [<a0000001004bdd80>] __driver_attach+0x80/0xe0
> >> [ 5.302164] sp=e00000130307fdc0 bsp=e000001303078de8
> >> [ 5.316032] [<a0000001004bc5a0>] bus_for_each_dev+0xc0/0x140
> >> [ 5.316034] sp=e00000130307fdc0 bsp=e000001303078db0
> >> [ 5.330072] [<a0000001004bd700>] driver_attach+0x40/0x60
> >> [ 5.330074] sp=e00000130307fde0 bsp=e000001303078d90
> >> [ 5.343761] [<a0000001004bd290>] bus_add_driver+0x370/0x4a0
> >> [ 5.343763] sp=e00000130307fde0 bsp=e000001303078d48
> >> [ 5.357720] [<a0000001004be3d0>] driver_register+0xd0/0x340
> >> [ 5.357721] sp=e00000130307fde0 bsp=e000001303078d00
> >> [ 5.371693] [<a0000001009a3ea0>] ide_cdrom_init+0x20/0x40
> >> [ 5.371695] sp=e00000130307fde0 bsp=e000001303078ce8
> >> [ 5.385475] [<a00000010000a5a0>] do_one_initcall+0x60/0x380
> >> [ 5.385477] sp=e00000130307fde0 bsp=e000001303078ca8
> >> [ 5.399445] [<a0000001009645b0>] kernel_init+0x370/0x420
> >> [ 5.399447] sp=e00000130307fe20 bsp=e000001303078c68
> >> [ 5.413148] [<a000000100013590>] kernel_thread_helper+0xd0/0x100
> >> [ 5.413149] sp=e00000130307fe30 bsp=e000001303078c40
> >> [ 5.427547] [<a00000010000a4c0>] start_kernel_thread+0x20/0x40
> >> [ 5.427548] sp=e00000130307fe30 bsp=e000001303078c40
> >>
> >> We are trying to send a sense command to the device and the buffer we
> >> use (which is rq->cmd) is what is unaligned, I believe. I'm not sure how
> >> useful I can be going forward...
> >
> > Borislav/Fujita, any ideas what is going wrong with ide-cd?
> >
>
> I think its the following:
>
> ide_cdrom_get_capabilities() allocates a struct packet_command cgc on
> the stack in order to do cdrom_mode_sense() later on. Since that cmd
> is not 4byte aligned as we've seen above and we don't do the alignment
> check in ide_cd_queue_pc() similar to cdrom_do_block_pc() (see
> 0b6abc17700a7843b165c677da0ac94522f83083), we bust the transfer later.
>
> I'll cook up something later when I have the time...
I'm happy to test any patches (and it should be relatively quick to
test).
Thanks,
Nish
--
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 16:45 ` Nishanth Aravamudan
@ 2008-08-22 17:29 ` Boris Petkov
2008-08-22 18:36 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 27+ messages in thread
From: Boris Petkov @ 2008-08-22 17:29 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz, Nishanth Aravamudan
Cc: Robin Holt, tony.luck, linux-ia64, linux-ide, FUJITA Tomonori
On Fri, Aug 22, 2008 at 6:45 PM, Nishanth Aravamudan <nacc@us.ibm.com> wrote:
> On 22.08.2008 [12:55:25 +0200], Boris Petkov wrote:
>> On Fri, Aug 22, 2008 at 12:15 PM, Bartlomiej Zolnierkiewicz
>> <bzolnier@gmail.com> wrote:
>> > On Friday 22 August 2008, Nishanth Aravamudan wrote:
>> >> On 21.08.2008 [16:54:26 -0500], Robin Holt wrote:
>> >> > > [ 32.597792] outsl(496, e000000644678466, 3)
>> >> > ^^^^^^^^^^^^^^^^
>> >> >
>> >> > This is expected to be an unsigned int * and typecast to that in outsl.
>> >> > Looks like the buffer being passed in is not properly aligned. Time to
>> >> > go look at the caller. Make sure buf is defined as an array of at least
>> >> > int size. That should make this aligned on a 4 byte boundary instead of
>> >> > the 2 byte boundary it is on now.
>> >> >
>> >> > You can cheat at finding the callers by putting
>> >> > WARN_ON(buf & 0x3);
>> >> > printk...
>> >>
>> >> So I tried this and it gets quite hairy quickly (I think) because what's
>> >> unaligned is an IDE command buffer? There is a lot of pointer passing
>> >> and I get lost since I don't know the IDE/elevator code very well.
>> >>
>> >> Here's the stack trace I'm looking at:
>> >>
>> >> [ 5.018347] [<a000000100015420>] show_stack+0x80/0xa0
>> >> [ 5.018348] sp=e00000130307f930 bsp=e0000013030793b8
>> >> [ 5.031782] [<a000000100015470>] dump_stack+0x30/0x60
>> >> [ 5.031783] sp=e00000130307fb00 bsp=e0000013030793a0
>> >> [ 5.045223] [<a000000100094ff0>] warn_on_slowpath+0x90/0xe0
>> >> [ 5.045225] sp=e00000130307fb00 bsp=e000001303079378
>> >> [ 5.059201] [<a000000100517480>] ide_output_data+0x3c0/0x540
>> >> [ 5.059204] sp=e00000130307fbf0 bsp=e000001303079310
>> >> [ 5.073248] [<a0000001005309e0>] cdrom_transfer_packet_command+0x2c0/0x340
>> >> [ 5.073249] sp=e00000130307fbf0 bsp=e0000013030792d0
>> >> [ 5.088519] [<a000000100530ac0>] cdrom_do_newpc_cont+0x60/0x80
>> >> [ 5.088522] sp=e00000130307fc00 bsp=e0000013030792b0
>> >> [ 5.102739] [<a00000010052f1a0>] ide_cd_do_request+0x980/0x1420
>> >> [ 5.102742] sp=e00000130307fc00 bsp=e000001303079238
>> >> [ 5.117064] [<a00000010050fe00>] ide_do_request+0xca0/0x1d00
>> >> [ 5.117066] sp=e00000130307fc00 bsp=e0000013030791a0
>> >> [ 5.131105] [<a000000100511580>] do_ide_request+0x40/0x60
>> >> [ 5.131107] sp=e00000130307fc30 bsp=e000001303079180
>> >> [ 5.144897] [<a000000100384780>] elv_insert+0x280/0x5c0
>> >> [ 5.144900] sp=e00000130307fc30 bsp=e000001303079148
>> >> [ 5.158507] [<a000000100384c40>] __elv_add_request+0x180/0x240
>> >> [ 5.158509] sp=e00000130307fc30 bsp=e000001303079110
>> >> [ 5.172733] [<a000000100391730>] blk_execute_rq_nowait+0xd0/0x1e0
>> >> [ 5.172734] sp=e00000130307fc30 bsp=e0000013030790d0
>> >> [ 5.187220] [<a000000100391910>] blk_execute_rq+0xd0/0x240
>> >> [ 5.187221] sp=e00000130307fc30 bsp=e000001303079090
>> >> [ 5.201091] [<a000000100531f70>] ide_cd_queue_pc+0x130/0x2e0
>> >> [ 5.201093] sp=e00000130307fcc0 bsp=e000001303078fd0
>> >> [ 5.215137] [<a0000001005342f0>] ide_cdrom_packet+0x130/0x180
>> >> [ 5.215139] sp=e00000130307fd00 bsp=e000001303078f78
>> >> [ 5.229281] [<a000000100593080>] cdrom_mode_sense+0xc0/0xe0
>> >> [ 5.229283] sp=e00000130307fd10 bsp=e000001303078f40
>> >> [ 5.243239] [<a00000010052d9c0>] ide_cdrom_get_capabilities+0x80/0xc0
>> >> [ 5.243240] sp=e00000130307fd10 bsp=e000001303078f10
>> >> [ 5.258084] [<a000000100533890>] ide_cd_probe+0x810/0xf40
>> >> [ 5.258086] sp=e00000130307fd50 bsp=e000001303078e90
>> >> [ 5.273709] [<a00000010050a510>] generic_ide_probe+0x70/0xa0
>> >> [ 5.273711] sp=e00000130307fdc0 bsp=e000001303078e70
>> >> [ 5.287774] [<a0000001004bdaf0>] driver_probe_device+0x190/0x3a0
>> >> [ 5.287775] sp=e00000130307fdc0 bsp=e000001303078e28
>> >> [ 5.302163] [<a0000001004bdd80>] __driver_attach+0x80/0xe0
>> >> [ 5.302164] sp=e00000130307fdc0 bsp=e000001303078de8
>> >> [ 5.316032] [<a0000001004bc5a0>] bus_for_each_dev+0xc0/0x140
>> >> [ 5.316034] sp=e00000130307fdc0 bsp=e000001303078db0
>> >> [ 5.330072] [<a0000001004bd700>] driver_attach+0x40/0x60
>> >> [ 5.330074] sp=e00000130307fde0 bsp=e000001303078d90
>> >> [ 5.343761] [<a0000001004bd290>] bus_add_driver+0x370/0x4a0
>> >> [ 5.343763] sp=e00000130307fde0 bsp=e000001303078d48
>> >> [ 5.357720] [<a0000001004be3d0>] driver_register+0xd0/0x340
>> >> [ 5.357721] sp=e00000130307fde0 bsp=e000001303078d00
>> >> [ 5.371693] [<a0000001009a3ea0>] ide_cdrom_init+0x20/0x40
>> >> [ 5.371695] sp=e00000130307fde0 bsp=e000001303078ce8
>> >> [ 5.385475] [<a00000010000a5a0>] do_one_initcall+0x60/0x380
>> >> [ 5.385477] sp=e00000130307fde0 bsp=e000001303078ca8
>> >> [ 5.399445] [<a0000001009645b0>] kernel_init+0x370/0x420
>> >> [ 5.399447] sp=e00000130307fe20 bsp=e000001303078c68
>> >> [ 5.413148] [<a000000100013590>] kernel_thread_helper+0xd0/0x100
>> >> [ 5.413149] sp=e00000130307fe30 bsp=e000001303078c40
>> >> [ 5.427547] [<a00000010000a4c0>] start_kernel_thread+0x20/0x40
>> >> [ 5.427548] sp=e00000130307fe30 bsp=e000001303078c40
>> >>
>> >> We are trying to send a sense command to the device and the buffer we
>> >> use (which is rq->cmd) is what is unaligned, I believe. I'm not sure how
>> >> useful I can be going forward...
>> >
>> > Borislav/Fujita, any ideas what is going wrong with ide-cd?
>> >
>>
>> I think its the following:
>>
>> ide_cdrom_get_capabilities() allocates a struct packet_command cgc on
>> the stack in order to do cdrom_mode_sense() later on. Since that cmd
>> is not 4byte aligned as we've seen above and we don't do the alignment
>> check in ide_cd_queue_pc() similar to cdrom_do_block_pc() (see
>> 0b6abc17700a7843b165c677da0ac94522f83083), we bust the transfer later.
>>
>> I'll cook up something later when I have the time...
>
> I'm happy to test any patches (and it should be relatively quick to
> test).
Sure, however, the problem is more hairy than I expected - the rq->cmd buffer
is received through blk_get_request() and it is sometimes 2 bytes aligned and
not 4. Bart, is it a sensible approach to do an ia64 ifdef that checks the
alignment of the buffer and turns off drive->io_32bit which is checked in
ide_output_data() thus doing only out(w|b) accesses on ia64 with misaligned
buffers?
Thanks.
--
Regards/Gruss,
Boris
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 17:29 ` Boris Petkov
@ 2008-08-22 18:36 ` Bartlomiej Zolnierkiewicz
2008-08-22 18:51 ` Luck, Tony
0 siblings, 1 reply; 27+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-08-22 18:36 UTC (permalink / raw)
To: petkovbb
Cc: Nishanth Aravamudan, Robin Holt, tony.luck, linux-ia64, linux-ide,
FUJITA Tomonori
On Friday 22 August 2008, Boris Petkov wrote:
> On Fri, Aug 22, 2008 at 6:45 PM, Nishanth Aravamudan <nacc@us.ibm.com> wrote:
> > On 22.08.2008 [12:55:25 +0200], Boris Petkov wrote:
> >> On Fri, Aug 22, 2008 at 12:15 PM, Bartlomiej Zolnierkiewicz
> >> <bzolnier@gmail.com> wrote:
> >> > On Friday 22 August 2008, Nishanth Aravamudan wrote:
> >> >> On 21.08.2008 [16:54:26 -0500], Robin Holt wrote:
> >> >> > > [ 32.597792] outsl(496, e000000644678466, 3)
> >> >> > ^^^^^^^^^^^^^^^^
> >> >> >
> >> >> > This is expected to be an unsigned int * and typecast to that in outsl.
> >> >> > Looks like the buffer being passed in is not properly aligned. Time to
> >> >> > go look at the caller. Make sure buf is defined as an array of at least
> >> >> > int size. That should make this aligned on a 4 byte boundary instead of
> >> >> > the 2 byte boundary it is on now.
> >> >> >
> >> >> > You can cheat at finding the callers by putting
> >> >> > WARN_ON(buf & 0x3);
> >> >> > printk...
> >> >>
> >> >> So I tried this and it gets quite hairy quickly (I think) because what's
> >> >> unaligned is an IDE command buffer? There is a lot of pointer passing
> >> >> and I get lost since I don't know the IDE/elevator code very well.
> >> >>
> >> >> Here's the stack trace I'm looking at:
> >> >>
> >> >> [ 5.018347] [<a000000100015420>] show_stack+0x80/0xa0
> >> >> [ 5.018348] sp=e00000130307f930 bsp=e0000013030793b8
> >> >> [ 5.031782] [<a000000100015470>] dump_stack+0x30/0x60
> >> >> [ 5.031783] sp=e00000130307fb00 bsp=e0000013030793a0
> >> >> [ 5.045223] [<a000000100094ff0>] warn_on_slowpath+0x90/0xe0
> >> >> [ 5.045225] sp=e00000130307fb00 bsp=e000001303079378
> >> >> [ 5.059201] [<a000000100517480>] ide_output_data+0x3c0/0x540
> >> >> [ 5.059204] sp=e00000130307fbf0 bsp=e000001303079310
> >> >> [ 5.073248] [<a0000001005309e0>] cdrom_transfer_packet_command+0x2c0/0x340
> >> >> [ 5.073249] sp=e00000130307fbf0 bsp=e0000013030792d0
> >> >> [ 5.088519] [<a000000100530ac0>] cdrom_do_newpc_cont+0x60/0x80
> >> >> [ 5.088522] sp=e00000130307fc00 bsp=e0000013030792b0
> >> >> [ 5.102739] [<a00000010052f1a0>] ide_cd_do_request+0x980/0x1420
> >> >> [ 5.102742] sp=e00000130307fc00 bsp=e000001303079238
> >> >> [ 5.117064] [<a00000010050fe00>] ide_do_request+0xca0/0x1d00
> >> >> [ 5.117066] sp=e00000130307fc00 bsp=e0000013030791a0
> >> >> [ 5.131105] [<a000000100511580>] do_ide_request+0x40/0x60
> >> >> [ 5.131107] sp=e00000130307fc30 bsp=e000001303079180
> >> >> [ 5.144897] [<a000000100384780>] elv_insert+0x280/0x5c0
> >> >> [ 5.144900] sp=e00000130307fc30 bsp=e000001303079148
> >> >> [ 5.158507] [<a000000100384c40>] __elv_add_request+0x180/0x240
> >> >> [ 5.158509] sp=e00000130307fc30 bsp=e000001303079110
> >> >> [ 5.172733] [<a000000100391730>] blk_execute_rq_nowait+0xd0/0x1e0
> >> >> [ 5.172734] sp=e00000130307fc30 bsp=e0000013030790d0
> >> >> [ 5.187220] [<a000000100391910>] blk_execute_rq+0xd0/0x240
> >> >> [ 5.187221] sp=e00000130307fc30 bsp=e000001303079090
> >> >> [ 5.201091] [<a000000100531f70>] ide_cd_queue_pc+0x130/0x2e0
> >> >> [ 5.201093] sp=e00000130307fcc0 bsp=e000001303078fd0
> >> >> [ 5.215137] [<a0000001005342f0>] ide_cdrom_packet+0x130/0x180
> >> >> [ 5.215139] sp=e00000130307fd00 bsp=e000001303078f78
> >> >> [ 5.229281] [<a000000100593080>] cdrom_mode_sense+0xc0/0xe0
> >> >> [ 5.229283] sp=e00000130307fd10 bsp=e000001303078f40
> >> >> [ 5.243239] [<a00000010052d9c0>] ide_cdrom_get_capabilities+0x80/0xc0
> >> >> [ 5.243240] sp=e00000130307fd10 bsp=e000001303078f10
> >> >> [ 5.258084] [<a000000100533890>] ide_cd_probe+0x810/0xf40
> >> >> [ 5.258086] sp=e00000130307fd50 bsp=e000001303078e90
> >> >> [ 5.273709] [<a00000010050a510>] generic_ide_probe+0x70/0xa0
> >> >> [ 5.273711] sp=e00000130307fdc0 bsp=e000001303078e70
> >> >> [ 5.287774] [<a0000001004bdaf0>] driver_probe_device+0x190/0x3a0
> >> >> [ 5.287775] sp=e00000130307fdc0 bsp=e000001303078e28
> >> >> [ 5.302163] [<a0000001004bdd80>] __driver_attach+0x80/0xe0
> >> >> [ 5.302164] sp=e00000130307fdc0 bsp=e000001303078de8
> >> >> [ 5.316032] [<a0000001004bc5a0>] bus_for_each_dev+0xc0/0x140
> >> >> [ 5.316034] sp=e00000130307fdc0 bsp=e000001303078db0
> >> >> [ 5.330072] [<a0000001004bd700>] driver_attach+0x40/0x60
> >> >> [ 5.330074] sp=e00000130307fde0 bsp=e000001303078d90
> >> >> [ 5.343761] [<a0000001004bd290>] bus_add_driver+0x370/0x4a0
> >> >> [ 5.343763] sp=e00000130307fde0 bsp=e000001303078d48
> >> >> [ 5.357720] [<a0000001004be3d0>] driver_register+0xd0/0x340
> >> >> [ 5.357721] sp=e00000130307fde0 bsp=e000001303078d00
> >> >> [ 5.371693] [<a0000001009a3ea0>] ide_cdrom_init+0x20/0x40
> >> >> [ 5.371695] sp=e00000130307fde0 bsp=e000001303078ce8
> >> >> [ 5.385475] [<a00000010000a5a0>] do_one_initcall+0x60/0x380
> >> >> [ 5.385477] sp=e00000130307fde0 bsp=e000001303078ca8
> >> >> [ 5.399445] [<a0000001009645b0>] kernel_init+0x370/0x420
> >> >> [ 5.399447] sp=e00000130307fe20 bsp=e000001303078c68
> >> >> [ 5.413148] [<a000000100013590>] kernel_thread_helper+0xd0/0x100
> >> >> [ 5.413149] sp=e00000130307fe30 bsp=e000001303078c40
> >> >> [ 5.427547] [<a00000010000a4c0>] start_kernel_thread+0x20/0x40
> >> >> [ 5.427548] sp=e00000130307fe30 bsp=e000001303078c40
> >> >>
> >> >> We are trying to send a sense command to the device and the buffer we
> >> >> use (which is rq->cmd) is what is unaligned, I believe. I'm not sure how
> >> >> useful I can be going forward...
> >> >
> >> > Borislav/Fujita, any ideas what is going wrong with ide-cd?
> >> >
> >>
> >> I think its the following:
> >>
> >> ide_cdrom_get_capabilities() allocates a struct packet_command cgc on
> >> the stack in order to do cdrom_mode_sense() later on. Since that cmd
> >> is not 4byte aligned as we've seen above and we don't do the alignment
> >> check in ide_cd_queue_pc() similar to cdrom_do_block_pc() (see
> >> 0b6abc17700a7843b165c677da0ac94522f83083), we bust the transfer later.
> >>
> >> I'll cook up something later when I have the time...
> >
> > I'm happy to test any patches (and it should be relatively quick to
> > test).
>
> Sure, however, the problem is more hairy than I expected - the rq->cmd buffer
> is received through blk_get_request() and it is sometimes 2 bytes aligned and
> not 4. Bart, is it a sensible approach to do an ia64 ifdef that checks the
> alignment of the buffer and turns off drive->io_32bit which is checked in
> ide_output_data() thus doing only out(w|b) accesses on ia64 with misaligned
> buffers?
Well, it sounds kind of like a hack if I have to answer honestly. ;-)
Why not just make rq->cmd always properly aligned in the block layer
i.e. by allocating BLK_MAX_CDB + 2 instead of BLK_MAX_CDB for rq->__cmd
and then doing ALIGN() when setting rq->cmd in blk_rq_init()?
[ I'm sure there exists even better solution... ]
Thanks,
Bart
^ permalink raw reply [flat|nested] 27+ messages in thread
* RE: kernel unaligned accesses on IA64 in IDE
2008-08-22 18:36 ` Bartlomiej Zolnierkiewicz
@ 2008-08-22 18:51 ` Luck, Tony
2008-08-22 19:39 ` Robin Holt
0 siblings, 1 reply; 27+ messages in thread
From: Luck, Tony @ 2008-08-22 18:51 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz, petkovbb@gmail.com
Cc: Nishanth Aravamudan, Robin Holt, linux-ia64@vger.kernel.org,
linux-ide@vger.kernel.org, FUJITA Tomonori
> Why not just make rq->cmd always properly aligned in the block layer
> i.e. by allocating BLK_MAX_CDB + 2 instead of BLK_MAX_CDB for rq->__cmd
> and then doing ALIGN() when setting rq->cmd in blk_rq_init()?
There are two places that do
if (rq->cmd != rq->__cmd)
kfree(rq->cmd);
that would need to be adjusted if you did that. Better to get __cmd
aligned on a good boundary by changing the declaration to
int __cmd[BLK_MAX_CDB / sizeof (int)];
and adding a cast to blk_rq_init():
rq->cmd = (char *)rq->__cmd;
-Tony
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 18:51 ` Luck, Tony
@ 2008-08-22 19:39 ` Robin Holt
2008-08-22 20:36 ` Luck, Tony
0 siblings, 1 reply; 27+ messages in thread
From: Robin Holt @ 2008-08-22 19:39 UTC (permalink / raw)
To: Luck, Tony
Cc: Bartlomiej Zolnierkiewicz, petkovbb@gmail.com,
Nishanth Aravamudan, Robin Holt, linux-ia64@vger.kernel.org,
linux-ide@vger.kernel.org, FUJITA Tomonori
On Fri, Aug 22, 2008 at 11:51:47AM -0700, Luck, Tony wrote:
> > Why not just make rq->cmd always properly aligned in the block layer
> > i.e. by allocating BLK_MAX_CDB + 2 instead of BLK_MAX_CDB for rq->__cmd
> > and then doing ALIGN() when setting rq->cmd in blk_rq_init()?
>
> There are two places that do
>
> if (rq->cmd != rq->__cmd)
> kfree(rq->cmd);
>
> that would need to be adjusted if you did that. Better to get __cmd
> aligned on a good boundary by changing the declaration to
>
> int __cmd[BLK_MAX_CDB / sizeof (int)];
How about long instead of int. int leaves us with the possibility that
something else will expect 8 byte alignment.
> and adding a cast to blk_rq_init():
>
> rq->cmd = (char *)rq->__cmd;
Robin
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 19:39 ` Robin Holt
@ 2008-08-22 20:36 ` Luck, Tony
2008-08-22 20:41 ` Borislav Petkov
` (3 more replies)
0 siblings, 4 replies; 27+ messages in thread
From: Luck, Tony @ 2008-08-22 20:36 UTC (permalink / raw)
To: Robin Holt
Cc: Bartlomiej Zolnierkiewicz, petkovbb@gmail.com,
Nishanth Aravamudan, linux-ia64@vger.kernel.org,
linux-ide@vger.kernel.org, FUJITA Tomonori
> How about long instead of int. int leaves us with the possibility that
> something else will expect 8 byte alignment.
How about this?
Align __cmd to ward off kernel unaligned access consoles messages on
ia64 (and perhaps make an almost imperceptible performance improvement
on other architectures that can handle unaligned access, but do so
more slowly than aligned accesses).
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index e61f22b..a493a4b 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -211,7 +211,7 @@ struct request {
* when request is used as a packet command carrier
*/
unsigned short cmd_len;
- unsigned char __cmd[BLK_MAX_CDB];
+ unsigned char __cmd[BLK_MAX_CDB] __attribute__((aligned(8)));
unsigned char *cmd;
unsigned int data_len;
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 20:36 ` Luck, Tony
@ 2008-08-22 20:41 ` Borislav Petkov
2008-08-22 20:54 ` Borislav Petkov
` (2 subsequent siblings)
3 siblings, 0 replies; 27+ messages in thread
From: Borislav Petkov @ 2008-08-22 20:41 UTC (permalink / raw)
To: Luck, Tony
Cc: Robin Holt, Bartlomiej Zolnierkiewicz, Nishanth Aravamudan,
linux-ia64@vger.kernel.org, linux-ide@vger.kernel.org,
FUJITA Tomonori
On Fri, Aug 22, 2008 at 01:36:06PM -0700, Luck, Tony wrote:
> > How about long instead of int. int leaves us with the possibility that
> > something else will expect 8 byte alignment.
>
> How about this?
>
> Align __cmd to ward off kernel unaligned access consoles messages on
> ia64 (and perhaps make an almost imperceptible performance improvement
> on other architectures that can handle unaligned access, but do so
> more slowly than aligned accesses).
That's probably the best solution for now. Testing...
> Signed-off-by: Tony Luck <tony.luck@intel.com>
>
> ---
>
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index e61f22b..a493a4b 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -211,7 +211,7 @@ struct request {
> * when request is used as a packet command carrier
> */
> unsigned short cmd_len;
> - unsigned char __cmd[BLK_MAX_CDB];
> + unsigned char __cmd[BLK_MAX_CDB] __attribute__((aligned(8)));
> unsigned char *cmd;
>
> unsigned int data_len;
--
Regards/Gruss,
Boris.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 20:36 ` Luck, Tony
2008-08-22 20:41 ` Borislav Petkov
@ 2008-08-22 20:54 ` Borislav Petkov
2008-08-22 21:38 ` Nishanth Aravamudan
2008-08-22 21:14 ` Borislav Petkov
2008-08-22 21:15 ` James Bottomley
3 siblings, 1 reply; 27+ messages in thread
From: Borislav Petkov @ 2008-08-22 20:54 UTC (permalink / raw)
To: Luck, Tony
Cc: Robin Holt, Bartlomiej Zolnierkiewicz, Nishanth Aravamudan,
linux-ia64@vger.kernel.org, linux-ide@vger.kernel.org,
FUJITA Tomonori
On Fri, Aug 22, 2008 at 01:36:06PM -0700, Luck, Tony wrote:
> > How about long instead of int. int leaves us with the possibility that
> > something else will expect 8 byte alignment.
>
> How about this?
>
> Align __cmd to ward off kernel unaligned access consoles messages on
> ia64 (and perhaps make an almost imperceptible performance improvement
> on other architectures that can handle unaligned access, but do so
> more slowly than aligned accesses).
By the way, i've been wondering, this unaligned access breaking should have
happened earlier, how did we miss that? Nish, Robin, can you see that in some
older logs?
--
Regards/Gruss,
Boris.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 20:36 ` Luck, Tony
2008-08-22 20:41 ` Borislav Petkov
2008-08-22 20:54 ` Borislav Petkov
@ 2008-08-22 21:14 ` Borislav Petkov
2008-08-22 23:02 ` Nishanth Aravamudan
2008-08-22 21:15 ` James Bottomley
3 siblings, 1 reply; 27+ messages in thread
From: Borislav Petkov @ 2008-08-22 21:14 UTC (permalink / raw)
To: Luck, Tony
Cc: Robin Holt, Bartlomiej Zolnierkiewicz, Nishanth Aravamudan,
linux-ia64@vger.kernel.org, linux-ide@vger.kernel.org,
FUJITA Tomonori, axboe
[adding Jens to CC: ]
On Fri, Aug 22, 2008 at 01:36:06PM -0700, Luck, Tony wrote:
> > How about long instead of int. int leaves us with the possibility that
> > something else will expect 8 byte alignment.
>
:> How about this?
>
> Align __cmd to ward off kernel unaligned access consoles messages on
> ia64 (and perhaps make an almost imperceptible performance improvement
> on other architectures that can handle unaligned access, but do so
> more slowly than aligned accesses).
>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
Tested-by: Borislav Petkov <petkovbb@gmail.com>
>
> ---
>
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index e61f22b..a493a4b 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -211,7 +211,7 @@ struct request {
> * when request is used as a packet command carrier
> */
> unsigned short cmd_len;
> - unsigned char __cmd[BLK_MAX_CDB];
> + unsigned char __cmd[BLK_MAX_CDB] __attribute__((aligned(8)));
> unsigned char *cmd;
>
> unsigned int data_len;
--
Regards/Gruss,
Boris.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 20:36 ` Luck, Tony
` (2 preceding siblings ...)
2008-08-22 21:14 ` Borislav Petkov
@ 2008-08-22 21:15 ` James Bottomley
2008-08-25 16:31 ` Nishanth Aravamudan
3 siblings, 1 reply; 27+ messages in thread
From: James Bottomley @ 2008-08-22 21:15 UTC (permalink / raw)
To: Luck, Tony
Cc: Robin Holt, Bartlomiej Zolnierkiewicz, petkovbb@gmail.com,
Nishanth Aravamudan, linux-ia64@vger.kernel.org,
linux-ide@vger.kernel.org, FUJITA Tomonori
On Fri, 2008-08-22 at 13:36 -0700, Luck, Tony wrote:
> > How about long instead of int. int leaves us with the possibility that
> > something else will expect 8 byte alignment.
>
> How about this?
>
> Align __cmd to ward off kernel unaligned access consoles messages on
> ia64 (and perhaps make an almost imperceptible performance improvement
> on other architectures that can handle unaligned access, but do so
> more slowly than aligned accesses).
>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
Yuk, really ... you're blowing out the size of a critical structure by
padding which is unnecessary in 99% of cases. Commands are supposed to
be byte streams. Adding extra alignment to generic code because some
driver has strange rules isn't very well layered.
Also, these are string out instructions ... They don't have any
alignment requirements (or they're not supposed to; they're like
memcpy); they're modelled on the x86 instructions
What about this as the obvious solution? It makes the ia64 version of
this command behave exactly as the x86 version does.
James
---
diff --git a/arch/ia64/include/asm/io.h b/arch/ia64/include/asm/io.h
index 260a85a..7f25750 100644
--- a/arch/ia64/include/asm/io.h
+++ b/arch/ia64/include/asm/io.h
@@ -19,6 +19,8 @@
* Copyright (C) 1999 Don Dugger <don.dugger@intel.com>
*/
+#include <asm/unaligned.h>
+
/* We don't use IO slowdowns on the ia64, but.. */
#define __SLOW_DOWN_IO do { } while (0)
#define SLOW_DOWN_IO do { } while (0)
@@ -241,7 +243,7 @@ __insw (unsigned long port, void *dst, unsigned long count)
unsigned short *dp = dst;
while (count--)
- *dp++ = platform_inw(port);
+ put_unaligned(platform_inw(port), dp++);
}
static inline void
@@ -250,7 +252,7 @@ __insl (unsigned long port, void *dst, unsigned long count)
unsigned int *dp = dst;
while (count--)
- *dp++ = platform_inl(port);
+ put_unaligned(platform_inl(port), dp++);
}
static inline void
@@ -268,7 +270,7 @@ __outsw (unsigned long port, const void *src, unsigned long count)
const unsigned short *sp = src;
while (count--)
- platform_outw(*sp++, port);
+ platform_outw(get_unaligned(sp++), port);
}
static inline void
@@ -277,7 +279,7 @@ __outsl (unsigned long port, const void *src, unsigned long count)
const unsigned int *sp = src;
while (count--)
- platform_outl(*sp++, port);
+ platform_outl(get_unaligned(sp++), port);
}
/*
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 20:54 ` Borislav Petkov
@ 2008-08-22 21:38 ` Nishanth Aravamudan
2008-08-22 21:49 ` Borislav Petkov
0 siblings, 1 reply; 27+ messages in thread
From: Nishanth Aravamudan @ 2008-08-22 21:38 UTC (permalink / raw)
To: Borislav Petkov
Cc: Luck, Tony, Robin Holt, Bartlomiej Zolnierkiewicz,
linux-ia64@vger.kernel.org, linux-ide@vger.kernel.org,
FUJITA Tomonori
On 22.08.2008 [22:54:31 +0200], Borislav Petkov wrote:
> On Fri, Aug 22, 2008 at 01:36:06PM -0700, Luck, Tony wrote:
> > > How about long instead of int. int leaves us with the possibility that
> > > something else will expect 8 byte alignment.
> >
> > How about this?
> >
> > Align __cmd to ward off kernel unaligned access consoles messages on
> > ia64 (and perhaps make an almost imperceptible performance improvement
> > on other architectures that can handle unaligned access, but do so
> > more slowly than aligned accesses).
>
> By the way, i've been wondering, this unaligned access breaking should have
> happened earlier, how did we miss that? Nish, Robin, can you see that in some
> older logs?
I replied about this in a separate sub-thread, but you may not have been
on the direct Cc (though linux-ide should have been).
This all began because I noticed one of my automated test machines had
not successfully booted a kernel in some time. I investigated via
bisection and found that CONFIG_PRINTK_TIME=y was broken on my IA64 box.
With Tony and Peter Z's help, that bug was resolved, but then with the
console working, I noticed these unaligned accesses. Sorry if it seemed
like, from my posting, they were a regression, I did not mean to give
that impression.
They may have been there for some time, but I don't have any logs from
kernels before 2.6.27-rc3, because of the CONFIG_PRINTK_TIME=y breakage
(which was being set by default for this box). I could go back and try
older kernels, if you'd like, but it would take some time.
Thanks,
Nish
--
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 21:38 ` Nishanth Aravamudan
@ 2008-08-22 21:49 ` Borislav Petkov
0 siblings, 0 replies; 27+ messages in thread
From: Borislav Petkov @ 2008-08-22 21:49 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: Luck, Tony, Robin Holt, Bartlomiej Zolnierkiewicz,
linux-ia64@vger.kernel.org, linux-ide@vger.kernel.org,
FUJITA Tomonori
On Fri, Aug 22, 2008 at 02:38:12PM -0700, Nishanth Aravamudan wrote:
> On 22.08.2008 [22:54:31 +0200], Borislav Petkov wrote:
> > On Fri, Aug 22, 2008 at 01:36:06PM -0700, Luck, Tony wrote:
> > > > How about long instead of int. int leaves us with the possibility that
> > > > something else will expect 8 byte alignment.
> > >
> > > How about this?
> > >
> > > Align __cmd to ward off kernel unaligned access consoles messages on
> > > ia64 (and perhaps make an almost imperceptible performance improvement
> > > on other architectures that can handle unaligned access, but do so
> > > more slowly than aligned accesses).
> >
> > By the way, i've been wondering, this unaligned access breaking should have
> > happened earlier, how did we miss that? Nish, Robin, can you see that in some
> > older logs?
>
> I replied about this in a separate sub-thread, but you may not have been
> on the direct Cc (though linux-ide should have been).
>
> This all began because I noticed one of my automated test machines had
> not successfully booted a kernel in some time. I investigated via
> bisection and found that CONFIG_PRINTK_TIME=y was broken on my IA64 box.
> With Tony and Peter Z's help, that bug was resolved, but then with the
> console working, I noticed these unaligned accesses. Sorry if it seemed
> like, from my posting, they were a regression, I did not mean to give
> that impression.
>
> They may have been there for some time, but I don't have any logs from
> kernels before 2.6.27-rc3, because of the CONFIG_PRINTK_TIME=y breakage
> (which was being set by default for this box). I could go back and try
> older kernels, if you'd like, but it would take some time.
Thanks for clarifying but it's not needed anymore since we know about the
problem now. I was simply wondering why similar reports didn't appear earlier
since the code that causes it is not that new - I guess there aren't that many
ia64 machines using ide-cd from a recent kernel out there :)
--
Regards/Gruss,
Boris.
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 21:14 ` Borislav Petkov
@ 2008-08-22 23:02 ` Nishanth Aravamudan
2008-08-22 23:30 ` Luck, Tony
0 siblings, 1 reply; 27+ messages in thread
From: Nishanth Aravamudan @ 2008-08-22 23:02 UTC (permalink / raw)
To: Borislav Petkov
Cc: Luck, Tony, Robin Holt, Bartlomiej Zolnierkiewicz,
linux-ia64@vger.kernel.org, linux-ide@vger.kernel.org,
FUJITA Tomonori, axboe
On 22.08.2008 [23:14:47 +0200], Borislav Petkov wrote:
> [adding Jens to CC: ]
>
> On Fri, Aug 22, 2008 at 01:36:06PM -0700, Luck, Tony wrote:
> > > How about long instead of int. int leaves us with the possibility that
> > > something else will expect 8 byte alignment.
> >
> :> How about this?
> >
> > Align __cmd to ward off kernel unaligned access consoles messages on
> > ia64 (and perhaps make an almost imperceptible performance improvement
> > on other architectures that can handle unaligned access, but do so
> > more slowly than aligned accesses).
> >
> > Signed-off-by: Tony Luck <tony.luck@intel.com>
>
> Tested-by: Borislav Petkov <petkovbb@gmail.com>
Tested-by: Nishanth Aravamudan <nacc@us.ibm.com>
Thanks,
Nish
--
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 27+ messages in thread
* RE: kernel unaligned accesses on IA64 in IDE
2008-08-22 23:02 ` Nishanth Aravamudan
@ 2008-08-22 23:30 ` Luck, Tony
2008-08-22 23:33 ` James Bottomley
0 siblings, 1 reply; 27+ messages in thread
From: Luck, Tony @ 2008-08-22 23:30 UTC (permalink / raw)
To: Nishanth Aravamudan, Borislav Petkov
Cc: Robin Holt, Bartlomiej Zolnierkiewicz, linux-ia64@vger.kernel.org,
linux-ide@vger.kernel.org, FUJITA Tomonori, axboe@kernel.dk,
James Bottomley
> > > Signed-off-by: Tony Luck <tony.luck@intel.com>
> >
> > Tested-by: Borislav Petkov <petkovbb@gmail.com>
>
> Tested-by: Nishanth Aravamudan <nacc@us.ibm.com>
Thanks guys for testing my crappy patch ... if you could test
James Bottomley's much better one, that would be wonderful.
My kernel boots ok with James' patch applied ... but I
don't get the unaligned kernel references (no ide-cd drive
on my box ... so I'm probably not executing any of these
code paths).
James: there's no Signed-off-by on your patch.
-Tony
^ permalink raw reply [flat|nested] 27+ messages in thread
* RE: kernel unaligned accesses on IA64 in IDE
2008-08-22 23:30 ` Luck, Tony
@ 2008-08-22 23:33 ` James Bottomley
0 siblings, 0 replies; 27+ messages in thread
From: James Bottomley @ 2008-08-22 23:33 UTC (permalink / raw)
To: Luck, Tony
Cc: Nishanth Aravamudan, Borislav Petkov, Robin Holt,
Bartlomiej Zolnierkiewicz, linux-ia64@vger.kernel.org,
linux-ide@vger.kernel.org, FUJITA Tomonori, axboe@kernel.dk
On Fri, 2008-08-22 at 16:30 -0700, Luck, Tony wrote:
> > > > Signed-off-by: Tony Luck <tony.luck@intel.com>
> > >
> > > Tested-by: Borislav Petkov <petkovbb@gmail.com>
> >
> > Tested-by: Nishanth Aravamudan <nacc@us.ibm.com>
>
> Thanks guys for testing my crappy patch ... if you could test
> James Bottomley's much better one, that would be wonderful.
> My kernel boots ok with James' patch applied ... but I
> don't get the unaligned kernel references (no ide-cd drive
> on my box ... so I'm probably not executing any of these
> code paths).
>
> James: there's no Signed-off-by on your patch.
I'm too used to adding one when I pull it in to my git tree, sorry.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
James
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: kernel unaligned accesses on IA64 in IDE
2008-08-22 21:15 ` James Bottomley
@ 2008-08-25 16:31 ` Nishanth Aravamudan
0 siblings, 0 replies; 27+ messages in thread
From: Nishanth Aravamudan @ 2008-08-25 16:31 UTC (permalink / raw)
To: James Bottomley
Cc: Luck, Tony, Robin Holt, Bartlomiej Zolnierkiewicz,
petkovbb@gmail.com, linux-ia64@vger.kernel.org,
linux-ide@vger.kernel.org, FUJITA Tomonori
On 22.08.2008 [16:15:22 -0500], James Bottomley wrote:
> On Fri, 2008-08-22 at 13:36 -0700, Luck, Tony wrote:
> > > How about long instead of int. int leaves us with the possibility that
> > > something else will expect 8 byte alignment.
> >
> > How about this?
> >
> > Align __cmd to ward off kernel unaligned access consoles messages on
> > ia64 (and perhaps make an almost imperceptible performance improvement
> > on other architectures that can handle unaligned access, but do so
> > more slowly than aligned accesses).
> >
> > Signed-off-by: Tony Luck <tony.luck@intel.com>
>
> Yuk, really ... you're blowing out the size of a critical structure by
> padding which is unnecessary in 99% of cases. Commands are supposed to
> be byte streams. Adding extra alignment to generic code because some
> driver has strange rules isn't very well layered.
>
> Also, these are string out instructions ... They don't have any
> alignment requirements (or they're not supposed to; they're like
> memcpy); they're modelled on the x86 instructions
>
> What about this as the obvious solution? It makes the ia64 version of
> this command behave exactly as the x86 version does.
>
> James
Tested-by: Nishanth Aravamudan <nacc@us.ibm.com>
Thanks,
Nish
--
Nishanth Aravamudan <nacc@us.ibm.com>
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 27+ messages in thread
end of thread, other threads:[~2008-08-25 16:31 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-19 22:56 kernel unaligned accesses on IA64 in IDE Nishanth Aravamudan
2008-08-20 1:39 ` Peter Chubb
2008-08-21 21:28 ` Nishanth Aravamudan
2008-08-20 14:35 ` Robin Holt
2008-08-21 21:31 ` Nishanth Aravamudan
2008-08-21 21:54 ` Robin Holt
2008-08-22 0:39 ` Nishanth Aravamudan
2008-08-22 1:11 ` Robin Holt
2008-08-22 16:45 ` Nishanth Aravamudan
2008-08-22 10:15 ` Bartlomiej Zolnierkiewicz
2008-08-22 10:55 ` Boris Petkov
2008-08-22 16:45 ` Nishanth Aravamudan
2008-08-22 17:29 ` Boris Petkov
2008-08-22 18:36 ` Bartlomiej Zolnierkiewicz
2008-08-22 18:51 ` Luck, Tony
2008-08-22 19:39 ` Robin Holt
2008-08-22 20:36 ` Luck, Tony
2008-08-22 20:41 ` Borislav Petkov
2008-08-22 20:54 ` Borislav Petkov
2008-08-22 21:38 ` Nishanth Aravamudan
2008-08-22 21:49 ` Borislav Petkov
2008-08-22 21:14 ` Borislav Petkov
2008-08-22 23:02 ` Nishanth Aravamudan
2008-08-22 23:30 ` Luck, Tony
2008-08-22 23:33 ` James Bottomley
2008-08-22 21:15 ` James Bottomley
2008-08-25 16:31 ` Nishanth Aravamudan
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).