Merge commit 'origin/master' into next
This commit is contained in:
commit
f480fe3916
|
@ -23,16 +23,14 @@ it does support include:
|
|||
|
||||
(*) Security (currently only AFS kaserver and KerberosIV tickets).
|
||||
|
||||
(*) File reading.
|
||||
(*) File reading and writing.
|
||||
|
||||
(*) Automounting.
|
||||
|
||||
(*) Local caching (via fscache).
|
||||
|
||||
It does not yet support the following AFS features:
|
||||
|
||||
(*) Write support.
|
||||
|
||||
(*) Local caching.
|
||||
|
||||
(*) pioctl() system call.
|
||||
|
||||
|
||||
|
@ -56,7 +54,7 @@ They permit the debugging messages to be turned on dynamically by manipulating
|
|||
the masks in the following files:
|
||||
|
||||
/sys/module/af_rxrpc/parameters/debug
|
||||
/sys/module/afs/parameters/debug
|
||||
/sys/module/kafs/parameters/debug
|
||||
|
||||
|
||||
=====
|
||||
|
@ -66,9 +64,9 @@ USAGE
|
|||
When inserting the driver modules the root cell must be specified along with a
|
||||
list of volume location server IP addresses:
|
||||
|
||||
insmod af_rxrpc.o
|
||||
insmod rxkad.o
|
||||
insmod kafs.o rootcell=cambridge.redhat.com:172.16.18.73:172.16.18.91
|
||||
modprobe af_rxrpc
|
||||
modprobe rxkad
|
||||
modprobe kafs rootcell=cambridge.redhat.com:172.16.18.73:172.16.18.91
|
||||
|
||||
The first module is the AF_RXRPC network protocol driver. This provides the
|
||||
RxRPC remote operation protocol and may also be accessed from userspace. See:
|
||||
|
@ -81,7 +79,7 @@ is the actual filesystem driver for the AFS filesystem.
|
|||
Once the module has been loaded, more modules can be added by the following
|
||||
procedure:
|
||||
|
||||
echo add grand.central.org 18.7.14.88:128.2.191.224 >/proc/fs/afs/cells
|
||||
echo add grand.central.org 18.9.48.14:128.2.203.61:130.237.48.87 >/proc/fs/afs/cells
|
||||
|
||||
Where the parameters to the "add" command are the name of a cell and a list of
|
||||
volume location servers within that cell, with the latter separated by colons.
|
||||
|
@ -101,7 +99,7 @@ The name of the volume can be suffixes with ".backup" or ".readonly" to
|
|||
specify connection to only volumes of those types.
|
||||
|
||||
The name of the cell is optional, and if not given during a mount, then the
|
||||
named volume will be looked up in the cell specified during insmod.
|
||||
named volume will be looked up in the cell specified during modprobe.
|
||||
|
||||
Additional cells can be added through /proc (see later section).
|
||||
|
||||
|
@ -163,14 +161,14 @@ THE CELL DATABASE
|
|||
|
||||
The filesystem maintains an internal database of all the cells it knows and the
|
||||
IP addresses of the volume location servers for those cells. The cell to which
|
||||
the system belongs is added to the database when insmod is performed by the
|
||||
the system belongs is added to the database when modprobe is performed by the
|
||||
"rootcell=" argument or, if compiled in, using a "kafs.rootcell=" argument on
|
||||
the kernel command line.
|
||||
|
||||
Further cells can be added by commands similar to the following:
|
||||
|
||||
echo add CELLNAME VLADDR[:VLADDR][:VLADDR]... >/proc/fs/afs/cells
|
||||
echo add grand.central.org 18.7.14.88:128.2.191.224 >/proc/fs/afs/cells
|
||||
echo add grand.central.org 18.9.48.14:128.2.203.61:130.237.48.87 >/proc/fs/afs/cells
|
||||
|
||||
No other cell database operations are available at this time.
|
||||
|
||||
|
@ -233,7 +231,7 @@ insmod /tmp/kafs.o rootcell=cambridge.redhat.com:172.16.18.91
|
|||
mount -t afs \%root.afs. /afs
|
||||
mount -t afs \%cambridge.redhat.com:root.cell. /afs/cambridge.redhat.com/
|
||||
|
||||
echo add grand.central.org 18.7.14.88:128.2.191.224 > /proc/fs/afs/cells
|
||||
echo add grand.central.org 18.9.48.14:128.2.203.61:130.237.48.87 > /proc/fs/afs/cells
|
||||
mount -t afs "#grand.central.org:root.cell." /afs/grand.central.org/
|
||||
mount -t afs "#grand.central.org:root.archive." /afs/grand.central.org/archive
|
||||
mount -t afs "#grand.central.org:root.contrib." /afs/grand.central.org/contrib
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 31
|
||||
EXTRAVERSION = -rc6
|
||||
EXTRAVERSION = -rc7
|
||||
NAME = Man-Eating Seals of Antiquity
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
@ -629,7 +629,7 @@ CONFIG_SCSI_LOWLEVEL=y
|
|||
CONFIG_ATA=y
|
||||
# CONFIG_ATA_NONSTANDARD is not set
|
||||
CONFIG_SATA_PMP=y
|
||||
# CONFIG_SATA_AHCI is not set
|
||||
CONFIG_SATA_AHCI=y
|
||||
# CONFIG_SATA_SIL24 is not set
|
||||
CONFIG_ATA_SFF=y
|
||||
# CONFIG_SATA_SVW is not set
|
||||
|
|
|
@ -206,6 +206,15 @@ static void __init qnap_ts219_init(void)
|
|||
|
||||
}
|
||||
|
||||
static int __init ts219_pci_init(void)
|
||||
{
|
||||
if (machine_is_ts219())
|
||||
kirkwood_pcie_init();
|
||||
|
||||
return 0;
|
||||
}
|
||||
subsys_initcall(ts219_pci_init);
|
||||
|
||||
MACHINE_START(TS219, "QNAP TS-119/TS-219")
|
||||
/* Maintainer: Martin Michlmayr <tbm@cyrius.com> */
|
||||
.phys_io = KIRKWOOD_REGS_PHYS_BASE,
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#ifndef __PLAT_GPIO_H
|
||||
#define __PLAT_GPIO_H
|
||||
|
||||
#include <linux/init.h>
|
||||
|
||||
/*
|
||||
* GENERIC_GPIO primitives.
|
||||
*/
|
||||
|
|
|
@ -72,6 +72,10 @@ static struct ads7846_platform_data ads7843_data = {
|
|||
.debounce_max = 20,
|
||||
.debounce_rep = 4,
|
||||
.debounce_tol = 5,
|
||||
|
||||
.keep_vref_on = true,
|
||||
.settle_delay_usecs = 500,
|
||||
.penirq_recheck_delay_usecs = 100,
|
||||
};
|
||||
|
||||
static struct spi_board_info __initdata spi1_board_info[] = {
|
||||
|
|
|
@ -24,8 +24,8 @@ memcpy:
|
|||
brne 1f
|
||||
|
||||
/* At this point, "from" is word-aligned */
|
||||
2: sub r10, 4
|
||||
mov r9, r12
|
||||
2: mov r9, r12
|
||||
5: sub r10, 4
|
||||
brlt 4f
|
||||
|
||||
3: ld.w r8, r11++
|
||||
|
@ -49,6 +49,7 @@ memcpy:
|
|||
|
||||
/* Handle unaligned "from" pointer */
|
||||
1: sub r10, 4
|
||||
movlt r9, r12
|
||||
brlt 4b
|
||||
add r10, r9
|
||||
lsl r9, 2
|
||||
|
@ -59,4 +60,13 @@ memcpy:
|
|||
st.b r12++, r8
|
||||
ld.ub r8, r11++
|
||||
st.b r12++, r8
|
||||
rjmp 2b
|
||||
mov r8, r12
|
||||
add pc, pc, r9
|
||||
sub r8, 1
|
||||
nop
|
||||
sub r8, 1
|
||||
nop
|
||||
sub r8, 1
|
||||
nop
|
||||
mov r9, r8
|
||||
rjmp 5b
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.30-rc6
|
||||
# Fri May 22 10:02:33 2009
|
||||
# Linux kernel version: 2.6.31-rc6
|
||||
# Tue Aug 18 11:00:02 2009
|
||||
#
|
||||
CONFIG_MICROBLAZE=y
|
||||
# CONFIG_SWAP is not set
|
||||
|
@ -18,7 +18,11 @@ CONFIG_GENERIC_TIME=y
|
|||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
|
||||
CONFIG_GENERIC_GPIO=y
|
||||
CONFIG_GENERIC_CSUM=y
|
||||
# CONFIG_PCI is not set
|
||||
CONFIG_NO_DMA=y
|
||||
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
|
||||
CONFIG_CONSTRUCTORS=y
|
||||
|
||||
#
|
||||
# General setup
|
||||
|
@ -59,8 +63,8 @@ CONFIG_INITRAMFS_ROOT_GID=0
|
|||
CONFIG_RD_GZIP=y
|
||||
# CONFIG_RD_BZIP2 is not set
|
||||
# CONFIG_RD_LZMA is not set
|
||||
CONFIG_INITRAMFS_COMPRESSION_NONE=y
|
||||
# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
|
||||
# CONFIG_INITRAMFS_COMPRESSION_NONE is not set
|
||||
CONFIG_INITRAMFS_COMPRESSION_GZIP=y
|
||||
# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
|
||||
# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
|
@ -71,7 +75,6 @@ CONFIG_SYSCTL_SYSCALL=y
|
|||
CONFIG_KALLSYMS=y
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_KALLSYMS_EXTRA_PASS=y
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
# CONFIG_HOTPLUG is not set
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_BUG=y
|
||||
|
@ -84,13 +87,22 @@ CONFIG_TIMERFD=y
|
|||
CONFIG_EVENTFD=y
|
||||
# CONFIG_SHMEM is not set
|
||||
CONFIG_AIO=y
|
||||
|
||||
#
|
||||
# Performance Counters
|
||||
#
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_COMPAT_BRK=y
|
||||
CONFIG_SLAB=y
|
||||
# CONFIG_SLUB is not set
|
||||
# CONFIG_SLOB is not set
|
||||
# CONFIG_PROFILING is not set
|
||||
# CONFIG_MARKERS is not set
|
||||
|
||||
#
|
||||
# GCOV-based kernel profiling
|
||||
#
|
||||
# CONFIG_SLOW_WORK is not set
|
||||
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
|
||||
CONFIG_SLABINFO=y
|
||||
|
@ -102,7 +114,7 @@ CONFIG_MODULE_UNLOAD=y
|
|||
# CONFIG_MODVERSIONS is not set
|
||||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
CONFIG_BLOCK=y
|
||||
# CONFIG_LBD is not set
|
||||
CONFIG_LBDAF=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_BLK_DEV_INTEGRITY is not set
|
||||
|
||||
|
@ -194,9 +206,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
|
|||
# CONFIG_PHYS_ADDR_T_64BIT is not set
|
||||
CONFIG_ZONE_DMA_FLAG=0
|
||||
CONFIG_VIRT_TO_BUS=y
|
||||
CONFIG_UNEVICTABLE_LRU=y
|
||||
CONFIG_HAVE_MLOCK=y
|
||||
CONFIG_HAVE_MLOCKED_PAGE_BIT=y
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
|
||||
|
||||
#
|
||||
# Exectuable file formats
|
||||
|
@ -262,6 +274,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
|
|||
# CONFIG_ECONET is not set
|
||||
# CONFIG_WAN_ROUTER is not set
|
||||
# CONFIG_PHONET is not set
|
||||
# CONFIG_IEEE802154 is not set
|
||||
# CONFIG_NET_SCHED is not set
|
||||
# CONFIG_DCB is not set
|
||||
|
||||
|
@ -325,7 +338,6 @@ CONFIG_MISC_DEVICES=y
|
|||
# CONFIG_ATA is not set
|
||||
# CONFIG_MD is not set
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_COMPAT_NET_DEV_OPS=y
|
||||
# CONFIG_DUMMY is not set
|
||||
# CONFIG_BONDING is not set
|
||||
# CONFIG_MACVLAN is not set
|
||||
|
@ -344,7 +356,7 @@ CONFIG_NET_ETHERNET=y
|
|||
# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
|
||||
# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
|
||||
# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
|
||||
# CONFIG_B44 is not set
|
||||
# CONFIG_KS8842 is not set
|
||||
CONFIG_NETDEV_1000=y
|
||||
CONFIG_NETDEV_10000=y
|
||||
|
||||
|
@ -410,6 +422,11 @@ CONFIG_LEGACY_PTY_COUNT=256
|
|||
# CONFIG_TCG_TPM is not set
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_SPI is not set
|
||||
|
||||
#
|
||||
# PPS support
|
||||
#
|
||||
# CONFIG_PPS is not set
|
||||
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
|
||||
# CONFIG_GPIOLIB is not set
|
||||
# CONFIG_W1 is not set
|
||||
|
@ -418,12 +435,6 @@ CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
|
|||
# CONFIG_THERMAL is not set
|
||||
# CONFIG_THERMAL_HWMON is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
CONFIG_SSB_POSSIBLE=y
|
||||
|
||||
#
|
||||
# Sonics Silicon Backplane
|
||||
#
|
||||
# CONFIG_SSB is not set
|
||||
|
||||
#
|
||||
# Multifunction device drivers
|
||||
|
@ -433,22 +444,7 @@ CONFIG_SSB_POSSIBLE=y
|
|||
# CONFIG_HTC_PASIC3 is not set
|
||||
# CONFIG_MFD_TMIO is not set
|
||||
# CONFIG_REGULATOR 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
|
||||
# CONFIG_MEDIA_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Graphics support
|
||||
|
@ -469,9 +465,12 @@ CONFIG_SSB_POSSIBLE=y
|
|||
# CONFIG_NEW_LEDS is not set
|
||||
# CONFIG_ACCESSIBILITY is not set
|
||||
# CONFIG_RTC_CLASS is not set
|
||||
# CONFIG_DMADEVICES is not set
|
||||
# CONFIG_AUXDISPLAY is not set
|
||||
# CONFIG_UIO is not set
|
||||
|
||||
#
|
||||
# TI VLYNQ
|
||||
#
|
||||
# CONFIG_STAGING is not set
|
||||
|
||||
#
|
||||
|
@ -485,12 +484,15 @@ CONFIG_EXT2_FS=y
|
|||
# CONFIG_REISERFS_FS is not set
|
||||
# CONFIG_JFS_FS is not set
|
||||
# CONFIG_FS_POSIX_ACL is not set
|
||||
CONFIG_FILE_LOCKING=y
|
||||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_GFS2_FS is not set
|
||||
# CONFIG_OCFS2_FS is not set
|
||||
# CONFIG_BTRFS_FS is not set
|
||||
CONFIG_FILE_LOCKING=y
|
||||
CONFIG_FSNOTIFY=y
|
||||
# CONFIG_DNOTIFY is not set
|
||||
# CONFIG_INOTIFY is not set
|
||||
CONFIG_INOTIFY_USER=y
|
||||
# CONFIG_QUOTA is not set
|
||||
# CONFIG_AUTOFS_FS is not set
|
||||
# CONFIG_AUTOFS4_FS is not set
|
||||
|
@ -678,6 +680,7 @@ CONFIG_DEBUG_INFO=y
|
|||
# CONFIG_SYSCTL_SYSCALL_CHECK is not set
|
||||
# CONFIG_PAGE_POISONING is not set
|
||||
# CONFIG_SAMPLES is not set
|
||||
# CONFIG_KMEMCHECK is not set
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_HEART_BEAT=y
|
||||
CONFIG_DEBUG_BOOTMEM=y
|
||||
|
@ -793,6 +796,5 @@ CONFIG_ZLIB_INFLATE=y
|
|||
CONFIG_DECOMPRESS_GZIP=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAVE_LMB=y
|
||||
CONFIG_NLATTR=y
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.30-rc5
|
||||
# Mon May 11 09:01:02 2009
|
||||
# Linux kernel version: 2.6.31-rc6
|
||||
# Tue Aug 18 10:35:30 2009
|
||||
#
|
||||
CONFIG_MICROBLAZE=y
|
||||
# CONFIG_SWAP is not set
|
||||
|
@ -17,9 +17,12 @@ CONFIG_GENERIC_TIME=y
|
|||
# CONFIG_GENERIC_TIME_VSYSCALL is not set
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
|
||||
CONFIG_GENERIC_GPIO=y
|
||||
CONFIG_GENERIC_CSUM=y
|
||||
# CONFIG_PCI is not set
|
||||
# CONFIG_NO_DMA is not set
|
||||
CONFIG_NO_DMA=y
|
||||
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
|
||||
CONFIG_CONSTRUCTORS=y
|
||||
|
||||
#
|
||||
# General setup
|
||||
|
@ -64,7 +67,6 @@ CONFIG_SYSCTL_SYSCALL=y
|
|||
CONFIG_KALLSYMS=y
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_KALLSYMS_EXTRA_PASS=y
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
# CONFIG_HOTPLUG is not set
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_BUG=y
|
||||
|
@ -76,13 +78,23 @@ CONFIG_SIGNALFD=y
|
|||
CONFIG_TIMERFD=y
|
||||
CONFIG_EVENTFD=y
|
||||
CONFIG_AIO=y
|
||||
|
||||
#
|
||||
# Performance Counters
|
||||
#
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_COMPAT_BRK=y
|
||||
CONFIG_SLAB=y
|
||||
# CONFIG_SLUB is not set
|
||||
# CONFIG_SLOB is not set
|
||||
# CONFIG_PROFILING is not set
|
||||
# CONFIG_MARKERS is not set
|
||||
|
||||
#
|
||||
# GCOV-based kernel profiling
|
||||
#
|
||||
# CONFIG_GCOV_KERNEL is not set
|
||||
# CONFIG_SLOW_WORK is not set
|
||||
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
|
||||
CONFIG_SLABINFO=y
|
||||
|
@ -95,7 +107,7 @@ CONFIG_MODULE_UNLOAD=y
|
|||
# CONFIG_MODVERSIONS is not set
|
||||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
CONFIG_BLOCK=y
|
||||
# CONFIG_LBD is not set
|
||||
CONFIG_LBDAF=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_BLK_DEV_INTEGRITY is not set
|
||||
|
||||
|
@ -156,8 +168,16 @@ CONFIG_CMDLINE_BOOL=y
|
|||
CONFIG_CMDLINE="console=ttyUL0,115200"
|
||||
# CONFIG_CMDLINE_FORCE is not set
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_DEVICE=y
|
||||
CONFIG_PROC_DEVICETREE=y
|
||||
|
||||
#
|
||||
# Advanced setup
|
||||
#
|
||||
|
||||
#
|
||||
# Default settings for advanced configuration options are used
|
||||
#
|
||||
CONFIG_KERNEL_START=0x90000000
|
||||
CONFIG_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_FLATMEM_MANUAL=y
|
||||
# CONFIG_DISCONTIGMEM_MANUAL is not set
|
||||
|
@ -169,7 +189,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
|
|||
# CONFIG_PHYS_ADDR_T_64BIT is not set
|
||||
CONFIG_ZONE_DMA_FLAG=0
|
||||
CONFIG_VIRT_TO_BUS=y
|
||||
CONFIG_UNEVICTABLE_LRU=y
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
|
||||
CONFIG_NOMMU_INITIAL_TRIM_EXCESS=1
|
||||
|
||||
#
|
||||
|
@ -237,6 +257,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
|
|||
# CONFIG_ECONET is not set
|
||||
# CONFIG_WAN_ROUTER is not set
|
||||
# CONFIG_PHONET is not set
|
||||
# CONFIG_IEEE802154 is not set
|
||||
# CONFIG_NET_SCHED is not set
|
||||
# CONFIG_DCB is not set
|
||||
|
||||
|
@ -254,7 +275,11 @@ CONFIG_WIRELESS=y
|
|||
CONFIG_WIRELESS_OLD_REGULATORY=y
|
||||
# CONFIG_WIRELESS_EXT is not set
|
||||
# CONFIG_LIB80211 is not set
|
||||
# CONFIG_MAC80211 is not set
|
||||
|
||||
#
|
||||
# CFG80211 needs to be enabled for MAC80211
|
||||
#
|
||||
CONFIG_MAC80211_DEFAULT_PS_VALUE=0
|
||||
# CONFIG_WIMAX is not set
|
||||
# CONFIG_RFKILL is not set
|
||||
# CONFIG_NET_9P is not set
|
||||
|
@ -353,6 +378,7 @@ CONFIG_MTD_UCLINUX=y
|
|||
# UBI - Unsorted block images
|
||||
#
|
||||
# CONFIG_MTD_UBI is not set
|
||||
CONFIG_OF_DEVICE=y
|
||||
# CONFIG_PARPORT is not set
|
||||
CONFIG_BLK_DEV=y
|
||||
# CONFIG_BLK_DEV_COW_COMMON is not set
|
||||
|
@ -364,6 +390,7 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
|
|||
# CONFIG_BLK_DEV_XIP is not set
|
||||
# CONFIG_CDROM_PKTCDVD is not set
|
||||
# CONFIG_ATA_OVER_ETH is not set
|
||||
# CONFIG_XILINX_SYSACE is not set
|
||||
CONFIG_MISC_DEVICES=y
|
||||
# CONFIG_ENCLOSURE_SERVICES is not set
|
||||
# CONFIG_C2PORT is not set
|
||||
|
@ -383,7 +410,6 @@ CONFIG_MISC_DEVICES=y
|
|||
# CONFIG_ATA is not set
|
||||
# CONFIG_MD is not set
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_COMPAT_NET_DEV_OPS=y
|
||||
# CONFIG_DUMMY is not set
|
||||
# CONFIG_BONDING is not set
|
||||
# CONFIG_MACVLAN is not set
|
||||
|
@ -402,7 +428,7 @@ CONFIG_NET_ETHERNET=y
|
|||
# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
|
||||
# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
|
||||
# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
|
||||
# CONFIG_B44 is not set
|
||||
# CONFIG_KS8842 is not set
|
||||
CONFIG_NETDEV_1000=y
|
||||
CONFIG_NETDEV_10000=y
|
||||
|
||||
|
@ -463,23 +489,25 @@ CONFIG_HW_RANDOM=y
|
|||
# CONFIG_HW_RANDOM_TIMERIOMEM is not set
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_GEN_RTC is not set
|
||||
# CONFIG_XILINX_HWICAP is not set
|
||||
# CONFIG_R3964 is not set
|
||||
# CONFIG_RAW_DRIVER is not set
|
||||
# CONFIG_TCG_TPM is not set
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_SPI is not set
|
||||
|
||||
#
|
||||
# PPS support
|
||||
#
|
||||
# CONFIG_PPS is not set
|
||||
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
|
||||
# CONFIG_GPIOLIB is not set
|
||||
# CONFIG_W1 is not set
|
||||
# CONFIG_POWER_SUPPLY is not set
|
||||
# CONFIG_HWMON is not set
|
||||
# CONFIG_THERMAL is not set
|
||||
# CONFIG_THERMAL_HWMON is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
CONFIG_SSB_POSSIBLE=y
|
||||
|
||||
#
|
||||
# Sonics Silicon Backplane
|
||||
#
|
||||
# CONFIG_SSB is not set
|
||||
|
||||
#
|
||||
# Multifunction device drivers
|
||||
|
@ -489,22 +517,7 @@ CONFIG_SSB_POSSIBLE=y
|
|||
# CONFIG_HTC_PASIC3 is not set
|
||||
# CONFIG_MFD_TMIO is not set
|
||||
# CONFIG_REGULATOR 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=y
|
||||
# CONFIG_MEDIA_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Graphics support
|
||||
|
@ -520,9 +533,10 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
|
|||
# CONFIG_DISPLAY_SUPPORT is not set
|
||||
# CONFIG_SOUND is not set
|
||||
CONFIG_USB_SUPPORT=y
|
||||
# CONFIG_USB_ARCH_HAS_HCD is not set
|
||||
CONFIG_USB_ARCH_HAS_HCD=y
|
||||
# CONFIG_USB_ARCH_HAS_OHCI is not set
|
||||
# CONFIG_USB_ARCH_HAS_EHCI is not set
|
||||
# CONFIG_USB is not set
|
||||
# CONFIG_USB_OTG_WHITELIST is not set
|
||||
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
|
||||
|
||||
|
@ -543,9 +557,12 @@ CONFIG_USB_SUPPORT=y
|
|||
# CONFIG_NEW_LEDS is not set
|
||||
# CONFIG_ACCESSIBILITY is not set
|
||||
# CONFIG_RTC_CLASS is not set
|
||||
# CONFIG_DMADEVICES is not set
|
||||
# CONFIG_AUXDISPLAY is not set
|
||||
# CONFIG_UIO is not set
|
||||
|
||||
#
|
||||
# TI VLYNQ
|
||||
#
|
||||
# CONFIG_STAGING is not set
|
||||
|
||||
#
|
||||
|
@ -558,12 +575,15 @@ CONFIG_EXT2_FS=y
|
|||
# CONFIG_REISERFS_FS is not set
|
||||
# CONFIG_JFS_FS is not set
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_FILE_LOCKING=y
|
||||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_GFS2_FS is not set
|
||||
# CONFIG_OCFS2_FS is not set
|
||||
# CONFIG_BTRFS_FS is not set
|
||||
CONFIG_FILE_LOCKING=y
|
||||
CONFIG_FSNOTIFY=y
|
||||
# CONFIG_DNOTIFY is not set
|
||||
# CONFIG_INOTIFY is not set
|
||||
CONFIG_INOTIFY_USER=y
|
||||
# CONFIG_QUOTA is not set
|
||||
# CONFIG_AUTOFS_FS is not set
|
||||
# CONFIG_AUTOFS4_FS is not set
|
||||
|
@ -813,6 +833,5 @@ CONFIG_GENERIC_FIND_LAST_BIT=y
|
|||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAVE_LMB=y
|
||||
CONFIG_NLATTR=y
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
/* should be defined in each interrupt controller driver */
|
||||
extern unsigned int get_irq(struct pt_regs *regs);
|
||||
|
||||
#define ack_bad_irq ack_bad_irq
|
||||
void ack_bad_irq(unsigned int irq);
|
||||
#include <asm-generic/hardirq.h>
|
||||
|
||||
#endif /* _ASM_MICROBLAZE_HARDIRQ_H */
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <linux/irq.h>
|
||||
#include <asm/page.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/bug.h>
|
||||
|
||||
#include <asm/prom.h>
|
||||
#include <asm/irq.h>
|
||||
|
@ -130,6 +131,7 @@ void __init init_IRQ(void)
|
|||
if (intc)
|
||||
break;
|
||||
}
|
||||
BUG_ON(!intc);
|
||||
|
||||
intc_baseaddr = *(int *) of_get_property(intc, "reg", NULL);
|
||||
intc_baseaddr = (unsigned long) ioremap(intc_baseaddr, PAGE_SIZE);
|
||||
|
|
|
@ -30,15 +30,6 @@ unsigned int irq_of_parse_and_map(struct device_node *dev, int index)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(irq_of_parse_and_map);
|
||||
|
||||
/*
|
||||
* 'what should we do if we get a hw irq event on an illegal vector'.
|
||||
* each architecture has to answer this themselves.
|
||||
*/
|
||||
void ack_bad_irq(unsigned int irq)
|
||||
{
|
||||
printk(KERN_WARNING "unexpected IRQ trap at vector %02x\n", irq);
|
||||
}
|
||||
|
||||
static u32 concurrent_irq;
|
||||
|
||||
void do_IRQ(struct pt_regs *regs)
|
||||
|
|
|
@ -313,7 +313,7 @@ ENTRY(sys_call_table)
|
|||
.long sys_fchmodat
|
||||
.long sys_faccessat
|
||||
.long sys_ni_syscall /* pselect6 */
|
||||
.long sys_ni_syscall /* sys_ppoll */
|
||||
.long sys_ppoll
|
||||
.long sys_unshare /* 310 */
|
||||
.long sys_set_robust_list
|
||||
.long sys_get_robust_list
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <linux/clocksource.h>
|
||||
#include <linux/clockchips.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/bug.h>
|
||||
#include <asm/cpuinfo.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/prom.h>
|
||||
|
@ -234,6 +235,7 @@ void __init time_init(void)
|
|||
if (timer)
|
||||
break;
|
||||
}
|
||||
BUG_ON(!timer);
|
||||
|
||||
timer_baseaddr = *(int *) of_get_property(timer, "reg", NULL);
|
||||
timer_baseaddr = (unsigned long) ioremap(timer_baseaddr, PAGE_SIZE);
|
||||
|
|
|
@ -130,13 +130,13 @@ void __init setup_memory(void)
|
|||
* (in case the address isn't page-aligned).
|
||||
*/
|
||||
#ifndef CONFIG_MMU
|
||||
map_size = init_bootmem_node(NODE_DATA(0), PFN_UP(TOPHYS((u32)_end)),
|
||||
map_size = init_bootmem_node(NODE_DATA(0), PFN_UP(TOPHYS((u32)klimit)),
|
||||
min_low_pfn, max_low_pfn);
|
||||
#else
|
||||
map_size = init_bootmem_node(&contig_page_data,
|
||||
PFN_UP(TOPHYS((u32)_end)), min_low_pfn, max_low_pfn);
|
||||
PFN_UP(TOPHYS((u32)klimit)), min_low_pfn, max_low_pfn);
|
||||
#endif
|
||||
lmb_reserve(PFN_UP(TOPHYS((u32)_end)) << PAGE_SHIFT, map_size);
|
||||
lmb_reserve(PFN_UP(TOPHYS((u32)klimit)) << PAGE_SHIFT, map_size);
|
||||
|
||||
/* free bootmem is whole main memory */
|
||||
free_bootmem(memory_start, memory_size);
|
||||
|
|
|
@ -154,6 +154,20 @@ static int __init condev_setup(char *str)
|
|||
|
||||
__setup("condev=", condev_setup);
|
||||
|
||||
static void __init set_preferred_console(void)
|
||||
{
|
||||
if (MACHINE_IS_KVM) {
|
||||
add_preferred_console("hvc", 0, NULL);
|
||||
s390_virtio_console_init();
|
||||
return;
|
||||
}
|
||||
|
||||
if (CONSOLE_IS_3215 || CONSOLE_IS_SCLP)
|
||||
add_preferred_console("ttyS", 0, NULL);
|
||||
if (CONSOLE_IS_3270)
|
||||
add_preferred_console("tty3270", 0, NULL);
|
||||
}
|
||||
|
||||
static int __init conmode_setup(char *str)
|
||||
{
|
||||
#if defined(CONFIG_SCLP_CONSOLE) || defined(CONFIG_SCLP_VT220_CONSOLE)
|
||||
|
@ -168,6 +182,7 @@ static int __init conmode_setup(char *str)
|
|||
if (strncmp(str, "3270", 5) == 0)
|
||||
SET_CONSOLE_3270;
|
||||
#endif
|
||||
set_preferred_console();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -780,9 +795,6 @@ static void __init setup_hwcaps(void)
|
|||
void __init
|
||||
setup_arch(char **cmdline_p)
|
||||
{
|
||||
/* set up preferred console */
|
||||
add_preferred_console("ttyS", 0, NULL);
|
||||
|
||||
/*
|
||||
* print what head.S has found out about the machine
|
||||
*/
|
||||
|
@ -802,11 +814,9 @@ setup_arch(char **cmdline_p)
|
|||
if (MACHINE_IS_VM)
|
||||
pr_info("Linux is running as a z/VM "
|
||||
"guest operating system in 64-bit mode\n");
|
||||
else if (MACHINE_IS_KVM) {
|
||||
else if (MACHINE_IS_KVM)
|
||||
pr_info("Linux is running under KVM in 64-bit mode\n");
|
||||
add_preferred_console("hvc", 0, NULL);
|
||||
s390_virtio_console_init();
|
||||
} else
|
||||
else
|
||||
pr_info("Linux is running natively in 64-bit mode\n");
|
||||
#endif /* CONFIG_64BIT */
|
||||
|
||||
|
@ -851,6 +861,7 @@ setup_arch(char **cmdline_p)
|
|||
|
||||
/* Setup default console */
|
||||
conmode_default();
|
||||
set_preferred_console();
|
||||
|
||||
/* Setup zfcpdump support */
|
||||
setup_zfcpdump(console_devno);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.30-rc2
|
||||
# Fri Apr 17 04:04:46 2009
|
||||
# Linux kernel version: 2.6.31-rc1
|
||||
# Tue Aug 18 23:45:52 2009
|
||||
#
|
||||
# CONFIG_64BIT is not set
|
||||
CONFIG_SPARC=y
|
||||
|
@ -17,6 +17,7 @@ CONFIG_GENERIC_ISA_DMA=y
|
|||
CONFIG_ARCH_NO_VIRT_TO_BUS=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
|
||||
CONFIG_CONSTRUCTORS=y
|
||||
|
||||
#
|
||||
# General setup
|
||||
|
@ -74,7 +75,6 @@ CONFIG_SYSCTL_SYSCALL=y
|
|||
CONFIG_KALLSYMS=y
|
||||
# CONFIG_KALLSYMS_ALL is not set
|
||||
# CONFIG_KALLSYMS_EXTRA_PASS is not set
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_HOTPLUG=y
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_BUG=y
|
||||
|
@ -87,8 +87,13 @@ CONFIG_TIMERFD=y
|
|||
CONFIG_EVENTFD=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_AIO=y
|
||||
|
||||
#
|
||||
# Performance Counters
|
||||
#
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_PCI_QUIRKS=y
|
||||
# CONFIG_STRIP_ASM_SYMS is not set
|
||||
CONFIG_COMPAT_BRK=y
|
||||
CONFIG_SLAB=y
|
||||
# CONFIG_SLUB is not set
|
||||
|
@ -97,6 +102,10 @@ CONFIG_SLAB=y
|
|||
# CONFIG_MARKERS is not set
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
CONFIG_HAVE_ARCH_TRACEHOOK=y
|
||||
|
||||
#
|
||||
# GCOV-based kernel profiling
|
||||
#
|
||||
# CONFIG_SLOW_WORK is not set
|
||||
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
|
||||
CONFIG_SLABINFO=y
|
||||
|
@ -109,7 +118,7 @@ CONFIG_MODULE_UNLOAD=y
|
|||
# CONFIG_MODVERSIONS is not set
|
||||
# CONFIG_MODULE_SRCVERSION_ALL is not set
|
||||
CONFIG_BLOCK=y
|
||||
# CONFIG_LBD is not set
|
||||
CONFIG_LBDAF=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_BLK_DEV_INTEGRITY is not set
|
||||
|
||||
|
@ -154,9 +163,9 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
|
|||
# CONFIG_PHYS_ADDR_T_64BIT is not set
|
||||
CONFIG_ZONE_DMA_FLAG=1
|
||||
CONFIG_BOUNCE=y
|
||||
CONFIG_UNEVICTABLE_LRU=y
|
||||
CONFIG_HAVE_MLOCK=y
|
||||
CONFIG_HAVE_MLOCKED_PAGE_BIT=y
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
|
||||
CONFIG_SUN_PM=y
|
||||
# CONFIG_SPARC_LED is not set
|
||||
CONFIG_SERIAL_CONSOLE=y
|
||||
|
@ -264,6 +273,7 @@ CONFIG_IPV6_TUNNEL=m
|
|||
# CONFIG_ECONET is not set
|
||||
# CONFIG_WAN_ROUTER is not set
|
||||
# CONFIG_PHONET is not set
|
||||
# CONFIG_IEEE802154 is not set
|
||||
# CONFIG_NET_SCHED is not set
|
||||
# CONFIG_DCB is not set
|
||||
|
||||
|
@ -281,7 +291,11 @@ CONFIG_WIRELESS=y
|
|||
CONFIG_WIRELESS_OLD_REGULATORY=y
|
||||
# CONFIG_WIRELESS_EXT is not set
|
||||
# CONFIG_LIB80211 is not set
|
||||
# CONFIG_MAC80211 is not set
|
||||
|
||||
#
|
||||
# CFG80211 needs to be enabled for MAC80211
|
||||
#
|
||||
CONFIG_MAC80211_DEFAULT_PS_VALUE=0
|
||||
# CONFIG_WIMAX is not set
|
||||
# CONFIG_RFKILL is not set
|
||||
# CONFIG_NET_9P is not set
|
||||
|
@ -335,6 +349,7 @@ CONFIG_MISC_DEVICES=y
|
|||
# EEPROM support
|
||||
#
|
||||
# CONFIG_EEPROM_93CX6 is not set
|
||||
# CONFIG_CB710_CORE is not set
|
||||
CONFIG_HAVE_IDE=y
|
||||
# CONFIG_IDE is not set
|
||||
|
||||
|
@ -358,10 +373,6 @@ CONFIG_BLK_DEV_SR=m
|
|||
# CONFIG_BLK_DEV_SR_VENDOR is not set
|
||||
CONFIG_CHR_DEV_SG=m
|
||||
# CONFIG_CHR_DEV_SCH is not set
|
||||
|
||||
#
|
||||
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
|
||||
#
|
||||
# CONFIG_SCSI_MULTI_LUN is not set
|
||||
# CONFIG_SCSI_CONSTANTS is not set
|
||||
# CONFIG_SCSI_LOGGING is not set
|
||||
|
@ -379,6 +390,7 @@ CONFIG_SCSI_SPI_ATTRS=y
|
|||
CONFIG_SCSI_LOWLEVEL=y
|
||||
# CONFIG_ISCSI_TCP is not set
|
||||
# CONFIG_SCSI_CXGB3_ISCSI is not set
|
||||
# CONFIG_SCSI_BNX2_ISCSI 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
|
||||
|
@ -387,6 +399,7 @@ CONFIG_SCSI_LOWLEVEL=y
|
|||
# CONFIG_SCSI_AIC7XXX_OLD is not set
|
||||
# CONFIG_SCSI_AIC79XX is not set
|
||||
# CONFIG_SCSI_AIC94XX is not set
|
||||
# CONFIG_SCSI_MVSAS is not set
|
||||
# CONFIG_SCSI_ARCMSR is not set
|
||||
# CONFIG_MEGARAID_NEWGEN is not set
|
||||
# CONFIG_MEGARAID_LEGACY is not set
|
||||
|
@ -401,7 +414,6 @@ CONFIG_SCSI_LOWLEVEL=y
|
|||
# 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
|
||||
|
@ -426,13 +438,16 @@ CONFIG_SCSI_SUNESP=y
|
|||
#
|
||||
|
||||
#
|
||||
# Enable only one of the two stacks, unless you know what you are doing
|
||||
# You can enable one or both FireWire driver stacks.
|
||||
#
|
||||
|
||||
#
|
||||
# See the help texts for more information.
|
||||
#
|
||||
# CONFIG_FIREWIRE is not set
|
||||
# CONFIG_IEEE1394 is not set
|
||||
# CONFIG_I2O is not set
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_COMPAT_NET_DEV_OPS=y
|
||||
CONFIG_DUMMY=m
|
||||
# CONFIG_BONDING is not set
|
||||
# CONFIG_MACVLAN is not set
|
||||
|
@ -463,6 +478,7 @@ CONFIG_SUNQE=m
|
|||
# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
|
||||
# CONFIG_NET_PCI is not set
|
||||
# CONFIG_B44 is not set
|
||||
# CONFIG_KS8842 is not set
|
||||
# CONFIG_ATL2 is not set
|
||||
CONFIG_NETDEV_1000=y
|
||||
# CONFIG_ACENIC is not set
|
||||
|
@ -482,6 +498,7 @@ CONFIG_NETDEV_1000=y
|
|||
# CONFIG_VIA_VELOCITY is not set
|
||||
# CONFIG_TIGON3 is not set
|
||||
# CONFIG_BNX2 is not set
|
||||
# CONFIG_CNIC is not set
|
||||
# CONFIG_QLA3XXX is not set
|
||||
# CONFIG_ATL1 is not set
|
||||
# CONFIG_ATL1E is not set
|
||||
|
@ -629,6 +646,11 @@ CONFIG_HW_RANDOM=m
|
|||
CONFIG_DEVPORT=y
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_SPI is not set
|
||||
|
||||
#
|
||||
# PPS support
|
||||
#
|
||||
# CONFIG_PPS is not set
|
||||
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
|
||||
# CONFIG_GPIOLIB is not set
|
||||
# CONFIG_W1 is not set
|
||||
|
@ -668,22 +690,7 @@ CONFIG_SSB_POSSIBLE=y
|
|||
# CONFIG_HTC_PASIC3 is not set
|
||||
# CONFIG_MFD_TMIO is not set
|
||||
# CONFIG_REGULATOR 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
|
||||
# CONFIG_MEDIA_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Graphics support
|
||||
|
@ -776,6 +783,10 @@ CONFIG_RTC_DRV_M48T59=y
|
|||
# CONFIG_DMADEVICES is not set
|
||||
# CONFIG_AUXDISPLAY is not set
|
||||
# CONFIG_UIO is not set
|
||||
|
||||
#
|
||||
# TI VLYNQ
|
||||
#
|
||||
# CONFIG_STAGING is not set
|
||||
|
||||
#
|
||||
|
@ -799,10 +810,12 @@ CONFIG_FS_MBCACHE=y
|
|||
# CONFIG_REISERFS_FS is not set
|
||||
# CONFIG_JFS_FS is not set
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_FILE_LOCKING=y
|
||||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_GFS2_FS is not set
|
||||
# CONFIG_OCFS2_FS is not set
|
||||
# CONFIG_BTRFS_FS is not set
|
||||
CONFIG_FILE_LOCKING=y
|
||||
CONFIG_FSNOTIFY=y
|
||||
CONFIG_DNOTIFY=y
|
||||
CONFIG_INOTIFY=y
|
||||
CONFIG_INOTIFY_USER=y
|
||||
|
@ -985,6 +998,7 @@ CONFIG_KGDB=y
|
|||
CONFIG_KGDB_SERIAL_CONSOLE=y
|
||||
CONFIG_KGDB_TESTS=y
|
||||
# CONFIG_KGDB_TESTS_ON_BOOT is not set
|
||||
# CONFIG_KMEMCHECK is not set
|
||||
# CONFIG_DEBUG_STACK_USAGE is not set
|
||||
# CONFIG_STACK_DEBUG is not set
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.30
|
||||
# Tue Jun 16 04:59:36 2009
|
||||
# Linux kernel version: 2.6.31-rc1
|
||||
# Tue Aug 18 23:56:02 2009
|
||||
#
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_SPARC=y
|
||||
|
@ -26,6 +26,7 @@ CONFIG_ARCH_NO_VIRT_TO_BUS=y
|
|||
CONFIG_OF=y
|
||||
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
|
||||
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
|
||||
CONFIG_CONSTRUCTORS=y
|
||||
|
||||
#
|
||||
# General setup
|
||||
|
@ -119,6 +120,11 @@ CONFIG_HAVE_KPROBES=y
|
|||
CONFIG_HAVE_KRETPROBES=y
|
||||
CONFIG_HAVE_ARCH_TRACEHOOK=y
|
||||
CONFIG_USE_GENERIC_SMP_HELPERS=y
|
||||
|
||||
#
|
||||
# GCOV-based kernel profiling
|
||||
#
|
||||
# CONFIG_GCOV_KERNEL is not set
|
||||
# CONFIG_SLOW_WORK is not set
|
||||
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
|
||||
CONFIG_SLABINFO=y
|
||||
|
@ -204,7 +210,6 @@ CONFIG_MIGRATION=y
|
|||
CONFIG_PHYS_ADDR_T_64BIT=y
|
||||
CONFIG_ZONE_DMA_FLAG=0
|
||||
CONFIG_NR_QUICK=1
|
||||
CONFIG_UNEVICTABLE_LRU=y
|
||||
CONFIG_HAVE_MLOCK=y
|
||||
CONFIG_HAVE_MLOCKED_PAGE_BIT=y
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=8192
|
||||
|
@ -410,6 +415,7 @@ CONFIG_MISC_DEVICES=y
|
|||
#
|
||||
# CONFIG_EEPROM_AT24 is not set
|
||||
# CONFIG_EEPROM_LEGACY is not set
|
||||
# CONFIG_EEPROM_MAX6875 is not set
|
||||
# CONFIG_EEPROM_93CX6 is not set
|
||||
# CONFIG_CB710_CORE is not set
|
||||
CONFIG_HAVE_IDE=y
|
||||
|
@ -562,6 +568,7 @@ CONFIG_BLK_DEV_DM=m
|
|||
CONFIG_DM_CRYPT=m
|
||||
CONFIG_DM_SNAPSHOT=m
|
||||
CONFIG_DM_MIRROR=m
|
||||
# CONFIG_DM_LOG_USERSPACE is not set
|
||||
CONFIG_DM_ZERO=m
|
||||
# CONFIG_DM_MULTIPATH is not set
|
||||
# CONFIG_DM_DELAY is not set
|
||||
|
@ -573,7 +580,11 @@ CONFIG_DM_ZERO=m
|
|||
#
|
||||
|
||||
#
|
||||
# Enable only one of the two stacks, unless you know what you are doing
|
||||
# You can enable one or both FireWire driver stacks.
|
||||
#
|
||||
|
||||
#
|
||||
# See the help texts for more information.
|
||||
#
|
||||
# CONFIG_FIREWIRE is not set
|
||||
# CONFIG_IEEE1394 is not set
|
||||
|
@ -667,6 +678,7 @@ CONFIG_E1000E=m
|
|||
# CONFIG_VIA_VELOCITY is not set
|
||||
CONFIG_TIGON3=m
|
||||
CONFIG_BNX2=m
|
||||
# CONFIG_CNIC is not set
|
||||
# CONFIG_QLA3XXX is not set
|
||||
# CONFIG_ATL1 is not set
|
||||
# CONFIG_ATL1E is not set
|
||||
|
@ -773,6 +785,7 @@ CONFIG_MOUSE_SERIAL=y
|
|||
# CONFIG_MOUSE_APPLETOUCH is not set
|
||||
# CONFIG_MOUSE_BCM5974 is not set
|
||||
# CONFIG_MOUSE_VSXXXAA is not set
|
||||
# CONFIG_MOUSE_SYNAPTICS_I2C is not set
|
||||
# CONFIG_INPUT_JOYSTICK is not set
|
||||
# CONFIG_INPUT_TABLET is not set
|
||||
# CONFIG_INPUT_TOUCHSCREEN is not set
|
||||
|
@ -870,6 +883,7 @@ CONFIG_I2C_ALGOBIT=y
|
|||
#
|
||||
# I2C system bus drivers (mostly embedded / system-on-chip)
|
||||
#
|
||||
# CONFIG_I2C_DESIGNWARE is not set
|
||||
# CONFIG_I2C_OCORES is not set
|
||||
# CONFIG_I2C_SIMTEC is not set
|
||||
|
||||
|
@ -898,13 +912,17 @@ CONFIG_I2C_ALGOBIT=y
|
|||
# CONFIG_SENSORS_PCF8574 is not set
|
||||
# CONFIG_PCF8575 is not set
|
||||
# CONFIG_SENSORS_PCA9539 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
|
||||
|
||||
#
|
||||
# PPS support
|
||||
#
|
||||
# CONFIG_PPS is not set
|
||||
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
|
||||
# CONFIG_GPIOLIB is not set
|
||||
# CONFIG_W1 is not set
|
||||
|
@ -959,6 +977,7 @@ CONFIG_HWMON=y
|
|||
# CONFIG_SENSORS_SMSC47B397 is not set
|
||||
# CONFIG_SENSORS_ADS7828 is not set
|
||||
# CONFIG_SENSORS_THMC50 is not set
|
||||
# CONFIG_SENSORS_TMP401 is not set
|
||||
# CONFIG_SENSORS_VIA686A is not set
|
||||
# CONFIG_SENSORS_VT1211 is not set
|
||||
# CONFIG_SENSORS_VT8231 is not set
|
||||
|
@ -994,23 +1013,9 @@ CONFIG_SSB_POSSIBLE=y
|
|||
# CONFIG_MFD_WM8400 is not set
|
||||
# CONFIG_MFD_WM8350_I2C is not set
|
||||
# CONFIG_MFD_PCF50633 is not set
|
||||
# CONFIG_AB3100_CORE is not set
|
||||
# CONFIG_REGULATOR 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
|
||||
# CONFIG_MEDIA_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Graphics support
|
||||
|
@ -1284,7 +1289,6 @@ CONFIG_USB=y
|
|||
#
|
||||
# Miscellaneous USB options
|
||||
#
|
||||
CONFIG_USB_DEVICEFS=y
|
||||
# CONFIG_USB_DEVICE_CLASS is not set
|
||||
# CONFIG_USB_DYNAMIC_MINORS is not set
|
||||
# CONFIG_USB_OTG is not set
|
||||
|
@ -1296,6 +1300,7 @@ CONFIG_USB_DEVICEFS=y
|
|||
# USB Host Controller Drivers
|
||||
#
|
||||
# CONFIG_USB_C67X00_HCD is not set
|
||||
# CONFIG_USB_XHCI_HCD is not set
|
||||
CONFIG_USB_EHCI_HCD=m
|
||||
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
|
||||
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
|
||||
|
@ -1374,7 +1379,6 @@ CONFIG_USB_STORAGE=m
|
|||
# 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_VST is not set
|
||||
# CONFIG_USB_GADGET is not set
|
||||
|
@ -1420,6 +1424,7 @@ CONFIG_RTC_INTF_DEV=y
|
|||
# CONFIG_RTC_DRV_S35390A is not set
|
||||
# CONFIG_RTC_DRV_FM3130 is not set
|
||||
# CONFIG_RTC_DRV_RX8581 is not set
|
||||
# CONFIG_RTC_DRV_RX8025 is not set
|
||||
|
||||
#
|
||||
# SPI RTC drivers
|
||||
|
@ -1448,6 +1453,10 @@ CONFIG_RTC_DRV_STARFIRE=y
|
|||
# CONFIG_DMADEVICES is not set
|
||||
# CONFIG_AUXDISPLAY is not set
|
||||
# CONFIG_UIO is not set
|
||||
|
||||
#
|
||||
# TI VLYNQ
|
||||
#
|
||||
# CONFIG_STAGING is not set
|
||||
|
||||
#
|
||||
|
@ -1480,11 +1489,11 @@ CONFIG_FS_MBCACHE=y
|
|||
# CONFIG_REISERFS_FS is not set
|
||||
# CONFIG_JFS_FS is not set
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_FILE_LOCKING=y
|
||||
# CONFIG_XFS_FS is not set
|
||||
# CONFIG_GFS2_FS is not set
|
||||
# CONFIG_OCFS2_FS is not set
|
||||
# CONFIG_BTRFS_FS is not set
|
||||
CONFIG_FILE_LOCKING=y
|
||||
CONFIG_FSNOTIFY=y
|
||||
CONFIG_DNOTIFY=y
|
||||
CONFIG_INOTIFY=y
|
||||
|
@ -1560,7 +1569,7 @@ CONFIG_NETWORK_FILESYSTEMS=y
|
|||
# CONFIG_PARTITION_ADVANCED is not set
|
||||
CONFIG_MSDOS_PARTITION=y
|
||||
CONFIG_SUN_PARTITION=y
|
||||
CONFIG_NLS=m
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NLS_DEFAULT="iso8859-1"
|
||||
# CONFIG_NLS_CODEPAGE_437 is not set
|
||||
# CONFIG_NLS_CODEPAGE_737 is not set
|
||||
|
|
|
@ -726,11 +726,17 @@ extern unsigned long pte_file(pte_t);
|
|||
extern pte_t pgoff_to_pte(unsigned long);
|
||||
#define PTE_FILE_MAX_BITS (64UL - PAGE_SHIFT - 1UL)
|
||||
|
||||
extern unsigned long *sparc64_valid_addr_bitmap;
|
||||
extern unsigned long sparc64_valid_addr_bitmap[];
|
||||
|
||||
/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
|
||||
#define kern_addr_valid(addr) \
|
||||
(test_bit(__pa((unsigned long)(addr))>>22, sparc64_valid_addr_bitmap))
|
||||
static inline bool kern_addr_valid(unsigned long addr)
|
||||
{
|
||||
unsigned long paddr = __pa(addr);
|
||||
|
||||
if ((paddr >> 41UL) != 0UL)
|
||||
return false;
|
||||
return test_bit(paddr >> 22, sparc64_valid_addr_bitmap);
|
||||
}
|
||||
|
||||
extern int page_in_phys_avail(unsigned long paddr);
|
||||
|
||||
|
|
|
@ -151,12 +151,46 @@ kvmap_dtlb_4v:
|
|||
* Must preserve %g1 and %g6 (TAG).
|
||||
*/
|
||||
kvmap_dtlb_tsb4m_miss:
|
||||
sethi %hi(kpte_linear_bitmap), %g2
|
||||
/* Clear the PAGE_OFFSET top virtual bits, shift
|
||||
* down to get PFN, and make sure PFN is in range.
|
||||
*/
|
||||
sllx %g4, 21, %g5
|
||||
|
||||
/* Check to see if we know about valid memory at the 4MB
|
||||
* chunk this physical address will reside within.
|
||||
*/
|
||||
srlx %g5, 21 + 41, %g2
|
||||
brnz,pn %g2, kvmap_dtlb_longpath
|
||||
nop
|
||||
|
||||
/* This unconditional branch and delay-slot nop gets patched
|
||||
* by the sethi sequence once the bitmap is properly setup.
|
||||
*/
|
||||
.globl valid_addr_bitmap_insn
|
||||
valid_addr_bitmap_insn:
|
||||
ba,pt %xcc, 2f
|
||||
nop
|
||||
.subsection 2
|
||||
.globl valid_addr_bitmap_patch
|
||||
valid_addr_bitmap_patch:
|
||||
sethi %hi(sparc64_valid_addr_bitmap), %g7
|
||||
or %g7, %lo(sparc64_valid_addr_bitmap), %g7
|
||||
.previous
|
||||
|
||||
srlx %g5, 21 + 22, %g2
|
||||
srlx %g2, 6, %g5
|
||||
and %g2, 63, %g2
|
||||
sllx %g5, 3, %g5
|
||||
ldx [%g7 + %g5], %g5
|
||||
mov 1, %g7
|
||||
sllx %g7, %g2, %g7
|
||||
andcc %g5, %g7, %g0
|
||||
be,pn %xcc, kvmap_dtlb_longpath
|
||||
|
||||
2: sethi %hi(kpte_linear_bitmap), %g2
|
||||
or %g2, %lo(kpte_linear_bitmap), %g2
|
||||
|
||||
/* Clear the PAGE_OFFSET top virtual bits, then shift
|
||||
* down to get a 256MB physical address index.
|
||||
*/
|
||||
/* Get the 256MB physical address index. */
|
||||
sllx %g4, 21, %g5
|
||||
mov 1, %g7
|
||||
srlx %g5, 21 + 28, %g5
|
||||
|
|
|
@ -162,9 +162,6 @@ extern void cpu_panic(void);
|
|||
*/
|
||||
|
||||
extern struct linux_prom_registers smp_penguin_ctable;
|
||||
extern unsigned long trapbase_cpu1[];
|
||||
extern unsigned long trapbase_cpu2[];
|
||||
extern unsigned long trapbase_cpu3[];
|
||||
|
||||
void __init smp4d_boot_cpus(void)
|
||||
{
|
||||
|
@ -235,25 +232,6 @@ void __init smp4d_smp_done(void)
|
|||
*prev = first;
|
||||
local_flush_cache_all();
|
||||
|
||||
/* Free unneeded trap tables */
|
||||
ClearPageReserved(virt_to_page(trapbase_cpu1));
|
||||
init_page_count(virt_to_page(trapbase_cpu1));
|
||||
free_page((unsigned long)trapbase_cpu1);
|
||||
totalram_pages++;
|
||||
num_physpages++;
|
||||
|
||||
ClearPageReserved(virt_to_page(trapbase_cpu2));
|
||||
init_page_count(virt_to_page(trapbase_cpu2));
|
||||
free_page((unsigned long)trapbase_cpu2);
|
||||
totalram_pages++;
|
||||
num_physpages++;
|
||||
|
||||
ClearPageReserved(virt_to_page(trapbase_cpu3));
|
||||
init_page_count(virt_to_page(trapbase_cpu3));
|
||||
free_page((unsigned long)trapbase_cpu3);
|
||||
totalram_pages++;
|
||||
num_physpages++;
|
||||
|
||||
/* Ok, they are spinning and ready to go. */
|
||||
smp_processors_ready = 1;
|
||||
sun4d_distribute_irqs();
|
||||
|
|
|
@ -121,9 +121,6 @@ void __cpuinit smp4m_callin(void)
|
|||
*/
|
||||
|
||||
extern struct linux_prom_registers smp_penguin_ctable;
|
||||
extern unsigned long trapbase_cpu1[];
|
||||
extern unsigned long trapbase_cpu2[];
|
||||
extern unsigned long trapbase_cpu3[];
|
||||
|
||||
void __init smp4m_boot_cpus(void)
|
||||
{
|
||||
|
@ -193,29 +190,6 @@ void __init smp4m_smp_done(void)
|
|||
*prev = first;
|
||||
local_flush_cache_all();
|
||||
|
||||
/* Free unneeded trap tables */
|
||||
if (!cpu_isset(1, cpu_present_map)) {
|
||||
ClearPageReserved(virt_to_page(trapbase_cpu1));
|
||||
init_page_count(virt_to_page(trapbase_cpu1));
|
||||
free_page((unsigned long)trapbase_cpu1);
|
||||
totalram_pages++;
|
||||
num_physpages++;
|
||||
}
|
||||
if (!cpu_isset(2, cpu_present_map)) {
|
||||
ClearPageReserved(virt_to_page(trapbase_cpu2));
|
||||
init_page_count(virt_to_page(trapbase_cpu2));
|
||||
free_page((unsigned long)trapbase_cpu2);
|
||||
totalram_pages++;
|
||||
num_physpages++;
|
||||
}
|
||||
if (!cpu_isset(3, cpu_present_map)) {
|
||||
ClearPageReserved(virt_to_page(trapbase_cpu3));
|
||||
init_page_count(virt_to_page(trapbase_cpu3));
|
||||
free_page((unsigned long)trapbase_cpu3);
|
||||
totalram_pages++;
|
||||
num_physpages++;
|
||||
}
|
||||
|
||||
/* Ok, they are spinning and ready to go. */
|
||||
}
|
||||
|
||||
|
|
|
@ -134,10 +134,12 @@ SIGN1(sys32_getpeername, sys_getpeername, %o0)
|
|||
SIGN1(sys32_getsockname, sys_getsockname, %o0)
|
||||
SIGN2(sys32_ioprio_get, sys_ioprio_get, %o0, %o1)
|
||||
SIGN3(sys32_ioprio_set, sys_ioprio_set, %o0, %o1, %o2)
|
||||
SIGN2(sys32_splice, sys_splice, %o0, %o1)
|
||||
SIGN2(sys32_splice, sys_splice, %o0, %o2)
|
||||
SIGN2(sys32_sync_file_range, compat_sync_file_range, %o0, %o5)
|
||||
SIGN2(sys32_tee, sys_tee, %o0, %o1)
|
||||
SIGN1(sys32_vmsplice, compat_sys_vmsplice, %o0)
|
||||
SIGN1(sys32_truncate, sys_truncate, %o1)
|
||||
SIGN1(sys32_ftruncate, sys_ftruncate, %o1)
|
||||
|
||||
.globl sys32_mmap2
|
||||
sys32_mmap2:
|
||||
|
|
|
@ -43,8 +43,8 @@ sys_call_table32:
|
|||
/*110*/ .word sys_setresgid, sys_getresgid, sys_setregid, sys_nis_syscall, sys_nis_syscall
|
||||
.word sys32_getgroups, compat_sys_gettimeofday, sys32_getrusage, sys_nis_syscall, sys_getcwd
|
||||
/*120*/ .word compat_sys_readv, compat_sys_writev, compat_sys_settimeofday, sys_fchown16, sys_fchmod
|
||||
.word sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, sys_truncate
|
||||
/*130*/ .word sys_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall
|
||||
.word sys_nis_syscall, sys_setreuid16, sys_setregid16, sys_rename, sys32_truncate
|
||||
/*130*/ .word sys32_ftruncate, sys_flock, compat_sys_lstat64, sys_nis_syscall, sys_nis_syscall
|
||||
.word sys_nis_syscall, sys32_mkdir, sys_rmdir, compat_sys_utimes, compat_sys_stat64
|
||||
/*140*/ .word sys32_sendfile64, sys_nis_syscall, sys32_futex, sys_gettid, compat_sys_getrlimit
|
||||
.word compat_sys_setrlimit, sys_pivot_root, sys32_prctl, sys_pciconfig_read, sys_pciconfig_write
|
||||
|
|
|
@ -319,9 +319,10 @@ no_context:
|
|||
*/
|
||||
out_of_memory:
|
||||
up_read(&mm->mmap_sem);
|
||||
printk("VM: killing process %s\n", tsk->comm);
|
||||
if (from_user)
|
||||
do_group_exit(SIGKILL);
|
||||
if (from_user) {
|
||||
pagefault_out_of_memory();
|
||||
return;
|
||||
}
|
||||
goto no_context;
|
||||
|
||||
do_sigbus:
|
||||
|
|
|
@ -447,9 +447,10 @@ handle_kernel_fault:
|
|||
out_of_memory:
|
||||
insn = get_fault_insn(regs, insn);
|
||||
up_read(&mm->mmap_sem);
|
||||
printk("VM: killing process %s\n", current->comm);
|
||||
if (!(regs->tstate & TSTATE_PRIV))
|
||||
do_group_exit(SIGKILL);
|
||||
if (!(regs->tstate & TSTATE_PRIV)) {
|
||||
pagefault_out_of_memory();
|
||||
return;
|
||||
}
|
||||
goto handle_kernel_fault;
|
||||
|
||||
intr_or_no_mm:
|
||||
|
|
|
@ -145,7 +145,8 @@ static void __init read_obp_memory(const char *property,
|
|||
cmp_p64, NULL);
|
||||
}
|
||||
|
||||
unsigned long *sparc64_valid_addr_bitmap __read_mostly;
|
||||
unsigned long sparc64_valid_addr_bitmap[VALID_ADDR_BITMAP_BYTES /
|
||||
sizeof(unsigned long)];
|
||||
EXPORT_SYMBOL(sparc64_valid_addr_bitmap);
|
||||
|
||||
/* Kernel physical address base and size in bytes. */
|
||||
|
@ -1874,7 +1875,7 @@ static int pavail_rescan_ents __initdata;
|
|||
* memory list again, and make sure it provides at least as much
|
||||
* memory as 'pavail' does.
|
||||
*/
|
||||
static void __init setup_valid_addr_bitmap_from_pavail(void)
|
||||
static void __init setup_valid_addr_bitmap_from_pavail(unsigned long *bitmap)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -1897,8 +1898,7 @@ static void __init setup_valid_addr_bitmap_from_pavail(void)
|
|||
|
||||
if (new_start <= old_start &&
|
||||
new_end >= (old_start + PAGE_SIZE)) {
|
||||
set_bit(old_start >> 22,
|
||||
sparc64_valid_addr_bitmap);
|
||||
set_bit(old_start >> 22, bitmap);
|
||||
goto do_next_page;
|
||||
}
|
||||
}
|
||||
|
@ -1919,20 +1919,21 @@ static void __init setup_valid_addr_bitmap_from_pavail(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void __init patch_tlb_miss_handler_bitmap(void)
|
||||
{
|
||||
extern unsigned int valid_addr_bitmap_insn[];
|
||||
extern unsigned int valid_addr_bitmap_patch[];
|
||||
|
||||
valid_addr_bitmap_insn[1] = valid_addr_bitmap_patch[1];
|
||||
mb();
|
||||
valid_addr_bitmap_insn[0] = valid_addr_bitmap_patch[0];
|
||||
flushi(&valid_addr_bitmap_insn[0]);
|
||||
}
|
||||
|
||||
void __init mem_init(void)
|
||||
{
|
||||
unsigned long codepages, datapages, initpages;
|
||||
unsigned long addr, last;
|
||||
int i;
|
||||
|
||||
i = last_valid_pfn >> ((22 - PAGE_SHIFT) + 6);
|
||||
i += 1;
|
||||
sparc64_valid_addr_bitmap = (unsigned long *) alloc_bootmem(i << 3);
|
||||
if (sparc64_valid_addr_bitmap == NULL) {
|
||||
prom_printf("mem_init: Cannot alloc valid_addr_bitmap.\n");
|
||||
prom_halt();
|
||||
}
|
||||
memset(sparc64_valid_addr_bitmap, 0, i << 3);
|
||||
|
||||
addr = PAGE_OFFSET + kern_base;
|
||||
last = PAGE_ALIGN(kern_size) + addr;
|
||||
|
@ -1941,15 +1942,19 @@ void __init mem_init(void)
|
|||
addr += PAGE_SIZE;
|
||||
}
|
||||
|
||||
setup_valid_addr_bitmap_from_pavail();
|
||||
setup_valid_addr_bitmap_from_pavail(sparc64_valid_addr_bitmap);
|
||||
patch_tlb_miss_handler_bitmap();
|
||||
|
||||
high_memory = __va(last_valid_pfn << PAGE_SHIFT);
|
||||
|
||||
#ifdef CONFIG_NEED_MULTIPLE_NODES
|
||||
for_each_online_node(i) {
|
||||
if (NODE_DATA(i)->node_spanned_pages != 0) {
|
||||
totalram_pages +=
|
||||
free_all_bootmem_node(NODE_DATA(i));
|
||||
{
|
||||
int i;
|
||||
for_each_online_node(i) {
|
||||
if (NODE_DATA(i)->node_spanned_pages != 0) {
|
||||
totalram_pages +=
|
||||
free_all_bootmem_node(NODE_DATA(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -5,10 +5,13 @@
|
|||
* marked non-static so that assembler code can get at them.
|
||||
*/
|
||||
|
||||
#define MAX_PHYS_ADDRESS (1UL << 42UL)
|
||||
#define KPTE_BITMAP_CHUNK_SZ (256UL * 1024UL * 1024UL)
|
||||
#define MAX_PHYS_ADDRESS (1UL << 41UL)
|
||||
#define KPTE_BITMAP_CHUNK_SZ (256UL * 1024UL * 1024UL)
|
||||
#define KPTE_BITMAP_BYTES \
|
||||
((MAX_PHYS_ADDRESS / KPTE_BITMAP_CHUNK_SZ) / 8)
|
||||
#define VALID_ADDR_BITMAP_CHUNK_SZ (4UL * 1024UL * 1024UL)
|
||||
#define VALID_ADDR_BITMAP_BYTES \
|
||||
((MAX_PHYS_ADDRESS / VALID_ADDR_BITMAP_CHUNK_SZ) / 8)
|
||||
|
||||
extern unsigned long kern_linear_pte_xor[2];
|
||||
extern unsigned long kpte_linear_bitmap[KPTE_BITMAP_BYTES / sizeof(unsigned long)];
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# create a compressed vmlinux image from the original vmlinux
|
||||
#
|
||||
|
||||
targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o
|
||||
targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o
|
||||
|
||||
KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
|
||||
KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define _ASM_X86_PGTABLE_H
|
||||
|
||||
#include <asm/page.h>
|
||||
#include <asm/e820.h>
|
||||
|
||||
#include <asm/pgtable_types.h>
|
||||
|
||||
|
@ -269,9 +270,16 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)
|
|||
|
||||
#define canon_pgprot(p) __pgprot(massage_pgprot(p))
|
||||
|
||||
static inline int is_new_memtype_allowed(unsigned long flags,
|
||||
unsigned long new_flags)
|
||||
static inline int is_new_memtype_allowed(u64 paddr, unsigned long size,
|
||||
unsigned long flags,
|
||||
unsigned long new_flags)
|
||||
{
|
||||
/*
|
||||
* PAT type is always WB for ISA. So no need to check.
|
||||
*/
|
||||
if (is_ISA_range(paddr, paddr + size - 1))
|
||||
return 1;
|
||||
|
||||
/*
|
||||
* Certain new memtypes are not allowed with certain
|
||||
* requested memtype:
|
||||
|
|
|
@ -106,6 +106,9 @@ void default_send_IPI_mask_logical(const struct cpumask *cpumask, int vector)
|
|||
unsigned long mask = cpumask_bits(cpumask)[0];
|
||||
unsigned long flags;
|
||||
|
||||
if (WARN_ONCE(!mask, "empty IPI mask"))
|
||||
return;
|
||||
|
||||
local_irq_save(flags);
|
||||
WARN_ON(mask & ~cpumask_bits(cpu_online_mask)[0]);
|
||||
__default_send_IPI_dest_field(mask, vector, apic->dest_logical);
|
||||
|
|
|
@ -7,6 +7,10 @@ ifdef CONFIG_FUNCTION_TRACER
|
|||
CFLAGS_REMOVE_common.o = -pg
|
||||
endif
|
||||
|
||||
# Make sure load_percpu_segment has no stackprotector
|
||||
nostackp := $(call cc-option, -fno-stack-protector)
|
||||
CFLAGS_common.o := $(nostackp)
|
||||
|
||||
obj-y := intel_cacheinfo.o addon_cpuid_features.o
|
||||
obj-y += proc.o capflags.o powerflags.o common.o
|
||||
obj-y += vmware.o hypervisor.o
|
||||
|
|
|
@ -261,9 +261,7 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
|
|||
* which will be freed later
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_HOTPLUG_CPU
|
||||
.section .init.text,"ax",@progbits
|
||||
#endif
|
||||
__CPUINIT
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
ENTRY(startup_32_smp)
|
||||
|
@ -602,11 +600,7 @@ ignore_int:
|
|||
#endif
|
||||
iret
|
||||
|
||||
#ifndef CONFIG_HOTPLUG_CPU
|
||||
__CPUINITDATA
|
||||
#else
|
||||
__REFDATA
|
||||
#endif
|
||||
.align 4
|
||||
ENTRY(initial_code)
|
||||
.long i386_start_kernel
|
||||
|
|
|
@ -519,16 +519,12 @@ static void c1e_idle(void)
|
|||
if (!cpumask_test_cpu(cpu, c1e_mask)) {
|
||||
cpumask_set_cpu(cpu, c1e_mask);
|
||||
/*
|
||||
* Force broadcast so ACPI can not interfere. Needs
|
||||
* to run with interrupts enabled as it uses
|
||||
* smp_function_call.
|
||||
* Force broadcast so ACPI can not interfere.
|
||||
*/
|
||||
local_irq_enable();
|
||||
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_FORCE,
|
||||
&cpu);
|
||||
printk(KERN_INFO "Switch to broadcast mode on CPU%d\n",
|
||||
cpu);
|
||||
local_irq_disable();
|
||||
}
|
||||
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu);
|
||||
|
||||
|
|
|
@ -46,11 +46,10 @@ PHDRS {
|
|||
data PT_LOAD FLAGS(7); /* RWE */
|
||||
#ifdef CONFIG_X86_64
|
||||
user PT_LOAD FLAGS(7); /* RWE */
|
||||
data.init PT_LOAD FLAGS(7); /* RWE */
|
||||
#ifdef CONFIG_SMP
|
||||
percpu PT_LOAD FLAGS(7); /* RWE */
|
||||
#endif
|
||||
data.init2 PT_LOAD FLAGS(7); /* RWE */
|
||||
init PT_LOAD FLAGS(7); /* RWE */
|
||||
#endif
|
||||
note PT_NOTE FLAGS(0); /* ___ */
|
||||
}
|
||||
|
@ -103,65 +102,43 @@ SECTIONS
|
|||
__stop___ex_table = .;
|
||||
} :text = 0x9090
|
||||
|
||||
RODATA
|
||||
RO_DATA(PAGE_SIZE)
|
||||
|
||||
/* Data */
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
.data : AT(ADDR(.data) - LOAD_OFFSET) {
|
||||
/* Start of data section */
|
||||
_sdata = .;
|
||||
|
||||
/* init_task */
|
||||
INIT_TASK_DATA(THREAD_SIZE)
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
/* 32 bit has nosave before _edata */
|
||||
NOSAVE_DATA
|
||||
#endif
|
||||
|
||||
PAGE_ALIGNED_DATA(PAGE_SIZE)
|
||||
*(.data.idt)
|
||||
|
||||
CACHELINE_ALIGNED_DATA(CONFIG_X86_L1_CACHE_BYTES)
|
||||
|
||||
DATA_DATA
|
||||
CONSTRUCTORS
|
||||
} :data
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
/* 32 bit has nosave before _edata */
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
.data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
|
||||
__nosave_begin = .;
|
||||
*(.data.nosave)
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
__nosave_end = .;
|
||||
}
|
||||
#endif
|
||||
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
.data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
|
||||
*(.data.page_aligned)
|
||||
*(.data.idt)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
. = ALIGN(32);
|
||||
#else
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
. = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
|
||||
#endif
|
||||
.data.cacheline_aligned :
|
||||
AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
|
||||
*(.data.cacheline_aligned)
|
||||
}
|
||||
|
||||
/* rarely changed data like cpu maps */
|
||||
#ifdef CONFIG_X86_32
|
||||
. = ALIGN(32);
|
||||
#else
|
||||
. = ALIGN(CONFIG_X86_INTERNODE_CACHE_BYTES);
|
||||
#endif
|
||||
.data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) {
|
||||
*(.data.read_mostly)
|
||||
/* rarely changed data like cpu maps */
|
||||
READ_MOSTLY_DATA(CONFIG_X86_INTERNODE_CACHE_BYTES)
|
||||
|
||||
/* End of data section */
|
||||
_edata = .;
|
||||
}
|
||||
} :data
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
|
||||
#define VSYSCALL_ADDR (-10*1024*1024)
|
||||
#define VSYSCALL_PHYS_ADDR ((LOADADDR(.data.read_mostly) + \
|
||||
SIZEOF(.data.read_mostly) + 4095) & ~(4095))
|
||||
#define VSYSCALL_VIRT_ADDR ((ADDR(.data.read_mostly) + \
|
||||
SIZEOF(.data.read_mostly) + 4095) & ~(4095))
|
||||
#define VSYSCALL_PHYS_ADDR ((LOADADDR(.data) + SIZEOF(.data) + \
|
||||
PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
|
||||
#define VSYSCALL_VIRT_ADDR ((ADDR(.data) + SIZEOF(.data) + \
|
||||
PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
|
||||
|
||||
#define VLOAD_OFFSET (VSYSCALL_ADDR - VSYSCALL_PHYS_ADDR)
|
||||
#define VLOAD(x) (ADDR(x) - VLOAD_OFFSET)
|
||||
|
@ -227,35 +204,29 @@ SECTIONS
|
|||
|
||||
#endif /* CONFIG_X86_64 */
|
||||
|
||||
/* init_task */
|
||||
. = ALIGN(THREAD_SIZE);
|
||||
.data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
|
||||
*(.data.init_task)
|
||||
}
|
||||
#ifdef CONFIG_X86_64
|
||||
:data.init
|
||||
#endif
|
||||
|
||||
/*
|
||||
* smp_locks might be freed after init
|
||||
* start/end must be page aligned
|
||||
*/
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
.smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
|
||||
__smp_locks = .;
|
||||
*(.smp_locks)
|
||||
__smp_locks_end = .;
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
}
|
||||
|
||||
/* Init code and data - will be freed after init */
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
.init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
|
||||
.init.begin : AT(ADDR(.init.begin) - LOAD_OFFSET) {
|
||||
__init_begin = .; /* paired with __init_end */
|
||||
}
|
||||
|
||||
#if defined(CONFIG_X86_64) && defined(CONFIG_SMP)
|
||||
/*
|
||||
* percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the
|
||||
* output PHDR, so the next output section - .init.text - should
|
||||
* start another segment - init.
|
||||
*/
|
||||
PERCPU_VADDR(0, :percpu)
|
||||
#endif
|
||||
|
||||
.init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
|
||||
_sinittext = .;
|
||||
INIT_TEXT
|
||||
_einittext = .;
|
||||
}
|
||||
#ifdef CONFIG_X86_64
|
||||
:init
|
||||
#endif
|
||||
|
||||
.init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
|
||||
INIT_DATA
|
||||
|
@ -326,17 +297,7 @@ SECTIONS
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_X86_64) && defined(CONFIG_SMP)
|
||||
/*
|
||||
* percpu offsets are zero-based on SMP. PERCPU_VADDR() changes the
|
||||
* output PHDR, so the next output section - __data_nosave - should
|
||||
* start another section data.init2. Also, pda should be at the head of
|
||||
* percpu area. Preallocate it and define the percpu offset symbol
|
||||
* so that it can be accessed as a percpu variable.
|
||||
*/
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
PERCPU_VADDR(0, :percpu)
|
||||
#else
|
||||
#if !defined(CONFIG_X86_64) || !defined(CONFIG_SMP)
|
||||
PERCPU(PAGE_SIZE)
|
||||
#endif
|
||||
|
||||
|
@ -347,15 +308,22 @@ SECTIONS
|
|||
__init_end = .;
|
||||
}
|
||||
|
||||
/*
|
||||
* smp_locks might be freed after init
|
||||
* start/end must be page aligned
|
||||
*/
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
.smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
|
||||
__smp_locks = .;
|
||||
*(.smp_locks)
|
||||
__smp_locks_end = .;
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
.data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
__nosave_begin = .;
|
||||
*(.data.nosave)
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
__nosave_end = .;
|
||||
} :data.init2
|
||||
/* use another section data.init2, see PERCPU_VADDR() above */
|
||||
NOSAVE_DATA
|
||||
}
|
||||
#endif
|
||||
|
||||
/* BSS */
|
||||
|
|
|
@ -796,7 +796,7 @@ int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
|
|||
return ret;
|
||||
|
||||
#else
|
||||
reserve_bootmem(phys, len, BOOTMEM_DEFAULT);
|
||||
reserve_bootmem(phys, len, flags);
|
||||
#endif
|
||||
|
||||
if (phys+len <= MAX_DMA_PFN*PAGE_SIZE) {
|
||||
|
|
|
@ -623,7 +623,8 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,
|
|||
return ret;
|
||||
|
||||
if (flags != want_flags) {
|
||||
if (strict_prot || !is_new_memtype_allowed(want_flags, flags)) {
|
||||
if (strict_prot ||
|
||||
!is_new_memtype_allowed(paddr, size, want_flags, flags)) {
|
||||
free_memtype(paddr, paddr + size);
|
||||
printk(KERN_ERR "%s:%d map pfn expected mapping type %s"
|
||||
" for %Lx-%Lx, got %s\n",
|
||||
|
|
|
@ -183,18 +183,17 @@ static void flush_tlb_others_ipi(const struct cpumask *cpumask,
|
|||
|
||||
f->flush_mm = mm;
|
||||
f->flush_va = va;
|
||||
cpumask_andnot(to_cpumask(f->flush_cpumask),
|
||||
cpumask, cpumask_of(smp_processor_id()));
|
||||
if (cpumask_andnot(to_cpumask(f->flush_cpumask), cpumask, cpumask_of(smp_processor_id()))) {
|
||||
/*
|
||||
* We have to send the IPI only to
|
||||
* CPUs affected.
|
||||
*/
|
||||
apic->send_IPI_mask(to_cpumask(f->flush_cpumask),
|
||||
INVALIDATE_TLB_VECTOR_START + sender);
|
||||
|
||||
/*
|
||||
* We have to send the IPI only to
|
||||
* CPUs affected.
|
||||
*/
|
||||
apic->send_IPI_mask(to_cpumask(f->flush_cpumask),
|
||||
INVALIDATE_TLB_VECTOR_START + sender);
|
||||
|
||||
while (!cpumask_empty(to_cpumask(f->flush_cpumask)))
|
||||
cpu_relax();
|
||||
while (!cpumask_empty(to_cpumask(f->flush_cpumask)))
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
f->flush_mm = NULL;
|
||||
f->flush_va = 0;
|
||||
|
|
|
@ -5,6 +5,10 @@ CFLAGS_REMOVE_time.o = -pg
|
|||
CFLAGS_REMOVE_irq.o = -pg
|
||||
endif
|
||||
|
||||
# Make sure early boot has no stackprotector
|
||||
nostackp := $(call cc-option, -fno-stack-protector)
|
||||
CFLAGS_enlighten.o := $(nostackp)
|
||||
|
||||
obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \
|
||||
time.o xen-asm.o xen-asm_$(BITS).o \
|
||||
grant-table.o suspend.o
|
||||
|
|
|
@ -974,10 +974,6 @@ asmlinkage void __init xen_start_kernel(void)
|
|||
|
||||
xen_domain_type = XEN_PV_DOMAIN;
|
||||
|
||||
BUG_ON(memcmp(xen_start_info->magic, "xen-3", 5) != 0);
|
||||
|
||||
xen_setup_features();
|
||||
|
||||
/* Install Xen paravirt ops */
|
||||
pv_info = xen_info;
|
||||
pv_init_ops = xen_init_ops;
|
||||
|
@ -986,8 +982,15 @@ asmlinkage void __init xen_start_kernel(void)
|
|||
pv_apic_ops = xen_apic_ops;
|
||||
pv_mmu_ops = xen_mmu_ops;
|
||||
|
||||
xen_init_irq_ops();
|
||||
#ifdef CONFIG_X86_64
|
||||
/*
|
||||
* Setup percpu state. We only need to do this for 64-bit
|
||||
* because 32-bit already has %fs set properly.
|
||||
*/
|
||||
load_percpu_segment(0);
|
||||
#endif
|
||||
|
||||
xen_init_irq_ops();
|
||||
xen_init_cpuid_mask();
|
||||
|
||||
#ifdef CONFIG_X86_LOCAL_APIC
|
||||
|
@ -997,6 +1000,8 @@ asmlinkage void __init xen_start_kernel(void)
|
|||
set_xen_basic_apic_ops();
|
||||
#endif
|
||||
|
||||
xen_setup_features();
|
||||
|
||||
if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) {
|
||||
pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start;
|
||||
pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit;
|
||||
|
@ -1004,13 +1009,6 @@ asmlinkage void __init xen_start_kernel(void)
|
|||
|
||||
machine_ops = xen_machine_ops;
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
/*
|
||||
* Setup percpu state. We only need to do this for 64-bit
|
||||
* because 32-bit already has %fs set properly.
|
||||
*/
|
||||
load_percpu_segment(0);
|
||||
#endif
|
||||
/*
|
||||
* The only reliable way to retain the initial address of the
|
||||
* percpu gdt_page is to remember it here, so we can go and
|
||||
|
|
|
@ -162,8 +162,9 @@ static void lapic_timer_check_state(int state, struct acpi_processor *pr,
|
|||
pr->power.timer_broadcast_on_state = state;
|
||||
}
|
||||
|
||||
static void lapic_timer_propagate_broadcast(struct acpi_processor *pr)
|
||||
static void lapic_timer_propagate_broadcast(void *arg)
|
||||
{
|
||||
struct acpi_processor *pr = (struct acpi_processor *) arg;
|
||||
unsigned long reason;
|
||||
|
||||
reason = pr->power.timer_broadcast_on_state < INT_MAX ?
|
||||
|
@ -635,7 +636,8 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
|
|||
working++;
|
||||
}
|
||||
|
||||
lapic_timer_propagate_broadcast(pr);
|
||||
smp_call_function_single(pr->id, lapic_timer_propagate_broadcast,
|
||||
pr, 1);
|
||||
|
||||
return (working);
|
||||
}
|
||||
|
|
|
@ -508,8 +508,9 @@ static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)
|
|||
* be obtained while the delayed work queue halt ensures that no more
|
||||
* data is fed to the ldisc.
|
||||
*
|
||||
* In order to wait for any existing references to complete see
|
||||
* tty_ldisc_wait_idle.
|
||||
* You need to do a 'flush_scheduled_work()' (outside the ldisc_mutex)
|
||||
* in order to make sure any currently executing ldisc work is also
|
||||
* flushed.
|
||||
*/
|
||||
|
||||
static int tty_ldisc_halt(struct tty_struct *tty)
|
||||
|
@ -753,11 +754,14 @@ void tty_ldisc_hangup(struct tty_struct *tty)
|
|||
* N_TTY.
|
||||
*/
|
||||
if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) {
|
||||
/* Make sure the old ldisc is quiescent */
|
||||
tty_ldisc_halt(tty);
|
||||
flush_scheduled_work();
|
||||
|
||||
/* Avoid racing set_ldisc or tty_ldisc_release */
|
||||
mutex_lock(&tty->ldisc_mutex);
|
||||
if (tty->ldisc) { /* Not yet closed */
|
||||
/* Switch back to N_TTY */
|
||||
tty_ldisc_halt(tty);
|
||||
tty_ldisc_reinit(tty);
|
||||
/* At this point we have a closed ldisc and we want to
|
||||
reopen it. We could defer this to the next open but
|
||||
|
|
|
@ -257,31 +257,6 @@ void *drm_mode_object_find(struct drm_device *dev, uint32_t id, uint32_t type)
|
|||
}
|
||||
EXPORT_SYMBOL(drm_mode_object_find);
|
||||
|
||||
/**
|
||||
* drm_crtc_from_fb - find the CRTC structure associated with an fb
|
||||
* @dev: DRM device
|
||||
* @fb: framebuffer in question
|
||||
*
|
||||
* LOCKING:
|
||||
* Caller must hold mode_config lock.
|
||||
*
|
||||
* Find CRTC in the mode_config structure that matches @fb.
|
||||
*
|
||||
* RETURNS:
|
||||
* Pointer to the CRTC or NULL if it wasn't found.
|
||||
*/
|
||||
struct drm_crtc *drm_crtc_from_fb(struct drm_device *dev,
|
||||
struct drm_framebuffer *fb)
|
||||
{
|
||||
struct drm_crtc *crtc;
|
||||
|
||||
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
|
||||
if (crtc->fb == fb)
|
||||
return crtc;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* drm_framebuffer_init - initialize a framebuffer
|
||||
* @dev: DRM device
|
||||
|
@ -328,11 +303,20 @@ void drm_framebuffer_cleanup(struct drm_framebuffer *fb)
|
|||
{
|
||||
struct drm_device *dev = fb->dev;
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_mode_set set;
|
||||
int ret;
|
||||
|
||||
/* remove from any CRTC */
|
||||
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
|
||||
if (crtc->fb == fb)
|
||||
crtc->fb = NULL;
|
||||
if (crtc->fb == fb) {
|
||||
/* should turn off the crtc */
|
||||
memset(&set, 0, sizeof(struct drm_mode_set));
|
||||
set.crtc = crtc;
|
||||
set.fb = NULL;
|
||||
ret = crtc->funcs->set_config(&set);
|
||||
if (ret)
|
||||
DRM_ERROR("failed to reset crtc %p when fb was deleted\n", crtc);
|
||||
}
|
||||
}
|
||||
|
||||
drm_mode_object_put(dev, &fb->base);
|
||||
|
@ -1511,7 +1495,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
|
|||
set.mode = mode;
|
||||
set.connectors = connector_set;
|
||||
set.num_connectors = crtc_req->count_connectors;
|
||||
set.fb =fb;
|
||||
set.fb = fb;
|
||||
ret = crtc->funcs->set_config(&set);
|
||||
|
||||
out:
|
||||
|
|
|
@ -502,12 +502,40 @@ static int add_detailed_info(struct drm_connector *connector,
|
|||
struct detailed_non_pixel *data = &timing->data.other_data;
|
||||
struct drm_display_mode *newmode;
|
||||
|
||||
/* EDID up to and including 1.2 may put monitor info here */
|
||||
if (edid->version == 1 && edid->revision < 3)
|
||||
continue;
|
||||
/* X server check is version 1.1 or higher */
|
||||
if (edid->version == 1 && edid->revision >= 1 &&
|
||||
!timing->pixel_clock) {
|
||||
/* Other timing or info */
|
||||
switch (data->type) {
|
||||
case EDID_DETAIL_MONITOR_SERIAL:
|
||||
break;
|
||||
case EDID_DETAIL_MONITOR_STRING:
|
||||
break;
|
||||
case EDID_DETAIL_MONITOR_RANGE:
|
||||
/* Get monitor range data */
|
||||
break;
|
||||
case EDID_DETAIL_MONITOR_NAME:
|
||||
break;
|
||||
case EDID_DETAIL_MONITOR_CPDATA:
|
||||
break;
|
||||
case EDID_DETAIL_STD_MODES:
|
||||
/* Five modes per detailed section */
|
||||
for (j = 0; j < 5; i++) {
|
||||
struct std_timing *std;
|
||||
struct drm_display_mode *newmode;
|
||||
|
||||
/* Detailed mode timing */
|
||||
if (timing->pixel_clock) {
|
||||
std = &data->data.timings[j];
|
||||
newmode = drm_mode_std(dev, std);
|
||||
if (newmode) {
|
||||
drm_mode_probed_add(connector, newmode);
|
||||
modes++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
newmode = drm_mode_detailed(dev, edid, timing, quirks);
|
||||
if (!newmode)
|
||||
continue;
|
||||
|
@ -518,38 +546,6 @@ static int add_detailed_info(struct drm_connector *connector,
|
|||
drm_mode_probed_add(connector, newmode);
|
||||
|
||||
modes++;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Other timing or info */
|
||||
switch (data->type) {
|
||||
case EDID_DETAIL_MONITOR_SERIAL:
|
||||
break;
|
||||
case EDID_DETAIL_MONITOR_STRING:
|
||||
break;
|
||||
case EDID_DETAIL_MONITOR_RANGE:
|
||||
/* Get monitor range data */
|
||||
break;
|
||||
case EDID_DETAIL_MONITOR_NAME:
|
||||
break;
|
||||
case EDID_DETAIL_MONITOR_CPDATA:
|
||||
break;
|
||||
case EDID_DETAIL_STD_MODES:
|
||||
/* Five modes per detailed section */
|
||||
for (j = 0; j < 5; i++) {
|
||||
struct std_timing *std;
|
||||
struct drm_display_mode *newmode;
|
||||
|
||||
std = &data->data.timings[j];
|
||||
newmode = drm_mode_std(dev, std);
|
||||
if (newmode) {
|
||||
drm_mode_probed_add(connector, newmode);
|
||||
modes++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,44 +22,50 @@
|
|||
#define to_drm_minor(d) container_of(d, struct drm_minor, kdev)
|
||||
#define to_drm_connector(d) container_of(d, struct drm_connector, kdev)
|
||||
|
||||
static struct device_type drm_sysfs_device_minor = {
|
||||
.name = "drm_minor"
|
||||
};
|
||||
|
||||
/**
|
||||
* drm_sysfs_suspend - DRM class suspend hook
|
||||
* drm_class_suspend - DRM class suspend hook
|
||||
* @dev: Linux device to suspend
|
||||
* @state: power state to enter
|
||||
*
|
||||
* Just figures out what the actual struct drm_device associated with
|
||||
* @dev is and calls its suspend hook, if present.
|
||||
*/
|
||||
static int drm_sysfs_suspend(struct device *dev, pm_message_t state)
|
||||
static int drm_class_suspend(struct device *dev, pm_message_t state)
|
||||
{
|
||||
struct drm_minor *drm_minor = to_drm_minor(dev);
|
||||
struct drm_device *drm_dev = drm_minor->dev;
|
||||
|
||||
if (drm_minor->type == DRM_MINOR_LEGACY &&
|
||||
!drm_core_check_feature(drm_dev, DRIVER_MODESET) &&
|
||||
drm_dev->driver->suspend)
|
||||
return drm_dev->driver->suspend(drm_dev, state);
|
||||
if (dev->type == &drm_sysfs_device_minor) {
|
||||
struct drm_minor *drm_minor = to_drm_minor(dev);
|
||||
struct drm_device *drm_dev = drm_minor->dev;
|
||||
|
||||
if (drm_minor->type == DRM_MINOR_LEGACY &&
|
||||
!drm_core_check_feature(drm_dev, DRIVER_MODESET) &&
|
||||
drm_dev->driver->suspend)
|
||||
return drm_dev->driver->suspend(drm_dev, state);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* drm_sysfs_resume - DRM class resume hook
|
||||
* drm_class_resume - DRM class resume hook
|
||||
* @dev: Linux device to resume
|
||||
*
|
||||
* Just figures out what the actual struct drm_device associated with
|
||||
* @dev is and calls its resume hook, if present.
|
||||
*/
|
||||
static int drm_sysfs_resume(struct device *dev)
|
||||
static int drm_class_resume(struct device *dev)
|
||||
{
|
||||
struct drm_minor *drm_minor = to_drm_minor(dev);
|
||||
struct drm_device *drm_dev = drm_minor->dev;
|
||||
|
||||
if (drm_minor->type == DRM_MINOR_LEGACY &&
|
||||
!drm_core_check_feature(drm_dev, DRIVER_MODESET) &&
|
||||
drm_dev->driver->resume)
|
||||
return drm_dev->driver->resume(drm_dev);
|
||||
if (dev->type == &drm_sysfs_device_minor) {
|
||||
struct drm_minor *drm_minor = to_drm_minor(dev);
|
||||
struct drm_device *drm_dev = drm_minor->dev;
|
||||
|
||||
if (drm_minor->type == DRM_MINOR_LEGACY &&
|
||||
!drm_core_check_feature(drm_dev, DRIVER_MODESET) &&
|
||||
drm_dev->driver->resume)
|
||||
return drm_dev->driver->resume(drm_dev);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -99,8 +105,8 @@ struct class *drm_sysfs_create(struct module *owner, char *name)
|
|||
goto err_out;
|
||||
}
|
||||
|
||||
class->suspend = drm_sysfs_suspend;
|
||||
class->resume = drm_sysfs_resume;
|
||||
class->suspend = drm_class_suspend;
|
||||
class->resume = drm_class_resume;
|
||||
|
||||
err = class_create_file(class, &class_attr_version);
|
||||
if (err)
|
||||
|
@ -480,6 +486,7 @@ int drm_sysfs_device_add(struct drm_minor *minor)
|
|||
minor->kdev.class = drm_class;
|
||||
minor->kdev.release = drm_sysfs_device_release;
|
||||
minor->kdev.devt = minor->device;
|
||||
minor->kdev.type = &drm_sysfs_device_minor;
|
||||
if (minor->type == DRM_MINOR_CONTROL)
|
||||
minor_str = "controlD%d";
|
||||
else if (minor->type == DRM_MINOR_RENDER)
|
||||
|
|
|
@ -253,6 +253,72 @@ void r100_mc_fini(struct radeon_device *rdev)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Interrupts
|
||||
*/
|
||||
int r100_irq_set(struct radeon_device *rdev)
|
||||
{
|
||||
uint32_t tmp = 0;
|
||||
|
||||
if (rdev->irq.sw_int) {
|
||||
tmp |= RADEON_SW_INT_ENABLE;
|
||||
}
|
||||
if (rdev->irq.crtc_vblank_int[0]) {
|
||||
tmp |= RADEON_CRTC_VBLANK_MASK;
|
||||
}
|
||||
if (rdev->irq.crtc_vblank_int[1]) {
|
||||
tmp |= RADEON_CRTC2_VBLANK_MASK;
|
||||
}
|
||||
WREG32(RADEON_GEN_INT_CNTL, tmp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline uint32_t r100_irq_ack(struct radeon_device *rdev)
|
||||
{
|
||||
uint32_t irqs = RREG32(RADEON_GEN_INT_STATUS);
|
||||
uint32_t irq_mask = RADEON_SW_INT_TEST | RADEON_CRTC_VBLANK_STAT |
|
||||
RADEON_CRTC2_VBLANK_STAT;
|
||||
|
||||
if (irqs) {
|
||||
WREG32(RADEON_GEN_INT_STATUS, irqs);
|
||||
}
|
||||
return irqs & irq_mask;
|
||||
}
|
||||
|
||||
int r100_irq_process(struct radeon_device *rdev)
|
||||
{
|
||||
uint32_t status;
|
||||
|
||||
status = r100_irq_ack(rdev);
|
||||
if (!status) {
|
||||
return IRQ_NONE;
|
||||
}
|
||||
while (status) {
|
||||
/* SW interrupt */
|
||||
if (status & RADEON_SW_INT_TEST) {
|
||||
radeon_fence_process(rdev);
|
||||
}
|
||||
/* Vertical blank interrupts */
|
||||
if (status & RADEON_CRTC_VBLANK_STAT) {
|
||||
drm_handle_vblank(rdev->ddev, 0);
|
||||
}
|
||||
if (status & RADEON_CRTC2_VBLANK_STAT) {
|
||||
drm_handle_vblank(rdev->ddev, 1);
|
||||
}
|
||||
status = r100_irq_ack(rdev);
|
||||
}
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
u32 r100_get_vblank_counter(struct radeon_device *rdev, int crtc)
|
||||
{
|
||||
if (crtc == 0)
|
||||
return RREG32(RADEON_CRTC_CRNT_FRAME);
|
||||
else
|
||||
return RREG32(RADEON_CRTC2_CRNT_FRAME);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Fence emission
|
||||
*/
|
||||
|
@ -1025,6 +1091,16 @@ static int r100_packet0_check(struct radeon_cs_parser *p,
|
|||
tmp |= tile_flags;
|
||||
ib[idx] = tmp;
|
||||
break;
|
||||
case RADEON_RB3D_ZPASS_ADDR:
|
||||
r = r100_cs_packet_next_reloc(p, &reloc);
|
||||
if (r) {
|
||||
DRM_ERROR("No reloc for ib[%d]=0x%04X\n",
|
||||
idx, reg);
|
||||
r100_cs_dump_packet(p, pkt);
|
||||
return r;
|
||||
}
|
||||
ib[idx] = ib_chunk->kdata[idx] + ((u32)reloc->lobj.gpu_offset);
|
||||
break;
|
||||
default:
|
||||
/* FIXME: we don't want to allow anyothers packet */
|
||||
break;
|
||||
|
@ -1556,26 +1632,6 @@ void r100_pll_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
|
|||
r100_pll_errata_after_data(rdev);
|
||||
}
|
||||
|
||||
uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg)
|
||||
{
|
||||
if (reg < 0x10000)
|
||||
return readl(((void __iomem *)rdev->rmmio) + reg);
|
||||
else {
|
||||
writel(reg, ((void __iomem *)rdev->rmmio) + RADEON_MM_INDEX);
|
||||
return readl(((void __iomem *)rdev->rmmio) + RADEON_MM_DATA);
|
||||
}
|
||||
}
|
||||
|
||||
void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
|
||||
{
|
||||
if (reg < 0x10000)
|
||||
writel(v, ((void __iomem *)rdev->rmmio) + reg);
|
||||
else {
|
||||
writel(reg, ((void __iomem *)rdev->rmmio) + RADEON_MM_INDEX);
|
||||
writel(v, ((void __iomem *)rdev->rmmio) + RADEON_MM_DATA);
|
||||
}
|
||||
}
|
||||
|
||||
int r100_init(struct radeon_device *rdev)
|
||||
{
|
||||
return 0;
|
||||
|
|
|
@ -83,8 +83,8 @@ void rv370_pcie_gart_tlb_flush(struct radeon_device *rdev)
|
|||
WREG32_PCIE(RADEON_PCIE_TX_GART_CNTL, tmp | RADEON_PCIE_TX_GART_INVALIDATE_TLB);
|
||||
(void)RREG32_PCIE(RADEON_PCIE_TX_GART_CNTL);
|
||||
WREG32_PCIE(RADEON_PCIE_TX_GART_CNTL, tmp);
|
||||
mb();
|
||||
}
|
||||
mb();
|
||||
}
|
||||
|
||||
int rv370_pcie_gart_enable(struct radeon_device *rdev)
|
||||
|
@ -448,6 +448,7 @@ void r300_gpu_init(struct radeon_device *rdev)
|
|||
/* rv350,rv370,rv380 */
|
||||
rdev->num_gb_pipes = 1;
|
||||
}
|
||||
rdev->num_z_pipes = 1;
|
||||
gb_tile_config = (R300_ENABLE_TILING | R300_TILE_SIZE_16);
|
||||
switch (rdev->num_gb_pipes) {
|
||||
case 2:
|
||||
|
@ -486,7 +487,8 @@ void r300_gpu_init(struct radeon_device *rdev)
|
|||
printk(KERN_WARNING "Failed to wait MC idle while "
|
||||
"programming pipes. Bad things might happen.\n");
|
||||
}
|
||||
DRM_INFO("radeon: %d pipes initialized.\n", rdev->num_gb_pipes);
|
||||
DRM_INFO("radeon: %d quad pipes, %d Z pipes initialized.\n",
|
||||
rdev->num_gb_pipes, rdev->num_z_pipes);
|
||||
}
|
||||
|
||||
int r300_ga_reset(struct radeon_device *rdev)
|
||||
|
@ -592,27 +594,6 @@ void r300_vram_info(struct radeon_device *rdev)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Indirect registers accessor
|
||||
*/
|
||||
uint32_t rv370_pcie_rreg(struct radeon_device *rdev, uint32_t reg)
|
||||
{
|
||||
uint32_t r;
|
||||
|
||||
WREG8(RADEON_PCIE_INDEX, ((reg) & 0xff));
|
||||
(void)RREG32(RADEON_PCIE_INDEX);
|
||||
r = RREG32(RADEON_PCIE_DATA);
|
||||
return r;
|
||||
}
|
||||
|
||||
void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
|
||||
{
|
||||
WREG8(RADEON_PCIE_INDEX, ((reg) & 0xff));
|
||||
(void)RREG32(RADEON_PCIE_INDEX);
|
||||
WREG32(RADEON_PCIE_DATA, (v));
|
||||
(void)RREG32(RADEON_PCIE_DATA);
|
||||
}
|
||||
|
||||
/*
|
||||
* PCIE Lanes
|
||||
*/
|
||||
|
@ -1403,6 +1384,21 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
|
|||
tmp = (ib_chunk->kdata[idx] >> 22) & 0xF;
|
||||
track->textures[i].txdepth = tmp;
|
||||
break;
|
||||
case R300_ZB_ZPASS_ADDR:
|
||||
r = r100_cs_packet_next_reloc(p, &reloc);
|
||||
if (r) {
|
||||
DRM_ERROR("No reloc for ib[%d]=0x%04X\n",
|
||||
idx, reg);
|
||||
r100_cs_dump_packet(p, pkt);
|
||||
return r;
|
||||
}
|
||||
ib[idx] = ib_chunk->kdata[idx] + ((u32)reloc->lobj.gpu_offset);
|
||||
break;
|
||||
case 0x4be8:
|
||||
/* valid register only on RV530 */
|
||||
if (p->rdev->family == CHIP_RV530)
|
||||
break;
|
||||
/* fallthrough do not move */
|
||||
default:
|
||||
printk(KERN_ERR "Forbidden register 0x%04X in cs at %d\n",
|
||||
reg, idx);
|
||||
|
|
|
@ -165,7 +165,18 @@ void r420_pipes_init(struct radeon_device *rdev)
|
|||
printk(KERN_WARNING "Failed to wait GUI idle while "
|
||||
"programming pipes. Bad things might happen.\n");
|
||||
}
|
||||
DRM_INFO("radeon: %d pipes initialized.\n", rdev->num_gb_pipes);
|
||||
|
||||
if (rdev->family == CHIP_RV530) {
|
||||
tmp = RREG32(RV530_GB_PIPE_SELECT2);
|
||||
if ((tmp & 3) == 3)
|
||||
rdev->num_z_pipes = 2;
|
||||
else
|
||||
rdev->num_z_pipes = 1;
|
||||
} else
|
||||
rdev->num_z_pipes = 1;
|
||||
|
||||
DRM_INFO("radeon: %d quad pipes, %d z pipes initialized.\n",
|
||||
rdev->num_gb_pipes, rdev->num_z_pipes);
|
||||
}
|
||||
|
||||
void r420_gpu_init(struct radeon_device *rdev)
|
||||
|
|
|
@ -350,6 +350,7 @@
|
|||
#define AVIVO_D1CRTC_BLANK_CONTROL 0x6084
|
||||
#define AVIVO_D1CRTC_INTERLACE_CONTROL 0x6088
|
||||
#define AVIVO_D1CRTC_INTERLACE_STATUS 0x608c
|
||||
#define AVIVO_D1CRTC_FRAME_COUNT 0x60a4
|
||||
#define AVIVO_D1CRTC_STEREO_CONTROL 0x60c4
|
||||
|
||||
/* master controls */
|
||||
|
@ -438,14 +439,15 @@
|
|||
# define AVIVO_DC_LB_DISP1_END_ADR_SHIFT 4
|
||||
# define AVIVO_DC_LB_DISP1_END_ADR_MASK 0x7ff
|
||||
|
||||
#define R500_DxMODE_INT_MASK 0x6540
|
||||
#define R500_D1MODE_INT_MASK (1<<0)
|
||||
#define R500_D2MODE_INT_MASK (1<<8)
|
||||
|
||||
#define AVIVO_D1MODE_DATA_FORMAT 0x6528
|
||||
# define AVIVO_D1MODE_INTERLEAVE_EN (1 << 0)
|
||||
#define AVIVO_D1MODE_DESKTOP_HEIGHT 0x652C
|
||||
#define AVIVO_D1MODE_VBLANK_STATUS 0x6534
|
||||
# define AVIVO_VBLANK_ACK (1 << 4)
|
||||
#define AVIVO_D1MODE_VLINE_START_END 0x6538
|
||||
#define AVIVO_DxMODE_INT_MASK 0x6540
|
||||
# define AVIVO_D1MODE_INT_MASK (1 << 0)
|
||||
# define AVIVO_D2MODE_INT_MASK (1 << 8)
|
||||
#define AVIVO_D1MODE_VIEWPORT_START 0x6580
|
||||
#define AVIVO_D1MODE_VIEWPORT_SIZE 0x6584
|
||||
#define AVIVO_D1MODE_EXT_OVERSCAN_LEFT_RIGHT 0x6588
|
||||
|
@ -475,6 +477,7 @@
|
|||
#define AVIVO_D2CRTC_BLANK_CONTROL 0x6884
|
||||
#define AVIVO_D2CRTC_INTERLACE_CONTROL 0x6888
|
||||
#define AVIVO_D2CRTC_INTERLACE_STATUS 0x688c
|
||||
#define AVIVO_D2CRTC_FRAME_COUNT 0x68a4
|
||||
#define AVIVO_D2CRTC_STEREO_CONTROL 0x68c4
|
||||
|
||||
#define AVIVO_D2GRPH_ENABLE 0x6900
|
||||
|
@ -497,6 +500,7 @@
|
|||
#define AVIVO_D2CUR_SIZE 0x6c10
|
||||
#define AVIVO_D2CUR_POSITION 0x6c14
|
||||
|
||||
#define AVIVO_D2MODE_VBLANK_STATUS 0x6d34
|
||||
#define AVIVO_D2MODE_VLINE_START_END 0x6d38
|
||||
#define AVIVO_D2MODE_VIEWPORT_START 0x6d80
|
||||
#define AVIVO_D2MODE_VIEWPORT_SIZE 0x6d84
|
||||
|
@ -748,4 +752,8 @@
|
|||
# define AVIVO_I2C_EN (1 << 0)
|
||||
# define AVIVO_I2C_RESET (1 << 8)
|
||||
|
||||
#define AVIVO_DISP_INTERRUPT_STATUS 0x7edc
|
||||
# define AVIVO_D1_VBLANK_INTERRUPT (1 << 4)
|
||||
# define AVIVO_D2_VBLANK_INTERRUPT (1 << 5)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -177,7 +177,6 @@ void r520_gpu_init(struct radeon_device *rdev)
|
|||
*/
|
||||
/* workaround for RV530 */
|
||||
if (rdev->family == CHIP_RV530) {
|
||||
WREG32(0x4124, 1);
|
||||
WREG32(0x4128, 0xFF);
|
||||
}
|
||||
r420_pipes_init(rdev);
|
||||
|
|
|
@ -242,6 +242,7 @@ int radeon_object_pin(struct radeon_object *robj, uint32_t domain,
|
|||
uint64_t *gpu_addr);
|
||||
void radeon_object_unpin(struct radeon_object *robj);
|
||||
int radeon_object_wait(struct radeon_object *robj);
|
||||
int radeon_object_busy_domain(struct radeon_object *robj, uint32_t *cur_placement);
|
||||
int radeon_object_evict_vram(struct radeon_device *rdev);
|
||||
int radeon_object_mmap(struct radeon_object *robj, uint64_t *offset);
|
||||
void radeon_object_force_delete(struct radeon_device *rdev);
|
||||
|
@ -574,6 +575,7 @@ struct radeon_asic {
|
|||
void (*ring_start)(struct radeon_device *rdev);
|
||||
int (*irq_set)(struct radeon_device *rdev);
|
||||
int (*irq_process)(struct radeon_device *rdev);
|
||||
u32 (*get_vblank_counter)(struct radeon_device *rdev, int crtc);
|
||||
void (*fence_ring_emit)(struct radeon_device *rdev, struct radeon_fence *fence);
|
||||
int (*cs_parse)(struct radeon_cs_parser *p);
|
||||
int (*copy_blit)(struct radeon_device *rdev,
|
||||
|
@ -653,6 +655,7 @@ struct radeon_device {
|
|||
int usec_timeout;
|
||||
enum radeon_pll_errata pll_errata;
|
||||
int num_gb_pipes;
|
||||
int num_z_pipes;
|
||||
int disp_priority;
|
||||
/* BIOS */
|
||||
uint8_t *bios;
|
||||
|
@ -666,14 +669,11 @@ struct radeon_device {
|
|||
resource_size_t rmmio_base;
|
||||
resource_size_t rmmio_size;
|
||||
void *rmmio;
|
||||
radeon_rreg_t mm_rreg;
|
||||
radeon_wreg_t mm_wreg;
|
||||
radeon_rreg_t mc_rreg;
|
||||
radeon_wreg_t mc_wreg;
|
||||
radeon_rreg_t pll_rreg;
|
||||
radeon_wreg_t pll_wreg;
|
||||
radeon_rreg_t pcie_rreg;
|
||||
radeon_wreg_t pcie_wreg;
|
||||
uint32_t pcie_reg_mask;
|
||||
radeon_rreg_t pciep_rreg;
|
||||
radeon_wreg_t pciep_wreg;
|
||||
struct radeon_clock clock;
|
||||
|
@ -705,22 +705,42 @@ int radeon_device_init(struct radeon_device *rdev,
|
|||
void radeon_device_fini(struct radeon_device *rdev);
|
||||
int radeon_gpu_wait_for_idle(struct radeon_device *rdev);
|
||||
|
||||
static inline uint32_t r100_mm_rreg(struct radeon_device *rdev, uint32_t reg)
|
||||
{
|
||||
if (reg < 0x10000)
|
||||
return readl(((void __iomem *)rdev->rmmio) + reg);
|
||||
else {
|
||||
writel(reg, ((void __iomem *)rdev->rmmio) + RADEON_MM_INDEX);
|
||||
return readl(((void __iomem *)rdev->rmmio) + RADEON_MM_DATA);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void r100_mm_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
|
||||
{
|
||||
if (reg < 0x10000)
|
||||
writel(v, ((void __iomem *)rdev->rmmio) + reg);
|
||||
else {
|
||||
writel(reg, ((void __iomem *)rdev->rmmio) + RADEON_MM_INDEX);
|
||||
writel(v, ((void __iomem *)rdev->rmmio) + RADEON_MM_DATA);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Registers read & write functions.
|
||||
*/
|
||||
#define RREG8(reg) readb(((void __iomem *)rdev->rmmio) + (reg))
|
||||
#define WREG8(reg, v) writeb(v, ((void __iomem *)rdev->rmmio) + (reg))
|
||||
#define RREG32(reg) rdev->mm_rreg(rdev, (reg))
|
||||
#define WREG32(reg, v) rdev->mm_wreg(rdev, (reg), (v))
|
||||
#define RREG32(reg) r100_mm_rreg(rdev, (reg))
|
||||
#define WREG32(reg, v) r100_mm_wreg(rdev, (reg), (v))
|
||||
#define REG_SET(FIELD, v) (((v) << FIELD##_SHIFT) & FIELD##_MASK)
|
||||
#define REG_GET(FIELD, v) (((v) << FIELD##_SHIFT) & FIELD##_MASK)
|
||||
#define RREG32_PLL(reg) rdev->pll_rreg(rdev, (reg))
|
||||
#define WREG32_PLL(reg, v) rdev->pll_wreg(rdev, (reg), (v))
|
||||
#define RREG32_MC(reg) rdev->mc_rreg(rdev, (reg))
|
||||
#define WREG32_MC(reg, v) rdev->mc_wreg(rdev, (reg), (v))
|
||||
#define RREG32_PCIE(reg) rdev->pcie_rreg(rdev, (reg))
|
||||
#define WREG32_PCIE(reg, v) rdev->pcie_wreg(rdev, (reg), (v))
|
||||
#define RREG32_PCIE(reg) rv370_pcie_rreg(rdev, (reg))
|
||||
#define WREG32_PCIE(reg, v) rv370_pcie_wreg(rdev, (reg), (v))
|
||||
#define WREG32_P(reg, val, mask) \
|
||||
do { \
|
||||
uint32_t tmp_ = RREG32(reg); \
|
||||
|
@ -736,6 +756,24 @@ int radeon_gpu_wait_for_idle(struct radeon_device *rdev);
|
|||
WREG32_PLL(reg, tmp_); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Indirect registers accessor
|
||||
*/
|
||||
static inline uint32_t rv370_pcie_rreg(struct radeon_device *rdev, uint32_t reg)
|
||||
{
|
||||
uint32_t r;
|
||||
|
||||
WREG32(RADEON_PCIE_INDEX, ((reg) & rdev->pcie_reg_mask));
|
||||
r = RREG32(RADEON_PCIE_DATA);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
|
||||
{
|
||||
WREG32(RADEON_PCIE_INDEX, ((reg) & rdev->pcie_reg_mask));
|
||||
WREG32(RADEON_PCIE_DATA, (v));
|
||||
}
|
||||
|
||||
void r100_pll_errata_after_index(struct radeon_device *rdev);
|
||||
|
||||
|
||||
|
@ -862,6 +900,7 @@ static inline void radeon_ring_write(struct radeon_device *rdev, uint32_t v)
|
|||
#define radeon_ring_start(rdev) (rdev)->asic->ring_start((rdev))
|
||||
#define radeon_irq_set(rdev) (rdev)->asic->irq_set((rdev))
|
||||
#define radeon_irq_process(rdev) (rdev)->asic->irq_process((rdev))
|
||||
#define radeon_get_vblank_counter(rdev, crtc) (rdev)->asic->get_vblank_counter((rdev), (crtc))
|
||||
#define radeon_fence_ring_emit(rdev, fence) (rdev)->asic->fence_ring_emit((rdev), (fence))
|
||||
#define radeon_copy_blit(rdev, s, d, np, f) (rdev)->asic->copy_blit((rdev), (s), (d), (np), (f))
|
||||
#define radeon_copy_dma(rdev, s, d, np, f) (rdev)->asic->copy_dma((rdev), (s), (d), (np), (f))
|
||||
|
|
|
@ -49,6 +49,7 @@ void r100_vram_info(struct radeon_device *rdev);
|
|||
int r100_gpu_reset(struct radeon_device *rdev);
|
||||
int r100_mc_init(struct radeon_device *rdev);
|
||||
void r100_mc_fini(struct radeon_device *rdev);
|
||||
u32 r100_get_vblank_counter(struct radeon_device *rdev, int crtc);
|
||||
int r100_wb_init(struct radeon_device *rdev);
|
||||
void r100_wb_fini(struct radeon_device *rdev);
|
||||
int r100_gart_enable(struct radeon_device *rdev);
|
||||
|
@ -96,6 +97,7 @@ static struct radeon_asic r100_asic = {
|
|||
.ring_start = &r100_ring_start,
|
||||
.irq_set = &r100_irq_set,
|
||||
.irq_process = &r100_irq_process,
|
||||
.get_vblank_counter = &r100_get_vblank_counter,
|
||||
.fence_ring_emit = &r100_fence_ring_emit,
|
||||
.cs_parse = &r100_cs_parse,
|
||||
.copy_blit = &r100_copy_blit,
|
||||
|
@ -156,6 +158,7 @@ static struct radeon_asic r300_asic = {
|
|||
.ring_start = &r300_ring_start,
|
||||
.irq_set = &r100_irq_set,
|
||||
.irq_process = &r100_irq_process,
|
||||
.get_vblank_counter = &r100_get_vblank_counter,
|
||||
.fence_ring_emit = &r300_fence_ring_emit,
|
||||
.cs_parse = &r300_cs_parse,
|
||||
.copy_blit = &r100_copy_blit,
|
||||
|
@ -196,6 +199,7 @@ static struct radeon_asic r420_asic = {
|
|||
.ring_start = &r300_ring_start,
|
||||
.irq_set = &r100_irq_set,
|
||||
.irq_process = &r100_irq_process,
|
||||
.get_vblank_counter = &r100_get_vblank_counter,
|
||||
.fence_ring_emit = &r300_fence_ring_emit,
|
||||
.cs_parse = &r300_cs_parse,
|
||||
.copy_blit = &r100_copy_blit,
|
||||
|
@ -243,6 +247,7 @@ static struct radeon_asic rs400_asic = {
|
|||
.ring_start = &r300_ring_start,
|
||||
.irq_set = &r100_irq_set,
|
||||
.irq_process = &r100_irq_process,
|
||||
.get_vblank_counter = &r100_get_vblank_counter,
|
||||
.fence_ring_emit = &r300_fence_ring_emit,
|
||||
.cs_parse = &r300_cs_parse,
|
||||
.copy_blit = &r100_copy_blit,
|
||||
|
@ -266,6 +271,8 @@ void rs600_vram_info(struct radeon_device *rdev);
|
|||
int rs600_mc_init(struct radeon_device *rdev);
|
||||
void rs600_mc_fini(struct radeon_device *rdev);
|
||||
int rs600_irq_set(struct radeon_device *rdev);
|
||||
int rs600_irq_process(struct radeon_device *rdev);
|
||||
u32 rs600_get_vblank_counter(struct radeon_device *rdev, int crtc);
|
||||
int rs600_gart_enable(struct radeon_device *rdev);
|
||||
void rs600_gart_disable(struct radeon_device *rdev);
|
||||
void rs600_gart_tlb_flush(struct radeon_device *rdev);
|
||||
|
@ -291,7 +298,8 @@ static struct radeon_asic rs600_asic = {
|
|||
.cp_disable = &r100_cp_disable,
|
||||
.ring_start = &r300_ring_start,
|
||||
.irq_set = &rs600_irq_set,
|
||||
.irq_process = &r100_irq_process,
|
||||
.irq_process = &rs600_irq_process,
|
||||
.get_vblank_counter = &rs600_get_vblank_counter,
|
||||
.fence_ring_emit = &r300_fence_ring_emit,
|
||||
.cs_parse = &r300_cs_parse,
|
||||
.copy_blit = &r100_copy_blit,
|
||||
|
@ -308,6 +316,7 @@ static struct radeon_asic rs600_asic = {
|
|||
/*
|
||||
* rs690,rs740
|
||||
*/
|
||||
int rs690_init(struct radeon_device *rdev);
|
||||
void rs690_errata(struct radeon_device *rdev);
|
||||
void rs690_vram_info(struct radeon_device *rdev);
|
||||
int rs690_mc_init(struct radeon_device *rdev);
|
||||
|
@ -316,7 +325,7 @@ uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg);
|
|||
void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
|
||||
void rs690_bandwidth_update(struct radeon_device *rdev);
|
||||
static struct radeon_asic rs690_asic = {
|
||||
.init = &r300_init,
|
||||
.init = &rs690_init,
|
||||
.errata = &rs690_errata,
|
||||
.vram_info = &rs690_vram_info,
|
||||
.gpu_reset = &r300_gpu_reset,
|
||||
|
@ -333,7 +342,8 @@ static struct radeon_asic rs690_asic = {
|
|||
.cp_disable = &r100_cp_disable,
|
||||
.ring_start = &r300_ring_start,
|
||||
.irq_set = &rs600_irq_set,
|
||||
.irq_process = &r100_irq_process,
|
||||
.irq_process = &rs600_irq_process,
|
||||
.get_vblank_counter = &rs600_get_vblank_counter,
|
||||
.fence_ring_emit = &r300_fence_ring_emit,
|
||||
.cs_parse = &r300_cs_parse,
|
||||
.copy_blit = &r100_copy_blit,
|
||||
|
@ -381,8 +391,9 @@ static struct radeon_asic rv515_asic = {
|
|||
.cp_fini = &r100_cp_fini,
|
||||
.cp_disable = &r100_cp_disable,
|
||||
.ring_start = &rv515_ring_start,
|
||||
.irq_set = &r100_irq_set,
|
||||
.irq_process = &r100_irq_process,
|
||||
.irq_set = &rs600_irq_set,
|
||||
.irq_process = &rs600_irq_process,
|
||||
.get_vblank_counter = &rs600_get_vblank_counter,
|
||||
.fence_ring_emit = &r300_fence_ring_emit,
|
||||
.cs_parse = &r300_cs_parse,
|
||||
.copy_blit = &r100_copy_blit,
|
||||
|
@ -423,8 +434,9 @@ static struct radeon_asic r520_asic = {
|
|||
.cp_fini = &r100_cp_fini,
|
||||
.cp_disable = &r100_cp_disable,
|
||||
.ring_start = &rv515_ring_start,
|
||||
.irq_set = &r100_irq_set,
|
||||
.irq_process = &r100_irq_process,
|
||||
.irq_set = &rs600_irq_set,
|
||||
.irq_process = &rs600_irq_process,
|
||||
.get_vblank_counter = &rs600_get_vblank_counter,
|
||||
.fence_ring_emit = &r300_fence_ring_emit,
|
||||
.cs_parse = &r300_cs_parse,
|
||||
.copy_blit = &r100_copy_blit,
|
||||
|
|
|
@ -685,23 +685,15 @@ static const uint32_t default_tvdac_adj[CHIP_LAST] = {
|
|||
0x00780000, /* rs480 */
|
||||
};
|
||||
|
||||
static struct radeon_encoder_tv_dac
|
||||
*radeon_legacy_get_tv_dac_info_from_table(struct radeon_device *rdev)
|
||||
static void radeon_legacy_get_tv_dac_info_from_table(struct radeon_device *rdev,
|
||||
struct radeon_encoder_tv_dac *tv_dac)
|
||||
{
|
||||
struct radeon_encoder_tv_dac *tv_dac = NULL;
|
||||
|
||||
tv_dac = kzalloc(sizeof(struct radeon_encoder_tv_dac), GFP_KERNEL);
|
||||
|
||||
if (!tv_dac)
|
||||
return NULL;
|
||||
|
||||
tv_dac->ps2_tvdac_adj = default_tvdac_adj[rdev->family];
|
||||
if ((rdev->flags & RADEON_IS_MOBILITY) && (rdev->family == CHIP_RV250))
|
||||
tv_dac->ps2_tvdac_adj = 0x00880000;
|
||||
tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj;
|
||||
tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj;
|
||||
|
||||
return tv_dac;
|
||||
return;
|
||||
}
|
||||
|
||||
struct radeon_encoder_tv_dac *radeon_combios_get_tv_dac_info(struct
|
||||
|
@ -713,19 +705,18 @@ struct radeon_encoder_tv_dac *radeon_combios_get_tv_dac_info(struct
|
|||
uint16_t dac_info;
|
||||
uint8_t rev, bg, dac;
|
||||
struct radeon_encoder_tv_dac *tv_dac = NULL;
|
||||
int found = 0;
|
||||
|
||||
tv_dac = kzalloc(sizeof(struct radeon_encoder_tv_dac), GFP_KERNEL);
|
||||
if (!tv_dac)
|
||||
return NULL;
|
||||
|
||||
if (rdev->bios == NULL)
|
||||
return radeon_legacy_get_tv_dac_info_from_table(rdev);
|
||||
goto out;
|
||||
|
||||
/* first check TV table */
|
||||
dac_info = combios_get_table_offset(dev, COMBIOS_TV_INFO_TABLE);
|
||||
if (dac_info) {
|
||||
tv_dac =
|
||||
kzalloc(sizeof(struct radeon_encoder_tv_dac), GFP_KERNEL);
|
||||
|
||||
if (!tv_dac)
|
||||
return NULL;
|
||||
|
||||
rev = RBIOS8(dac_info + 0x3);
|
||||
if (rev > 4) {
|
||||
bg = RBIOS8(dac_info + 0xc) & 0xf;
|
||||
|
@ -739,6 +730,7 @@ struct radeon_encoder_tv_dac *radeon_combios_get_tv_dac_info(struct
|
|||
bg = RBIOS8(dac_info + 0x10) & 0xf;
|
||||
dac = RBIOS8(dac_info + 0x11) & 0xf;
|
||||
tv_dac->ntsc_tvdac_adj = (bg << 16) | (dac << 20);
|
||||
found = 1;
|
||||
} else if (rev > 1) {
|
||||
bg = RBIOS8(dac_info + 0xc) & 0xf;
|
||||
dac = (RBIOS8(dac_info + 0xc) >> 4) & 0xf;
|
||||
|
@ -751,22 +743,15 @@ struct radeon_encoder_tv_dac *radeon_combios_get_tv_dac_info(struct
|
|||
bg = RBIOS8(dac_info + 0xe) & 0xf;
|
||||
dac = (RBIOS8(dac_info + 0xe) >> 4) & 0xf;
|
||||
tv_dac->ntsc_tvdac_adj = (bg << 16) | (dac << 20);
|
||||
found = 1;
|
||||
}
|
||||
|
||||
tv_dac->tv_std = radeon_combios_get_tv_info(encoder);
|
||||
|
||||
} else {
|
||||
}
|
||||
if (!found) {
|
||||
/* then check CRT table */
|
||||
dac_info =
|
||||
combios_get_table_offset(dev, COMBIOS_CRT_INFO_TABLE);
|
||||
if (dac_info) {
|
||||
tv_dac =
|
||||
kzalloc(sizeof(struct radeon_encoder_tv_dac),
|
||||
GFP_KERNEL);
|
||||
|
||||
if (!tv_dac)
|
||||
return NULL;
|
||||
|
||||
rev = RBIOS8(dac_info) & 0x3;
|
||||
if (rev < 2) {
|
||||
bg = RBIOS8(dac_info + 0x3) & 0xf;
|
||||
|
@ -775,6 +760,7 @@ struct radeon_encoder_tv_dac *radeon_combios_get_tv_dac_info(struct
|
|||
(bg << 16) | (dac << 20);
|
||||
tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj;
|
||||
tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj;
|
||||
found = 1;
|
||||
} else {
|
||||
bg = RBIOS8(dac_info + 0x4) & 0xf;
|
||||
dac = RBIOS8(dac_info + 0x5) & 0xf;
|
||||
|
@ -782,13 +768,17 @@ struct radeon_encoder_tv_dac *radeon_combios_get_tv_dac_info(struct
|
|||
(bg << 16) | (dac << 20);
|
||||
tv_dac->pal_tvdac_adj = tv_dac->ps2_tvdac_adj;
|
||||
tv_dac->ntsc_tvdac_adj = tv_dac->ps2_tvdac_adj;
|
||||
found = 1;
|
||||
}
|
||||
} else {
|
||||
DRM_INFO("No TV DAC info found in BIOS\n");
|
||||
return radeon_legacy_get_tv_dac_info_from_table(rdev);
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
if (!found) /* fallback to defaults */
|
||||
radeon_legacy_get_tv_dac_info_from_table(rdev, tv_dac);
|
||||
|
||||
return tv_dac;
|
||||
}
|
||||
|
||||
|
|
|
@ -406,6 +406,15 @@ static void radeon_init_pipes(drm_radeon_private_t *dev_priv)
|
|||
{
|
||||
uint32_t gb_tile_config, gb_pipe_sel = 0;
|
||||
|
||||
if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV530) {
|
||||
uint32_t z_pipe_sel = RADEON_READ(RV530_GB_PIPE_SELECT2);
|
||||
if ((z_pipe_sel & 3) == 3)
|
||||
dev_priv->num_z_pipes = 2;
|
||||
else
|
||||
dev_priv->num_z_pipes = 1;
|
||||
} else
|
||||
dev_priv->num_z_pipes = 1;
|
||||
|
||||
/* RS4xx/RS6xx/R4xx/R5xx */
|
||||
if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R420) {
|
||||
gb_pipe_sel = RADEON_READ(R400_GB_PIPE_SELECT);
|
||||
|
|
|
@ -225,25 +225,18 @@ void radeon_invalid_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
|
|||
|
||||
void radeon_register_accessor_init(struct radeon_device *rdev)
|
||||
{
|
||||
rdev->mm_rreg = &r100_mm_rreg;
|
||||
rdev->mm_wreg = &r100_mm_wreg;
|
||||
rdev->mc_rreg = &radeon_invalid_rreg;
|
||||
rdev->mc_wreg = &radeon_invalid_wreg;
|
||||
rdev->pll_rreg = &radeon_invalid_rreg;
|
||||
rdev->pll_wreg = &radeon_invalid_wreg;
|
||||
rdev->pcie_rreg = &radeon_invalid_rreg;
|
||||
rdev->pcie_wreg = &radeon_invalid_wreg;
|
||||
rdev->pciep_rreg = &radeon_invalid_rreg;
|
||||
rdev->pciep_wreg = &radeon_invalid_wreg;
|
||||
|
||||
/* Don't change order as we are overridding accessor. */
|
||||
if (rdev->family < CHIP_RV515) {
|
||||
rdev->pcie_rreg = &rv370_pcie_rreg;
|
||||
rdev->pcie_wreg = &rv370_pcie_wreg;
|
||||
}
|
||||
if (rdev->family >= CHIP_RV515) {
|
||||
rdev->pcie_rreg = &rv515_pcie_rreg;
|
||||
rdev->pcie_wreg = &rv515_pcie_wreg;
|
||||
rdev->pcie_reg_mask = 0xff;
|
||||
} else {
|
||||
rdev->pcie_reg_mask = 0x7ff;
|
||||
}
|
||||
/* FIXME: not sure here */
|
||||
if (rdev->family <= CHIP_R580) {
|
||||
|
|
|
@ -100,9 +100,10 @@
|
|||
* 1.28- Add support for VBL on CRTC2
|
||||
* 1.29- R500 3D cmd buffer support
|
||||
* 1.30- Add support for occlusion queries
|
||||
* 1.31- Add support for num Z pipes from GET_PARAM
|
||||
*/
|
||||
#define DRIVER_MAJOR 1
|
||||
#define DRIVER_MINOR 30
|
||||
#define DRIVER_MINOR 31
|
||||
#define DRIVER_PATCHLEVEL 0
|
||||
|
||||
/*
|
||||
|
@ -329,6 +330,7 @@ typedef struct drm_radeon_private {
|
|||
resource_size_t fb_aper_offset;
|
||||
|
||||
int num_gb_pipes;
|
||||
int num_z_pipes;
|
||||
int track_flush;
|
||||
drm_local_map_t *mmio;
|
||||
|
||||
|
@ -689,6 +691,7 @@ extern void r600_page_table_cleanup(struct drm_device *dev, struct drm_ati_pciga
|
|||
|
||||
/* pipe config regs */
|
||||
#define R400_GB_PIPE_SELECT 0x402c
|
||||
#define RV530_GB_PIPE_SELECT2 0x4124
|
||||
#define R500_DYN_SCLK_PWMEM_PIPE 0x000d /* PLL */
|
||||
#define R300_GB_TILE_CONFIG 0x4018
|
||||
# define R300_ENABLE_TILING (1 << 0)
|
||||
|
|
|
@ -574,6 +574,8 @@ int radeonfb_create(struct radeon_device *rdev,
|
|||
goto out_unref;
|
||||
}
|
||||
|
||||
memset_io(fbptr, 0, aligned_size);
|
||||
|
||||
strcpy(info->fix.id, "radeondrmfb");
|
||||
info->fix.type = FB_TYPE_PACKED_PIXELS;
|
||||
info->fix.visual = FB_VISUAL_TRUECOLOR;
|
||||
|
|
|
@ -262,8 +262,34 @@ int radeon_gem_mmap_ioctl(struct drm_device *dev, void *data,
|
|||
int radeon_gem_busy_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *filp)
|
||||
{
|
||||
/* FIXME: implement */
|
||||
return 0;
|
||||
struct drm_radeon_gem_busy *args = data;
|
||||
struct drm_gem_object *gobj;
|
||||
struct radeon_object *robj;
|
||||
int r;
|
||||
uint32_t cur_placement;
|
||||
|
||||
gobj = drm_gem_object_lookup(dev, filp, args->handle);
|
||||
if (gobj == NULL) {
|
||||
return -EINVAL;
|
||||
}
|
||||
robj = gobj->driver_private;
|
||||
r = radeon_object_busy_domain(robj, &cur_placement);
|
||||
switch (cur_placement) {
|
||||
case TTM_PL_VRAM:
|
||||
args->domain = RADEON_GEM_DOMAIN_VRAM;
|
||||
break;
|
||||
case TTM_PL_TT:
|
||||
args->domain = RADEON_GEM_DOMAIN_GTT;
|
||||
break;
|
||||
case TTM_PL_SYSTEM:
|
||||
args->domain = RADEON_GEM_DOMAIN_CPU;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
drm_gem_object_unreference(gobj);
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
int radeon_gem_wait_idle_ioctl(struct drm_device *dev, void *data,
|
||||
|
|
|
@ -32,60 +32,6 @@
|
|||
#include "radeon.h"
|
||||
#include "atom.h"
|
||||
|
||||
static inline uint32_t r100_irq_ack(struct radeon_device *rdev)
|
||||
{
|
||||
uint32_t irqs = RREG32(RADEON_GEN_INT_STATUS);
|
||||
uint32_t irq_mask = RADEON_SW_INT_TEST;
|
||||
|
||||
if (irqs) {
|
||||
WREG32(RADEON_GEN_INT_STATUS, irqs);
|
||||
}
|
||||
return irqs & irq_mask;
|
||||
}
|
||||
|
||||
int r100_irq_set(struct radeon_device *rdev)
|
||||
{
|
||||
uint32_t tmp = 0;
|
||||
|
||||
if (rdev->irq.sw_int) {
|
||||
tmp |= RADEON_SW_INT_ENABLE;
|
||||
}
|
||||
/* Todo go through CRTC and enable vblank int or not */
|
||||
WREG32(RADEON_GEN_INT_CNTL, tmp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int r100_irq_process(struct radeon_device *rdev)
|
||||
{
|
||||
uint32_t status;
|
||||
|
||||
status = r100_irq_ack(rdev);
|
||||
if (!status) {
|
||||
return IRQ_NONE;
|
||||
}
|
||||
while (status) {
|
||||
/* SW interrupt */
|
||||
if (status & RADEON_SW_INT_TEST) {
|
||||
radeon_fence_process(rdev);
|
||||
}
|
||||
status = r100_irq_ack(rdev);
|
||||
}
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
int rs600_irq_set(struct radeon_device *rdev)
|
||||
{
|
||||
uint32_t tmp = 0;
|
||||
|
||||
if (rdev->irq.sw_int) {
|
||||
tmp |= RADEON_SW_INT_ENABLE;
|
||||
}
|
||||
WREG32(RADEON_GEN_INT_CNTL, tmp);
|
||||
/* Todo go through CRTC and enable vblank int or not */
|
||||
WREG32(R500_DxMODE_INT_MASK, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
irqreturn_t radeon_driver_irq_handler_kms(DRM_IRQ_ARGS)
|
||||
{
|
||||
struct drm_device *dev = (struct drm_device *) arg;
|
||||
|
|
|
@ -95,6 +95,9 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
|
|||
case RADEON_INFO_NUM_GB_PIPES:
|
||||
value = rdev->num_gb_pipes;
|
||||
break;
|
||||
case RADEON_INFO_NUM_Z_PIPES:
|
||||
value = rdev->num_z_pipes;
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Invalid request %d\n", info->request);
|
||||
return -EINVAL;
|
||||
|
@ -141,19 +144,42 @@ void radeon_driver_preclose_kms(struct drm_device *dev,
|
|||
*/
|
||||
u32 radeon_get_vblank_counter_kms(struct drm_device *dev, int crtc)
|
||||
{
|
||||
/* FIXME: implement */
|
||||
return 0;
|
||||
struct radeon_device *rdev = dev->dev_private;
|
||||
|
||||
if (crtc < 0 || crtc > 1) {
|
||||
DRM_ERROR("Invalid crtc %d\n", crtc);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return radeon_get_vblank_counter(rdev, crtc);
|
||||
}
|
||||
|
||||
int radeon_enable_vblank_kms(struct drm_device *dev, int crtc)
|
||||
{
|
||||
/* FIXME: implement */
|
||||
return 0;
|
||||
struct radeon_device *rdev = dev->dev_private;
|
||||
|
||||
if (crtc < 0 || crtc > 1) {
|
||||
DRM_ERROR("Invalid crtc %d\n", crtc);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
rdev->irq.crtc_vblank_int[crtc] = true;
|
||||
|
||||
return radeon_irq_set(rdev);
|
||||
}
|
||||
|
||||
void radeon_disable_vblank_kms(struct drm_device *dev, int crtc)
|
||||
{
|
||||
/* FIXME: implement */
|
||||
struct radeon_device *rdev = dev->dev_private;
|
||||
|
||||
if (crtc < 0 || crtc > 1) {
|
||||
DRM_ERROR("Invalid crtc %d\n", crtc);
|
||||
return;
|
||||
}
|
||||
|
||||
rdev->irq.crtc_vblank_int[crtc] = false;
|
||||
|
||||
radeon_irq_set(rdev);
|
||||
}
|
||||
|
||||
|
||||
|
@ -295,5 +321,6 @@ struct drm_ioctl_desc radeon_ioctls_kms[] = {
|
|||
DRM_IOCTL_DEF(DRM_RADEON_INFO, radeon_info_ioctl, DRM_AUTH),
|
||||
DRM_IOCTL_DEF(DRM_RADEON_GEM_SET_TILING, radeon_gem_set_tiling_ioctl, DRM_AUTH),
|
||||
DRM_IOCTL_DEF(DRM_RADEON_GEM_GET_TILING, radeon_gem_get_tiling_ioctl, DRM_AUTH),
|
||||
DRM_IOCTL_DEF(DRM_RADEON_GEM_BUSY, radeon_gem_busy_ioctl, DRM_AUTH),
|
||||
};
|
||||
int radeon_max_kms_ioctl = DRM_ARRAY_SIZE(radeon_ioctls_kms);
|
||||
|
|
|
@ -310,10 +310,13 @@ void radeon_crtc_dpms(struct drm_crtc *crtc, int mode)
|
|||
RADEON_CRTC_DISP_REQ_EN_B));
|
||||
WREG32_P(RADEON_CRTC_EXT_CNTL, 0, ~mask);
|
||||
}
|
||||
drm_vblank_post_modeset(dev, radeon_crtc->crtc_id);
|
||||
radeon_crtc_load_lut(crtc);
|
||||
break;
|
||||
case DRM_MODE_DPMS_STANDBY:
|
||||
case DRM_MODE_DPMS_SUSPEND:
|
||||
case DRM_MODE_DPMS_OFF:
|
||||
drm_vblank_pre_modeset(dev, radeon_crtc->crtc_id);
|
||||
if (radeon_crtc->crtc_id)
|
||||
WREG32_P(RADEON_CRTC2_GEN_CNTL, mask, ~mask);
|
||||
else {
|
||||
|
@ -323,10 +326,6 @@ void radeon_crtc_dpms(struct drm_crtc *crtc, int mode)
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (mode != DRM_MODE_DPMS_OFF) {
|
||||
radeon_crtc_load_lut(crtc);
|
||||
}
|
||||
}
|
||||
|
||||
/* properly set crtc bpp when using atombios */
|
||||
|
|
|
@ -1066,6 +1066,7 @@ radeon_add_legacy_encoder(struct drm_device *dev, uint32_t encoder_id, uint32_t
|
|||
|
||||
switch (radeon_encoder->encoder_id) {
|
||||
case ENCODER_OBJECT_ID_INTERNAL_LVDS:
|
||||
encoder->possible_crtcs = 0x1;
|
||||
drm_encoder_init(dev, encoder, &radeon_legacy_lvds_enc_funcs, DRM_MODE_ENCODER_LVDS);
|
||||
drm_encoder_helper_add(encoder, &radeon_legacy_lvds_helper_funcs);
|
||||
if (rdev->is_atom_bios)
|
||||
|
|
|
@ -316,6 +316,25 @@ int radeon_object_wait(struct radeon_object *robj)
|
|||
return r;
|
||||
}
|
||||
|
||||
int radeon_object_busy_domain(struct radeon_object *robj, uint32_t *cur_placement)
|
||||
{
|
||||
int r = 0;
|
||||
|
||||
r = radeon_object_reserve(robj, true);
|
||||
if (unlikely(r != 0)) {
|
||||
DRM_ERROR("radeon: failed to reserve object for waiting.\n");
|
||||
return r;
|
||||
}
|
||||
spin_lock(&robj->tobj.lock);
|
||||
*cur_placement = robj->tobj.mem.mem_type;
|
||||
if (robj->tobj.sync_obj) {
|
||||
r = ttm_bo_wait(&robj->tobj, true, true, true);
|
||||
}
|
||||
spin_unlock(&robj->tobj.lock);
|
||||
radeon_object_unreserve(robj);
|
||||
return r;
|
||||
}
|
||||
|
||||
int radeon_object_evict_vram(struct radeon_device *rdev)
|
||||
{
|
||||
if (rdev->flags & RADEON_IS_IGP) {
|
||||
|
|
|
@ -982,12 +982,15 @@
|
|||
# define RS400_TMDS2_PLLRST (1 << 1)
|
||||
|
||||
#define RADEON_GEN_INT_CNTL 0x0040
|
||||
# define RADEON_CRTC_VBLANK_MASK (1 << 0)
|
||||
# define RADEON_CRTC2_VBLANK_MASK (1 << 9)
|
||||
# define RADEON_SW_INT_ENABLE (1 << 25)
|
||||
#define RADEON_GEN_INT_STATUS 0x0044
|
||||
# define RADEON_VSYNC_INT_AK (1 << 2)
|
||||
# define RADEON_VSYNC_INT (1 << 2)
|
||||
# define RADEON_VSYNC2_INT_AK (1 << 6)
|
||||
# define RADEON_VSYNC2_INT (1 << 6)
|
||||
# define AVIVO_DISPLAY_INT_STATUS (1 << 0)
|
||||
# define RADEON_CRTC_VBLANK_STAT (1 << 0)
|
||||
# define RADEON_CRTC_VBLANK_STAT_ACK (1 << 0)
|
||||
# define RADEON_CRTC2_VBLANK_STAT (1 << 9)
|
||||
# define RADEON_CRTC2_VBLANK_STAT_ACK (1 << 9)
|
||||
# define RADEON_SW_INT_FIRE (1 << 26)
|
||||
# define RADEON_SW_INT_TEST (1 << 25)
|
||||
# define RADEON_SW_INT_TEST_ACK (1 << 25)
|
||||
|
@ -2334,6 +2337,9 @@
|
|||
# define RADEON_RE_WIDTH_SHIFT 0
|
||||
# define RADEON_RE_HEIGHT_SHIFT 16
|
||||
|
||||
#define RADEON_RB3D_ZPASS_DATA 0x3290
|
||||
#define RADEON_RB3D_ZPASS_ADDR 0x3294
|
||||
|
||||
#define RADEON_SE_CNTL 0x1c4c
|
||||
# define RADEON_FFACE_CULL_CW (0 << 0)
|
||||
# define RADEON_FFACE_CULL_CCW (1 << 0)
|
||||
|
@ -3568,4 +3574,6 @@
|
|||
#define RADEON_SCRATCH_REG4 0x15f0
|
||||
#define RADEON_SCRATCH_REG5 0x15f4
|
||||
|
||||
#define RV530_GB_PIPE_SELECT2 0x4124
|
||||
|
||||
#endif
|
||||
|
|
|
@ -3081,6 +3081,9 @@ static int radeon_cp_getparam(struct drm_device *dev, void *data, struct drm_fil
|
|||
case RADEON_PARAM_NUM_GB_PIPES:
|
||||
value = dev_priv->num_gb_pipes;
|
||||
break;
|
||||
case RADEON_PARAM_NUM_Z_PIPES:
|
||||
value = dev_priv->num_z_pipes;
|
||||
break;
|
||||
default:
|
||||
DRM_DEBUG("Invalid parameter %d\n", param->param);
|
||||
return -EINVAL;
|
||||
|
|
|
@ -239,6 +239,88 @@ void rs600_mc_fini(struct radeon_device *rdev)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Interrupts
|
||||
*/
|
||||
int rs600_irq_set(struct radeon_device *rdev)
|
||||
{
|
||||
uint32_t tmp = 0;
|
||||
uint32_t mode_int = 0;
|
||||
|
||||
if (rdev->irq.sw_int) {
|
||||
tmp |= RADEON_SW_INT_ENABLE;
|
||||
}
|
||||
if (rdev->irq.crtc_vblank_int[0]) {
|
||||
tmp |= AVIVO_DISPLAY_INT_STATUS;
|
||||
mode_int |= AVIVO_D1MODE_INT_MASK;
|
||||
}
|
||||
if (rdev->irq.crtc_vblank_int[1]) {
|
||||
tmp |= AVIVO_DISPLAY_INT_STATUS;
|
||||
mode_int |= AVIVO_D2MODE_INT_MASK;
|
||||
}
|
||||
WREG32(RADEON_GEN_INT_CNTL, tmp);
|
||||
WREG32(AVIVO_DxMODE_INT_MASK, mode_int);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline uint32_t rs600_irq_ack(struct radeon_device *rdev, u32 *r500_disp_int)
|
||||
{
|
||||
uint32_t irqs = RREG32(RADEON_GEN_INT_STATUS);
|
||||
uint32_t irq_mask = RADEON_SW_INT_TEST;
|
||||
|
||||
if (irqs & AVIVO_DISPLAY_INT_STATUS) {
|
||||
*r500_disp_int = RREG32(AVIVO_DISP_INTERRUPT_STATUS);
|
||||
if (*r500_disp_int & AVIVO_D1_VBLANK_INTERRUPT) {
|
||||
WREG32(AVIVO_D1MODE_VBLANK_STATUS, AVIVO_VBLANK_ACK);
|
||||
}
|
||||
if (*r500_disp_int & AVIVO_D2_VBLANK_INTERRUPT) {
|
||||
WREG32(AVIVO_D2MODE_VBLANK_STATUS, AVIVO_VBLANK_ACK);
|
||||
}
|
||||
} else {
|
||||
*r500_disp_int = 0;
|
||||
}
|
||||
|
||||
if (irqs) {
|
||||
WREG32(RADEON_GEN_INT_STATUS, irqs);
|
||||
}
|
||||
return irqs & irq_mask;
|
||||
}
|
||||
|
||||
int rs600_irq_process(struct radeon_device *rdev)
|
||||
{
|
||||
uint32_t status;
|
||||
uint32_t r500_disp_int;
|
||||
|
||||
status = rs600_irq_ack(rdev, &r500_disp_int);
|
||||
if (!status && !r500_disp_int) {
|
||||
return IRQ_NONE;
|
||||
}
|
||||
while (status || r500_disp_int) {
|
||||
/* SW interrupt */
|
||||
if (status & RADEON_SW_INT_TEST) {
|
||||
radeon_fence_process(rdev);
|
||||
}
|
||||
/* Vertical blank interrupts */
|
||||
if (r500_disp_int & AVIVO_D1_VBLANK_INTERRUPT) {
|
||||
drm_handle_vblank(rdev->ddev, 0);
|
||||
}
|
||||
if (r500_disp_int & AVIVO_D2_VBLANK_INTERRUPT) {
|
||||
drm_handle_vblank(rdev->ddev, 1);
|
||||
}
|
||||
status = rs600_irq_ack(rdev, &r500_disp_int);
|
||||
}
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
u32 rs600_get_vblank_counter(struct radeon_device *rdev, int crtc)
|
||||
{
|
||||
if (crtc == 0)
|
||||
return RREG32(AVIVO_D1CRTC_FRAME_COUNT);
|
||||
else
|
||||
return RREG32(AVIVO_D2CRTC_FRAME_COUNT);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Global GPU functions
|
||||
*/
|
||||
|
|
|
@ -652,3 +652,68 @@ void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
|
|||
WREG32(RS690_MC_DATA, v);
|
||||
WREG32(RS690_MC_INDEX, RS690_MC_INDEX_WR_ACK);
|
||||
}
|
||||
|
||||
static const unsigned rs690_reg_safe_bm[219] = {
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0x17FF1FFF,0xFFFFFFFC,0xFFFFFFFF,0xFF30FFBF,
|
||||
0xFFFFFFF8,0xC3E6FFFF,0xFFFFF6DF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFF03F,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFEFCE,0xF00EBFFF,0x007C0000,
|
||||
0xF0000078,0xFF000009,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFF7FF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFC78,0xFFFFFFFF,0xFFFFFFFE,0xFFFFFFFF,
|
||||
0x38FF8F50,0xFFF88082,0xF000000C,0xFAE009FF,
|
||||
0x0000FFFF,0xFFFFFFFF,0xFFFFFFFF,0x00000000,
|
||||
0x00000000,0x0000C100,0x00000000,0x00000000,
|
||||
0x00000000,0x00000000,0x00000000,0x00000000,
|
||||
0x00000000,0xFFFF0000,0xFFFFFFFF,0xFF80FFFF,
|
||||
0x00000000,0x00000000,0x00000000,0x00000000,
|
||||
0x0003FC01,0xFFFFFFF8,0xFE800B19,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
|
||||
};
|
||||
|
||||
int rs690_init(struct radeon_device *rdev)
|
||||
{
|
||||
rdev->config.r300.reg_safe_bm = rs690_reg_safe_bm;
|
||||
rdev->config.r300.reg_safe_bm_size = ARRAY_SIZE(rs690_reg_safe_bm);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -400,25 +400,6 @@ void rv515_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
|
|||
WREG32(MC_IND_INDEX, 0);
|
||||
}
|
||||
|
||||
uint32_t rv515_pcie_rreg(struct radeon_device *rdev, uint32_t reg)
|
||||
{
|
||||
uint32_t r;
|
||||
|
||||
WREG32(PCIE_INDEX, ((reg) & 0x7ff));
|
||||
(void)RREG32(PCIE_INDEX);
|
||||
r = RREG32(PCIE_DATA);
|
||||
return r;
|
||||
}
|
||||
|
||||
void rv515_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
|
||||
{
|
||||
WREG32(PCIE_INDEX, ((reg) & 0x7ff));
|
||||
(void)RREG32(PCIE_INDEX);
|
||||
WREG32(PCIE_DATA, (v));
|
||||
(void)RREG32(PCIE_DATA);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Debugfs info
|
||||
*/
|
||||
|
|
|
@ -674,7 +674,14 @@ omap_i2c_isr(int this_irq, void *dev_id)
|
|||
|
||||
err = 0;
|
||||
complete:
|
||||
omap_i2c_write_reg(dev, OMAP_I2C_STAT_REG, stat);
|
||||
/*
|
||||
* Ack the stat in one go, but [R/X]DR and [R/X]RDY should be
|
||||
* acked after the data operation is complete.
|
||||
* Ref: TRM SWPU114Q Figure 18-31
|
||||
*/
|
||||
omap_i2c_write_reg(dev, OMAP_I2C_STAT_REG, stat &
|
||||
~(OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR |
|
||||
OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR));
|
||||
|
||||
if (stat & OMAP_I2C_STAT_NACK) {
|
||||
err |= OMAP_I2C_STAT_NACK;
|
||||
|
@ -687,6 +694,9 @@ complete:
|
|||
}
|
||||
if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK |
|
||||
OMAP_I2C_STAT_AL)) {
|
||||
omap_i2c_ack_stat(dev, stat &
|
||||
(OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR |
|
||||
OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR));
|
||||
omap_i2c_complete_cmd(dev, err);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
@ -774,7 +784,7 @@ complete:
|
|||
* memory to the I2C interface.
|
||||
*/
|
||||
|
||||
if (cpu_is_omap34xx()) {
|
||||
if (dev->rev <= OMAP_I2C_REV_ON_3430) {
|
||||
while (!(stat & OMAP_I2C_STAT_XUDF)) {
|
||||
if (stat & (OMAP_I2C_STAT_NACK | OMAP_I2C_STAT_AL)) {
|
||||
omap_i2c_ack_stat(dev, stat & (OMAP_I2C_STAT_XRDY | OMAP_I2C_STAT_XDR));
|
||||
|
|
|
@ -117,7 +117,8 @@ enum stu300_error {
|
|||
STU300_ERROR_NONE = 0,
|
||||
STU300_ERROR_ACKNOWLEDGE_FAILURE,
|
||||
STU300_ERROR_BUS_ERROR,
|
||||
STU300_ERROR_ARBITRATION_LOST
|
||||
STU300_ERROR_ARBITRATION_LOST,
|
||||
STU300_ERROR_UNKNOWN
|
||||
};
|
||||
|
||||
/* timeout waiting for the controller to respond */
|
||||
|
@ -127,7 +128,7 @@ enum stu300_error {
|
|||
* The number of address send athemps tried before giving up.
|
||||
* If the first one failes it seems like 5 to 8 attempts are required.
|
||||
*/
|
||||
#define NUM_ADDR_RESEND_ATTEMPTS 10
|
||||
#define NUM_ADDR_RESEND_ATTEMPTS 12
|
||||
|
||||
/* I2C clock speed, in Hz 0-400kHz*/
|
||||
static unsigned int scl_frequency = 100000;
|
||||
|
@ -149,6 +150,7 @@ module_param(scl_frequency, uint, 0644);
|
|||
* @msg_index: index of current message
|
||||
* @msg_len: length of current message
|
||||
*/
|
||||
|
||||
struct stu300_dev {
|
||||
struct platform_device *pdev;
|
||||
struct i2c_adapter adapter;
|
||||
|
@ -188,6 +190,27 @@ static inline u32 stu300_r8(void __iomem *address)
|
|||
return readl(address) & 0x000000FFU;
|
||||
}
|
||||
|
||||
static void stu300_irq_enable(struct stu300_dev *dev)
|
||||
{
|
||||
u32 val;
|
||||
val = stu300_r8(dev->virtbase + I2C_CR);
|
||||
val |= I2C_CR_INTERRUPT_ENABLE;
|
||||
/* Twice paranoia (possible HW glitch) */
|
||||
stu300_wr8(val, dev->virtbase + I2C_CR);
|
||||
stu300_wr8(val, dev->virtbase + I2C_CR);
|
||||
}
|
||||
|
||||
static void stu300_irq_disable(struct stu300_dev *dev)
|
||||
{
|
||||
u32 val;
|
||||
val = stu300_r8(dev->virtbase + I2C_CR);
|
||||
val &= ~I2C_CR_INTERRUPT_ENABLE;
|
||||
/* Twice paranoia (possible HW glitch) */
|
||||
stu300_wr8(val, dev->virtbase + I2C_CR);
|
||||
stu300_wr8(val, dev->virtbase + I2C_CR);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Tells whether a certain event or events occurred in
|
||||
* response to a command. The events represent states in
|
||||
|
@ -196,9 +219,10 @@ static inline u32 stu300_r8(void __iomem *address)
|
|||
* documentation and can only be treated as abstract state
|
||||
* machine states.
|
||||
*
|
||||
* @ret 0 = event has not occurred, any other value means
|
||||
* the event occurred.
|
||||
* @ret 0 = event has not occurred or unknown error, any
|
||||
* other value means the correct event occurred or an error.
|
||||
*/
|
||||
|
||||
static int stu300_event_occurred(struct stu300_dev *dev,
|
||||
enum stu300_event mr_event) {
|
||||
u32 status1;
|
||||
|
@ -206,11 +230,28 @@ static int stu300_event_occurred(struct stu300_dev *dev,
|
|||
|
||||
/* What event happened? */
|
||||
status1 = stu300_r8(dev->virtbase + I2C_SR1);
|
||||
|
||||
if (!(status1 & I2C_SR1_EVF_IND))
|
||||
/* No event at all */
|
||||
return 0;
|
||||
|
||||
status2 = stu300_r8(dev->virtbase + I2C_SR2);
|
||||
|
||||
/* Block any multiple interrupts */
|
||||
stu300_irq_disable(dev);
|
||||
|
||||
/* Check for errors first */
|
||||
if (status2 & I2C_SR2_AF_IND) {
|
||||
dev->cmd_err = STU300_ERROR_ACKNOWLEDGE_FAILURE;
|
||||
return 1;
|
||||
} else if (status2 & I2C_SR2_BERR_IND) {
|
||||
dev->cmd_err = STU300_ERROR_BUS_ERROR;
|
||||
return 1;
|
||||
} else if (status2 & I2C_SR2_ARLO_IND) {
|
||||
dev->cmd_err = STU300_ERROR_ARBITRATION_LOST;
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (mr_event) {
|
||||
case STU300_EVENT_1:
|
||||
if (status1 & I2C_SR1_ADSL_IND)
|
||||
|
@ -221,10 +262,6 @@ static int stu300_event_occurred(struct stu300_dev *dev,
|
|||
case STU300_EVENT_7:
|
||||
case STU300_EVENT_8:
|
||||
if (status1 & I2C_SR1_BTF_IND) {
|
||||
if (status2 & I2C_SR2_AF_IND)
|
||||
dev->cmd_err = STU300_ERROR_ACKNOWLEDGE_FAILURE;
|
||||
else if (status2 & I2C_SR2_BERR_IND)
|
||||
dev->cmd_err = STU300_ERROR_BUS_ERROR;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
@ -240,8 +277,6 @@ static int stu300_event_occurred(struct stu300_dev *dev,
|
|||
case STU300_EVENT_6:
|
||||
if (status2 & I2C_SR2_ENDAD_IND) {
|
||||
/* First check for any errors */
|
||||
if (status2 & I2C_SR2_AF_IND)
|
||||
dev->cmd_err = STU300_ERROR_ACKNOWLEDGE_FAILURE;
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
@ -252,8 +287,15 @@ static int stu300_event_occurred(struct stu300_dev *dev,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
if (status2 & I2C_SR2_ARLO_IND)
|
||||
dev->cmd_err = STU300_ERROR_ARBITRATION_LOST;
|
||||
/* If we get here, we're on thin ice.
|
||||
* Here we are in a status where we have
|
||||
* gotten a response that does not match
|
||||
* what we requested.
|
||||
*/
|
||||
dev->cmd_err = STU300_ERROR_UNKNOWN;
|
||||
dev_err(&dev->pdev->dev,
|
||||
"Unhandled interrupt! %d sr1: 0x%x sr2: 0x%x\n",
|
||||
mr_event, status1, status2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -262,21 +304,20 @@ static irqreturn_t stu300_irh(int irq, void *data)
|
|||
struct stu300_dev *dev = data;
|
||||
int res;
|
||||
|
||||
/* Just make sure that the block is clocked */
|
||||
clk_enable(dev->clk);
|
||||
|
||||
/* See if this was what we were waiting for */
|
||||
spin_lock(&dev->cmd_issue_lock);
|
||||
if (dev->cmd_event != STU300_EVENT_NONE) {
|
||||
res = stu300_event_occurred(dev, dev->cmd_event);
|
||||
if (res || dev->cmd_err != STU300_ERROR_NONE) {
|
||||
u32 val;
|
||||
|
||||
complete(&dev->cmd_complete);
|
||||
/* Block any multiple interrupts */
|
||||
val = stu300_r8(dev->virtbase + I2C_CR);
|
||||
val &= ~I2C_CR_INTERRUPT_ENABLE;
|
||||
stu300_wr8(val, dev->virtbase + I2C_CR);
|
||||
}
|
||||
}
|
||||
res = stu300_event_occurred(dev, dev->cmd_event);
|
||||
if (res || dev->cmd_err != STU300_ERROR_NONE)
|
||||
complete(&dev->cmd_complete);
|
||||
|
||||
spin_unlock(&dev->cmd_issue_lock);
|
||||
|
||||
clk_disable(dev->clk);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
@ -308,7 +349,6 @@ static int stu300_start_and_await_event(struct stu300_dev *dev,
|
|||
stu300_wr8(cr_value, dev->virtbase + I2C_CR);
|
||||
ret = wait_for_completion_interruptible_timeout(&dev->cmd_complete,
|
||||
STU300_TIMEOUT);
|
||||
|
||||
if (ret < 0) {
|
||||
dev_err(&dev->pdev->dev,
|
||||
"wait_for_completion_interruptible_timeout() "
|
||||
|
@ -342,7 +382,6 @@ static int stu300_await_event(struct stu300_dev *dev,
|
|||
enum stu300_event mr_event)
|
||||
{
|
||||
int ret;
|
||||
u32 val;
|
||||
|
||||
if (unlikely(irqs_disabled())) {
|
||||
/* TODO: implement polling for this case if need be. */
|
||||
|
@ -354,36 +393,18 @@ static int stu300_await_event(struct stu300_dev *dev,
|
|||
/* Is it already here? */
|
||||
spin_lock_irq(&dev->cmd_issue_lock);
|
||||
dev->cmd_err = STU300_ERROR_NONE;
|
||||
if (stu300_event_occurred(dev, mr_event)) {
|
||||
spin_unlock_irq(&dev->cmd_issue_lock);
|
||||
goto exit_await_check_err;
|
||||
}
|
||||
init_completion(&dev->cmd_complete);
|
||||
dev->cmd_err = STU300_ERROR_NONE;
|
||||
dev->cmd_event = mr_event;
|
||||
|
||||
init_completion(&dev->cmd_complete);
|
||||
|
||||
/* Turn on the I2C interrupt for current operation */
|
||||
val = stu300_r8(dev->virtbase + I2C_CR);
|
||||
val |= I2C_CR_INTERRUPT_ENABLE;
|
||||
stu300_wr8(val, dev->virtbase + I2C_CR);
|
||||
|
||||
/* Twice paranoia (possible HW glitch) */
|
||||
stu300_wr8(val, dev->virtbase + I2C_CR);
|
||||
|
||||
/* Check again: is it already here? */
|
||||
if (unlikely(stu300_event_occurred(dev, mr_event))) {
|
||||
/* Disable IRQ again. */
|
||||
val &= ~I2C_CR_INTERRUPT_ENABLE;
|
||||
stu300_wr8(val, dev->virtbase + I2C_CR);
|
||||
spin_unlock_irq(&dev->cmd_issue_lock);
|
||||
goto exit_await_check_err;
|
||||
}
|
||||
stu300_irq_enable(dev);
|
||||
|
||||
/* Unlock the command block and wait for the event to occur */
|
||||
spin_unlock_irq(&dev->cmd_issue_lock);
|
||||
|
||||
ret = wait_for_completion_interruptible_timeout(&dev->cmd_complete,
|
||||
STU300_TIMEOUT);
|
||||
|
||||
if (ret < 0) {
|
||||
dev_err(&dev->pdev->dev,
|
||||
"wait_for_completion_interruptible_timeout()"
|
||||
|
@ -401,7 +422,6 @@ static int stu300_await_event(struct stu300_dev *dev,
|
|||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
exit_await_check_err:
|
||||
if (dev->cmd_err != STU300_ERROR_NONE) {
|
||||
if (mr_event != STU300_EVENT_6) {
|
||||
dev_err(&dev->pdev->dev, "controller "
|
||||
|
@ -457,18 +477,19 @@ struct stu300_clkset {
|
|||
};
|
||||
|
||||
static const struct stu300_clkset stu300_clktable[] = {
|
||||
{ 0, 0xFFU },
|
||||
{ 2500000, I2C_OAR2_FR_25_10MHZ },
|
||||
{ 10000000, I2C_OAR2_FR_10_1667MHZ },
|
||||
{ 16670000, I2C_OAR2_FR_1667_2667MHZ },
|
||||
{ 26670000, I2C_OAR2_FR_2667_40MHZ },
|
||||
{ 40000000, I2C_OAR2_FR_40_5333MHZ },
|
||||
{ 53330000, I2C_OAR2_FR_5333_66MHZ },
|
||||
{ 66000000, I2C_OAR2_FR_66_80MHZ },
|
||||
{ 80000000, I2C_OAR2_FR_80_100MHZ },
|
||||
{ 0, 0xFFU },
|
||||
{ 2500000, I2C_OAR2_FR_25_10MHZ },
|
||||
{ 10000000, I2C_OAR2_FR_10_1667MHZ },
|
||||
{ 16670000, I2C_OAR2_FR_1667_2667MHZ },
|
||||
{ 26670000, I2C_OAR2_FR_2667_40MHZ },
|
||||
{ 40000000, I2C_OAR2_FR_40_5333MHZ },
|
||||
{ 53330000, I2C_OAR2_FR_5333_66MHZ },
|
||||
{ 66000000, I2C_OAR2_FR_66_80MHZ },
|
||||
{ 80000000, I2C_OAR2_FR_80_100MHZ },
|
||||
{ 100000000, 0xFFU },
|
||||
};
|
||||
|
||||
|
||||
static int stu300_set_clk(struct stu300_dev *dev, unsigned long clkrate)
|
||||
{
|
||||
|
||||
|
@ -494,10 +515,10 @@ static int stu300_set_clk(struct stu300_dev *dev, unsigned long clkrate)
|
|||
|
||||
if (dev->speed > 100000)
|
||||
/* Fast Mode I2C */
|
||||
val = ((clkrate/dev->speed)-9)/3;
|
||||
val = ((clkrate/dev->speed) - 9)/3 + 1;
|
||||
else
|
||||
/* Standard Mode I2C */
|
||||
val = ((clkrate/dev->speed)-7)/2;
|
||||
val = ((clkrate/dev->speed) - 7)/2 + 1;
|
||||
|
||||
/* According to spec the divider must be > 2 */
|
||||
if (val < 0x002) {
|
||||
|
@ -557,6 +578,7 @@ static int stu300_init_hw(struct stu300_dev *dev)
|
|||
*/
|
||||
clkrate = clk_get_rate(dev->clk);
|
||||
ret = stu300_set_clk(dev, clkrate);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
/*
|
||||
|
@ -641,7 +663,6 @@ static int stu300_xfer_msg(struct i2c_adapter *adap,
|
|||
int attempts = 0;
|
||||
struct stu300_dev *dev = i2c_get_adapdata(adap);
|
||||
|
||||
|
||||
clk_enable(dev->clk);
|
||||
|
||||
/* Remove this if (0) to trace each and every message. */
|
||||
|
@ -715,14 +736,15 @@ static int stu300_xfer_msg(struct i2c_adapter *adap,
|
|||
|
||||
if (attempts < NUM_ADDR_RESEND_ATTEMPTS && attempts > 0) {
|
||||
dev_dbg(&dev->pdev->dev, "managed to get address "
|
||||
"through after %d attempts\n", attempts);
|
||||
"through after %d attempts\n", attempts);
|
||||
} else if (attempts == NUM_ADDR_RESEND_ATTEMPTS) {
|
||||
dev_dbg(&dev->pdev->dev, "I give up, tried %d times "
|
||||
"to resend address.\n",
|
||||
NUM_ADDR_RESEND_ATTEMPTS);
|
||||
"to resend address.\n",
|
||||
NUM_ADDR_RESEND_ATTEMPTS);
|
||||
goto exit_disable;
|
||||
}
|
||||
|
||||
|
||||
if (msg->flags & I2C_M_RD) {
|
||||
/* READ: we read the actual bytes one at a time */
|
||||
for (i = 0; i < msg->len; i++) {
|
||||
|
@ -804,8 +826,10 @@ static int stu300_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
|
|||
{
|
||||
int ret = -1;
|
||||
int i;
|
||||
|
||||
struct stu300_dev *dev = i2c_get_adapdata(adap);
|
||||
dev->msg_len = num;
|
||||
|
||||
for (i = 0; i < num; i++) {
|
||||
/*
|
||||
* Another driver appears to send stop for each message,
|
||||
|
@ -817,6 +841,7 @@ static int stu300_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
|
|||
dev->msg_index = i;
|
||||
|
||||
ret = stu300_xfer_msg(adap, &msgs[i], (i == (num - 1)));
|
||||
|
||||
if (ret != 0) {
|
||||
num = ret;
|
||||
break;
|
||||
|
@ -845,6 +870,7 @@ stu300_probe(struct platform_device *pdev)
|
|||
struct resource *res;
|
||||
int bus_nr;
|
||||
int ret = 0;
|
||||
char clk_name[] = "I2C0";
|
||||
|
||||
dev = kzalloc(sizeof(struct stu300_dev), GFP_KERNEL);
|
||||
if (!dev) {
|
||||
|
@ -854,7 +880,8 @@ stu300_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
bus_nr = pdev->id;
|
||||
dev->clk = clk_get(&pdev->dev, NULL);
|
||||
clk_name[3] += (char)bus_nr;
|
||||
dev->clk = clk_get(&pdev->dev, clk_name);
|
||||
if (IS_ERR(dev->clk)) {
|
||||
ret = PTR_ERR(dev->clk);
|
||||
dev_err(&pdev->dev, "could not retrieve i2c bus clock\n");
|
||||
|
|
|
@ -456,8 +456,11 @@ static int joydev_ioctl_common(struct joydev *joydev,
|
|||
unsigned int cmd, void __user *argp)
|
||||
{
|
||||
struct input_dev *dev = joydev->handle.dev;
|
||||
size_t len;
|
||||
int i, j;
|
||||
const char *name;
|
||||
|
||||
/* Process fixed-sized commands. */
|
||||
switch (cmd) {
|
||||
|
||||
case JS_SET_CAL:
|
||||
|
@ -499,9 +502,22 @@ static int joydev_ioctl_common(struct joydev *joydev,
|
|||
return copy_to_user(argp, joydev->corr,
|
||||
sizeof(joydev->corr[0]) * joydev->nabs) ? -EFAULT : 0;
|
||||
|
||||
case JSIOCSAXMAP:
|
||||
if (copy_from_user(joydev->abspam, argp,
|
||||
sizeof(__u8) * (ABS_MAX + 1)))
|
||||
}
|
||||
|
||||
/*
|
||||
* Process variable-sized commands (the axis and button map commands
|
||||
* are considered variable-sized to decouple them from the values of
|
||||
* ABS_MAX and KEY_MAX).
|
||||
*/
|
||||
switch (cmd & ~IOCSIZE_MASK) {
|
||||
|
||||
case (JSIOCSAXMAP & ~IOCSIZE_MASK):
|
||||
len = min_t(size_t, _IOC_SIZE(cmd), sizeof(joydev->abspam));
|
||||
/*
|
||||
* FIXME: we should not copy into our axis map before
|
||||
* validating the data.
|
||||
*/
|
||||
if (copy_from_user(joydev->abspam, argp, len))
|
||||
return -EFAULT;
|
||||
|
||||
for (i = 0; i < joydev->nabs; i++) {
|
||||
|
@ -511,13 +527,17 @@ static int joydev_ioctl_common(struct joydev *joydev,
|
|||
}
|
||||
return 0;
|
||||
|
||||
case JSIOCGAXMAP:
|
||||
return copy_to_user(argp, joydev->abspam,
|
||||
sizeof(__u8) * (ABS_MAX + 1)) ? -EFAULT : 0;
|
||||
case (JSIOCGAXMAP & ~IOCSIZE_MASK):
|
||||
len = min_t(size_t, _IOC_SIZE(cmd), sizeof(joydev->abspam));
|
||||
return copy_to_user(argp, joydev->abspam, len) ? -EFAULT : 0;
|
||||
|
||||
case JSIOCSBTNMAP:
|
||||
if (copy_from_user(joydev->keypam, argp,
|
||||
sizeof(__u16) * (KEY_MAX - BTN_MISC + 1)))
|
||||
case (JSIOCSBTNMAP & ~IOCSIZE_MASK):
|
||||
len = min_t(size_t, _IOC_SIZE(cmd), sizeof(joydev->keypam));
|
||||
/*
|
||||
* FIXME: we should not copy into our keymap before
|
||||
* validating the data.
|
||||
*/
|
||||
if (copy_from_user(joydev->keypam, argp, len))
|
||||
return -EFAULT;
|
||||
|
||||
for (i = 0; i < joydev->nkey; i++) {
|
||||
|
@ -529,25 +549,19 @@ static int joydev_ioctl_common(struct joydev *joydev,
|
|||
|
||||
return 0;
|
||||
|
||||
case JSIOCGBTNMAP:
|
||||
return copy_to_user(argp, joydev->keypam,
|
||||
sizeof(__u16) * (KEY_MAX - BTN_MISC + 1)) ? -EFAULT : 0;
|
||||
case (JSIOCGBTNMAP & ~IOCSIZE_MASK):
|
||||
len = min_t(size_t, _IOC_SIZE(cmd), sizeof(joydev->keypam));
|
||||
return copy_to_user(argp, joydev->keypam, len) ? -EFAULT : 0;
|
||||
|
||||
default:
|
||||
if ((cmd & ~IOCSIZE_MASK) == JSIOCGNAME(0)) {
|
||||
int len;
|
||||
const char *name = dev->name;
|
||||
case JSIOCGNAME(0):
|
||||
name = dev->name;
|
||||
if (!name)
|
||||
return 0;
|
||||
|
||||
if (!name)
|
||||
return 0;
|
||||
len = strlen(name) + 1;
|
||||
if (len > _IOC_SIZE(cmd))
|
||||
len = _IOC_SIZE(cmd);
|
||||
if (copy_to_user(argp, name, len))
|
||||
return -EFAULT;
|
||||
return len;
|
||||
}
|
||||
len = min_t(size_t, _IOC_SIZE(cmd), strlen(name) + 1);
|
||||
return copy_to_user(argp, name, len) ? -EFAULT : len;
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,6 +74,7 @@ static struct iforce_device iforce_device[] = {
|
|||
{ 0x05ef, 0x8884, "AVB Mag Turbo Force", btn_avb_wheel, abs_wheel, ff_iforce },
|
||||
{ 0x05ef, 0x8888, "AVB Top Shot Force Feedback Racing Wheel", btn_avb_tw, abs_wheel, ff_iforce }, //?
|
||||
{ 0x061c, 0xc0a4, "ACT LABS Force RS", btn_wheel, abs_wheel, ff_iforce }, //?
|
||||
{ 0x061c, 0xc084, "ACT LABS Force RS", btn_wheel, abs_wheel, ff_iforce },
|
||||
{ 0x06f8, 0x0001, "Guillemot Race Leader Force Feedback", btn_wheel, abs_wheel, ff_iforce }, //?
|
||||
{ 0x06f8, 0x0004, "Guillemot Force Feedback Racing Wheel", btn_wheel, abs_wheel, ff_iforce }, //?
|
||||
{ 0x06f8, 0x0004, "Gullemot Jet Leader 3D", btn_joystick, abs_joystick, ff_iforce }, //?
|
||||
|
|
|
@ -223,6 +223,7 @@ static struct usb_device_id iforce_usb_ids [] = {
|
|||
{ USB_DEVICE(0x05ef, 0x8884) }, /* AVB Mag Turbo Force */
|
||||
{ USB_DEVICE(0x05ef, 0x8888) }, /* AVB Top Shot FFB Racing Wheel */
|
||||
{ USB_DEVICE(0x061c, 0xc0a4) }, /* ACT LABS Force RS */
|
||||
{ USB_DEVICE(0x061c, 0xc084) }, /* ACT LABS Force RS */
|
||||
{ USB_DEVICE(0x06f8, 0x0001) }, /* Guillemot Race Leader Force Feedback */
|
||||
{ USB_DEVICE(0x06f8, 0x0004) }, /* Guillemot Force Feedback Racing Wheel */
|
||||
{ USB_DEVICE(0x06f8, 0xa302) }, /* Guillemot Jet Leader 3D */
|
||||
|
|
|
@ -388,6 +388,32 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi
|
|||
return result;
|
||||
}
|
||||
|
||||
static int wacom_query_tablet_data(struct usb_interface *intf)
|
||||
{
|
||||
unsigned char *rep_data;
|
||||
int limit = 0;
|
||||
int error;
|
||||
|
||||
rep_data = kmalloc(2, GFP_KERNEL);
|
||||
if (!rep_data)
|
||||
return -ENOMEM;
|
||||
|
||||
do {
|
||||
rep_data[0] = 2;
|
||||
rep_data[1] = 2;
|
||||
error = usb_set_report(intf, WAC_HID_FEATURE_REPORT,
|
||||
2, rep_data, 2);
|
||||
if (error >= 0)
|
||||
error = usb_get_report(intf,
|
||||
WAC_HID_FEATURE_REPORT, 2,
|
||||
rep_data, 2);
|
||||
} while ((error < 0 || rep_data[1] != 2) && limit++ < 5);
|
||||
|
||||
kfree(rep_data);
|
||||
|
||||
return error < 0 ? error : 0;
|
||||
}
|
||||
|
||||
static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
||||
{
|
||||
struct usb_device *dev = interface_to_usbdev(intf);
|
||||
|
@ -398,7 +424,6 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
|
|||
struct wacom_features *features;
|
||||
struct input_dev *input_dev;
|
||||
int error = -ENOMEM;
|
||||
char rep_data[2], limit = 0;
|
||||
struct hid_descriptor *hid_desc;
|
||||
|
||||
wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL);
|
||||
|
@ -489,20 +514,10 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
|
|||
|
||||
/*
|
||||
* Ask the tablet to report tablet data if it is not a Tablet PC.
|
||||
* Repeat until it succeeds
|
||||
* Note that if query fails it is not a hard failure.
|
||||
*/
|
||||
if (wacom_wac->features->type != TABLETPC) {
|
||||
do {
|
||||
rep_data[0] = 2;
|
||||
rep_data[1] = 2;
|
||||
error = usb_set_report(intf, WAC_HID_FEATURE_REPORT,
|
||||
2, rep_data, 2);
|
||||
if (error >= 0)
|
||||
error = usb_get_report(intf,
|
||||
WAC_HID_FEATURE_REPORT, 2,
|
||||
rep_data, 2);
|
||||
} while ((error < 0 || rep_data[1] != 2) && limit++ < 5);
|
||||
}
|
||||
if (wacom_wac->features->type != TABLETPC)
|
||||
wacom_query_tablet_data(intf);
|
||||
|
||||
usb_set_intfdata(intf, wacom);
|
||||
return 0;
|
||||
|
|
|
@ -170,11 +170,11 @@ static void ucb1400_handle_pending_irq(struct ucb1400_ts *ucb)
|
|||
ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, isr);
|
||||
ucb1400_reg_write(ucb->ac97, UCB_IE_CLEAR, 0);
|
||||
|
||||
if (isr & UCB_IE_TSPX) {
|
||||
if (isr & UCB_IE_TSPX)
|
||||
ucb1400_ts_irq_disable(ucb->ac97);
|
||||
enable_irq(ucb->irq);
|
||||
} else
|
||||
printk(KERN_ERR "ucb1400: unexpected IE_STATUS = %#x\n", isr);
|
||||
else
|
||||
dev_dbg(&ucb->ts_idev->dev, "ucb1400: unexpected IE_STATUS = %#x\n", isr);
|
||||
enable_irq(ucb->irq);
|
||||
}
|
||||
|
||||
static int ucb1400_ts_thread(void *_ucb)
|
||||
|
@ -345,6 +345,7 @@ static int ucb1400_ts_detect_irq(struct ucb1400_ts *ucb)
|
|||
static int ucb1400_ts_probe(struct platform_device *dev)
|
||||
{
|
||||
int error, x_res, y_res;
|
||||
u16 fcsr;
|
||||
struct ucb1400_ts *ucb = dev->dev.platform_data;
|
||||
|
||||
ucb->ts_idev = input_allocate_device();
|
||||
|
@ -382,6 +383,14 @@ static int ucb1400_ts_probe(struct platform_device *dev)
|
|||
ucb->ts_idev->evbit[0] = BIT_MASK(EV_ABS) | BIT_MASK(EV_KEY);
|
||||
ucb->ts_idev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
|
||||
|
||||
/*
|
||||
* Enable ADC filter to prevent horrible jitter on Colibri.
|
||||
* This also further reduces jitter on boards where ADCSYNC
|
||||
* pin is connected.
|
||||
*/
|
||||
fcsr = ucb1400_reg_read(ucb->ac97, UCB_FCSR);
|
||||
ucb1400_reg_write(ucb->ac97, UCB_FCSR, fcsr | UCB_FCSR_AVE);
|
||||
|
||||
ucb1400_adc_enable(ucb->ac97);
|
||||
x_res = ucb1400_ts_read_xres(ucb);
|
||||
y_res = ucb1400_ts_read_yres(ucb);
|
||||
|
|
|
@ -61,7 +61,7 @@ static void orion_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
|
|||
buf64 = (uint64_t *)buf;
|
||||
while (i < len/8) {
|
||||
uint64_t x;
|
||||
asm ("ldrd\t%0, [%1]" : "=r" (x) : "r" (io_base));
|
||||
asm volatile ("ldrd\t%0, [%1]" : "=&r" (x) : "r" (io_base));
|
||||
buf64[i++] = x;
|
||||
}
|
||||
i *= 8;
|
||||
|
|
|
@ -1727,12 +1727,14 @@ config KS8842
|
|||
tristate "Micrel KSZ8842"
|
||||
depends on HAS_IOMEM
|
||||
help
|
||||
This platform driver is for Micrel KSZ8842 chip.
|
||||
This platform driver is for Micrel KSZ8842 / KS8842
|
||||
2-port ethernet switch chip (managed, VLAN, QoS).
|
||||
|
||||
config KS8851
|
||||
tristate "Micrel KS8851 SPI"
|
||||
depends on SPI
|
||||
select MII
|
||||
select CRC32
|
||||
help
|
||||
SPI driver for Micrel KS8851 SPI attached network chip.
|
||||
|
||||
|
|
|
@ -1080,7 +1080,7 @@ static struct platform_driver w90p910_ether_driver = {
|
|||
.probe = w90p910_ether_probe,
|
||||
.remove = __devexit_p(w90p910_ether_remove),
|
||||
.driver = {
|
||||
.name = "w90p910-emc",
|
||||
.name = "nuc900-emc",
|
||||
.owner = THIS_MODULE,
|
||||
},
|
||||
};
|
||||
|
@ -1101,5 +1101,5 @@ module_exit(w90p910_ether_exit);
|
|||
MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>");
|
||||
MODULE_DESCRIPTION("w90p910 MAC driver!");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS("platform:w90p910-emc");
|
||||
MODULE_ALIAS("platform:nuc900-emc");
|
||||
|
||||
|
|
|
@ -1899,7 +1899,7 @@ static int e100_rx_indicate(struct nic *nic, struct rx *rx,
|
|||
nic->ru_running = RU_SUSPENDED;
|
||||
pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr,
|
||||
sizeof(struct rfd),
|
||||
PCI_DMA_BIDIRECTIONAL);
|
||||
PCI_DMA_FROMDEVICE);
|
||||
return -ENODATA;
|
||||
}
|
||||
|
||||
|
|
|
@ -309,6 +309,7 @@ static int mpc52xx_fec_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
{
|
||||
struct mpc52xx_fec_priv *priv = netdev_priv(dev);
|
||||
struct bcom_fec_bd *bd;
|
||||
unsigned long flags;
|
||||
|
||||
if (bcom_queue_full(priv->tx_dmatsk)) {
|
||||
if (net_ratelimit())
|
||||
|
@ -316,7 +317,7 @@ static int mpc52xx_fec_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
return NETDEV_TX_BUSY;
|
||||
}
|
||||
|
||||
spin_lock_irq(&priv->lock);
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
dev->trans_start = jiffies;
|
||||
|
||||
bd = (struct bcom_fec_bd *)
|
||||
|
@ -332,7 +333,7 @@ static int mpc52xx_fec_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
netif_stop_queue(dev);
|
||||
}
|
||||
|
||||
spin_unlock_irq(&priv->lock);
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
|
|
@ -1305,6 +1305,8 @@ static int emac_close(struct net_device *ndev)
|
|||
|
||||
free_irq(dev->emac_irq, dev);
|
||||
|
||||
netif_carrier_off(ndev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
@ -205,9 +204,6 @@ static const struct net_device_ops au1k_irda_netdev_ops = {
|
|||
.ndo_start_xmit = au1k_irda_hard_xmit,
|
||||
.ndo_tx_timeout = au1k_tx_timeout,
|
||||
.ndo_do_ioctl = au1k_irda_ioctl,
|
||||
.ndo_change_mtu = eth_change_mtu,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
};
|
||||
|
||||
static int au1k_irda_net_init(struct net_device *dev)
|
||||
|
|
|
@ -803,9 +803,6 @@ static const struct net_device_ops pxa_irda_netdev_ops = {
|
|||
.ndo_stop = pxa_irda_stop,
|
||||
.ndo_start_xmit = pxa_irda_hard_xmit,
|
||||
.ndo_do_ioctl = pxa_irda_ioctl,
|
||||
.ndo_change_mtu = eth_change_mtu,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
};
|
||||
|
||||
static int pxa_irda_probe(struct platform_device *pdev)
|
||||
|
@ -830,6 +827,7 @@ static int pxa_irda_probe(struct platform_device *pdev)
|
|||
if (!dev)
|
||||
goto err_mem_3;
|
||||
|
||||
SET_NETDEV_DEV(dev, &pdev->dev);
|
||||
si = netdev_priv(dev);
|
||||
si->dev = &pdev->dev;
|
||||
si->pdata = pdev->dev.platform_data;
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
@ -881,9 +880,6 @@ static const struct net_device_ops sa1100_irda_netdev_ops = {
|
|||
.ndo_stop = sa1100_irda_stop,
|
||||
.ndo_start_xmit = sa1100_irda_hard_xmit,
|
||||
.ndo_do_ioctl = sa1100_irda_ioctl,
|
||||
.ndo_change_mtu = eth_change_mtu,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
};
|
||||
|
||||
static int sa1100_irda_probe(struct platform_device *pdev)
|
||||
|
|
|
@ -41,6 +41,7 @@ static int ixpdev_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
struct ixpdev_priv *ip = netdev_priv(dev);
|
||||
struct ixpdev_tx_desc *desc;
|
||||
int entry;
|
||||
unsigned long flags;
|
||||
|
||||
if (unlikely(skb->len > PAGE_SIZE)) {
|
||||
/* @@@ Count drops. */
|
||||
|
@ -63,11 +64,11 @@ static int ixpdev_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
|
||||
dev->trans_start = jiffies;
|
||||
|
||||
local_irq_disable();
|
||||
local_irq_save(flags);
|
||||
ip->tx_queue_entries++;
|
||||
if (ip->tx_queue_entries == TX_BUF_COUNT_PER_CHAN)
|
||||
netif_stop_queue(dev);
|
||||
local_irq_enable();
|
||||
local_irq_restore(flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -620,6 +620,7 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
dma_addr_t mapping;
|
||||
unsigned int len, entry;
|
||||
u32 ctrl;
|
||||
unsigned long flags;
|
||||
|
||||
#ifdef DEBUG
|
||||
int i;
|
||||
|
@ -635,12 +636,12 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
#endif
|
||||
|
||||
len = skb->len;
|
||||
spin_lock_irq(&bp->lock);
|
||||
spin_lock_irqsave(&bp->lock, flags);
|
||||
|
||||
/* This is a hard error, log it. */
|
||||
if (TX_BUFFS_AVAIL(bp) < 1) {
|
||||
netif_stop_queue(dev);
|
||||
spin_unlock_irq(&bp->lock);
|
||||
spin_unlock_irqrestore(&bp->lock, flags);
|
||||
dev_err(&bp->pdev->dev,
|
||||
"BUG! Tx Ring full when queue awake!\n");
|
||||
dev_dbg(&bp->pdev->dev, "tx_head = %u, tx_tail = %u\n",
|
||||
|
@ -674,7 +675,7 @@ static int macb_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
if (TX_BUFFS_AVAIL(bp) < 1)
|
||||
netif_stop_queue(dev);
|
||||
|
||||
spin_unlock_irq(&bp->lock);
|
||||
spin_unlock_irqrestore(&bp->lock, flags);
|
||||
|
||||
dev->trans_start = jiffies;
|
||||
|
||||
|
|
|
@ -437,6 +437,7 @@ static inline void mlx4_en_xmit_poll(struct mlx4_en_priv *priv, int tx_ind)
|
|||
{
|
||||
struct mlx4_en_cq *cq = &priv->tx_cq[tx_ind];
|
||||
struct mlx4_en_tx_ring *ring = &priv->tx_ring[tx_ind];
|
||||
unsigned long flags;
|
||||
|
||||
/* If we don't have a pending timer, set one up to catch our recent
|
||||
post in case the interface becomes idle */
|
||||
|
@ -445,9 +446,9 @@ static inline void mlx4_en_xmit_poll(struct mlx4_en_priv *priv, int tx_ind)
|
|||
|
||||
/* Poll the CQ every mlx4_en_TX_MODER_POLL packets */
|
||||
if ((++ring->poll_cnt & (MLX4_EN_TX_POLL_MODER - 1)) == 0)
|
||||
if (spin_trylock_irq(&ring->comp_lock)) {
|
||||
if (spin_trylock_irqsave(&ring->comp_lock, flags)) {
|
||||
mlx4_en_process_tx_cq(priv->dev, cq);
|
||||
spin_unlock_irq(&ring->comp_lock);
|
||||
spin_unlock_irqrestore(&ring->comp_lock, flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -196,21 +196,23 @@ static void PRINT_PKT(u_char *buf, int length)
|
|||
/* this enables an interrupt in the interrupt mask register */
|
||||
#define SMC_ENABLE_INT(lp, x) do { \
|
||||
unsigned char mask; \
|
||||
spin_lock_irq(&lp->lock); \
|
||||
unsigned long smc_enable_flags; \
|
||||
spin_lock_irqsave(&lp->lock, smc_enable_flags); \
|
||||
mask = SMC_GET_INT_MASK(lp); \
|
||||
mask |= (x); \
|
||||
SMC_SET_INT_MASK(lp, mask); \
|
||||
spin_unlock_irq(&lp->lock); \
|
||||
spin_unlock_irqrestore(&lp->lock, smc_enable_flags); \
|
||||
} while (0)
|
||||
|
||||
/* this disables an interrupt from the interrupt mask register */
|
||||
#define SMC_DISABLE_INT(lp, x) do { \
|
||||
unsigned char mask; \
|
||||
spin_lock_irq(&lp->lock); \
|
||||
unsigned long smc_disable_flags; \
|
||||
spin_lock_irqsave(&lp->lock, smc_disable_flags); \
|
||||
mask = SMC_GET_INT_MASK(lp); \
|
||||
mask &= ~(x); \
|
||||
SMC_SET_INT_MASK(lp, mask); \
|
||||
spin_unlock_irq(&lp->lock); \
|
||||
spin_unlock_irqrestore(&lp->lock, smc_disable_flags); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
|
@ -520,21 +522,21 @@ static inline void smc_rcv(struct net_device *dev)
|
|||
* any other concurrent access and C would always interrupt B. But life
|
||||
* isn't that easy in a SMP world...
|
||||
*/
|
||||
#define smc_special_trylock(lock) \
|
||||
#define smc_special_trylock(lock, flags) \
|
||||
({ \
|
||||
int __ret; \
|
||||
local_irq_disable(); \
|
||||
local_irq_save(flags); \
|
||||
__ret = spin_trylock(lock); \
|
||||
if (!__ret) \
|
||||
local_irq_enable(); \
|
||||
local_irq_restore(flags); \
|
||||
__ret; \
|
||||
})
|
||||
#define smc_special_lock(lock) spin_lock_irq(lock)
|
||||
#define smc_special_unlock(lock) spin_unlock_irq(lock)
|
||||
#define smc_special_lock(lock, flags) spin_lock_irq(lock, flags)
|
||||
#define smc_special_unlock(lock, flags) spin_unlock_irqrestore(lock, flags)
|
||||
#else
|
||||
#define smc_special_trylock(lock) (1)
|
||||
#define smc_special_lock(lock) do { } while (0)
|
||||
#define smc_special_unlock(lock) do { } while (0)
|
||||
#define smc_special_trylock(lock, flags) (1)
|
||||
#define smc_special_lock(lock, flags) do { } while (0)
|
||||
#define smc_special_unlock(lock, flags) do { } while (0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -548,10 +550,11 @@ static void smc_hardware_send_pkt(unsigned long data)
|
|||
struct sk_buff *skb;
|
||||
unsigned int packet_no, len;
|
||||
unsigned char *buf;
|
||||
unsigned long flags;
|
||||
|
||||
DBG(3, "%s: %s\n", dev->name, __func__);
|
||||
|
||||
if (!smc_special_trylock(&lp->lock)) {
|
||||
if (!smc_special_trylock(&lp->lock, flags)) {
|
||||
netif_stop_queue(dev);
|
||||
tasklet_schedule(&lp->tx_task);
|
||||
return;
|
||||
|
@ -559,7 +562,7 @@ static void smc_hardware_send_pkt(unsigned long data)
|
|||
|
||||
skb = lp->pending_tx_skb;
|
||||
if (unlikely(!skb)) {
|
||||
smc_special_unlock(&lp->lock);
|
||||
smc_special_unlock(&lp->lock, flags);
|
||||
return;
|
||||
}
|
||||
lp->pending_tx_skb = NULL;
|
||||
|
@ -569,7 +572,7 @@ static void smc_hardware_send_pkt(unsigned long data)
|
|||
printk("%s: Memory allocation failed.\n", dev->name);
|
||||
dev->stats.tx_errors++;
|
||||
dev->stats.tx_fifo_errors++;
|
||||
smc_special_unlock(&lp->lock);
|
||||
smc_special_unlock(&lp->lock, flags);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -608,7 +611,7 @@ static void smc_hardware_send_pkt(unsigned long data)
|
|||
|
||||
/* queue the packet for TX */
|
||||
SMC_SET_MMU_CMD(lp, MC_ENQUEUE);
|
||||
smc_special_unlock(&lp->lock);
|
||||
smc_special_unlock(&lp->lock, flags);
|
||||
|
||||
dev->trans_start = jiffies;
|
||||
dev->stats.tx_packets++;
|
||||
|
@ -633,6 +636,7 @@ static int smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
struct smc_local *lp = netdev_priv(dev);
|
||||
void __iomem *ioaddr = lp->base;
|
||||
unsigned int numPages, poll_count, status;
|
||||
unsigned long flags;
|
||||
|
||||
DBG(3, "%s: %s\n", dev->name, __func__);
|
||||
|
||||
|
@ -658,7 +662,7 @@ static int smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
smc_special_lock(&lp->lock);
|
||||
smc_special_lock(&lp->lock, flags);
|
||||
|
||||
/* now, try to allocate the memory */
|
||||
SMC_SET_MMU_CMD(lp, MC_ALLOC | numPages);
|
||||
|
@ -676,7 +680,7 @@ static int smc_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
}
|
||||
} while (--poll_count);
|
||||
|
||||
smc_special_unlock(&lp->lock);
|
||||
smc_special_unlock(&lp->lock, flags);
|
||||
|
||||
lp->pending_tx_skb = skb;
|
||||
if (!poll_count) {
|
||||
|
|
|
@ -70,7 +70,7 @@ int orinoco_hw_get_tkip_iv(struct orinoco_private *priv, int key, u8 *tsc)
|
|||
int err = 0;
|
||||
u8 tsc_arr[4][IW_ENCODE_SEQ_MAX_SIZE];
|
||||
|
||||
if ((key < 0) || (key > 4))
|
||||
if ((key < 0) || (key >= 4))
|
||||
return -EINVAL;
|
||||
|
||||
err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CURRENT_TKIP_IV,
|
||||
|
|
|
@ -869,6 +869,9 @@ static int rtl8187b_init_hw(struct ieee80211_hw *dev)
|
|||
priv->aifsn[3] = 3; /* AIFSN[AC_BE] */
|
||||
rtl818x_iowrite8(priv, &priv->map->ACM_CONTROL, 0);
|
||||
|
||||
/* ENEDCA flag must always be set, transmit issues? */
|
||||
rtl818x_iowrite8(priv, &priv->map->MSR, RTL818X_MSR_ENEDCA);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1173,13 +1176,16 @@ static void rtl8187_bss_info_changed(struct ieee80211_hw *dev,
|
|||
rtl818x_iowrite8(priv, &priv->map->BSSID[i],
|
||||
info->bssid[i]);
|
||||
|
||||
if (priv->is_rtl8187b)
|
||||
reg = RTL818X_MSR_ENEDCA;
|
||||
else
|
||||
reg = 0;
|
||||
|
||||
if (is_valid_ether_addr(info->bssid)) {
|
||||
reg = RTL818X_MSR_INFRA;
|
||||
if (priv->is_rtl8187b)
|
||||
reg |= RTL818X_MSR_ENEDCA;
|
||||
reg |= RTL818X_MSR_INFRA;
|
||||
rtl818x_iowrite8(priv, &priv->map->MSR, reg);
|
||||
} else {
|
||||
reg = RTL818X_MSR_NO_LINK;
|
||||
reg |= RTL818X_MSR_NO_LINK;
|
||||
rtl818x_iowrite8(priv, &priv->map->MSR, reg);
|
||||
}
|
||||
|
||||
|
|
|
@ -346,7 +346,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
|
|||
static int yellowfin_open(struct net_device *dev);
|
||||
static void yellowfin_timer(unsigned long data);
|
||||
static void yellowfin_tx_timeout(struct net_device *dev);
|
||||
static void yellowfin_init_ring(struct net_device *dev);
|
||||
static int yellowfin_init_ring(struct net_device *dev);
|
||||
static int yellowfin_start_xmit(struct sk_buff *skb, struct net_device *dev);
|
||||
static irqreturn_t yellowfin_interrupt(int irq, void *dev_instance);
|
||||
static int yellowfin_rx(struct net_device *dev);
|
||||
|
@ -573,19 +573,24 @@ static int yellowfin_open(struct net_device *dev)
|
|||
{
|
||||
struct yellowfin_private *yp = netdev_priv(dev);
|
||||
void __iomem *ioaddr = yp->base;
|
||||
int i;
|
||||
int i, ret;
|
||||
|
||||
/* Reset the chip. */
|
||||
iowrite32(0x80000000, ioaddr + DMACtrl);
|
||||
|
||||
i = request_irq(dev->irq, &yellowfin_interrupt, IRQF_SHARED, dev->name, dev);
|
||||
if (i) return i;
|
||||
ret = request_irq(dev->irq, &yellowfin_interrupt, IRQF_SHARED, dev->name, dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (yellowfin_debug > 1)
|
||||
printk(KERN_DEBUG "%s: yellowfin_open() irq %d.\n",
|
||||
dev->name, dev->irq);
|
||||
|
||||
yellowfin_init_ring(dev);
|
||||
ret = yellowfin_init_ring(dev);
|
||||
if (ret) {
|
||||
free_irq(dev->irq, dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
iowrite32(yp->rx_ring_dma, ioaddr + RxPtr);
|
||||
iowrite32(yp->tx_ring_dma, ioaddr + TxPtr);
|
||||
|
@ -725,10 +730,10 @@ static void yellowfin_tx_timeout(struct net_device *dev)
|
|||
}
|
||||
|
||||
/* Initialize the Rx and Tx rings, along with various 'dev' bits. */
|
||||
static void yellowfin_init_ring(struct net_device *dev)
|
||||
static int yellowfin_init_ring(struct net_device *dev)
|
||||
{
|
||||
struct yellowfin_private *yp = netdev_priv(dev);
|
||||
int i;
|
||||
int i, j;
|
||||
|
||||
yp->tx_full = 0;
|
||||
yp->cur_rx = yp->cur_tx = 0;
|
||||
|
@ -753,6 +758,11 @@ static void yellowfin_init_ring(struct net_device *dev)
|
|||
yp->rx_ring[i].addr = cpu_to_le32(pci_map_single(yp->pci_dev,
|
||||
skb->data, yp->rx_buf_sz, PCI_DMA_FROMDEVICE));
|
||||
}
|
||||
if (i != RX_RING_SIZE) {
|
||||
for (j = 0; j < i; j++)
|
||||
dev_kfree_skb(yp->rx_skbuff[j]);
|
||||
return -ENOMEM;
|
||||
}
|
||||
yp->rx_ring[i-1].dbdma_cmd = cpu_to_le32(CMD_STOP);
|
||||
yp->dirty_rx = (unsigned int)(i - RX_RING_SIZE);
|
||||
|
||||
|
@ -769,8 +779,6 @@ static void yellowfin_init_ring(struct net_device *dev)
|
|||
yp->tx_ring[--i].dbdma_cmd = cpu_to_le32(CMD_STOP | BRANCH_ALWAYS);
|
||||
#else
|
||||
{
|
||||
int j;
|
||||
|
||||
/* Tx ring needs a pair of descriptors, the second for the status. */
|
||||
for (i = 0; i < TX_RING_SIZE; i++) {
|
||||
j = 2*i;
|
||||
|
@ -805,7 +813,7 @@ static void yellowfin_init_ring(struct net_device *dev)
|
|||
}
|
||||
#endif
|
||||
yp->tx_tail_desc = &yp->tx_status[0];
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int yellowfin_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
|
|
|
@ -508,7 +508,7 @@ static int pci_restore_standard_config(struct pci_dev *pci_dev)
|
|||
return error;
|
||||
}
|
||||
|
||||
return pci_dev->state_saved ? pci_restore_state(pci_dev) : 0;
|
||||
return pci_restore_state(pci_dev);
|
||||
}
|
||||
|
||||
static void pci_pm_default_resume_noirq(struct pci_dev *pci_dev)
|
||||
|
|
|
@ -846,6 +846,8 @@ pci_restore_state(struct pci_dev *dev)
|
|||
int i;
|
||||
u32 val;
|
||||
|
||||
if (!dev->state_saved)
|
||||
return 0;
|
||||
/* PCI Express register must be restored first */
|
||||
pci_restore_pcie_state(dev);
|
||||
|
||||
|
|
|
@ -2135,9 +2135,9 @@ static int dasd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
|
|||
struct dasd_device *base;
|
||||
|
||||
block = bdev->bd_disk->private_data;
|
||||
base = block->base;
|
||||
if (!block)
|
||||
return -ENODEV;
|
||||
base = block->base;
|
||||
|
||||
if (!base->discipline ||
|
||||
!base->discipline->fill_geometry)
|
||||
|
|
|
@ -772,10 +772,8 @@ static struct ccw_device * io_subchannel_create_ccwdev(struct subchannel *sch)
|
|||
cdev = io_subchannel_allocate_dev(sch);
|
||||
if (!IS_ERR(cdev)) {
|
||||
ret = io_subchannel_initialize_dev(sch, cdev);
|
||||
if (ret) {
|
||||
kfree(cdev);
|
||||
if (ret)
|
||||
cdev = ERR_PTR(ret);
|
||||
}
|
||||
}
|
||||
return cdev;
|
||||
}
|
||||
|
|
|
@ -537,8 +537,12 @@ int bbc_envctrl_init(struct bbc_i2c_bus *bp)
|
|||
}
|
||||
if (temp_index != 0 && fan_index != 0) {
|
||||
kenvctrld_task = kthread_run(kenvctrld, NULL, "kenvctrld");
|
||||
if (IS_ERR(kenvctrld_task))
|
||||
return PTR_ERR(kenvctrld_task);
|
||||
if (IS_ERR(kenvctrld_task)) {
|
||||
int err = PTR_ERR(kenvctrld_task);
|
||||
|
||||
kenvctrld_task = NULL;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -561,7 +565,8 @@ void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp)
|
|||
struct bbc_cpu_temperature *tp, *tpos;
|
||||
struct bbc_fan_control *fp, *fpos;
|
||||
|
||||
kthread_stop(kenvctrld_task);
|
||||
if (kenvctrld_task)
|
||||
kthread_stop(kenvctrld_task);
|
||||
|
||||
list_for_each_entry_safe(tp, tpos, &bp->temps, bp_list) {
|
||||
list_del(&tp->bp_list);
|
||||
|
|
|
@ -119,6 +119,64 @@ _base_fault_reset_work(struct work_struct *work)
|
|||
spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* mpt2sas_base_start_watchdog - start the fault_reset_work_q
|
||||
* @ioc: pointer to scsi command object
|
||||
* Context: sleep.
|
||||
*
|
||||
* Return nothing.
|
||||
*/
|
||||
void
|
||||
mpt2sas_base_start_watchdog(struct MPT2SAS_ADAPTER *ioc)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
if (ioc->fault_reset_work_q)
|
||||
return;
|
||||
|
||||
/* initialize fault polling */
|
||||
INIT_DELAYED_WORK(&ioc->fault_reset_work, _base_fault_reset_work);
|
||||
snprintf(ioc->fault_reset_work_q_name,
|
||||
sizeof(ioc->fault_reset_work_q_name), "poll_%d_status", ioc->id);
|
||||
ioc->fault_reset_work_q =
|
||||
create_singlethread_workqueue(ioc->fault_reset_work_q_name);
|
||||
if (!ioc->fault_reset_work_q) {
|
||||
printk(MPT2SAS_ERR_FMT "%s: failed (line=%d)\n",
|
||||
ioc->name, __func__, __LINE__);
|
||||
return;
|
||||
}
|
||||
spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags);
|
||||
if (ioc->fault_reset_work_q)
|
||||
queue_delayed_work(ioc->fault_reset_work_q,
|
||||
&ioc->fault_reset_work,
|
||||
msecs_to_jiffies(FAULT_POLLING_INTERVAL));
|
||||
spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* mpt2sas_base_stop_watchdog - stop the fault_reset_work_q
|
||||
* @ioc: pointer to scsi command object
|
||||
* Context: sleep.
|
||||
*
|
||||
* Return nothing.
|
||||
*/
|
||||
void
|
||||
mpt2sas_base_stop_watchdog(struct MPT2SAS_ADAPTER *ioc)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct workqueue_struct *wq;
|
||||
|
||||
spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags);
|
||||
wq = ioc->fault_reset_work_q;
|
||||
ioc->fault_reset_work_q = NULL;
|
||||
spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags);
|
||||
if (wq) {
|
||||
if (!cancel_delayed_work(&ioc->fault_reset_work))
|
||||
flush_workqueue(wq);
|
||||
destroy_workqueue(wq);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SCSI_MPT2SAS_LOGGING
|
||||
/**
|
||||
* _base_sas_ioc_info - verbose translation of the ioc status
|
||||
|
@ -440,6 +498,10 @@ _base_sas_log_info(struct MPT2SAS_ADAPTER *ioc , u32 log_info)
|
|||
if (sas_loginfo.dw.bus_type != 3 /*SAS*/)
|
||||
return;
|
||||
|
||||
/* each nexus loss loginfo */
|
||||
if (log_info == 0x31170000)
|
||||
return;
|
||||
|
||||
/* eat the loginfos associated with task aborts */
|
||||
if (ioc->ignore_loginfos && (log_info == 30050000 || log_info ==
|
||||
0x31140000 || log_info == 0x31130000))
|
||||
|
@ -1109,7 +1171,6 @@ mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER *ioc)
|
|||
}
|
||||
}
|
||||
|
||||
pci_set_drvdata(pdev, ioc->shost);
|
||||
_base_mask_interrupts(ioc);
|
||||
r = _base_enable_msix(ioc);
|
||||
if (r)
|
||||
|
@ -1132,7 +1193,6 @@ mpt2sas_base_map_resources(struct MPT2SAS_ADAPTER *ioc)
|
|||
ioc->pci_irq = -1;
|
||||
pci_release_selected_regions(ioc->pdev, ioc->bars);
|
||||
pci_disable_device(pdev);
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -3191,7 +3251,6 @@ mpt2sas_base_free_resources(struct MPT2SAS_ADAPTER *ioc)
|
|||
ioc->chip_phys = 0;
|
||||
pci_release_selected_regions(ioc->pdev, ioc->bars);
|
||||
pci_disable_device(pdev);
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3205,7 +3264,6 @@ int
|
|||
mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc)
|
||||
{
|
||||
int r, i;
|
||||
unsigned long flags;
|
||||
|
||||
dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
|
||||
__func__));
|
||||
|
@ -3214,6 +3272,7 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc)
|
|||
if (r)
|
||||
return r;
|
||||
|
||||
pci_set_drvdata(ioc->pdev, ioc->shost);
|
||||
r = _base_make_ioc_ready(ioc, CAN_SLEEP, SOFT_RESET);
|
||||
if (r)
|
||||
goto out_free_resources;
|
||||
|
@ -3288,23 +3347,7 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc)
|
|||
if (r)
|
||||
goto out_free_resources;
|
||||
|
||||
/* initialize fault polling */
|
||||
INIT_DELAYED_WORK(&ioc->fault_reset_work, _base_fault_reset_work);
|
||||
snprintf(ioc->fault_reset_work_q_name,
|
||||
sizeof(ioc->fault_reset_work_q_name), "poll_%d_status", ioc->id);
|
||||
ioc->fault_reset_work_q =
|
||||
create_singlethread_workqueue(ioc->fault_reset_work_q_name);
|
||||
if (!ioc->fault_reset_work_q) {
|
||||
printk(MPT2SAS_ERR_FMT "%s: failed (line=%d)\n",
|
||||
ioc->name, __func__, __LINE__);
|
||||
goto out_free_resources;
|
||||
}
|
||||
spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags);
|
||||
if (ioc->fault_reset_work_q)
|
||||
queue_delayed_work(ioc->fault_reset_work_q,
|
||||
&ioc->fault_reset_work,
|
||||
msecs_to_jiffies(FAULT_POLLING_INTERVAL));
|
||||
spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags);
|
||||
mpt2sas_base_start_watchdog(ioc);
|
||||
return 0;
|
||||
|
||||
out_free_resources:
|
||||
|
@ -3312,6 +3355,7 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc)
|
|||
ioc->remove_host = 1;
|
||||
mpt2sas_base_free_resources(ioc);
|
||||
_base_release_memory_pools(ioc);
|
||||
pci_set_drvdata(ioc->pdev, NULL);
|
||||
kfree(ioc->tm_cmds.reply);
|
||||
kfree(ioc->transport_cmds.reply);
|
||||
kfree(ioc->config_cmds.reply);
|
||||
|
@ -3337,22 +3381,14 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc)
|
|||
void
|
||||
mpt2sas_base_detach(struct MPT2SAS_ADAPTER *ioc)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct workqueue_struct *wq;
|
||||
|
||||
dexitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name,
|
||||
__func__));
|
||||
|
||||
spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags);
|
||||
wq = ioc->fault_reset_work_q;
|
||||
ioc->fault_reset_work_q = NULL;
|
||||
spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags);
|
||||
if (!cancel_delayed_work(&ioc->fault_reset_work))
|
||||
flush_workqueue(wq);
|
||||
destroy_workqueue(wq);
|
||||
|
||||
mpt2sas_base_stop_watchdog(ioc);
|
||||
mpt2sas_base_free_resources(ioc);
|
||||
_base_release_memory_pools(ioc);
|
||||
pci_set_drvdata(ioc->pdev, NULL);
|
||||
kfree(ioc->pfacts);
|
||||
kfree(ioc->ctl_cmds.reply);
|
||||
kfree(ioc->base_cmds.reply);
|
||||
|
|
|
@ -69,10 +69,10 @@
|
|||
#define MPT2SAS_DRIVER_NAME "mpt2sas"
|
||||
#define MPT2SAS_AUTHOR "LSI Corporation <DL-MPTFusionLinux@lsi.com>"
|
||||
#define MPT2SAS_DESCRIPTION "LSI MPT Fusion SAS 2.0 Device Driver"
|
||||
#define MPT2SAS_DRIVER_VERSION "01.100.03.00"
|
||||
#define MPT2SAS_DRIVER_VERSION "01.100.04.00"
|
||||
#define MPT2SAS_MAJOR_VERSION 01
|
||||
#define MPT2SAS_MINOR_VERSION 100
|
||||
#define MPT2SAS_BUILD_VERSION 03
|
||||
#define MPT2SAS_BUILD_VERSION 04
|
||||
#define MPT2SAS_RELEASE_VERSION 00
|
||||
|
||||
/*
|
||||
|
@ -673,6 +673,8 @@ typedef void (*MPT_CALLBACK)(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 VF_ID,
|
|||
|
||||
/* base shared API */
|
||||
extern struct list_head mpt2sas_ioc_list;
|
||||
void mpt2sas_base_start_watchdog(struct MPT2SAS_ADAPTER *ioc);
|
||||
void mpt2sas_base_stop_watchdog(struct MPT2SAS_ADAPTER *ioc);
|
||||
|
||||
int mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc);
|
||||
void mpt2sas_base_detach(struct MPT2SAS_ADAPTER *ioc);
|
||||
|
|
|
@ -236,17 +236,25 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t
|
|||
Mpi2ConfigRequest_t *config_request;
|
||||
int r;
|
||||
u8 retry_count;
|
||||
u8 issue_reset;
|
||||
u8 issue_host_reset = 0;
|
||||
u16 wait_state_count;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
if (ioc->config_cmds.status != MPT2_CMD_NOT_USED) {
|
||||
printk(MPT2SAS_ERR_FMT "%s: config_cmd in use\n",
|
||||
ioc->name, __func__);
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return -EAGAIN;
|
||||
}
|
||||
retry_count = 0;
|
||||
|
||||
retry_config:
|
||||
if (retry_count) {
|
||||
if (retry_count > 2) /* attempt only 2 retries */
|
||||
return -EFAULT;
|
||||
printk(MPT2SAS_INFO_FMT "%s: attempting retry (%d)\n",
|
||||
ioc->name, __func__, retry_count);
|
||||
}
|
||||
wait_state_count = 0;
|
||||
ioc_state = mpt2sas_base_get_iocstate(ioc, 1);
|
||||
while (ioc_state != MPI2_IOC_STATE_OPERATIONAL) {
|
||||
|
@ -254,8 +262,8 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t
|
|||
printk(MPT2SAS_ERR_FMT
|
||||
"%s: failed due to ioc not operational\n",
|
||||
ioc->name, __func__);
|
||||
ioc->config_cmds.status = MPT2_CMD_NOT_USED;
|
||||
return -EFAULT;
|
||||
r = -EFAULT;
|
||||
goto out;
|
||||
}
|
||||
ssleep(1);
|
||||
ioc_state = mpt2sas_base_get_iocstate(ioc, 1);
|
||||
|
@ -271,8 +279,8 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t
|
|||
if (!smid) {
|
||||
printk(MPT2SAS_ERR_FMT "%s: failed obtaining a smid\n",
|
||||
ioc->name, __func__);
|
||||
ioc->config_cmds.status = MPT2_CMD_NOT_USED;
|
||||
return -EAGAIN;
|
||||
r = -EAGAIN;
|
||||
goto out;
|
||||
}
|
||||
|
||||
r = 0;
|
||||
|
@ -292,9 +300,15 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t
|
|||
ioc->name, __func__);
|
||||
_debug_dump_mf(mpi_request,
|
||||
sizeof(Mpi2ConfigRequest_t)/4);
|
||||
if (!(ioc->config_cmds.status & MPT2_CMD_RESET))
|
||||
issue_reset = 1;
|
||||
goto issue_host_reset;
|
||||
retry_count++;
|
||||
if (ioc->config_cmds.smid == smid)
|
||||
mpt2sas_base_free_smid(ioc, smid);
|
||||
if ((ioc->shost_recovery) ||
|
||||
(ioc->config_cmds.status & MPT2_CMD_RESET))
|
||||
goto retry_config;
|
||||
issue_host_reset = 1;
|
||||
r = -EFAULT;
|
||||
goto out;
|
||||
}
|
||||
if (ioc->config_cmds.status & MPT2_CMD_REPLY_VALID)
|
||||
memcpy(mpi_reply, ioc->config_cmds.reply,
|
||||
|
@ -302,21 +316,13 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t
|
|||
if (retry_count)
|
||||
printk(MPT2SAS_INFO_FMT "%s: retry completed!!\n",
|
||||
ioc->name, __func__);
|
||||
out:
|
||||
ioc->config_cmds.status = MPT2_CMD_NOT_USED;
|
||||
return r;
|
||||
|
||||
issue_host_reset:
|
||||
if (issue_reset)
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
if (issue_host_reset)
|
||||
mpt2sas_base_hard_reset_handler(ioc, CAN_SLEEP,
|
||||
FORCE_BIG_HAMMER);
|
||||
ioc->config_cmds.status = MPT2_CMD_NOT_USED;
|
||||
if (!retry_count) {
|
||||
printk(MPT2SAS_INFO_FMT "%s: attempting retry\n",
|
||||
ioc->name, __func__);
|
||||
retry_count++;
|
||||
goto retry_config;
|
||||
}
|
||||
return -EFAULT;
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -375,7 +381,6 @@ mpt2sas_config_get_manufacturing_pg0(struct MPT2SAS_ADAPTER *ioc,
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(config_page, 0, sizeof(Mpi2ManufacturingPage0_t));
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -417,7 +422,6 @@ mpt2sas_config_get_manufacturing_pg0(struct MPT2SAS_ADAPTER *ioc,
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -438,7 +442,6 @@ mpt2sas_config_get_bios_pg2(struct MPT2SAS_ADAPTER *ioc,
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(config_page, 0, sizeof(Mpi2BiosPage2_t));
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -480,7 +483,6 @@ mpt2sas_config_get_bios_pg2(struct MPT2SAS_ADAPTER *ioc,
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -501,7 +503,6 @@ mpt2sas_config_get_bios_pg3(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(config_page, 0, sizeof(Mpi2BiosPage3_t));
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -543,7 +544,6 @@ mpt2sas_config_get_bios_pg3(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -564,7 +564,6 @@ mpt2sas_config_get_iounit_pg0(struct MPT2SAS_ADAPTER *ioc,
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(config_page, 0, sizeof(Mpi2IOUnitPage0_t));
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -606,7 +605,6 @@ mpt2sas_config_get_iounit_pg0(struct MPT2SAS_ADAPTER *ioc,
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -627,7 +625,6 @@ mpt2sas_config_get_iounit_pg1(struct MPT2SAS_ADAPTER *ioc,
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(config_page, 0, sizeof(Mpi2IOUnitPage1_t));
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -669,7 +666,6 @@ mpt2sas_config_get_iounit_pg1(struct MPT2SAS_ADAPTER *ioc,
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -690,7 +686,6 @@ mpt2sas_config_set_iounit_pg1(struct MPT2SAS_ADAPTER *ioc,
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
mpi_request.Action = MPI2_CONFIG_ACTION_PAGE_HEADER;
|
||||
|
@ -732,7 +727,6 @@ mpt2sas_config_set_iounit_pg1(struct MPT2SAS_ADAPTER *ioc,
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -753,7 +747,6 @@ mpt2sas_config_get_ioc_pg8(struct MPT2SAS_ADAPTER *ioc,
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(config_page, 0, sizeof(Mpi2IOCPage8_t));
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -795,7 +788,6 @@ mpt2sas_config_get_ioc_pg8(struct MPT2SAS_ADAPTER *ioc,
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -818,7 +810,6 @@ mpt2sas_config_get_sas_device_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(config_page, 0, sizeof(Mpi2SasDevicePage0_t));
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -863,7 +854,6 @@ mpt2sas_config_get_sas_device_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -886,7 +876,6 @@ mpt2sas_config_get_sas_device_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(config_page, 0, sizeof(Mpi2SasDevicePage1_t));
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -931,7 +920,6 @@ mpt2sas_config_get_sas_device_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -953,7 +941,6 @@ mpt2sas_config_get_number_hba_phys(struct MPT2SAS_ADAPTER *ioc, u8 *num_phys)
|
|||
Mpi2ConfigReply_t mpi_reply;
|
||||
Mpi2SasIOUnitPage0_t config_page;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
mpi_request.Action = MPI2_CONFIG_ACTION_PAGE_HEADER;
|
||||
|
@ -1002,7 +989,6 @@ mpt2sas_config_get_number_hba_phys(struct MPT2SAS_ADAPTER *ioc, u8 *num_phys)
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -1026,8 +1012,6 @@ mpt2sas_config_get_sas_iounit_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
Mpi2ConfigRequest_t mpi_request;
|
||||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(config_page, 0, sz);
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -1070,7 +1054,6 @@ mpt2sas_config_get_sas_iounit_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -1095,7 +1078,6 @@ mpt2sas_config_get_sas_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(config_page, 0, sz);
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -1138,7 +1120,6 @@ mpt2sas_config_get_sas_iounit_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -1161,7 +1142,6 @@ mpt2sas_config_get_expander_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(config_page, 0, sizeof(Mpi2ExpanderPage0_t));
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -1206,7 +1186,6 @@ mpt2sas_config_get_expander_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -1230,7 +1209,6 @@ mpt2sas_config_get_expander_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(config_page, 0, sizeof(Mpi2ExpanderPage1_t));
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -1277,7 +1255,6 @@ mpt2sas_config_get_expander_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -1300,7 +1277,6 @@ mpt2sas_config_get_enclosure_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(config_page, 0, sizeof(Mpi2SasEnclosurePage0_t));
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -1345,7 +1321,6 @@ mpt2sas_config_get_enclosure_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -1367,7 +1342,6 @@ mpt2sas_config_get_phy_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(config_page, 0, sizeof(Mpi2SasPhyPage0_t));
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -1413,7 +1387,6 @@ mpt2sas_config_get_phy_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -1435,7 +1408,6 @@ mpt2sas_config_get_phy_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(config_page, 0, sizeof(Mpi2SasPhyPage1_t));
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -1481,7 +1453,6 @@ mpt2sas_config_get_phy_pg1(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -1505,7 +1476,6 @@ mpt2sas_config_get_raid_volume_pg1(struct MPT2SAS_ADAPTER *ioc,
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(config_page, 0, sizeof(Mpi2RaidVolPage1_t));
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -1548,7 +1518,6 @@ mpt2sas_config_get_raid_volume_pg1(struct MPT2SAS_ADAPTER *ioc,
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -1572,7 +1541,6 @@ mpt2sas_config_get_number_pds(struct MPT2SAS_ADAPTER *ioc, u16 handle,
|
|||
struct config_request mem;
|
||||
u16 ioc_status;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
*num_pds = 0;
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -1620,7 +1588,6 @@ mpt2sas_config_get_number_pds(struct MPT2SAS_ADAPTER *ioc, u16 handle,
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -1645,7 +1612,6 @@ mpt2sas_config_get_raid_volume_pg0(struct MPT2SAS_ADAPTER *ioc,
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
memset(config_page, 0, sz);
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -1687,7 +1653,6 @@ mpt2sas_config_get_raid_volume_pg0(struct MPT2SAS_ADAPTER *ioc,
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -1711,7 +1676,6 @@ mpt2sas_config_get_phys_disk_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
int r;
|
||||
struct config_request mem;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
memset(config_page, 0, sizeof(Mpi2RaidPhysDiskPage0_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -1754,7 +1718,6 @@ mpt2sas_config_get_phys_disk_pg0(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigReply_t
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -1778,7 +1741,6 @@ mpt2sas_config_get_volume_handle(struct MPT2SAS_ADAPTER *ioc, u16 pd_handle,
|
|||
struct config_request mem;
|
||||
u16 ioc_status;
|
||||
|
||||
mutex_lock(&ioc->config_cmds.mutex);
|
||||
*volume_handle = 0;
|
||||
memset(&mpi_request, 0, sizeof(Mpi2ConfigRequest_t));
|
||||
mpi_request.Function = MPI2_FUNCTION_CONFIG;
|
||||
|
@ -1842,7 +1804,6 @@ mpt2sas_config_get_volume_handle(struct MPT2SAS_ADAPTER *ioc, u16 pd_handle,
|
|||
_config_free_config_dma_memory(ioc, &mem);
|
||||
|
||||
out:
|
||||
mutex_unlock(&ioc->config_cmds.mutex);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
|
@ -2767,6 +2767,10 @@ _scsih_scsi_ioc_info(struct MPT2SAS_ADAPTER *ioc, struct scsi_cmnd *scmd,
|
|||
char *desc_ioc_state = NULL;
|
||||
char *desc_scsi_status = NULL;
|
||||
char *desc_scsi_state = ioc->tmp_string;
|
||||
u32 log_info = le32_to_cpu(mpi_reply->IOCLogInfo);
|
||||
|
||||
if (log_info == 0x31170000)
|
||||
return;
|
||||
|
||||
switch (ioc_status) {
|
||||
case MPI2_IOCSTATUS_SUCCESS:
|
||||
|
@ -3426,7 +3430,7 @@ _scsih_expander_add(struct MPT2SAS_ADAPTER *ioc, u16 handle)
|
|||
__le64 sas_address;
|
||||
int i;
|
||||
unsigned long flags;
|
||||
struct _sas_port *mpt2sas_port;
|
||||
struct _sas_port *mpt2sas_port = NULL;
|
||||
int rc = 0;
|
||||
|
||||
if (!handle)
|
||||
|
@ -3518,12 +3522,20 @@ _scsih_expander_add(struct MPT2SAS_ADAPTER *ioc, u16 handle)
|
|||
&expander_pg1, i, handle))) {
|
||||
printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n",
|
||||
ioc->name, __FILE__, __LINE__, __func__);
|
||||
continue;
|
||||
rc = -1;
|
||||
goto out_fail;
|
||||
}
|
||||
sas_expander->phy[i].handle = handle;
|
||||
sas_expander->phy[i].phy_id = i;
|
||||
mpt2sas_transport_add_expander_phy(ioc, &sas_expander->phy[i],
|
||||
expander_pg1, sas_expander->parent_dev);
|
||||
|
||||
if ((mpt2sas_transport_add_expander_phy(ioc,
|
||||
&sas_expander->phy[i], expander_pg1,
|
||||
sas_expander->parent_dev))) {
|
||||
printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n",
|
||||
ioc->name, __FILE__, __LINE__, __func__);
|
||||
rc = -1;
|
||||
goto out_fail;
|
||||
}
|
||||
}
|
||||
|
||||
if (sas_expander->enclosure_handle) {
|
||||
|
@ -3540,8 +3552,9 @@ _scsih_expander_add(struct MPT2SAS_ADAPTER *ioc, u16 handle)
|
|||
|
||||
out_fail:
|
||||
|
||||
if (sas_expander)
|
||||
kfree(sas_expander->phy);
|
||||
if (mpt2sas_port)
|
||||
mpt2sas_transport_port_remove(ioc, sas_expander->sas_address,
|
||||
sas_expander->parent_handle);
|
||||
kfree(sas_expander);
|
||||
return rc;
|
||||
}
|
||||
|
@ -3663,12 +3676,11 @@ _scsih_add_device(struct MPT2SAS_ADAPTER *ioc, u16 handle, u8 phy_num, u8 is_pd)
|
|||
sas_device->hidden_raid_component = is_pd;
|
||||
|
||||
/* get enclosure_logical_id */
|
||||
if (!(mpt2sas_config_get_enclosure_pg0(ioc, &mpi_reply, &enclosure_pg0,
|
||||
MPI2_SAS_ENCLOS_PGAD_FORM_HANDLE,
|
||||
sas_device->enclosure_handle))) {
|
||||
if (sas_device->enclosure_handle && !(mpt2sas_config_get_enclosure_pg0(
|
||||
ioc, &mpi_reply, &enclosure_pg0, MPI2_SAS_ENCLOS_PGAD_FORM_HANDLE,
|
||||
sas_device->enclosure_handle)))
|
||||
sas_device->enclosure_logical_id =
|
||||
le64_to_cpu(enclosure_pg0.EnclosureLogicalID);
|
||||
}
|
||||
|
||||
/* get device name */
|
||||
sas_device->device_name = le64_to_cpu(sas_device_pg0.DeviceName);
|
||||
|
@ -4250,12 +4262,6 @@ _scsih_sas_volume_add(struct MPT2SAS_ADAPTER *ioc,
|
|||
u16 handle = le16_to_cpu(element->VolDevHandle);
|
||||
int rc;
|
||||
|
||||
#if 0 /* RAID_HACKS */
|
||||
if (le32_to_cpu(event_data->Flags) &
|
||||
MPI2_EVENT_IR_CHANGE_FLAGS_FOREIGN_CONFIG)
|
||||
return;
|
||||
#endif
|
||||
|
||||
mpt2sas_config_get_volume_wwid(ioc, handle, &wwid);
|
||||
if (!wwid) {
|
||||
printk(MPT2SAS_ERR_FMT
|
||||
|
@ -4310,12 +4316,6 @@ _scsih_sas_volume_delete(struct MPT2SAS_ADAPTER *ioc,
|
|||
unsigned long flags;
|
||||
struct MPT2SAS_TARGET *sas_target_priv_data;
|
||||
|
||||
#if 0 /* RAID_HACKS */
|
||||
if (le32_to_cpu(event_data->Flags) &
|
||||
MPI2_EVENT_IR_CHANGE_FLAGS_FOREIGN_CONFIG)
|
||||
return;
|
||||
#endif
|
||||
|
||||
spin_lock_irqsave(&ioc->raid_device_lock, flags);
|
||||
raid_device = _scsih_raid_device_find_by_handle(ioc, handle);
|
||||
spin_unlock_irqrestore(&ioc->raid_device_lock, flags);
|
||||
|
@ -4428,14 +4428,38 @@ _scsih_sas_pd_add(struct MPT2SAS_ADAPTER *ioc,
|
|||
struct _sas_device *sas_device;
|
||||
unsigned long flags;
|
||||
u16 handle = le16_to_cpu(element->PhysDiskDevHandle);
|
||||
Mpi2ConfigReply_t mpi_reply;
|
||||
Mpi2SasDevicePage0_t sas_device_pg0;
|
||||
u32 ioc_status;
|
||||
|
||||
spin_lock_irqsave(&ioc->sas_device_lock, flags);
|
||||
sas_device = _scsih_sas_device_find_by_handle(ioc, handle);
|
||||
spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
|
||||
if (sas_device)
|
||||
if (sas_device) {
|
||||
sas_device->hidden_raid_component = 1;
|
||||
else
|
||||
_scsih_add_device(ioc, handle, 0, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((mpt2sas_config_get_sas_device_pg0(ioc, &mpi_reply, &sas_device_pg0,
|
||||
MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) {
|
||||
printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n",
|
||||
ioc->name, __FILE__, __LINE__, __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
ioc_status = le16_to_cpu(mpi_reply.IOCStatus) &
|
||||
MPI2_IOCSTATUS_MASK;
|
||||
if (ioc_status != MPI2_IOCSTATUS_SUCCESS) {
|
||||
printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n",
|
||||
ioc->name, __FILE__, __LINE__, __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
_scsih_link_change(ioc,
|
||||
le16_to_cpu(sas_device_pg0.ParentDevHandle),
|
||||
handle, sas_device_pg0.PhyNum, MPI2_SAS_NEG_LINK_RATE_1_5);
|
||||
|
||||
_scsih_add_device(ioc, handle, 0, 1);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SCSI_MPT2SAS_LOGGING
|
||||
|
@ -4535,12 +4559,15 @@ _scsih_sas_ir_config_change_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID,
|
|||
{
|
||||
Mpi2EventIrConfigElement_t *element;
|
||||
int i;
|
||||
u8 foreign_config;
|
||||
|
||||
#ifdef CONFIG_SCSI_MPT2SAS_LOGGING
|
||||
if (ioc->logging_level & MPT_DEBUG_EVENT_WORK_TASK)
|
||||
_scsih_sas_ir_config_change_event_debug(ioc, event_data);
|
||||
|
||||
#endif
|
||||
foreign_config = (le32_to_cpu(event_data->Flags) &
|
||||
MPI2_EVENT_IR_CHANGE_FLAGS_FOREIGN_CONFIG) ? 1 : 0;
|
||||
|
||||
element = (Mpi2EventIrConfigElement_t *)&event_data->ConfigElement[0];
|
||||
for (i = 0; i < event_data->NumElements; i++, element++) {
|
||||
|
@ -4548,11 +4575,13 @@ _scsih_sas_ir_config_change_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID,
|
|||
switch (element->ReasonCode) {
|
||||
case MPI2_EVENT_IR_CHANGE_RC_VOLUME_CREATED:
|
||||
case MPI2_EVENT_IR_CHANGE_RC_ADDED:
|
||||
_scsih_sas_volume_add(ioc, element);
|
||||
if (!foreign_config)
|
||||
_scsih_sas_volume_add(ioc, element);
|
||||
break;
|
||||
case MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED:
|
||||
case MPI2_EVENT_IR_CHANGE_RC_REMOVED:
|
||||
_scsih_sas_volume_delete(ioc, element);
|
||||
if (!foreign_config)
|
||||
_scsih_sas_volume_delete(ioc, element);
|
||||
break;
|
||||
case MPI2_EVENT_IR_CHANGE_RC_PD_CREATED:
|
||||
_scsih_sas_pd_hide(ioc, element);
|
||||
|
@ -4671,6 +4700,9 @@ _scsih_sas_ir_physical_disk_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID,
|
|||
u32 state;
|
||||
struct _sas_device *sas_device;
|
||||
unsigned long flags;
|
||||
Mpi2ConfigReply_t mpi_reply;
|
||||
Mpi2SasDevicePage0_t sas_device_pg0;
|
||||
u32 ioc_status;
|
||||
|
||||
if (event_data->ReasonCode != MPI2_EVENT_IR_PHYSDISK_RC_STATE_CHANGED)
|
||||
return;
|
||||
|
@ -4687,22 +4719,40 @@ _scsih_sas_ir_physical_disk_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID,
|
|||
spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
|
||||
|
||||
switch (state) {
|
||||
#if 0
|
||||
case MPI2_RAID_PD_STATE_OFFLINE:
|
||||
if (sas_device)
|
||||
_scsih_remove_device(ioc, handle);
|
||||
break;
|
||||
#endif
|
||||
case MPI2_RAID_PD_STATE_ONLINE:
|
||||
case MPI2_RAID_PD_STATE_DEGRADED:
|
||||
case MPI2_RAID_PD_STATE_REBUILDING:
|
||||
case MPI2_RAID_PD_STATE_OPTIMAL:
|
||||
if (sas_device)
|
||||
if (sas_device) {
|
||||
sas_device->hidden_raid_component = 1;
|
||||
else
|
||||
_scsih_add_device(ioc, handle, 0, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((mpt2sas_config_get_sas_device_pg0(ioc, &mpi_reply,
|
||||
&sas_device_pg0, MPI2_SAS_DEVICE_PGAD_FORM_HANDLE,
|
||||
handle))) {
|
||||
printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n",
|
||||
ioc->name, __FILE__, __LINE__, __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
ioc_status = le16_to_cpu(mpi_reply.IOCStatus) &
|
||||
MPI2_IOCSTATUS_MASK;
|
||||
if (ioc_status != MPI2_IOCSTATUS_SUCCESS) {
|
||||
printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n",
|
||||
ioc->name, __FILE__, __LINE__, __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
_scsih_link_change(ioc,
|
||||
le16_to_cpu(sas_device_pg0.ParentDevHandle),
|
||||
handle, sas_device_pg0.PhyNum, MPI2_SAS_NEG_LINK_RATE_1_5);
|
||||
|
||||
_scsih_add_device(ioc, handle, 0, 1);
|
||||
|
||||
break;
|
||||
|
||||
case MPI2_RAID_PD_STATE_OFFLINE:
|
||||
case MPI2_RAID_PD_STATE_NOT_CONFIGURED:
|
||||
case MPI2_RAID_PD_STATE_NOT_COMPATIBLE:
|
||||
case MPI2_RAID_PD_STATE_HOT_SPARE:
|
||||
|
@ -5774,6 +5824,7 @@ _scsih_suspend(struct pci_dev *pdev, pm_message_t state)
|
|||
struct MPT2SAS_ADAPTER *ioc = shost_priv(shost);
|
||||
u32 device_state;
|
||||
|
||||
mpt2sas_base_stop_watchdog(ioc);
|
||||
flush_scheduled_work();
|
||||
scsi_block_requests(shost);
|
||||
device_state = pci_choose_state(pdev, state);
|
||||
|
@ -5816,6 +5867,7 @@ _scsih_resume(struct pci_dev *pdev)
|
|||
|
||||
mpt2sas_base_hard_reset_handler(ioc, CAN_SLEEP, SOFT_RESET);
|
||||
scsi_unblock_requests(shost);
|
||||
mpt2sas_base_start_watchdog(ioc);
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue