diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-07-02 06:34:04 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-07-02 06:34:04 -0700 |
| commit | faa7a4c05ace72d85bbfb8d2a458a80491f8045b (patch) | |
| tree | 360c5cb33ba4e4c762d0052af0c0e856d592328a | |
| parent | 62054d49783cfe93c9cee9d90a0779f1f9054968 (diff) | |
| parent | 9da9210dbc752cf35fa2fe866614a1d5b1266066 (diff) | |
Merge bk://linux-ntfs.bkbits.net/ntfs-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
258 files changed, 2962 insertions, 3732 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index e6de60b00f12..19814927d1cc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1110,7 +1110,7 @@ S: Maintained IOC3 DRIVER P: Ralf Baechle -M: ralf@oss.sgi.com +M: ralf@linux-mips.org L: linux-mips@linux-mips.org S: Maintained @@ -1352,6 +1352,13 @@ P: Zach Brown M: zab@zabbo.net S: Odd Fixes +MARVELL MV64340 ETHERNET DRIVER +P: Manish Lachwani +M: Manish_Lachwani@pmc-sierra.com +L: linux-mips@linux-mips.org +L: netdev@oss.sgi.com +S: Supported + MATROX FRAMEBUFFER DRIVER P: Petr Vandrovec M: vandrove@vc.cvut.cz @@ -1372,7 +1379,7 @@ S: Maintained MIPS P: Ralf Baechle -M: ralf@gnu.org +M: ralf@linux-mips.org W: http://oss.sgi.com/mips/mips-howto.html L: linux-mips@linux-mips.org S: Maintained diff --git a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c index a4f5a20a263f..4484e47a77c5 100644 --- a/arch/i386/kernel/vm86.c +++ b/arch/i386/kernel/vm86.c @@ -394,6 +394,7 @@ static inline unsigned long get_vflags(struct kernel_vm86_regs * regs) if (VEFLAGS & VIF_MASK) flags |= IF_MASK; + flags |= IOPL_MASK; return flags | (VEFLAGS & current->thread.v86mask); } diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c index 5a92ad7ef8b3..f502dde14e52 100644 --- a/arch/i386/mm/fault.c +++ b/arch/i386/mm/fault.c @@ -188,11 +188,16 @@ static int __is_prefetch(struct pt_regs *regs, unsigned long addr) return prefetch; } -static inline int is_prefetch(struct pt_regs *regs, unsigned long addr) +static inline int is_prefetch(struct pt_regs *regs, unsigned long addr, + unsigned long error_code) { if (unlikely(boot_cpu_data.x86_vendor == X86_VENDOR_AMD && - boot_cpu_data.x86 >= 6)) + boot_cpu_data.x86 >= 6)) { + /* Catch an obscure case of prefetch inside an NX page. */ + if (nx_enabled && (error_code & 16)) + return 0; return __is_prefetch(regs, addr); + } return 0; } @@ -374,7 +379,7 @@ bad_area_nosemaphore: * Valid to do another page fault here because this one came * from user space. */ - if (is_prefetch(regs, address)) + if (is_prefetch(regs, address, error_code)) return; tsk->thread.cr2 = address; @@ -415,7 +420,7 @@ no_context: * had been triggered by is_prefetch fixup_exception would have * handled it. */ - if (is_prefetch(regs, address)) + if (is_prefetch(regs, address, error_code)) return; /* @@ -426,18 +431,11 @@ no_context: bust_spinlocks(1); #ifdef CONFIG_X86_PAE - { - pgd_t *pgd; - pmd_t *pmd; - + if (error_code & 16) { + pte_t *pte = lookup_address(address); - - pgd = init_mm.pgd + pgd_index(address); - if (pgd_present(*pgd)) { - pmd = pmd_offset(pgd, address); - if (pmd_val(*pmd) & _PAGE_NX) - printk(KERN_CRIT "kernel tried to access NX-protected page - exploit attempt? (uid: %d)\n", current->uid); - } + if (pte && pte_present(*pte) && !pte_exec_kernel(*pte)) + printk(KERN_CRIT "kernel tried to execute NX-protected page - exploit attempt? (uid: %d)\n", current->uid); } #endif if (address < PAGE_SIZE) @@ -492,7 +490,7 @@ do_sigbus: goto no_context; /* User space => ok to do another page fault */ - if (is_prefetch(regs, address)) + if (is_prefetch(regs, address, error_code)) return; tsk->thread.cr2 = address; diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index d492599dac6a..a8bd0544ab2c 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c @@ -437,7 +437,7 @@ static int __init noexec_setup(char *str) __setup("noexec=", noexec_setup); #ifdef CONFIG_X86_PAE -static int use_nx = 0; +int nx_enabled = 0; static void __init set_nx(void) { @@ -449,7 +449,7 @@ static void __init set_nx(void) rdmsr(MSR_EFER, l, h); l |= EFER_NX; wrmsr(MSR_EFER, l, h); - use_nx = 1; + nx_enabled = 1; __supported_pte_mask |= _PAGE_NX; } } @@ -470,7 +470,7 @@ int __init set_kernel_exec(unsigned long vaddr, int enable) pte = lookup_address(vaddr); BUG_ON(!pte); - if (pte_val(*pte) & _PAGE_NX) + if (!pte_exec_kernel(*pte)) ret = 0; if (enable) @@ -495,7 +495,7 @@ void __init paging_init(void) { #ifdef CONFIG_X86_PAE set_nx(); - if (use_nx) + if (nx_enabled) printk("NX (Execute Disable) protection: active\n"); #endif diff --git a/arch/ia64/sn/fakeprom/fw-emu.c b/arch/ia64/sn/fakeprom/fw-emu.c index 7832af4d652f..7e6a7eae61c2 100644 --- a/arch/ia64/sn/fakeprom/fw-emu.c +++ b/arch/ia64/sn/fakeprom/fw-emu.c @@ -37,6 +37,7 @@ */ #include <linux/config.h> #include <linux/efi.h> +#include <linux/kernel.h> #include <asm/pal.h> #include <asm/sal.h> #include <asm/sn/sn_sal.h> @@ -78,7 +79,6 @@ #define BOOT_PARAM_ADDR 0x40000 #define MAX(i,j) ((i) > (j) ? (i) : (j)) #define MIN(i,j) ((i) < (j) ? (i) : (j)) -#define ABS(i) ((i) > 0 ? (i) : -(i)) #define ALIGN8(p) (((long)(p) +7) & ~7) #define FPROM_BUG() do {while (1);} while (0) @@ -670,7 +670,7 @@ sys_fw_init (const char *args, int arglen, int bsp) for (i=0; i<=max_nasid; i++) for (j=0; j<=max_nasid; j++) if (nasid_present(i) && nasid_present(j)) - *(cp+PROXIMITY_DOMAIN(i)*acpi_slit->localities+PROXIMITY_DOMAIN(j)) = 10 + MIN(254, 5*ABS(i-j)); + *(cp+PROXIMITY_DOMAIN(i)*acpi_slit->localities+PROXIMITY_DOMAIN(j)) = 10 + MIN(254, 5*abs(i-j)); cp = acpi_slit->entry + acpi_slit->localities*acpi_slit->localities; acpi_checksum(&acpi_slit->header, cp - (char*)acpi_slit); diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index ebfd35e5544d..6ab62cb4ddef 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -91,13 +91,6 @@ config IBM_WORKPAD select IRQ_CPU select ISA -config NEC_EAGLE - bool "Support for NEC Eagle/Hawk board" - select DMA_NONCOHERENT - select IRQ_CPU - depends on MACH_VR41XX - select HW_HAS_PCI - config TANBAC_TB0226 bool "Support for TANBAC TB0226 (Mbase)" depends on MACH_VR41XX @@ -311,6 +304,7 @@ config MOMENCO_OCELOT_G select HW_HAS_PCI select IRQ_CPU select IRQ_CPU_RM7K + select PCI_MARVELL select RM7000_CPU_SCACHE help The Ocelot is a MIPS-based Single Board Computer (SBC) made by @@ -321,6 +315,8 @@ config MOMENCO_OCELOT_C select DMA_NONCOHERENT select HW_HAS_PCI select IRQ_CPU + select IRQ_MV64340 + select PCI_MARVELL select RM7000_CPU_SCACHE help The Ocelot is a MIPS-based Single Board Computer (SBC) made by @@ -332,7 +328,9 @@ config MOMENCO_JAGUAR_ATX select HW_HAS_PCI select IRQ_CPU select IRQ_CPU_RM7K + select IRQ_MV64340 select LIMITED_DMA + select PCI_MARVELL select RM7000_CPU_SCACHE help The Jaguar ATX is a MIPS-based Single Board Computer (SBC) made by @@ -885,7 +883,7 @@ config MIPS_NILE4 config CPU_LITTLE_ENDIAN bool "Generate little endian code" - default y if ACER_PICA_61 || CASIO_E55 || DDB5074 || DDB5476 || DDB5477 || MACH_DECSTATION || HP_LASERJET || IBM_WORKPAD || LASAT || MIPS_COBALT || MIPS_ITE8172 || MIPS_IVR || SOC_AU1X00 || NEC_OSPREY || NEC_EAGLE || OLIVETTI_M700 || SNI_RM200_PCI || VICTOR_MPC30X || ZAO_CAPCELLA + default y if ACER_PICA_61 || CASIO_E55 || DDB5074 || DDB5476 || DDB5477 || MACH_DECSTATION || HP_LASERJET || IBM_WORKPAD || LASAT || MIPS_COBALT || MIPS_ITE8172 || MIPS_IVR || SOC_AU1X00 || NEC_OSPREY || OLIVETTI_M700 || SNI_RM200_PCI || VICTOR_MPC30X || ZAO_CAPCELLA default n if BAGET_MIPS || MIPS_EV64120 || MIPS_EV96100 || MOMENCO_OCELOT || MOMENCO_OCELOT_G || SGI_IP22 || SGI_IP27 || SGI_IP32 || TOSHIBA_JMR3927 help Some MIPS machines can be configured for either little or big endian @@ -898,6 +896,9 @@ config IRQ_CPU config IRQ_CPU_RM7K bool +config IRQ_MV64340 + bool + config DDB5XXX_COMMON bool depends on DDB5074 || DDB5476 || DDB5477 @@ -918,16 +919,14 @@ config MIPS_GT64120 depends on MIPS_EV64120 || MIPS_EV96100 || LASAT || MIPS_ATLAS || MIPS_MALTA || MOMENCO_OCELOT default y -config MIPS_MV64340 - bool - depends on MOMENCO_JAGUAR_ATX || MOMENCO_OCELOT_C - default y - config MIPS_TX3927 bool depends on TOSHIBA_JMR3927 default y +config PCI_MARVELL + bool + config ITE_BOARD_GEN bool depends on MIPS_IVR || MIPS_ITE8172 diff --git a/arch/mips/Makefile b/arch/mips/Makefile index c1aabc835f62..371558708a50 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -464,12 +464,6 @@ core-$(CONFIG_MACH_VR41XX) += arch/mips/vr41xx/common/ cflags-$(CONFIG_MACH_VR41XX) += -Iinclude/asm-mips/mach-vr41xx # -# NEC Eagle/Hawk (VR4122/VR4131) board -# -core-$(CONFIG_NEC_EAGLE) += arch/mips/vr41xx/nec-eagle/ -load-$(CONFIG_NEC_EAGLE) += 0x80000000 - -# # ZAO Networks Capcella (VR4131) # core-$(CONFIG_ZAO_CAPCELLA) += arch/mips/vr41xx/zao-capcella/ diff --git a/arch/mips/configs/atlas_defconfig b/arch/mips/configs/atlas_defconfig index cd4da1fb9f85..3cccab2b28d1 100644 --- a/arch/mips/configs/atlas_defconfig +++ b/arch/mips/configs/atlas_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -143,6 +144,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -169,7 +171,7 @@ CONFIG_TRAD_SIGNALS=y CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set @@ -212,13 +214,13 @@ CONFIG_BLK_DEV_SD=y # SCSI low-level drivers # # CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set # CONFIG_SCSI_AIC7XXX is not set # CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_MEGARAID is not set # CONFIG_SCSI_SATA is not set # CONFIG_SCSI_BUSLOGIC is not set @@ -321,6 +323,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -650,5 +653,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=y # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set diff --git a/arch/mips/configs/bosporus_defconfig b/arch/mips/configs/bosporus_defconfig index 2b71a0410b4e..369d8b04b252 100644 --- a/arch/mips/configs/bosporus_defconfig +++ b/arch/mips/configs/bosporus_defconfig @@ -28,6 +28,7 @@ CONFIG_HOTPLUG=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -147,6 +148,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # @@ -273,6 +275,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -607,6 +610,7 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -661,6 +665,7 @@ CONFIG_CRYPTO_CRC32C=m # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/capcella_defconfig b/arch/mips/configs/capcella_defconfig index 44799daa96b6..fe6d0b69fbe5 100644 --- a/arch/mips/configs/capcella_defconfig +++ b/arch/mips/configs/capcella_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -54,7 +55,6 @@ CONFIG_KMOD=y CONFIG_MACH_VR41XX=y # CONFIG_CASIO_E55 is not set # CONFIG_IBM_WORKPAD is not set -# CONFIG_NEC_EAGLE is not set # CONFIG_TANBAC_TB0226 is not set # CONFIG_TANBAC_TB0229 is not set # CONFIG_VICTOR_MPC30X is not set @@ -147,6 +147,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -172,7 +173,7 @@ CONFIG_TRAD_SIGNALS=y # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_LBD is not set @@ -185,6 +186,7 @@ CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set # CONFIG_BLK_DEV_IDECD is not set @@ -283,6 +285,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -624,5 +627,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=m # CONFIG_CRC32 is not set CONFIG_LIBCRC32C=m diff --git a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig index c3fda0f4e154..46f45c30bdd9 100644 --- a/arch/mips/configs/cobalt_defconfig +++ b/arch/mips/configs/cobalt_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -137,6 +138,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -163,7 +165,7 @@ CONFIG_TRAD_SIGNALS=y CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_LBD is not set @@ -176,6 +178,7 @@ CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set # CONFIG_BLK_DEV_IDECD is not set @@ -270,6 +273,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -600,5 +604,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=y # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set diff --git a/arch/mips/configs/db1000_defconfig b/arch/mips/configs/db1000_defconfig index 3ec36c06285c..0755f489b647 100644 --- a/arch/mips/configs/db1000_defconfig +++ b/arch/mips/configs/db1000_defconfig @@ -28,6 +28,7 @@ CONFIG_HOTPLUG=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -167,6 +168,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # @@ -293,6 +295,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -634,6 +637,7 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -688,6 +692,7 @@ CONFIG_CRYPTO_CRC32C=m # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/db1100_defconfig b/arch/mips/configs/db1100_defconfig index f649a7cafc04..88c42a5f2691 100644 --- a/arch/mips/configs/db1100_defconfig +++ b/arch/mips/configs/db1100_defconfig @@ -28,6 +28,7 @@ CONFIG_HOTPLUG=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -165,6 +166,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # @@ -291,6 +293,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -629,6 +632,7 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -683,6 +687,7 @@ CONFIG_CRYPTO_CRC32C=m # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/db1500_defconfig b/arch/mips/configs/db1500_defconfig index ff5ec324a67e..cbe2b1e3265c 100644 --- a/arch/mips/configs/db1500_defconfig +++ b/arch/mips/configs/db1500_defconfig @@ -28,6 +28,7 @@ CONFIG_HOTPLUG=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -167,6 +168,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # @@ -259,6 +261,7 @@ CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set CONFIG_BLK_DEV_IDECS=m @@ -372,6 +375,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -706,6 +710,7 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -760,6 +765,7 @@ CONFIG_CRYPTO_CRC32C=m # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/ddb5476_defconfig b/arch/mips/configs/ddb5476_defconfig index 2385348b99a7..122f2a9fa746 100644 --- a/arch/mips/configs/ddb5476_defconfig +++ b/arch/mips/configs/ddb5476_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -139,6 +140,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -166,7 +168,7 @@ CONFIG_TRAD_SIGNALS=y # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_LBD is not set @@ -179,6 +181,7 @@ CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set # CONFIG_BLK_DEV_IDECD is not set @@ -282,6 +285,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -485,6 +489,7 @@ CONFIG_LEGACY_PTY_COUNT=256 # # Graphics support # +# CONFIG_FB_CIRRUS is not set # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set # CONFIG_FB_ASILIANT is not set @@ -640,5 +645,6 @@ CONFIG_CMDLINE="ip=any" # # Library routines # +CONFIG_CRC16=y # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set diff --git a/arch/mips/configs/ddb5477_defconfig b/arch/mips/configs/ddb5477_defconfig index 3a2e7ca35066..fc23a6b9261f 100644 --- a/arch/mips/configs/ddb5477_defconfig +++ b/arch/mips/configs/ddb5477_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -138,6 +139,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -163,7 +165,7 @@ CONFIG_TRAD_SIGNALS=y # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_LBD is not set @@ -251,6 +253,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -306,6 +309,7 @@ CONFIG_PCNET32=y # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set +# CONFIG_VIA_VELOCITY is not set # CONFIG_LAN_SAA9730 is not set # @@ -599,5 +603,6 @@ CONFIG_CMDLINE="ip=any" # # Library routines # +CONFIG_CRC16=y CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set diff --git a/arch/mips/configs/decstation_defconfig b/arch/mips/configs/decstation_defconfig index c2bf43ff126b..06cf55a1678f 100644 --- a/arch/mips/configs/decstation_defconfig +++ b/arch/mips/configs/decstation_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -137,6 +138,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -277,6 +279,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -554,7 +557,6 @@ CONFIG_MSDOS_PARTITION=y # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set CONFIG_ULTRIX_PARTITION=y # CONFIG_SUN_PARTITION is not set @@ -585,5 +587,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m diff --git a/arch/mips/configs/e55_defconfig b/arch/mips/configs/e55_defconfig index cda052941dbb..0d9c4053e3ee 100644 --- a/arch/mips/configs/e55_defconfig +++ b/arch/mips/configs/e55_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -54,7 +55,6 @@ CONFIG_KMOD=y CONFIG_MACH_VR41XX=y CONFIG_CASIO_E55=y # CONFIG_IBM_WORKPAD is not set -# CONFIG_NEC_EAGLE is not set # CONFIG_TANBAC_TB0226 is not set # CONFIG_TANBAC_TB0229 is not set # CONFIG_VICTOR_MPC30X is not set @@ -143,6 +143,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -178,6 +179,7 @@ CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set # CONFIG_BLK_DEV_IDECD is not set @@ -277,6 +279,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -603,5 +606,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=m # CONFIG_CRC32 is not set CONFIG_LIBCRC32C=m diff --git a/arch/mips/configs/eagle_defconfig b/arch/mips/configs/eagle_defconfig deleted file mode 100644 index 78feb1ac0945..000000000000 --- a/arch/mips/configs/eagle_defconfig +++ /dev/null @@ -1,750 +0,0 @@ -# -# Automatically generated make config: don't edit -# -CONFIG_MIPS=y -# CONFIG_MIPS64 is not set -# CONFIG_64BIT is not set -CONFIG_MIPS32=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_CLEAN_COMPILE=y -CONFIG_STANDALONE=y -CONFIG_BROKEN_ON_SMP=y - -# -# General setup -# -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_HOTPLUG=y -# CONFIG_IKCONFIG is not set -CONFIG_EMBEDDED=y -CONFIG_KALLSYMS=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_OBSOLETE_MODPARM=y -CONFIG_MODVERSIONS=y -CONFIG_KMOD=y - -# -# Machine selection -# -# CONFIG_MACH_JAZZ is not set -# CONFIG_BAGET_MIPS is not set -CONFIG_MACH_VR41XX=y -# CONFIG_CASIO_E55 is not set -# CONFIG_IBM_WORKPAD is not set -CONFIG_NEC_EAGLE=y -# CONFIG_TANBAC_TB0226 is not set -# CONFIG_TANBAC_TB0229 is not set -# CONFIG_VICTOR_MPC30X is not set -# CONFIG_ZAO_CAPCELLA is not set -CONFIG_PCI_VR41XX=y -CONFIG_VRC4173=y -# CONFIG_TOSHIBA_JMR3927 is not set -# CONFIG_MIPS_COBALT is not set -# CONFIG_MACH_DECSTATION is not set -# CONFIG_MIPS_EV64120 is not set -# CONFIG_MIPS_EV96100 is not set -# CONFIG_MIPS_IVR is not set -# CONFIG_LASAT is not set -# CONFIG_MIPS_ITE8172 is not set -# CONFIG_MIPS_ATLAS is not set -# CONFIG_MIPS_MALTA is not set -# CONFIG_MIPS_SEAD is not set -# CONFIG_MOMENCO_OCELOT is not set -# CONFIG_MOMENCO_OCELOT_G is not set -# CONFIG_MOMENCO_OCELOT_C is not set -# CONFIG_MOMENCO_JAGUAR_ATX is not set -# CONFIG_PMC_YOSEMITE is not set -# CONFIG_DDB5074 is not set -# CONFIG_DDB5476 is not set -# CONFIG_DDB5477 is not set -# CONFIG_NEC_OSPREY is not set -# CONFIG_SGI_IP22 is not set -# CONFIG_SGI_IP32 is not set -# CONFIG_SOC_AU1X00 is not set -# CONFIG_SIBYTE_SB1xxx_SOC is not set -# CONFIG_SNI_RM200_PCI is not set -# CONFIG_TOSHIBA_RBTX4927 is not set -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_HAVE_DEC_LOCK=y -CONFIG_DMA_NONCOHERENT=y -CONFIG_CPU_LITTLE_ENDIAN=y -CONFIG_IRQ_CPU=y -CONFIG_MIPS_L1_CACHE_SHIFT=5 -# CONFIG_FB is not set - -# -# CPU selection -# -# CONFIG_CPU_MIPS32 is not set -# CONFIG_CPU_MIPS64 is not set -# CONFIG_CPU_R3000 is not set -# CONFIG_CPU_TX39XX is not set -CONFIG_CPU_VR41XX=y -# CONFIG_CPU_R4300 is not set -# CONFIG_CPU_R4X00 is not set -# CONFIG_CPU_TX49XX is not set -# CONFIG_CPU_R5000 is not set -# CONFIG_CPU_R5432 is not set -# CONFIG_CPU_R6000 is not set -# CONFIG_CPU_NEVADA is not set -# CONFIG_CPU_R8000 is not set -# CONFIG_CPU_R10000 is not set -# CONFIG_CPU_RM7000 is not set -# CONFIG_CPU_RM9000 is not set -# CONFIG_CPU_SB1 is not set -CONFIG_PAGE_SIZE_4KB=y -# CONFIG_PAGE_SIZE_8KB is not set -# CONFIG_PAGE_SIZE_16KB is not set -# CONFIG_PAGE_SIZE_64KB is not set -# CONFIG_CPU_ADVANCED is not set -CONFIG_CPU_HAS_SYNC=y -# CONFIG_PREEMPT is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set - -# -# Bus options (PCI, PCMCIA, EISA, ISA, TC) -# -CONFIG_HW_HAS_PCI=y -CONFIG_PCI=y -CONFIG_PCI_LEGACY_PROC=y -CONFIG_PCI_NAMES=y -CONFIG_MMU=y - -# -# PCMCIA/CardBus support -# -CONFIG_PCMCIA=y -# CONFIG_PCMCIA_DEBUG is not set -# CONFIG_YENTA is not set -# CONFIG_I82092 is not set -# CONFIG_TCIC is not set -# CONFIG_PCMCIA_VRC4173 is not set - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -CONFIG_TRAD_SIGNALS=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -# CONFIG_FW_LOADER is not set - -# -# Memory Technology Devices (MTD) -# -CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_PARTITIONS is not set -# CONFIG_MTD_CONCAT is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y -CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set - -# -# RAM/ROM/Flash chip drivers -# -CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=y -CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y -# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_CFI_INTELEXT=y -# CONFIG_MTD_CFI_AMDSTD is not set -# CONFIG_MTD_CFI_STAA is not set -# CONFIG_MTD_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# -# CONFIG_MTD_COMPLEX_MAPPINGS is not set -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_START=0x1c000000 -CONFIG_MTD_PHYSMAP_LEN=0x2000000 -CONFIG_MTD_PHYSMAP_BUSWIDTH=4 - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLKMTD is not set - -# -# Disk-On-Chip Device Drivers -# -# CONFIG_MTD_DOC2000 is not set -# CONFIG_MTD_DOC2001 is not set -# CONFIG_MTD_DOC2001PLUS is not set - -# -# NAND Flash Device Drivers -# -# CONFIG_MTD_NAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_LOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_LBD is not set - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -CONFIG_BLK_DEV_IDEDISK=y -CONFIG_IDEDISK_MULTI_MODE=y -CONFIG_BLK_DEV_IDECS=y -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_IDE_TASK_IOCTL is not set -CONFIG_IDE_TASKFILE_IO=y - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_IDEPCI is not set -# CONFIG_IDE_ARM is not set -# CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_IDEDMA_AUTO is not set -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Networking support -# -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_NETLINK_DEV=y -CONFIG_UNIX=y -CONFIG_NET_KEY=y -CONFIG_INET=y -CONFIG_IP_MULTICAST=y -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_PNP=y -# CONFIG_IP_PNP_DHCP is not set -CONFIG_IP_PNP_BOOTP=y -# CONFIG_IP_PNP_RARP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_IPV6 is not set -# CONFIG_NETFILTER is not set -CONFIG_XFRM=y -# CONFIG_XFRM_USER is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_SCTP is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_NET_DIVERT is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_FASTROUTE is not set -# CONFIG_NET_HW_FLOWCONTROL is not set - -# -# QoS and/or fair queueing -# -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -# CONFIG_MII is not set -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_NET_VENDOR_3COM is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -# CONFIG_NET_PCI is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SK98LIN is not set -# CONFIG_TIGON3 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# PCMCIA network device support -# -CONFIG_NET_PCMCIA=y -# CONFIG_PCMCIA_3C589 is not set -# CONFIG_PCMCIA_3C574 is not set -CONFIG_PCMCIA_FMVJ18X=y -CONFIG_PCMCIA_PCNET=m -# CONFIG_PCMCIA_NMCLAN is not set -# CONFIG_PCMCIA_SMC91C92 is not set -# CONFIG_PCMCIA_XIRC2PS is not set -# CONFIG_PCMCIA_AXNET is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -CONFIG_INPUT_MOUSEDEV=y -CONFIG_INPUT_MOUSEDEV_PSAUX=y -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input I/O drivers -# -# CONFIG_GAMEPORT is not set -CONFIG_SOUND_GAMEPORT=y -CONFIG_SERIO=y -CONFIG_SERIO_I8042=y -CONFIG_SERIO_SERPORT=y -# CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Character devices -# -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_CS is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -# CONFIG_PCIPCWATCHDOG is not set -# CONFIG_WDTPCI is not set -# CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set -# CONFIG_DRM is not set - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -# CONFIG_RAW_DRIVER is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -# CONFIG_USB is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT3_FS is not set -# CONFIG_JBD is not set -# CONFIG_REISERFS_FS is not set -# CONFIG_JFS_FS is not set -# CONFIG_XFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_QUOTA is not set -CONFIG_AUTOFS_FS=y -CONFIG_AUTOFS4_FS=y - -# -# CD-ROM/DVD Filesystems -# -# CONFIG_ISO9660_FS is not set -# CONFIG_UDF_FS is not set - -# -# DOS/FAT/NT Filesystems -# -# CONFIG_FAT_FS is not set -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_SYSFS=y -# CONFIG_DEVFS_FS is not set -CONFIG_DEVPTS_FS_XATTR=y -CONFIG_DEVPTS_FS_SECURITY=y -# CONFIG_TMPFS is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_JFFS_FS=y -CONFIG_JFFS_FS_VERBOSE=0 -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -# CONFIG_JFFS2_FS_NAND is not set -# CONFIG_CRAMFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=y -# CONFIG_NFS_V3 is not set -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=y -# CONFIG_NFSD_V3 is not set -# CONFIG_NFSD_TCP is not set -CONFIG_ROOT_NFS=y -CONFIG_LOCKD=y -CONFIG_EXPORTFS=y -CONFIG_SUNRPC=y -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y - -# -# Native Language Support -# -# CONFIG_NLS is not set - -# -# Kernel hacking -# -CONFIG_CROSSCOMPILE=y -CONFIG_CMDLINE="" -# CONFIG_DEBUG_KERNEL is not set - -# -# Security options -# -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_NULL=y -# CONFIG_CRYPTO_MD4 is not set -# CONFIG_CRYPTO_MD5 is not set -# CONFIG_CRYPTO_SHA1 is not set -# CONFIG_CRYPTO_SHA256 is not set -CONFIG_CRYPTO_SHA512=y -# CONFIG_CRYPTO_DES is not set -# CONFIG_CRYPTO_BLOWFISH is not set -CONFIG_CRYPTO_TWOFISH=y -# CONFIG_CRYPTO_SERPENT is not set -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_ARC4 is not set -CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_MICHAEL_MIC=y -CONFIG_CRYPTO_CRC32C=m -# CONFIG_CRYPTO_TEST is not set - -# -# Library routines -# -CONFIG_CRC32=y -CONFIG_LIBCRC32C=m -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y diff --git a/arch/mips/configs/ev64120_defconfig b/arch/mips/configs/ev64120_defconfig index f1c310de72cc..2ae2e3d4cc89 100644 --- a/arch/mips/configs/ev64120_defconfig +++ b/arch/mips/configs/ev64120_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -146,6 +147,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -171,7 +173,7 @@ CONFIG_TRAD_SIGNALS=y # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_LBD is not set @@ -258,6 +260,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -592,5 +595,6 @@ CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs rw nfsroot=192.168.1.1:/mnt/d # # Library routines # +CONFIG_CRC16=y # CONFIG_CRC32 is not set CONFIG_LIBCRC32C=m diff --git a/arch/mips/configs/ev96100_defconfig b/arch/mips/configs/ev96100_defconfig index 506214b4bbeb..927098b48e04 100644 --- a/arch/mips/configs/ev96100_defconfig +++ b/arch/mips/configs/ev96100_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -146,6 +147,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -252,6 +254,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -549,5 +552,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=m # CONFIG_CRC32 is not set CONFIG_LIBCRC32C=m diff --git a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defconfig index 83d850031444..22f427c46eea 100644 --- a/arch/mips/configs/ip22_defconfig +++ b/arch/mips/configs/ip22_defconfig @@ -29,6 +29,7 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -148,6 +149,7 @@ CONFIG_BINFMT_IRIX=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -362,6 +364,8 @@ CONFIG_IP_NF_COMPAT_IPCHAINS=m CONFIG_IP_NF_COMPAT_IPFWADM=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m # # IPv6: Netfilter Configuration @@ -438,8 +442,11 @@ CONFIG_NET_CLS_ROUTE4=m CONFIG_NET_CLS_ROUTE=y CONFIG_NET_CLS_FW=m CONFIG_NET_CLS_U32=m +# CONFIG_CLS_U32_PERF is not set +# CONFIG_NET_CLS_IND is not set CONFIG_NET_CLS_RSVP=m CONFIG_NET_CLS_RSVP6=m +# CONFIG_NET_CLS_ACT is not set CONFIG_NET_CLS_POLICE=y # @@ -696,6 +703,8 @@ CONFIG_UDF_FS=m CONFIG_FAT_FS=m CONFIG_MSDOS_FS=m CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # @@ -767,7 +776,6 @@ CONFIG_MSDOS_PARTITION=y # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set CONFIG_SGI_PARTITION=y # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set @@ -801,6 +809,7 @@ CONFIG_NLS_CODEPAGE_874=m CONFIG_NLS_ISO8859_8=m CONFIG_NLS_CODEPAGE_1250=m CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m CONFIG_NLS_ISO8859_1=m CONFIG_NLS_ISO8859_2=m CONFIG_NLS_ISO8859_3=m @@ -855,6 +864,7 @@ CONFIG_CRYPTO_CRC32C=m # # Library routines # +CONFIG_CRC16=m # CONFIG_CRC32 is not set CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig index a75dfcdd4bf4..490f2bc83788 100644 --- a/arch/mips/configs/ip27_defconfig +++ b/arch/mips/configs/ip27_defconfig @@ -27,6 +27,7 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -153,6 +154,7 @@ CONFIG_BINFMT_ELF32=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -178,7 +180,7 @@ CONFIG_BINFMT_ELF32=y # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # @@ -218,12 +220,12 @@ CONFIG_SCSI_SPI_ATTRS=y # SCSI low-level drivers # # CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set # CONFIG_SCSI_AIC7XXX is not set # CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_MEGARAID is not set # CONFIG_SCSI_SATA is not set # CONFIG_SCSI_BUSLOGIC is not set @@ -338,6 +340,7 @@ CONFIG_NET_SCH_TBF=y CONFIG_NET_SCH_GRED=y CONFIG_NET_SCH_DSMARK=y CONFIG_NET_SCH_DELAY=y +# CONFIG_NET_SCH_INGRESS is not set CONFIG_NET_QOS=y CONFIG_NET_ESTIMATOR=y CONFIG_NET_CLS=y @@ -346,8 +349,11 @@ CONFIG_NET_CLS_ROUTE4=y CONFIG_NET_CLS_ROUTE=y CONFIG_NET_CLS_FW=y CONFIG_NET_CLS_U32=y +# CONFIG_CLS_U32_PERF is not set +# CONFIG_NET_CLS_IND is not set CONFIG_NET_CLS_RSVP=y CONFIG_NET_CLS_RSVP6=y +# CONFIG_NET_CLS_ACT is not set CONFIG_NET_CLS_POLICE=y # @@ -657,7 +663,6 @@ CONFIG_MSDOS_PARTITION=y # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set CONFIG_SGI_PARTITION=y # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set @@ -707,6 +712,7 @@ CONFIG_CRYPTO_CRC32C=m # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defconfig index f6e3592da18b..02c732ab3236 100644 --- a/arch/mips/configs/ip32_defconfig +++ b/arch/mips/configs/ip32_defconfig @@ -20,6 +20,7 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 @@ -27,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -141,6 +143,7 @@ CONFIG_BINFMT_ELF32=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -167,7 +170,7 @@ CONFIG_BINFMT_ELF32=y CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # @@ -208,6 +211,7 @@ CONFIG_SCSI_LOGGING=y # SCSI low-level drivers # # CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set CONFIG_SCSI_AIC7XXX=y @@ -219,7 +223,6 @@ CONFIG_AIC7XXX_DEBUG_MASK=0 CONFIG_AIC7XXX_REG_PRETTY_PRINT=y # CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_MEGARAID is not set # CONFIG_SCSI_SATA is not set # CONFIG_SCSI_BUSLOGIC is not set @@ -321,6 +324,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -632,7 +636,6 @@ CONFIG_PARTITION_ADVANCED=y # CONFIG_MAC_PARTITION is not set # CONFIG_MSDOS_PARTITION is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set CONFIG_SGI_PARTITION=y # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set @@ -663,5 +666,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=y # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set diff --git a/arch/mips/configs/it8172_defconfig b/arch/mips/configs/it8172_defconfig index 3460da6ad76a..8bbe2b3ee601 100644 --- a/arch/mips/configs/it8172_defconfig +++ b/arch/mips/configs/it8172_defconfig @@ -21,6 +21,7 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 @@ -28,6 +29,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -141,6 +143,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -231,6 +234,7 @@ CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set # CONFIG_BLK_DEV_IDECD is not set @@ -326,6 +330,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -650,5 +655,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=m # CONFIG_CRC32 is not set CONFIG_LIBCRC32C=m diff --git a/arch/mips/configs/ivr_defconfig b/arch/mips/configs/ivr_defconfig index 4f3e01b3b8cc..c809e097b4c8 100644 --- a/arch/mips/configs/ivr_defconfig +++ b/arch/mips/configs/ivr_defconfig @@ -21,6 +21,7 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 @@ -28,6 +29,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -141,6 +143,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -166,7 +169,7 @@ CONFIG_TRAD_SIGNALS=y # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_LBD is not set @@ -179,6 +182,7 @@ CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set # CONFIG_BLK_DEV_IDECD is not set @@ -276,6 +280,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -604,5 +609,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=m # CONFIG_CRC32 is not set CONFIG_LIBCRC32C=m diff --git a/arch/mips/configs/jaguar-atx_defconfig b/arch/mips/configs/jaguar-atx_defconfig index f28e0657e6a7..b6f70da712ab 100644 --- a/arch/mips/configs/jaguar-atx_defconfig +++ b/arch/mips/configs/jaguar-atx_defconfig @@ -28,6 +28,7 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -39,7 +40,10 @@ CONFIG_IOSCHED_CFQ=y # # Loadable module support # -# CONFIG_MODULES is not set +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_OBSOLETE_MODPARM=y +CONFIG_KMOD=y # # Machine selection @@ -73,7 +77,8 @@ CONFIG_LIMITED_DMA=y # CONFIG_CPU_LITTLE_ENDIAN is not set CONFIG_IRQ_CPU=y CONFIG_IRQ_CPU_RM7K=y -CONFIG_MIPS_MV64340=y +CONFIG_IRQ_MV64340=y +CONFIG_PCI_MARVELL=y CONFIG_SWAP_IO_SPACE=y CONFIG_BOOT_ELF32=y CONFIG_MIPS_L1_CACHE_SHIFT=5 @@ -140,6 +145,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -164,7 +170,7 @@ CONFIG_TRAD_SIGNALS=y # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_LBD is not set @@ -234,6 +240,7 @@ CONFIG_IP_PNP_BOOTP=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -286,6 +293,7 @@ CONFIG_EEPRO100=y # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set +# CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) @@ -538,5 +546,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=m # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set diff --git a/arch/mips/configs/jmr3927_defconfig b/arch/mips/configs/jmr3927_defconfig index 17b715a04735..463fb5c33120 100644 --- a/arch/mips/configs/jmr3927_defconfig +++ b/arch/mips/configs/jmr3927_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -137,6 +138,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -162,7 +164,7 @@ CONFIG_TRAD_SIGNALS=y # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_LBD is not set @@ -250,6 +252,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -460,6 +463,7 @@ CONFIG_LEGACY_PTY_COUNT=256 # # Graphics support # +# CONFIG_FB_CIRRUS is not set # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set # CONFIG_FB_ASILIANT is not set @@ -612,5 +616,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=y # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set diff --git a/arch/mips/configs/lasat200_defconfig b/arch/mips/configs/lasat200_defconfig index d5874a83fbf4..2fb26c7f661e 100644 --- a/arch/mips/configs/lasat200_defconfig +++ b/arch/mips/configs/lasat200_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -148,6 +149,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -229,7 +231,7 @@ CONFIG_MTD_LASAT=y # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_LBD is not set @@ -242,6 +244,7 @@ CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y # CONFIG_BLK_DEV_IDECD is not set @@ -365,6 +368,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -698,5 +702,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig index 87e171b5f008..f5446e44c17a 100644 --- a/arch/mips/configs/malta_defconfig +++ b/arch/mips/configs/malta_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -150,6 +151,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -175,7 +177,7 @@ CONFIG_TRAD_SIGNALS=y # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set @@ -264,6 +266,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -319,6 +322,7 @@ CONFIG_PCNET32=y # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set +# CONFIG_VIA_VELOCITY is not set # CONFIG_LAN_SAA9730 is not set # @@ -613,5 +617,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m diff --git a/arch/mips/configs/mirage_defconfig b/arch/mips/configs/mirage_defconfig index 2b71a0410b4e..369d8b04b252 100644 --- a/arch/mips/configs/mirage_defconfig +++ b/arch/mips/configs/mirage_defconfig @@ -28,6 +28,7 @@ CONFIG_HOTPLUG=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -147,6 +148,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # @@ -273,6 +275,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -607,6 +610,7 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -661,6 +665,7 @@ CONFIG_CRYPTO_CRC32C=m # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/mpc30x_defconfig b/arch/mips/configs/mpc30x_defconfig index a78627cddd1d..96735cb12363 100644 --- a/arch/mips/configs/mpc30x_defconfig +++ b/arch/mips/configs/mpc30x_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -54,7 +55,6 @@ CONFIG_KMOD=y CONFIG_MACH_VR41XX=y # CONFIG_CASIO_E55 is not set # CONFIG_IBM_WORKPAD is not set -# CONFIG_NEC_EAGLE is not set # CONFIG_TANBAC_TB0226 is not set # CONFIG_TANBAC_TB0229 is not set CONFIG_VICTOR_MPC30X=y @@ -147,6 +147,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -172,7 +173,7 @@ CONFIG_TRAD_SIGNALS=y # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_LBD is not set @@ -261,6 +262,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -607,6 +609,7 @@ CONFIG_CRYPTO_CRC32C=m # # Library routines # +CONFIG_CRC16=m # CONFIG_CRC32 is not set CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/mtx1_defconfig b/arch/mips/configs/mtx1_defconfig index 2b71a0410b4e..369d8b04b252 100644 --- a/arch/mips/configs/mtx1_defconfig +++ b/arch/mips/configs/mtx1_defconfig @@ -28,6 +28,7 @@ CONFIG_HOTPLUG=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -147,6 +148,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # @@ -273,6 +275,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -607,6 +610,7 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -661,6 +665,7 @@ CONFIG_CRYPTO_CRC32C=m # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/ocelot_c_defconfig b/arch/mips/configs/ocelot_c_defconfig index 704bd7e7845d..167007dd8db1 100644 --- a/arch/mips/configs/ocelot_c_defconfig +++ b/arch/mips/configs/ocelot_c_defconfig @@ -27,6 +27,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -74,7 +75,8 @@ CONFIG_HAVE_DEC_LOCK=y CONFIG_DMA_NONCOHERENT=y # CONFIG_CPU_LITTLE_ENDIAN is not set CONFIG_IRQ_CPU=y -CONFIG_MIPS_MV64340=y +CONFIG_IRQ_MV64340=y +CONFIG_PCI_MARVELL=y CONFIG_SWAP_IO_SPACE=y CONFIG_MIPS_L1_CACHE_SHIFT=5 # CONFIG_FB is not set @@ -139,6 +141,7 @@ CONFIG_BINFMT_ELF32=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -164,7 +167,7 @@ CONFIG_BINFMT_ELF32=y # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # @@ -250,6 +253,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -580,5 +584,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=y # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set diff --git a/arch/mips/configs/ocelot_defconfig b/arch/mips/configs/ocelot_defconfig index e83e3f965082..da60ba05f984 100644 --- a/arch/mips/configs/ocelot_defconfig +++ b/arch/mips/configs/ocelot_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -144,6 +145,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -250,6 +252,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -548,5 +551,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=y # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set diff --git a/arch/mips/configs/ocelot_g_defconfig b/arch/mips/configs/ocelot_g_defconfig index d8e4d007a8c5..fa2584125bc4 100644 --- a/arch/mips/configs/ocelot_g_defconfig +++ b/arch/mips/configs/ocelot_g_defconfig @@ -27,6 +27,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -75,6 +76,7 @@ CONFIG_DMA_NONCOHERENT=y # CONFIG_CPU_LITTLE_ENDIAN is not set CONFIG_IRQ_CPU=y CONFIG_IRQ_CPU_RM7K=y +CONFIG_PCI_MARVELL=y CONFIG_SWAP_IO_SPACE=y # CONFIG_SYSCLK_75 is not set # CONFIG_SYSCLK_83 is not set @@ -142,6 +144,7 @@ CONFIG_BINFMT_ELF32=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -167,7 +170,7 @@ CONFIG_BINFMT_ELF32=y # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # @@ -253,6 +256,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -583,5 +587,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=y # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set diff --git a/arch/mips/configs/osprey_defconfig b/arch/mips/configs/osprey_defconfig index c7a3bbd48560..22387c2e405f 100644 --- a/arch/mips/configs/osprey_defconfig +++ b/arch/mips/configs/osprey_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -135,6 +136,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -242,6 +244,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -540,5 +543,6 @@ CONFIG_CMDLINE="ip=bootp ether=46,0x03fe0300,eth0" # # Library routines # +CONFIG_CRC16=m # CONFIG_CRC32 is not set CONFIG_LIBCRC32C=m diff --git a/arch/mips/configs/pb1000_defconfig b/arch/mips/configs/pb1000_defconfig index 2b71a0410b4e..369d8b04b252 100644 --- a/arch/mips/configs/pb1000_defconfig +++ b/arch/mips/configs/pb1000_defconfig @@ -28,6 +28,7 @@ CONFIG_HOTPLUG=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -147,6 +148,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # @@ -273,6 +275,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -607,6 +610,7 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -661,6 +665,7 @@ CONFIG_CRYPTO_CRC32C=m # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/pb1100_defconfig b/arch/mips/configs/pb1100_defconfig index 2b71a0410b4e..369d8b04b252 100644 --- a/arch/mips/configs/pb1100_defconfig +++ b/arch/mips/configs/pb1100_defconfig @@ -28,6 +28,7 @@ CONFIG_HOTPLUG=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -147,6 +148,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # @@ -273,6 +275,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -607,6 +610,7 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -661,6 +665,7 @@ CONFIG_CRYPTO_CRC32C=m # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig index fbf01a172524..0ca1885fa9c0 100644 --- a/arch/mips/configs/pb1500_defconfig +++ b/arch/mips/configs/pb1500_defconfig @@ -28,6 +28,7 @@ CONFIG_HOTPLUG=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -150,6 +151,7 @@ CONFIG_MMU=y CONFIG_PCMCIA=m # CONFIG_PCMCIA_DEBUG is not set # CONFIG_YENTA is not set +CONFIG_PD6729=m # CONFIG_I82092 is not set # CONFIG_TCIC is not set # CONFIG_PCMCIA_AU1X00 is not set @@ -173,6 +175,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # @@ -200,7 +203,7 @@ CONFIG_TRAD_SIGNALS=y CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_LBD is not set @@ -213,6 +216,7 @@ CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set # CONFIG_BLK_DEV_IDECS is not set @@ -357,6 +361,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -721,6 +726,7 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -775,6 +781,7 @@ CONFIG_CRYPTO_MICHAEL_MIC=y # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/pb1550_defconfig b/arch/mips/configs/pb1550_defconfig index 382b9f126477..147ebbde0b66 100644 --- a/arch/mips/configs/pb1550_defconfig +++ b/arch/mips/configs/pb1550_defconfig @@ -28,6 +28,7 @@ CONFIG_HOTPLUG=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -149,6 +150,7 @@ CONFIG_MMU=y CONFIG_PCMCIA=m # CONFIG_PCMCIA_DEBUG is not set # CONFIG_YENTA is not set +CONFIG_PD6729=m # CONFIG_I82092 is not set # CONFIG_TCIC is not set CONFIG_PCMCIA_AU1X00=m @@ -172,6 +174,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # @@ -199,7 +202,7 @@ CONFIG_TRAD_SIGNALS=y CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_LBD is not set @@ -212,6 +215,7 @@ CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set # CONFIG_BLK_DEV_IDECS is not set @@ -356,6 +360,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -720,6 +725,7 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -774,6 +780,7 @@ CONFIG_CRYPTO_CRC32C=m # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig index 68d9ef86ac1c..5413cd0615db 100644 --- a/arch/mips/configs/rm200_defconfig +++ b/arch/mips/configs/rm200_defconfig @@ -21,6 +21,7 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set CONFIG_SYSCTL=y # CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 @@ -29,6 +30,7 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -152,6 +154,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -218,7 +221,7 @@ CONFIG_PARIDE_ON26=m CONFIG_BLK_DEV_LOOP=m CONFIG_BLK_DEV_CRYPTOLOOP=m CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=m CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_LBD is not set @@ -261,6 +264,7 @@ CONFIG_SCSI_SPI_ATTRS=y # SCSI low-level drivers # # CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_7000FASST is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AHA152X is not set @@ -270,7 +274,6 @@ CONFIG_SCSI_SPI_ATTRS=y # CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_IN2000 is not set # CONFIG_SCSI_MEGARAID is not set # CONFIG_SCSI_SATA is not set @@ -335,6 +338,9 @@ CONFIG_MD_RAID5=m CONFIG_MD_MULTIPATH=m CONFIG_BLK_DEV_DM=m # CONFIG_DM_CRYPT is not set +# CONFIG_DM_SNAPSHOT is not set +# CONFIG_DM_MIRROR is not set +# CONFIG_DM_ZERO is not set # # Fusion MPT device support @@ -453,6 +459,8 @@ CONFIG_IP_NF_COMPAT_IPCHAINS=m CONFIG_IP_NF_COMPAT_IPFWADM=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_RAW=m +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set +# CONFIG_IP_NF_MATCH_REALM is not set # # IPv6: Netfilter Configuration @@ -554,8 +562,11 @@ CONFIG_NET_CLS_ROUTE4=m CONFIG_NET_CLS_ROUTE=y CONFIG_NET_CLS_FW=m CONFIG_NET_CLS_U32=m +# CONFIG_CLS_U32_PERF is not set +# CONFIG_NET_CLS_IND is not set CONFIG_NET_CLS_RSVP=m CONFIG_NET_CLS_RSVP6=m +# CONFIG_NET_CLS_ACT is not set CONFIG_NET_CLS_POLICE=y # @@ -655,6 +666,7 @@ CONFIG_EEPRO100=m # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set +# CONFIG_VIA_VELOCITY is not set # CONFIG_LAN_SAA9730 is not set # CONFIG_NET_POCKET is not set @@ -880,6 +892,7 @@ CONFIG_USB_ACM=m CONFIG_USB_PRINTER=m CONFIG_USB_STORAGE=m # CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_RW_DETECT is not set CONFIG_USB_STORAGE_DATAFAB=y CONFIG_USB_STORAGE_FREECOM=y CONFIG_USB_STORAGE_DPCM=y @@ -1089,6 +1102,8 @@ CONFIG_UDF_FS=m CONFIG_FAT_FS=m CONFIG_MSDOS_FS=m CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" CONFIG_NTFS_FS=m # CONFIG_NTFS_DEBUG is not set # CONFIG_NTFS_RW is not set @@ -1148,6 +1163,7 @@ CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m # CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_POSIX is not set CONFIG_NCP_FS=m CONFIG_NCPFS_PACKET_SIGNING=y CONFIG_NCPFS_IOCTL_LOCKING=y @@ -1177,7 +1193,6 @@ CONFIG_MSDOS_PARTITION=y # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set @@ -1211,6 +1226,7 @@ CONFIG_NLS_CODEPAGE_874=m CONFIG_NLS_ISO8859_8=m CONFIG_NLS_CODEPAGE_1250=m CONFIG_NLS_CODEPAGE_1251=m +# CONFIG_NLS_ASCII is not set CONFIG_NLS_ISO8859_1=m CONFIG_NLS_ISO8859_2=m CONFIG_NLS_ISO8859_3=m @@ -1265,6 +1281,7 @@ CONFIG_CRYPTO_TEST=m # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=m diff --git a/arch/mips/configs/sb1250-swarm_defconfig b/arch/mips/configs/sb1250-swarm_defconfig index 7d3c4df26207..02b8829f14e3 100644 --- a/arch/mips/configs/sb1250-swarm_defconfig +++ b/arch/mips/configs/sb1250-swarm_defconfig @@ -27,6 +27,7 @@ CONFIG_LOG_BUF_SHIFT=15 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -179,6 +180,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -204,7 +206,7 @@ CONFIG_TRAD_SIGNALS=y # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=9220 CONFIG_BLK_DEV_INITRD=y @@ -219,6 +221,7 @@ CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set CONFIG_BLK_DEV_IDECD=y @@ -317,6 +320,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -649,6 +653,7 @@ CONFIG_CRYPTO_MICHAEL_MIC=y # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/sead_defconfig b/arch/mips/configs/sead_defconfig index d9b6532c23c4..b641d81e4da6 100644 --- a/arch/mips/configs/sead_defconfig +++ b/arch/mips/configs/sead_defconfig @@ -27,6 +27,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -139,6 +140,7 @@ CONFIG_EMBEDDED_RAMDISK_IMAGE="ramdisk.gz" # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -428,5 +430,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=y # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set diff --git a/arch/mips/configs/tb0226_defconfig b/arch/mips/configs/tb0226_defconfig index 818bf63b72ea..b5a0d15728ad 100644 --- a/arch/mips/configs/tb0226_defconfig +++ b/arch/mips/configs/tb0226_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -54,7 +55,6 @@ CONFIG_KMOD=y CONFIG_MACH_VR41XX=y # CONFIG_CASIO_E55 is not set # CONFIG_IBM_WORKPAD is not set -# CONFIG_NEC_EAGLE is not set CONFIG_TANBAC_TB0226=y # CONFIG_TANBAC_TB0229 is not set # CONFIG_VICTOR_MPC30X is not set @@ -143,6 +143,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -178,6 +179,7 @@ CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y # CONFIG_BLK_DEV_IDECD is not set @@ -310,6 +312,7 @@ CONFIG_SYN_COOKIES=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -553,6 +556,8 @@ CONFIG_ZISOFS_FS=y CONFIG_FAT_FS=m CONFIG_MSDOS_FS=m CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # @@ -644,6 +649,7 @@ CONFIG_NLS_CODEPAGE_932=m # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set CONFIG_NLS_ISO8859_1=m # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -679,6 +685,7 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=m # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/tb0229_defconfig b/arch/mips/configs/tb0229_defconfig index 146c70cd6944..77deb2ba836e 100644 --- a/arch/mips/configs/tb0229_defconfig +++ b/arch/mips/configs/tb0229_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -54,7 +55,6 @@ CONFIG_KMOD=y CONFIG_MACH_VR41XX=y # CONFIG_CASIO_E55 is not set # CONFIG_IBM_WORKPAD is not set -# CONFIG_NEC_EAGLE is not set # CONFIG_TANBAC_TB0226 is not set CONFIG_TANBAC_TB0229=y # CONFIG_VICTOR_MPC30X is not set @@ -148,6 +148,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -174,7 +175,7 @@ CONFIG_TRAD_SIGNALS=y CONFIG_BLK_DEV_LOOP=m # CONFIG_BLK_DEV_CRYPTOLOOP is not set CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_BLK_DEV_INITRD is not set @@ -271,6 +272,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -544,6 +546,8 @@ CONFIG_ZISOFS_FS=y CONFIG_FAT_FS=m CONFIG_MSDOS_FS=m CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # @@ -635,6 +639,7 @@ CONFIG_NLS_CODEPAGE_932=m # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set CONFIG_NLS_ISO8859_1=m # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -670,6 +675,7 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=m # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/workpad_defconfig b/arch/mips/configs/workpad_defconfig index e1923900c710..228a685f1599 100644 --- a/arch/mips/configs/workpad_defconfig +++ b/arch/mips/configs/workpad_defconfig @@ -28,6 +28,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -54,7 +55,6 @@ CONFIG_KMOD=y CONFIG_MACH_VR41XX=y # CONFIG_CASIO_E55 is not set CONFIG_IBM_WORKPAD=y -# CONFIG_NEC_EAGLE is not set # CONFIG_TANBAC_TB0226 is not set # CONFIG_TANBAC_TB0229 is not set # CONFIG_VICTOR_MPC30X is not set @@ -143,6 +143,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -178,6 +179,7 @@ CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # +# CONFIG_BLK_DEV_IDE_SATA is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set # CONFIG_BLK_DEV_IDECD is not set @@ -277,6 +279,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -607,5 +610,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=m # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set diff --git a/arch/mips/configs/xxs1500_defconfig b/arch/mips/configs/xxs1500_defconfig index 188176e34b83..f28e04a4e619 100644 --- a/arch/mips/configs/xxs1500_defconfig +++ b/arch/mips/configs/xxs1500_defconfig @@ -28,6 +28,7 @@ CONFIG_HOTPLUG=y # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -147,6 +148,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # @@ -273,6 +275,7 @@ CONFIG_XFRM=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -607,6 +610,7 @@ CONFIG_NLS_DEFAULT="iso8859-1" # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set # CONFIG_NLS_ISO8859_1 is not set # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set @@ -661,6 +665,7 @@ CONFIG_CRYPTO_MICHAEL_MIC=y # # Library routines # +CONFIG_CRC16=m CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/configs/yosemite_defconfig b/arch/mips/configs/yosemite_defconfig index 37d39a6677b5..bf259d809351 100644 --- a/arch/mips/configs/yosemite_defconfig +++ b/arch/mips/configs/yosemite_defconfig @@ -28,6 +28,7 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -137,6 +138,7 @@ CONFIG_TRAD_SIGNALS=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -161,7 +163,7 @@ CONFIG_TRAD_SIGNALS=y # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_LBD is not set @@ -232,6 +234,7 @@ CONFIG_IP_PNP_BOOTP=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -517,5 +520,6 @@ CONFIG_CMDLINE="" # # Library routines # +CONFIG_CRC16=m # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set diff --git a/arch/mips/defconfig b/arch/mips/defconfig index 83d850031444..22f427c46eea 100644 --- a/arch/mips/defconfig +++ b/arch/mips/defconfig @@ -29,6 +29,7 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -148,6 +149,7 @@ CONFIG_BINFMT_IRIX=y # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # # Memory Technology Devices (MTD) @@ -362,6 +364,8 @@ CONFIG_IP_NF_COMPAT_IPCHAINS=m CONFIG_IP_NF_COMPAT_IPFWADM=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_REALM=m # # IPv6: Netfilter Configuration @@ -438,8 +442,11 @@ CONFIG_NET_CLS_ROUTE4=m CONFIG_NET_CLS_ROUTE=y CONFIG_NET_CLS_FW=m CONFIG_NET_CLS_U32=m +# CONFIG_CLS_U32_PERF is not set +# CONFIG_NET_CLS_IND is not set CONFIG_NET_CLS_RSVP=m CONFIG_NET_CLS_RSVP6=m +# CONFIG_NET_CLS_ACT is not set CONFIG_NET_CLS_POLICE=y # @@ -696,6 +703,8 @@ CONFIG_UDF_FS=m CONFIG_FAT_FS=m CONFIG_MSDOS_FS=m CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # @@ -767,7 +776,6 @@ CONFIG_MSDOS_PARTITION=y # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set CONFIG_SGI_PARTITION=y # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set @@ -801,6 +809,7 @@ CONFIG_NLS_CODEPAGE_874=m CONFIG_NLS_ISO8859_8=m CONFIG_NLS_CODEPAGE_1250=m CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m CONFIG_NLS_ISO8859_1=m CONFIG_NLS_ISO8859_2=m CONFIG_NLS_ISO8859_3=m @@ -855,6 +864,7 @@ CONFIG_CRYPTO_CRC32C=m # # Library routines # +CONFIG_CRC16=m # CONFIG_CRC32 is not set CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index 3a7f766fd961..3fd45773771e 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile @@ -38,7 +38,7 @@ obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_I8259) += i8259.o obj-$(CONFIG_IRQ_CPU) += irq_cpu.o obj-$(CONFIG_IRQ_CPU_RM7K) += irq-rm7000.o -obj-$(CONFIG_MIPS_MV64340) += irq-mv6434x.o +obj-$(CONFIG_IRQ_MV64340) += irq-mv6434x.o obj-$(CONFIG_MIPS32) += scall32-o32.o obj-$(CONFIG_MIPS64) += scall64-64.o diff --git a/arch/mips/kernel/irq-mv6434x.c b/arch/mips/kernel/irq-mv6434x.c index 1ed5ae59167c..cb9d2fe598f9 100644 --- a/arch/mips/kernel/irq-mv6434x.c +++ b/arch/mips/kernel/irq-mv6434x.c @@ -44,7 +44,7 @@ static inline void mask_mv64340_irq(unsigned int irq) MV_WRITE(MV64340_INTERRUPT0_MASK_0_LOW, value); } else { value = MV_READ(MV64340_INTERRUPT0_MASK_0_HIGH); - value &= ~(1 << (irq - (irq_base - 32))); + value &= ~(1 << (irq - irq_base - 32)); MV_WRITE(MV64340_INTERRUPT0_MASK_0_HIGH, value); } } @@ -60,7 +60,7 @@ static inline void unmask_mv64340_irq(unsigned int irq) MV_WRITE(MV64340_INTERRUPT0_MASK_0_LOW, value); } else { value = MV_READ(MV64340_INTERRUPT0_MASK_0_HIGH); - value |= 1 << (irq - (irq_base - 32)); + value |= 1 << (irq - irq_base - 32); MV_WRITE(MV64340_INTERRUPT0_MASK_0_HIGH, value); } } diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 83c9368de980..af1b42b58278 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -9,7 +9,7 @@ * Copyright (C) 1999 Silicon Graphics, Inc. * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com * Copyright (C) 2000, 01 MIPS Technologies, Inc. - * Copyright (C) 2002, 2003 Maciej W. Rozycki + * Copyright (C) 2002, 2003, 2004 Maciej W. Rozycki */ #include <linux/config.h> #include <linux/init.h> @@ -23,6 +23,7 @@ #include <asm/bootinfo.h> #include <asm/branch.h> +#include <asm/break.h> #include <asm/cpu.h> #include <asm/fpu.h> #include <asm/module.h> @@ -541,9 +542,12 @@ asmlinkage void do_bp(struct pt_regs *regs) /* * There is the ancient bug in the MIPS assemblers that the break * code starts left to bit 16 instead to bit 6 in the opcode. - * Gas is bug-compatible ... + * Gas is bug-compatible, but not always, grrr... + * We handle both cases with a simple heuristics. --macro */ - bcode = ((opcode >> 16) & ((1 << 20) - 1)); + bcode = ((opcode >> 6) & ((1 << 20) - 1)); + if (bcode < (1 << 10)) + bcode <<= 10; /* * (A short test says that IRIX 5.3 sends SIGTRAP for all break @@ -552,9 +556,9 @@ asmlinkage void do_bp(struct pt_regs *regs) * But should we continue the brokenness??? --macro */ switch (bcode) { - case 6: - case 7: - if (bcode == 7) + case BRK_OVERFLOW << 10: + case BRK_DIVZERO << 10: + if (bcode == (BRK_DIVZERO << 10)) info.si_code = FPE_INTDIV; else info.si_code = FPE_INTOVF; @@ -580,7 +584,7 @@ asmlinkage void do_tr(struct pt_regs *regs) /* Immediate versions don't provide a code. */ if (!(opcode & OPCODE)) - tcode = ((opcode >> 6) & ((1 << 20) - 1)); + tcode = ((opcode >> 6) & ((1 << 10) - 1)); /* * (A short test says that IRIX 5.3 sends SIGTRAP for all trap @@ -589,9 +593,9 @@ asmlinkage void do_tr(struct pt_regs *regs) * But should we continue the brokenness??? --macro */ switch (tcode) { - case 6: - case 7: - if (tcode == 7) + case BRK_OVERFLOW: + case BRK_DIVZERO: + if (tcode == BRK_DIVZERO) info.si_code = FPE_INTDIV; else info.si_code = FPE_INTOVF; diff --git a/arch/mips/mm/sc-rm7k.c b/arch/mips/mm/sc-rm7k.c index ec3ec9e906f9..9796a2279982 100644 --- a/arch/mips/mm/sc-rm7k.c +++ b/arch/mips/mm/sc-rm7k.c @@ -147,55 +147,47 @@ static void rm7k_sc_disable(void) clear_c0_config(1<<3); /* CONF_SE */ } -static inline int __init rm7k_sc_probe(void) +struct bcache_ops rm7k_sc_ops = { + .bc_enable = rm7k_sc_enable, + .bc_disable = rm7k_sc_disable, + .bc_wback_inv = rm7k_sc_wback_inv, + .bc_inv = rm7k_sc_inv +}; + +void __init rm7k_sc_init(void) { unsigned int config = read_c0_config(); - if ((config >> 31) & 1) - return 0; + if ((config >> 31) & 1) /* Bit 31 set -> no S-Cache */ + return; printk(KERN_INFO "Secondary cache size %dK, linesize %d bytes.\n", (scache_size >> 10), sc_lsize); - if ((config >> 3) & 1) /* CONF_SE */ - return 1; + if (!((config >> 3) & 1)) /* CONF_SE */ + rm7k_sc_enable(); /* * While we're at it let's deal with the tertiary cache. */ - if ((config >> 17) & 1) - return 1; - - /* - * We can't enable the L3 cache yet. There may be board-specific - * magic necessary to turn it on, and blindly asking the CPU to - * start using it would may give cache errors. - * - * Also, board-specific knowledge may allow us to use the - * CACHE Flash_Invalidate_T instruction if the tag RAM supports - * it, and may specify the size of the L3 cache so we don't have - * to probe it. - */ - printk(KERN_INFO "Tertiary cache present, %s enabled\n", - config&(1<<12) ? "already" : "not (yet)"); - - if ((config >> 12) & 1) - rm7k_tcache_enabled = 1; - - return 1; -} - -struct bcache_ops rm7k_sc_ops = { - .bc_enable = rm7k_sc_enable, - .bc_disable = rm7k_sc_disable, - .bc_wback_inv = rm7k_sc_wback_inv, - .bc_inv = rm7k_sc_inv -}; - -void __init rm7k_sc_init(void) -{ - if (rm7k_sc_probe()) { - rm7k_sc_enable(); - bcops = &rm7k_sc_ops; + if (!((config >> 17) & 1)) { + + /* + * We can't enable the L3 cache yet. There may be board-specific + * magic necessary to turn it on, and blindly asking the CPU to + * start using it would may give cache errors. + * + * Also, board-specific knowledge may allow us to use the + * CACHE Flash_Invalidate_T instruction if the tag RAM supports + * it, and may specify the size of the L3 cache so we don't have + * to probe it. + */ + printk(KERN_INFO "Tertiary cache present, %s enabled\n", + config&(1<<12) ? "already" : "not (yet)"); + + if ((config >> 12) & 1) + rm7k_tcache_enabled = 1; } + + bcops = &rm7k_sc_ops; } diff --git a/arch/mips/momentum/jaguar_atx/prom.c b/arch/mips/momentum/jaguar_atx/prom.c index 0ec82a10df5c..df52d2adf49d 100644 --- a/arch/mips/momentum/jaguar_atx/prom.c +++ b/arch/mips/momentum/jaguar_atx/prom.c @@ -33,7 +33,6 @@ extern void ja_setup_console(void); struct callvectors *debug_vectors; -extern unsigned long mv64340_base; extern unsigned long cpu_clock; const char *get_system_type(void) @@ -185,13 +184,13 @@ void __init prom_init(void) break; if (strncmp("gtbase", ptr, strlen("gtbase")) == 0) { - mv64340_base = simple_strtol(ptr + strlen("gtbase="), + marvell_base = simple_strtol(ptr + strlen("gtbase="), NULL, 16); - if ((mv64340_base & 0xffffffff00000000) == 0) - mv64340_base |= 0xffffffff00000000; + if ((marvell_base & 0xffffffff00000000) == 0) + marvell_base |= 0xffffffff00000000; - printk("mv64340_base set to 0x%016lx\n", mv64340_base); + printk("marvell_base set to 0x%016lx\n", marvell_base); } if (strncmp("cpuclock", ptr, strlen("cpuclock")) == 0) { cpu_clock = simple_strtol(ptr + strlen("cpuclock="), @@ -218,7 +217,7 @@ void __init prom_init(void) while (*env) { if (strncmp("gtbase", *env, strlen("gtbase")) == 0) { - mv64340_base = simple_strtol(*env + strlen("gtbase="), + marvell_base = simple_strtol(*env + strlen("gtbase="), NULL, 16); } if (strncmp("cpuclock", *env, strlen("cpuclock")) == 0) { diff --git a/arch/mips/momentum/jaguar_atx/setup.c b/arch/mips/momentum/jaguar_atx/setup.c index 261250737528..a849215b5352 100644 --- a/arch/mips/momentum/jaguar_atx/setup.c +++ b/arch/mips/momentum/jaguar_atx/setup.c @@ -46,6 +46,7 @@ #include <linux/types.h> #include <linux/mm.h> #include <linux/bootmem.h> +#include <linux/module.h> #include <linux/pci.h> #include <linux/swap.h> #include <linux/ioport.h> @@ -119,19 +120,21 @@ static __init void wire_stupidity_into_tlb(void) // add_wired_entry(ENTRYLO(0xfe000000), ENTRYLO(0xff000000), // 0xfe000000UL, PM_16M); - mv64340_base = 0xf4000000; + marvell_base = 0xf4000000; //mv64340_sram_base = 0xfe000000; /* Currently unused */ #endif } -unsigned long mv64340_base = 0xf4000000L; +unsigned long marvell_base = 0xf4000000L; unsigned long ja_fpga_base = JAGUAR_ATX_CS0_ADDR; unsigned long uart_base = 0xfd000000L; static unsigned char *rtc_base = (unsigned char*) 0xfc800000L; +EXPORT_SYMBOL(marvell_base); + static __init int per_cpu_mappings(void) { - mv64340_base = (unsigned long) ioremap(0xf4000000, 0x10000); + marvell_base = (unsigned long) ioremap(0xf4000000, 0x10000); ja_fpga_base = (unsigned long) ioremap(JAGUAR_ATX_CS0_ADDR, 0x1000); uart_base = (unsigned long) ioremap(0xfd000000UL, 0x1000); rtc_base = ioremap(0xfc000000UL, 0x8000); @@ -233,12 +236,14 @@ static struct resource mv_pci_mem0_resource = { .flags = IORESOURCE_MEM }; -extern struct pci_ops mv64340_bus0_pci_ops; - -static struct pci_controller mv_bus0_controller = { - .pci_ops = &mv64340_bus0_pci_ops, - .mem_resource = &mv_pci_mem0_resource, - .io_resource = &mv_pci_io_mem0_resource, +static struct mv_pci_controller mv_bus0_controller = { + .pcic = { + .pci_ops = &mv_pci_ops, + .mem_resource = &mv_pci_mem0_resource, + .io_resource = &mv_pci_io_mem0_resource, + }, + .config_addr = MV64340_PCI_0_CONFIG_ADDR, + .config_vreg = MV64340_PCI_0_CONFIG_DATA_VIRTUAL_REG, }; static uint32_t mv_io_base, mv_io_size; @@ -253,16 +258,16 @@ static void ja_pci0_init(void) mem0_base = MV_READ(MV64340_PCI_0_MEMORY0_BASE_ADDR) << 16; mem0_size = (MV_READ(MV64340_PCI_0_MEMORY0_SIZE) + 1) << 16; - mv_pci_io_mem0_resource.start = 0; - mv_pci_io_mem0_resource.end = io_size - 1; - mv_pci_mem0_resource.start = mem0_base; - mv_pci_mem0_resource.end = mem0_base + mem0_size - 1; - mv_bus0_controller.mem_offset = mem0_base; - mv_bus0_controller.io_offset = 0; + mv_pci_io_mem0_resource.start = 0; + mv_pci_io_mem0_resource.end = io_size - 1; + mv_pci_mem0_resource.start = mem0_base; + mv_pci_mem0_resource.end = mem0_base + mem0_size - 1; + mv_bus0_controller.pcic.mem_offset = mem0_base; + mv_bus0_controller.pcic.io_offset = 0; ioport_resource.end = io_size - 1; - register_pci_controller(&mv_bus0_controller); + register_pci_controller(&mv_bus0_controller.pcic); mv_io_base = io_base; mv_io_size = io_size; @@ -278,12 +283,14 @@ static struct resource mv_pci_mem1_resource = { .flags = IORESOURCE_MEM }; -extern struct pci_ops mv64340_bus1_pci_ops; - -static struct pci_controller mv_bus1_controller = { - .pci_ops = &mv64340_bus1_pci_ops, - .mem_resource = &mv_pci_mem1_resource, - .io_resource = &mv_pci_io_mem1_resource, +static struct mv_pci_controller mv_bus1_controller = { + .pcic = { + .pci_ops = &mv_pci_ops, + .mem_resource = &mv_pci_mem1_resource, + .io_resource = &mv_pci_io_mem1_resource, + }, + .config_addr = MV64340_PCI_1_CONFIG_ADDR, + .config_vreg = MV64340_PCI_1_CONFIG_DATA_VIRTUAL_REG, }; static __init void ja_pci1_init(void) @@ -301,16 +308,16 @@ static __init void ja_pci1_init(void) * the first. A gap is no problem but would waste address space for * remapping the port space. */ - mv_pci_io_mem1_resource.start = mv_io_size; - mv_pci_io_mem1_resource.end = mv_io_size + io_size - 1; - mv_pci_mem1_resource.start = mem0_base; - mv_pci_mem1_resource.end = mem0_base + mem0_size - 1; - mv_bus1_controller.mem_offset = mem0_base; - mv_bus1_controller.io_offset = 0; + mv_pci_io_mem1_resource.start = mv_io_size; + mv_pci_io_mem1_resource.end = mv_io_size + io_size - 1; + mv_pci_mem1_resource.start = mem0_base; + mv_pci_mem1_resource.end = mem0_base + mem0_size - 1; + mv_bus1_controller.pcic.mem_offset = mem0_base; + mv_bus1_controller.pcic.io_offset = 0; ioport_resource.end = io_base + io_size -mv_io_base - 1; - register_pci_controller(&mv_bus1_controller); + register_pci_controller(&mv_bus1_controller.pcic); mv_io_size = io_base + io_size - mv_io_base; } diff --git a/arch/mips/momentum/ocelot_c/prom.c b/arch/mips/momentum/ocelot_c/prom.c index a01bedb4485c..762112965f52 100644 --- a/arch/mips/momentum/ocelot_c/prom.c +++ b/arch/mips/momentum/ocelot_c/prom.c @@ -29,7 +29,7 @@ struct callvectors* debug_vectors; -extern unsigned long mv64340_base; +extern unsigned long marvell_base; extern unsigned long cpu_clock; #ifdef CONFIG_MV64340_ETH @@ -180,13 +180,13 @@ void __init prom_init(void) break; if (strncmp("gtbase", ptr, strlen("gtbase")) == 0) { - mv64340_base = simple_strtol(ptr + strlen("gtbase="), + marvell_base = simple_strtol(ptr + strlen("gtbase="), NULL, 16); - if ((mv64340_base & 0xffffffff00000000) == 0) - mv64340_base |= 0xffffffff00000000; + if ((marvell_base & 0xffffffff00000000) == 0) + marvell_base |= 0xffffffff00000000; - printk("mv64340_base set to 0x%016lx\n", mv64340_base); + printk("marvell_base set to 0x%016lx\n", marvell_base); } if (strncmp("cpuclock", ptr, strlen("cpuclock")) == 0) { cpu_clock = simple_strtol(ptr + strlen("cpuclock="), @@ -213,7 +213,7 @@ void __init prom_init(void) while (*env) { if (strncmp("gtbase", *env, strlen("gtbase")) == 0) { - mv64340_base = simple_strtol(*env + strlen("gtbase="), + marvell_base = simple_strtol(*env + strlen("gtbase="), NULL, 16); } if (strncmp("cpuclock", *env, strlen("cpuclock")) == 0) { diff --git a/arch/mips/momentum/ocelot_c/setup.c b/arch/mips/momentum/ocelot_c/setup.c index 1bd2ba659bfd..021c00e3c07c 100644 --- a/arch/mips/momentum/ocelot_c/setup.c +++ b/arch/mips/momentum/ocelot_c/setup.c @@ -67,7 +67,7 @@ #include <asm/mv64340.h> #include "ocelot_c_fpga.h" -unsigned long mv64340_base; +unsigned long marvell_base; extern unsigned long mv64340_sram_base; unsigned long cpu_clock; @@ -117,7 +117,7 @@ void PMON_v2_setup(void) /* m-sys and internal SRAM */ add_wired_entry(ENTRYLO(0xfe000000), ENTRYLO(0xff000000), 0xfffffffffe000000, PM_16M); - mv64340_base = 0xfffffffff4000000; + marvell_base = 0xfffffffff4000000; mv64340_sram_base = 0xfffffffffe000000; #else /* marvell and extra space */ @@ -127,7 +127,7 @@ void PMON_v2_setup(void) /* m-sys and internal SRAM */ add_wired_entry(ENTRYLO(0xfe000000), ENTRYLO(0xff000000), 0xfe000000, PM_16M); - mv64340_base = 0xf4000000; + marvell_base = 0xf4000000; mv64340_sram_base = 0xfe000000; #endif } diff --git a/arch/mips/momentum/ocelot_g/gt-irq.c b/arch/mips/momentum/ocelot_g/gt-irq.c index 4ec4aefd6952..93708965be11 100644 --- a/arch/mips/momentum/ocelot_g/gt-irq.c +++ b/arch/mips/momentum/ocelot_g/gt-irq.c @@ -114,10 +114,10 @@ static irqreturn_t gt64240_p0int_irq(int irq, void *dev, struct pt_regs *regs) int handled; /* get the low interrupt cause register */ - irq_src = GT_READ(LOW_INTERRUPT_CAUSE_REGISTER); + irq_src = MV_READ(LOW_INTERRUPT_CAUSE_REGISTER); /* get the mask register for this pin */ - irq_src_mask = GT_READ(PCI_0INTERRUPT_CAUSE_MASK_REGISTER_LOW); + irq_src_mask = MV_READ(PCI_0INTERRUPT_CAUSE_MASK_REGISTER_LOW); /* mask off only the interrupts we're interested in */ irq_src = irq_src & irq_src_mask; @@ -130,7 +130,7 @@ static irqreturn_t gt64240_p0int_irq(int irq, void *dev, struct pt_regs *regs) irq_src &= ~0x00000100; /* Clear any pending cause bits */ - GT_WRITE(TIMER_COUNTER_0_3_INTERRUPT_CAUSE, 0x0); + MV_WRITE(TIMER_COUNTER_0_3_INTERRUPT_CAUSE, 0x0); /* handle the timer call */ do_timer(regs); @@ -160,10 +160,10 @@ void gt64240_time_init(void) static struct irqaction timer; /* Stop the timer -- we'll use timer #0 */ - GT_WRITE(TIMER_COUNTER_0_3_CONTROL, 0x0); + MV_WRITE(TIMER_COUNTER_0_3_CONTROL, 0x0); /* Load timer value for 100 Hz */ - GT_WRITE(TIMER_COUNTER0, bus_clock / 100); + MV_WRITE(TIMER_COUNTER0, bus_clock / 100); /* * Create the IRQ structure entry for the timer. Since we're too early @@ -181,16 +181,16 @@ void gt64240_time_init(void) enable_irq(6); /* Clear any pending cause bits */ - GT_WRITE(TIMER_COUNTER_0_3_INTERRUPT_CAUSE, 0x0); + MV_WRITE(TIMER_COUNTER_0_3_INTERRUPT_CAUSE, 0x0); /* Enable the interrupt for timer 0 */ - GT_WRITE(TIMER_COUNTER_0_3_INTERRUPT_MASK, 0x1); + MV_WRITE(TIMER_COUNTER_0_3_INTERRUPT_MASK, 0x1); /* Enable the timer interrupt for GT-64240 pin P0_INT# */ - GT_WRITE (PCI_0INTERRUPT_CAUSE_MASK_REGISTER_LOW, 0x100); + MV_WRITE (PCI_0INTERRUPT_CAUSE_MASK_REGISTER_LOW, 0x100); /* Configure and start the timer */ - GT_WRITE(TIMER_COUNTER_0_3_CONTROL, 0x3); + MV_WRITE(TIMER_COUNTER_0_3_CONTROL, 0x3); } void gt64240_irq_init(void) diff --git a/arch/mips/momentum/ocelot_g/prom.c b/arch/mips/momentum/ocelot_g/prom.c index 82bebaeb0087..6b4f577c2757 100644 --- a/arch/mips/momentum/ocelot_g/prom.c +++ b/arch/mips/momentum/ocelot_g/prom.c @@ -26,7 +26,7 @@ struct callvectors* debug_vectors; -extern unsigned long gt64240_base; +extern unsigned long marvell_base; extern unsigned long bus_clock; #ifdef CONFIG_GALILLEO_GT64240_ETH @@ -69,7 +69,7 @@ void __init prom_init(void) while (*env) { if (strncmp("gtbase", *env, strlen("gtbase")) == 0) { - gt64240_base = simple_strtol(*env + strlen("gtbase="), + marvell_base = simple_strtol(*env + strlen("gtbase="), NULL, 16); } if (strncmp("busclock", *env, strlen("busclock")) == 0) { diff --git a/arch/mips/momentum/ocelot_g/setup.c b/arch/mips/momentum/ocelot_g/setup.c index 1d313eb56059..38a78ab8c830 100644 --- a/arch/mips/momentum/ocelot_g/setup.c +++ b/arch/mips/momentum/ocelot_g/setup.c @@ -67,7 +67,7 @@ extern unsigned char prom_mac_addr_base[6]; #endif -unsigned long gt64240_base; +unsigned long marvell_base; /* These functions are used for rebooting or halting the machine*/ extern void momenco_ocelot_restart(char *command); @@ -117,7 +117,7 @@ void PMON_v2_setup(void) add_temporary_entry(ENTRYLO(0xfc800000), ENTRYLO(0xfc810000), 0xfc800000, PM_64K); - gt64240_base = 0xf4000000; + marvell_base = 0xf4000000; } extern int rm7k_tcache_enabled; @@ -133,7 +133,7 @@ static void __init setup_l3cache(unsigned long size) printk("Enabling L3 cache..."); /* Enable the L3 cache in the GT64120A's CPU Configuration register */ - GT_WRITE(0, GT_READ(0) | (1<<14)); + MV_WRITE(0, MV_READ(0) | (1<<14)); /* Enable the L3 cache in the CPU */ set_c0_config(1<<12 /* CONF_TE */); @@ -239,7 +239,7 @@ static int __init momenco_ocelot_g_setup(void) } /* FIXME: Fix up the DiskOnChip mapping */ - GT_WRITE(0x468, 0xfef73); + MV_WRITE(0x468, 0xfef73); return 0; } diff --git a/arch/mips/pci/Makefile b/arch/mips/pci/Makefile index 9cdb8b8ba00a..5ed03fa905a9 100644 --- a/arch/mips/pci/Makefile +++ b/arch/mips/pci/Makefile @@ -12,7 +12,7 @@ obj-$(CONFIG_MIPS_BONITO64) += ops-bonito64.o obj-$(CONFIG_MIPS_GT64111) += ops-gt64111.o obj-$(CONFIG_MIPS_GT64120) += ops-gt64120.o obj-$(CONFIG_MIPS_GT96100) += ops-gt96100.o -obj-$(CONFIG_MIPS_MV64340) += ops-mv64340.o +obj-$(CONFIG_PCI_MARVELL) += ops-marvell.o obj-$(CONFIG_MIPS_MSC) += ops-msc.o obj-$(CONFIG_MIPS_NILE4) += ops-nile4.o obj-$(CONFIG_MIPS_TX3927) += ops-jmr3927.o @@ -38,8 +38,7 @@ obj-$(CONFIG_MIPS_MALTA) += fixup-malta.o obj-$(CONFIG_MOMENCO_JAGUAR_ATX)+= fixup-jaguar.o obj-$(CONFIG_MOMENCO_OCELOT) += fixup-ocelot.o pci-ocelot.o obj-$(CONFIG_MOMENCO_OCELOT_C) += fixup-ocelot-c.o pci-ocelot-c.o -obj-$(CONFIG_MOMENCO_OCELOT_G) += fixup-ocelot-g.o ops-gt64240.o pci-ocelot-g.o -obj-$(CONFIG_NEC_EAGLE) += fixup-eagle.o ops-vrc4173.o +obj-$(CONFIG_MOMENCO_OCELOT_G) += fixup-ocelot-g.o pci-ocelot-g.o obj-$(CONFIG_PMC_YOSEMITE) += fixup-yosemite.o ops-titan.o ops-titan-ht.o \ pci-yosemite.o obj-$(CONFIG_SGI_IP27) += pci-ip27.o diff --git a/arch/mips/pci/fixup-eagle.c b/arch/mips/pci/fixup-eagle.c deleted file mode 100644 index ac6f9d845358..000000000000 --- a/arch/mips/pci/fixup-eagle.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * arch/mips/vr41xx/nec-eagle/pci_fixup.c - * - * The NEC Eagle/Hawk Board specific PCI fixups. - * - * Author: Yoichi Yuasa <you@mvista.com, or source@mvista.com> - * - * 2001-2002,2004 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ -#include <linux/init.h> -#include <linux/pci.h> - -#include <asm/vr41xx/eagle.h> -#include <asm/vr41xx/vrc4173.h> - -/* - * Shortcuts - */ -#define INTA CP_INTA_IRQ -#define INTB CP_INTB_IRQ -#define INTC CP_INTC_IRQ -#define INTD CP_INTD_IRQ -#define PCMCIA1 VRC4173_PCMCIA1_IRQ -#define PCMCIA2 VRC4173_PCMCIA2_IRQ -#define LAN LANINTA_IRQ -#define SLOT PCISLOT_IRQ - -static char irq_tab_eagle[][5] __initdata = { - [ 8] = { 0, INTA, INTB, INTC, INTD }, - [ 9] = { 0, INTD, INTA, INTB, INTC }, - [10] = { 0, INTC, INTD, INTA, INTB }, - [12] = { 0, PCMCIA1, 0, 0, 0 }, - [13] = { 0, PCMCIA2, 0, 0, 0 }, - [28] = { 0, LAN, 0, 0, 0 }, - [29] = { 0, SLOT, INTB, INTC, INTD }, -}; - -/* - * This is a multifunction device. - */ -static char irq_func_tab[] __initdata = { - VRC4173_CASCADE_IRQ, - VRC4173_AC97_IRQ, - VRC4173_USB_IRQ -}; - -int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) -{ - if (slot == 30) - return irq_func_tab[PCI_FUNC(dev->devfn)]; - - return irq_tab_eagle[slot][pin]; -} - -struct pci_fixup pcibios_fixups[] __initdata = { - { .pass = 0, }, -}; diff --git a/arch/mips/pci/ops-gt64240.c b/arch/mips/pci/ops-gt64240.c deleted file mode 100644 index 6929faa65490..000000000000 --- a/arch/mips/pci/ops-gt64240.c +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright 2002 Momentum Computer - * Author: Matthew Dharm <mdharm@momenco.com> - * Copyright (C) 2004 Ralf Baechle <ralf@linux-mips.org> - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN - * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/types.h> -#include <linux/pci.h> -#include <asm/io.h> -#include <asm/gt64240.h> - - -#define MASTER_ABORT_BIT 0x100 - -/* - * galileo_pcibios_(read/write)_config_(dword/word/byte) - - * - * reads/write a dword/word/byte register from the configuration space - * of a device. - * - * Note that bus 0 and bus 1 are local, and we assume all other busses are - * bridged from bus 1. This is a safe assumption, since any other - * configuration will require major modifications to the CP7000G - * - * Inputs : - * bus - bus number - * dev - device number - * offset - register offset in the configuration space - * val - value to be written / read - * - * Outputs : - * PCIBIOS_SUCCESSFUL when operation was succesfull - * PCIBIOS_DEVICE_NOT_FOUND when the bus or dev is errorneous - * PCIBIOS_BAD_REGISTER_NUMBER when accessing non aligned - */ - - -static int gt_read_config(struct pci_bus *bus, unsigned int devfn, int offset, - int size, u32 *val, u32 address_reg, u32 data_reg) -{ - uint32_t address; - int dev, busno; - - busno = bus->number; - dev = PCI_SLOT(devfn); - - /* verify the range */ - if (dev == 31) - return PCIBIOS_DEVICE_NOT_FOUND; - - address = (busno << 16) | (devfn << 8) | (offset & 0xfc) | 0x80000000; - - /* start the configuration cycle */ - GT_WRITE(address_reg, address); - - switch (size) { - case 1: - GT_READ_8(data_reg + (offset & 0x3), val); - break; - case 2: - GT_READ_16(data_reg + (offset & 0x3), val); - break; - case 4: - *val = GT_READ(data_reg); - break; - } - - return PCIBIOS_SUCCESSFUL; -} - -static int gt_write_config(struct pci_bus *bus, unsigned int devfn, int offset, - int size, u32 val, u32 address_reg, u32 data_reg) -{ - unsigned int address; - int dev, busno; - - busno = bus->number; - dev = PCI_SLOT(devfn); - - /* verify the range */ - if (dev == 31) - return PCIBIOS_DEVICE_NOT_FOUND; - - address = (busno << 16) | (devfn << 8) | (offset & 0xfc) | 0x80000000; - - /* start the configuration cycle */ - GT_WRITE(address_reg, address); - - switch (size) { - case 1: - GT_WRITE_8(data_reg + (offset & 0x3), val); - break; - case 2: - GT_WRITE_16(data_reg + (offset & 0x3), val); - break; - case 4: - GT_WRITE(data_reg, val); - break; - } - - return PCIBIOS_SUCCESSFUL; -} - -#define BUILD_PCI_OPS(host) \ - \ -static int gt_bus ## host ## _read_config(struct pci_bus *bus, \ - unsigned int devfn, int reg, int size, u32 * val) \ -{ \ - return gt_read_config(bus, devfn, reg, size, val, \ - PCI_ ## host ## CONFIGURATION_ADDRESS, \ - PCI_ ## host ## CONFIGURATION_DATA_VIRTUAL_REGISTER); \ -} \ - \ -static int gt_bus ## host ## _write_config(struct pci_bus *bus, \ - unsigned int devfn, int reg, int size, u32 val) \ -{ \ - return gt_write_config(bus, devfn, reg, size, val, \ - PCI_ ## host ## CONFIGURATION_ADDRESS, \ - PCI_ ## host ## CONFIGURATION_DATA_VIRTUAL_REGISTER); \ -} \ - \ -struct pci_ops gt_bus ## host ## _pci_ops = { \ - .read = gt_bus ## host ## _read_config, \ - .write = gt_bus ## host ## _write_config \ -}; - -BUILD_PCI_OPS(0) -BUILD_PCI_OPS(1) diff --git a/arch/mips/pci/ops-marvell.c b/arch/mips/pci/ops-marvell.c new file mode 100644 index 000000000000..1ac5c59199d1 --- /dev/null +++ b/arch/mips/pci/ops-marvell.c @@ -0,0 +1,93 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 2003, 2004 Ralf Baechle (ralf@linux-mips.org) + */ +#include <linux/kernel.h> +#include <linux/types.h> +#include <linux/pci.h> + +#include <asm/marvell.h> + +static int mv_read_config(struct pci_bus *bus, unsigned int devfn, + int where, int size, u32 * val) +{ + struct mv_pci_controller *mvbc = bus->sysdata; + unsigned long address_reg, data_reg; + u32 address; + + address_reg = mvbc->config_addr; + data_reg = mvbc->config_vreg; + + /* Accessing device 31 crashes those Marvells. Since years. + Will they ever make sane controllers ... */ + if (PCI_SLOT(devfn) == 31) + return PCIBIOS_DEVICE_NOT_FOUND; + + address = (bus->number << 16) | (devfn << 8) | + (where & 0xfc) | 0x80000000; + + /* start the configuration cycle */ + MV_WRITE(address_reg, address); + + switch (size) { + case 1: + *val = MV_READ_8(data_reg + (where & 0x3)); + break; + + case 2: + *val = MV_READ_16(data_reg + (where & 0x3)); + break; + + case 4: + *val = MV_READ(data_reg); + break; + } + + return PCIBIOS_SUCCESSFUL; +} + +static int mv_write_config(struct pci_bus *bus, unsigned int devfn, + int where, int size, u32 val) +{ + struct mv_pci_controller *mvbc = bus->sysdata; + unsigned long address_reg, data_reg; + u32 address; + + address_reg = mvbc->config_addr; + data_reg = mvbc->config_vreg; + + /* Accessing device 31 crashes those Marvells. Since years. + Will they ever make sane controllers ... */ + if (PCI_SLOT(devfn) == 31) + return PCIBIOS_DEVICE_NOT_FOUND; + + address = (bus->number << 16) | (devfn << 8) | + (where & 0xfc) | 0x80000000; + + /* start the configuration cycle */ + MV_WRITE(address_reg, address); + + switch (size) { + case 1: + MV_WRITE_8(data_reg + (where & 0x3), val); + break; + + case 2: + MV_WRITE_16(data_reg + (where & 0x3), val); + break; + + case 4: + MV_WRITE(data_reg, val); + break; + } + + return PCIBIOS_SUCCESSFUL; +} + +struct pci_ops mv_pci_ops = { + .read = mv_read_config, + .write = mv_write_config +}; diff --git a/arch/mips/pci/ops-mv64340.c b/arch/mips/pci/ops-mv64340.c deleted file mode 100644 index 235e01b302e7..000000000000 --- a/arch/mips/pci/ops-mv64340.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright 2002 Momentum Computer - * Author: Matthew Dharm <mdharm@momenco.com> - * - * Copyright (C) 2003, 2004 Ralf Baechle (ralf@linux-mips.org) - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN - * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#include <linux/types.h> -#include <linux/pci.h> -#include <linux/kernel.h> -#include <asm/mv64340.h> - -/* - * galileo_pcibios_(read/write)_config_(dword/word/byte) - - * - * reads/write a dword/word/byte register from the configuration space - * of a device. - * - * Note that bus 0 and bus 1 are local, and we assume all other busses are - * bridged from bus 1. This is a safe assumption, since any other - * configuration will require major modifications to the CP7000G - * - * Inputs : - * bus - bus number - * dev - device number - * offset - register offset in the configuration space - * val - value to be written / read - * - * Outputs : - * PCIBIOS_SUCCESSFUL when operation was succesfull - * PCIBIOS_DEVICE_NOT_FOUND when the bus or dev is errorneous - * PCIBIOS_BAD_REGISTER_NUMBER when accessing non aligned - */ - -static int mv64340_read_config(struct pci_bus *bus, unsigned int devfn, int reg, - int size, u32 * val, u32 address_reg, u32 data_reg) -{ - u32 address; - - /* Accessing device 31 crashes the MV-64340. */ - if (PCI_SLOT(devfn) > 5) - return PCIBIOS_DEVICE_NOT_FOUND; - - address = (bus->number << 16) | (devfn << 8) | - (reg & 0xfc) | 0x80000000; - - /* start the configuration cycle */ - MV_WRITE(address_reg, address); - - switch (size) { - case 1: - *val = MV_READ_8(data_reg + (reg & 0x3)); - break; - - case 2: - *val = MV_READ_16(data_reg + (reg & 0x3)); - break; - - case 4: - *val = MV_READ(data_reg); - break; - } - - return PCIBIOS_SUCCESSFUL; -} - -static int mv64340_write_config(struct pci_bus *bus, unsigned int devfn, - int reg, int size, u32 val, u32 address_reg, u32 data_reg) -{ - u32 address; - - /* Accessing device 31 crashes the MV-64340. */ - if (PCI_SLOT(devfn) > 5) - return PCIBIOS_DEVICE_NOT_FOUND; - - address = (bus->number << 16) | (devfn << 8) | - (reg & 0xfc) | 0x80000000; - - /* start the configuration cycle */ - MV_WRITE(address_reg, address); - - switch (size) { - case 1: - /* write the data */ - MV_WRITE_8(data_reg + (reg & 0x3), val); - break; - - case 2: - /* write the data */ - MV_WRITE_16(data_reg + (reg & 0x3), val); - break; - - case 4: - /* write the data */ - MV_WRITE(data_reg, val); - break; - } - - return PCIBIOS_SUCCESSFUL; -} - -#define BUILD_PCI_OPS(host) \ - \ -static int mv64340_bus ## host ## _read_config(struct pci_bus *bus, \ - unsigned int devfn, int reg, int size, u32 * val) \ -{ \ - return mv64340_read_config(bus, devfn, reg, size, val, \ - MV64340_PCI_ ## host ## _CONFIG_ADDR, \ - MV64340_PCI_ ## host ## _CONFIG_DATA_VIRTUAL_REG); \ -} \ - \ -static int mv64340_bus ## host ## _write_config(struct pci_bus *bus, \ - unsigned int devfn, int reg, int size, u32 val) \ -{ \ - return mv64340_write_config(bus, devfn, reg, size, val, \ - MV64340_PCI_ ## host ## _CONFIG_ADDR, \ - MV64340_PCI_ ## host ## _CONFIG_DATA_VIRTUAL_REG); \ -} \ - \ -struct pci_ops mv64340_bus ## host ## _pci_ops = { \ - .read = mv64340_bus ## host ## _read_config, \ - .write = mv64340_bus ## host ## _write_config \ -}; - -BUILD_PCI_OPS(0) -BUILD_PCI_OPS(1) diff --git a/arch/mips/pci/ops-vrc4173.c b/arch/mips/pci/ops-vrc4173.c deleted file mode 100644 index ce4e7029a5a4..000000000000 --- a/arch/mips/pci/ops-vrc4173.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * FILE NAME - * arch/mips/vr41xx/nec-eagle/vrc4173.c - * - * BRIEF MODULE DESCRIPTION - * Pre-setup for NEC VRC4173. - * - * Author: Yoichi Yuasa - * yyuasa@mvista.com or source@mvista.com - * - * Copyright 2001,2002 MontaVista Software Inc. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#include <linux/init.h> -#include <linux/pci.h> -#include <linux/module.h> - -#include <asm/io.h> -#include <asm/vr41xx/eagle.h> -#include <asm/vr41xx/vrc4173.h> - -#define PCI_CONFIG_ADDR KSEG1ADDR(0x0f000c18) -#define PCI_CONFIG_DATA KSEG1ADDR(0x0f000c14) - -static inline void config_writeb(u8 reg, u8 val) -{ - u32 data; - int shift; - - writel((1UL << 0x1e) | (reg & 0xfc), PCI_CONFIG_ADDR); - data = readl(PCI_CONFIG_DATA); - - shift = (reg & 3) << 3; - data &= ~(0xff << shift); - data |= (((u32) val) << shift); - - writel(data, PCI_CONFIG_DATA); -} - -static inline u16 config_readw(u8 reg) -{ - u32 data; - - writel(((1UL << 30) | (reg & 0xfc)), PCI_CONFIG_ADDR); - data = readl(PCI_CONFIG_DATA); - - return (u16) (data >> ((reg & 2) << 3)); -} - -static inline u32 config_readl(u8 reg) -{ - writel(((1UL << 30) | (reg & 0xfc)), PCI_CONFIG_ADDR); - - return readl(PCI_CONFIG_DATA); -} - -static inline void config_writel(u8 reg, u32 val) -{ - writel((1UL << 0x1e) | (reg & 0xfc), PCI_CONFIG_ADDR); - writel(val, PCI_CONFIG_DATA); -} - -void __init vrc4173_preinit(void) -{ - u32 cmdsts, base; - u16 cmu_mask; - - - if ((config_readw(PCI_VENDOR_ID) == PCI_VENDOR_ID_NEC) && - (config_readw(PCI_DEVICE_ID) == PCI_DEVICE_ID_NEC_VRC4173)) { - /* - * Initialized NEC VRC4173 Bus Control Unit - */ - cmdsts = config_readl(PCI_COMMAND); - config_writel(PCI_COMMAND, - cmdsts | - PCI_COMMAND_IO | - PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); - - config_writeb(PCI_LATENCY_TIMER, 0x80); - - config_writel(PCI_BASE_ADDRESS_0, VR41XX_PCI_IO_START); - base = config_readl(PCI_BASE_ADDRESS_0); - base &= PCI_BASE_ADDRESS_IO_MASK; - config_writeb(0x40, 0x01); - - /* CARDU1 IDSEL = AD12, CARDU2 IDSEL = AD13 */ - config_writeb(0x41, 0); - - cmu_mask = 0x1000; - outw(cmu_mask, base + 0x040); - cmu_mask |= 0x0800; - outw(cmu_mask, base + 0x040); - - outw(0x000f, base + 0x042); /* Soft reset of CMU */ - cmu_mask |= 0x05e0; - outw(cmu_mask, base + 0x040); - cmu_mask = inw(base + 0x040); /* dummy read */ - outw(0x0000, base + 0x042); - } -} diff --git a/arch/mips/pci/pci-ocelot-c.c b/arch/mips/pci/pci-ocelot-c.c index dec6d3754fde..8b22272773a9 100644 --- a/arch/mips/pci/pci-ocelot-c.c +++ b/arch/mips/pci/pci-ocelot-c.c @@ -27,12 +27,14 @@ static struct resource mv_pci_mem0_resource = { .flags = IORESOURCE_MEM }; -extern struct pci_ops mv64340_bus0_pci_ops; - -static struct pci_controller mv_bus0_controller = { - .pci_ops = &mv64340_bus0_pci_ops, - .mem_resource = &mv_pci_mem0_resource, - .io_resource = &mv_pci_io_mem0_resource, +static struct mv_pci_controller mv_bus0_controller = { + .pcic = { + .pci_ops = &mv_pci_ops, + .mem_resource = &mv_pci_mem0_resource, + .io_resource = &mv_pci_io_mem0_resource, + }, + .config_addr = MV64340_PCI_0_CONFIG_ADDR, + .config_vreg = MV64340_PCI_0_CONFIG_DATA_VIRTUAL_REG, }; static uint32_t mv_io_base, mv_io_size; @@ -47,16 +49,16 @@ static void mv64340_pci0_init(void) mem0_base = MV_READ(MV64340_PCI_0_MEMORY0_BASE_ADDR) << 16; mem0_size = (MV_READ(MV64340_PCI_0_MEMORY0_SIZE) + 1) << 16; - mv_pci_io_mem0_resource.start = 0; - mv_pci_io_mem0_resource.end = io_size - 1; - mv_pci_mem0_resource.start = mem0_base; - mv_pci_mem0_resource.end = mem0_base + mem0_size - 1; - mv_bus0_controller.mem_offset = mem0_base; - mv_bus0_controller.io_offset = 0; + mv_pci_io_mem0_resource.start = 0; + mv_pci_io_mem0_resource.end = io_size - 1; + mv_pci_mem0_resource.start = mem0_base; + mv_pci_mem0_resource.end = mem0_base + mem0_size - 1; + mv_bus0_controller.pcic.mem_offset = mem0_base; + mv_bus0_controller.pcic.io_offset = 0; ioport_resource.end = io_size - 1; - register_pci_controller(&mv_bus0_controller); + register_pci_controller(&mv_bus0_controller.pcic); mv_io_base = io_base; mv_io_size = io_size; @@ -72,12 +74,14 @@ static struct resource mv_pci_mem1_resource = { .flags = IORESOURCE_MEM }; -extern struct pci_ops mv64340_bus1_pci_ops; - -static struct pci_controller mv_bus1_controller = { - .pci_ops = &mv64340_bus1_pci_ops, - .mem_resource = &mv_pci_mem1_resource, - .io_resource = &mv_pci_io_mem1_resource, +static struct mv_pci_controller mv_bus1_controller = { + .pcic = { + .pci_ops = &mv_pci_ops, + .mem_resource = &mv_pci_mem1_resource, + .io_resource = &mv_pci_io_mem1_resource, + }, + .config_addr = MV64340_PCI_1_CONFIG_ADDR, + .config_vreg = MV64340_PCI_1_CONFIG_DATA_VIRTUAL_REG, }; static __init void mv64340_pci1_init(void) @@ -95,16 +99,16 @@ static __init void mv64340_pci1_init(void) * the first. A gap is no problem but would waste address space for * remapping the port space. */ - mv_pci_io_mem1_resource.start = mv_io_size; - mv_pci_io_mem1_resource.end = mv_io_size + io_size - 1; - mv_pci_mem1_resource.start = mem0_base; - mv_pci_mem1_resource.end = mem0_base + mem0_size - 1; - mv_bus1_controller.mem_offset = mem0_base; - mv_bus1_controller.io_offset = 0; + mv_pci_io_mem1_resource.start = mv_io_size; + mv_pci_io_mem1_resource.end = mv_io_size + io_size - 1; + mv_pci_mem1_resource.start = mem0_base; + mv_pci_mem1_resource.end = mem0_base + mem0_size - 1; + mv_bus1_controller.pcic.mem_offset = mem0_base; + mv_bus1_controller.pcic.io_offset = 0; ioport_resource.end = io_base + io_size -mv_io_base - 1; - register_pci_controller(&mv_bus1_controller); + register_pci_controller(&mv_bus1_controller.pcic); mv_io_size = io_base + io_size - mv_io_base; } diff --git a/arch/mips/pci/pci-ocelot-g.c b/arch/mips/pci/pci-ocelot-g.c index 11b05c7e6751..239b81fba17b 100644 --- a/arch/mips/pci/pci-ocelot-g.c +++ b/arch/mips/pci/pci-ocelot-g.c @@ -39,12 +39,16 @@ static struct resource gt_pci_io_mem0_resource = { .flags = IORESOURCE_IO }; -static struct pci_controller gt_bus0_controller = { - .pci_ops = >_bus0_pci_ops, - .mem_resource = >_pci_mem0_resource, - .mem_offset = 0xc0000000UL, - .io_resource = >_pci_io_mem0_resource, - .io_offset = 0x00000000UL +static struct mv_pci_controller gt_bus0_controller = { + .pcic = { + .pci_ops = &mv_pci_ops, + .mem_resource = >_pci_mem0_resource, + .mem_offset = 0xc0000000UL, + .io_resource = >_pci_io_mem0_resource, + .io_offset = 0x00000000UL + }, + .config_addr = PCI_0CONFIGURATION_ADDRESS, + .config_vreg = PCI_0CONFIGURATION_DATA_VIRTUAL_REGISTER, }; static struct resource gt_pci_mem1_resource = { @@ -61,12 +65,16 @@ static struct resource gt_pci_io_mem1_resource = { .flags = IORESOURCE_IO }; -static struct pci_controller gt_bus1_controller = { - .pci_ops = >_bus1_pci_ops, - .mem_resource = >_pci_mem1_resource, - .mem_offset = 0xd0000000UL, - .io_resource = >_pci_io_mem1_resource, - .io_offset = 0x10000000UL +static struct mv_pci_controller gt_bus1_controller = { + .pcic = { + .pci_ops = &mv_pci_ops, + .mem_resource = >_pci_mem1_resource, + .mem_offset = 0xd0000000UL, + .io_resource = >_pci_io_mem1_resource, + .io_offset = 0x10000000UL + }, + .config_addr = PCI_1CONFIGURATION_ADDRESS, + .config_vreg = PCI_1CONFIGURATION_DATA_VIRTUAL_REGISTER, }; static __init int __init ocelot_g_pci_init(void) @@ -81,8 +89,8 @@ static __init int __init ocelot_g_pci_init(void) set_io_port_base(io_v_base); } - register_pci_controller(>_bus0_controller); - register_pci_controller(>_bus1_controller); + register_pci_controller(>_bus0_controller.pcic); + register_pci_controller(>_bus1_controller.pcic); return 0; } diff --git a/arch/mips/sibyte/sb1250/irq_handler.S b/arch/mips/sibyte/sb1250/irq_handler.S index 08c6070c5302..ad6c6b055952 100644 --- a/arch/mips/sibyte/sb1250/irq_handler.S +++ b/arch/mips/sibyte/sb1250/irq_handler.S @@ -123,7 +123,7 @@ * check the 1250 interrupt registers to figure out what to do * Need to detect which CPU we're on, now that smp_affinity is supported. */ - la v0, KSEG1 + A_IMR_CPU0_BASE + PTR_LA v0, KSEG1 + A_IMR_CPU0_BASE #ifdef CONFIG_SMP lw t1, TI_CPU($28) sll t1, IMR_REGISTER_SPACING_SHIFT diff --git a/arch/mips/vr41xx/nec-eagle/Makefile b/arch/mips/vr41xx/nec-eagle/Makefile deleted file mode 100644 index 0b257254a10c..000000000000 --- a/arch/mips/vr41xx/nec-eagle/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# -# Makefile for the NEC Eagle/Hawk specific parts of the kernel -# -# Author: Yoichi Yuasa -# yyuasa@mvista.com or source@mvista.com -# -# Copyright 2001,2002 MontaVista Software Inc. -# - -obj-y += irq.o setup.o diff --git a/arch/mips/vr41xx/nec-eagle/irq.c b/arch/mips/vr41xx/nec-eagle/irq.c deleted file mode 100644 index 03f74a587daa..000000000000 --- a/arch/mips/vr41xx/nec-eagle/irq.c +++ /dev/null @@ -1,190 +0,0 @@ -/* - * irq.c, Interrupt routines for the NEC Eagle/Hawk board. - * - * Copyright (C) 2002 MontaVista Software, Inc. - * Author: Yoichi Yuasa <yyuasa@mvista.com, or source@mvista.com> - * Copyright (C) 2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -/* - * Changes: - * MontaVista Software Inc. <yyuasa@mvista.com> or <source@mvista.com> - * - New creation, NEC Eagle is supported. - * - Added support for NEC Hawk. - * - * Yoichi Yuasa <yuasa@hh.iij4u.or.jp> - * - Changed from board_irq_init to driver module. - */ -#include <linux/config.h> -#include <linux/init.h> -#include <linux/interrupt.h> -#include <linux/module.h> -#include <linux/types.h> - -#include <asm/io.h> -#include <asm/vr41xx/eagle.h> - -MODULE_DESCRIPTION("IRQ module driver for NEC Eagle/Hawk"); -MODULE_AUTHOR("Yoichi Yuasa <yyuasa@mvista.com>"); -MODULE_LICENSE("GPL"); - -static void enable_pciint_irq(unsigned int irq) -{ - uint8_t val; - - val = readb(NEC_EAGLE_PCIINTMSKREG); - val |= (uint8_t)1 << (irq - PCIINT_IRQ_BASE); - writeb(val, NEC_EAGLE_PCIINTMSKREG); -} - -static void disable_pciint_irq(unsigned int irq) -{ - uint8_t val; - - val = readb(NEC_EAGLE_PCIINTMSKREG); - val &= ~((uint8_t)1 << (irq - PCIINT_IRQ_BASE)); - writeb(val, NEC_EAGLE_PCIINTMSKREG); -} - -static unsigned int startup_pciint_irq(unsigned int irq) -{ - enable_pciint_irq(irq); - return 0; /* never anything pending */ -} - -#define shutdown_pciint_irq disable_pciint_irq -#define ack_pciint_irq disable_pciint_irq - -static void end_pciint_irq(unsigned int irq) -{ - if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) - enable_pciint_irq(irq); -} - -static struct hw_interrupt_type pciint_irq_type = { - .typename = "PCIINT", - .startup = startup_pciint_irq, - .shutdown = shutdown_pciint_irq, - .enable = enable_pciint_irq, - .disable = disable_pciint_irq, - .ack = ack_pciint_irq, - .end = end_pciint_irq, -}; - -static void enable_sdbint_irq(unsigned int irq) -{ - uint8_t val; - - val = readb(NEC_EAGLE_SDBINTMSK); - val |= (uint8_t)1 << (irq - SDBINT_IRQ_BASE); - writeb(val, NEC_EAGLE_SDBINTMSK); -} - -static void disable_sdbint_irq(unsigned int irq) -{ - uint8_t val; - - val = readb(NEC_EAGLE_SDBINTMSK); - val &= ~((uint8_t)1 << (irq - SDBINT_IRQ_BASE)); - writeb(val, NEC_EAGLE_SDBINTMSK); -} - -static unsigned int startup_sdbint_irq(unsigned int irq) -{ - enable_sdbint_irq(irq); - return 0; /* never anything pending */ -} - -#define shutdown_sdbint_irq disable_sdbint_irq -#define ack_sdbint_irq disable_sdbint_irq - -static void end_sdbint_irq(unsigned int irq) -{ - if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) - enable_sdbint_irq(irq); -} - -static struct hw_interrupt_type sdbint_irq_type = { - .typename = "SDBINT", - .startup = startup_sdbint_irq, - .shutdown = shutdown_sdbint_irq, - .enable = enable_sdbint_irq, - .disable = disable_sdbint_irq, - .ack = ack_sdbint_irq, - .end = end_sdbint_irq, -}; - -static int eagle_get_irq_number(int irq) -{ - uint8_t sdbint, pciint; - int i; - - sdbint = readb(NEC_EAGLE_SDBINT); - sdbint &= (NEC_EAGLE_SDBINT_DEG | NEC_EAGLE_SDBINT_ENUM | - NEC_EAGLE_SDBINT_SIO1INT | NEC_EAGLE_SDBINT_SIO2INT | - NEC_EAGLE_SDBINT_PARINT); - pciint = readb(NEC_EAGLE_PCIINTREG); - pciint &= (NEC_EAGLE_PCIINT_CP_INTA | NEC_EAGLE_PCIINT_CP_INTB | - NEC_EAGLE_PCIINT_CP_INTC | NEC_EAGLE_PCIINT_CP_INTD | - NEC_EAGLE_PCIINT_LANINT); - - for (i = 1; i < 6; i++) - if (sdbint & (0x01 << i)) - return SDBINT_IRQ_BASE + i; - - for (i = 0; i < 5; i++) - if (pciint & (0x01 << i)) - return PCIINT_IRQ_BASE + i; - - return -EINVAL; -} - -static int __devinit eagle_irq_init(void) -{ - int i, retval; - - writeb(0, NEC_EAGLE_SDBINTMSK); - writeb(0, NEC_EAGLE_PCIINTMSKREG); - - vr41xx_set_irq_trigger(PCISLOT_PIN, TRIGGER_LEVEL, SIGNAL_THROUGH); - vr41xx_set_irq_level(PCISLOT_PIN, LEVEL_HIGH); - - vr41xx_set_irq_trigger(FPGA_PIN, TRIGGER_LEVEL, SIGNAL_THROUGH); - vr41xx_set_irq_level(FPGA_PIN, LEVEL_HIGH); - - vr41xx_set_irq_trigger(DCD_PIN, TRIGGER_EDGE, SIGNAL_HOLD); - vr41xx_set_irq_level(DCD_PIN, LEVEL_LOW); - - for (i = SDBINT_IRQ_BASE; i <= SDBINT_IRQ_LAST; i++) - irq_desc[i].handler = &sdbint_irq_type; - - for (i = PCIINT_IRQ_BASE; i <= PCIINT_IRQ_LAST; i++) - irq_desc[i].handler = &pciint_irq_type; - - retval = vr41xx_cascade_irq(FPGA_CASCADE_IRQ, eagle_get_irq_number); - if (retval != 0) - printk(KERN_ERR "eagle: Cannot cascade IRQ %d\n", FPGA_CASCADE_IRQ); - - return retval; -} - -static void __devexit eagle_irq_exit(void) -{ - free_irq(FPGA_CASCADE_IRQ, NULL); -} - -module_init(eagle_irq_init); -module_exit(eagle_irq_exit); diff --git a/arch/mips/vr41xx/nec-eagle/setup.c b/arch/mips/vr41xx/nec-eagle/setup.c deleted file mode 100644 index cc055af00e42..000000000000 --- a/arch/mips/vr41xx/nec-eagle/setup.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * arch/mips/vr41xx/nec-eagle/setup.c - * - * Setup for the NEC Eagle/Hawk board. - * - * Author: Yoichi Yuasa <yyuasa@mvista.com, or source@mvista.com> - * - * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - */ -#include <linux/config.h> -#include <linux/ioport.h> - -#include <asm/io.h> -#include <asm/pci_channel.h> -#include <asm/vr41xx/eagle.h> - -#ifdef CONFIG_PCI - -extern void vrc4173_preinit(void); - -static struct resource vr41xx_pci_io_resource = { - "PCI I/O space", - VR41XX_PCI_IO_START, - VR41XX_PCI_IO_END, - IORESOURCE_IO -}; - -static struct resource vr41xx_pci_mem_resource = { - "PCI memory space", - VR41XX_PCI_MEM_START, - VR41XX_PCI_MEM_END, - IORESOURCE_MEM -}; - -extern struct pci_ops vr41xx_pci_ops; - -struct pci_controller vr41xx_controller = { - .pci_ops = &vr41xx_pci_ops, - .io_resource = &vr41xx_pci_io_resource, - .mem_resource = &vr41xx_pci_mem_resource, -}; - -struct vr41xx_pci_address_space vr41xx_pci_mem1 = { - VR41XX_PCI_MEM1_BASE, - VR41XX_PCI_MEM1_MASK, - IO_MEM1_RESOURCE_START -}; - -struct vr41xx_pci_address_space vr41xx_pci_mem2 = { - VR41XX_PCI_MEM2_BASE, - VR41XX_PCI_MEM2_MASK, - IO_MEM2_RESOURCE_START -}; - -struct vr41xx_pci_address_space vr41xx_pci_io = { - VR41XX_PCI_IO_BASE, - VR41XX_PCI_IO_MASK, - IO_PORT_RESOURCE_START -}; - -static struct vr41xx_pci_address_map pci_address_map = { - &vr41xx_pci_mem1, - &vr41xx_pci_mem2, - &vr41xx_pci_io -}; -#endif - -const char *get_system_type(void) -{ - return "NEC SDB-VR4122/VR4131(Eagle/Hawk)"; -} - -static int nec_eagle_setup(void) -{ - set_io_port_base(IO_PORT_BASE); - ioport_resource.start = IO_PORT_RESOURCE_START; - ioport_resource.end = IO_PORT_RESOURCE_END; - -#ifdef CONFIG_SERIAL_8250 - vr41xx_select_siu_interface(SIU_RS232C, IRDA_NONE); - vr41xx_siu_init(); - vr41xx_dsiu_init(); -#endif - -#ifdef CONFIG_PCI - vr41xx_pciu_init(&pci_address_map); - - vrc4173_preinit(); -#endif - - return 0; -} - -early_initcall(nec_eagle_setup); diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 6de7ba17100d..8ce1cca29107 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig @@ -705,6 +705,16 @@ config MPC10X_BRIDGE depends on PCORE || POWERPMC250 || LOPEC || SANDPOINT default y +config FSL_OCP + bool + depends on MPC10X_BRIDGE + default y + +config MPC10X_OPENPIC + bool + depends on POWERPMC250 || LOPEC || SANDPOINT + default y + config MPC10X_STORE_GATHERING bool "Enable MPC10x store gathering" depends on MPC10X_BRIDGE diff --git a/arch/ppc/configs/ebony_defconfig b/arch/ppc/configs/ebony_defconfig index 7dca4c6e19c4..2c1334a86691 100644 --- a/arch/ppc/configs/ebony_defconfig +++ b/arch/ppc/configs/ebony_defconfig @@ -30,6 +30,7 @@ CONFIG_LOG_BUF_SHIFT=14 # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -56,6 +57,8 @@ CONFIG_44x=y # CONFIG_POWER3 is not set # CONFIG_POWER4 is not set # CONFIG_8xx is not set +# CONFIG_E500 is not set +CONFIG_BOOKE=y CONFIG_PTE_64BIT=y # CONFIG_MATH_EMULATION is not set # CONFIG_CPU_FREQ is not set @@ -68,7 +71,6 @@ CONFIG_EBONY=y # CONFIG_OCOTEA is not set CONFIG_440GP=y CONFIG_440=y -CONFIG_BOOKE=y CONFIG_IBM_OCP=y # CONFIG_PM is not set CONFIG_NOT_COHERENT_CACHE=y @@ -106,6 +108,8 @@ CONFIG_HIGHMEM_START=0xfe000000 CONFIG_LOWMEM_SIZE=0x30000000 CONFIG_KERNEL_START=0xc0000000 CONFIG_TASK_SIZE=0x80000000 +CONFIG_CONSISTENT_START=0xff100000 +CONFIG_CONSISTENT_SIZE=0x00200000 CONFIG_BOOT_LOAD=0x01000000 # @@ -115,6 +119,7 @@ CONFIG_BOOT_LOAD=0x01000000 # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_DEBUG_DRIVER is not set # @@ -141,7 +146,7 @@ CONFIG_BOOT_LOAD=0x01000000 # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set CONFIG_LBD=y @@ -247,6 +252,7 @@ CONFIG_NETFILTER=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing @@ -272,6 +278,12 @@ CONFIG_NETDEVICES=y # Ethernet (10 or 100Mbit) # # CONFIG_NET_ETHERNET is not set +CONFIG_IBM_EMAC=y +# CONFIG_IBM_EMAC_ERRMSG is not set +CONFIG_IBM_EMAC_RXB=64 +CONFIG_IBM_EMAC_TXB=8 +CONFIG_IBM_EMAC_FGAP=8 +CONFIG_IBM_EMAC_SKBRES=0 # # Ethernet (1000 Mbit) @@ -310,7 +322,6 @@ CONFIG_NETDEVICES=y # CONFIG_HIPPI is not set # CONFIG_PPP is not set # CONFIG_SLIP is not set -# CONFIG_RCPCI is not set # CONFIG_SHAPER is not set # CONFIG_NETCONSOLE is not set @@ -545,6 +556,11 @@ CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set # +# Profiling support +# +# CONFIG_PROFILING is not set + +# # Kernel hacking # CONFIG_DEBUG_KERNEL=y diff --git a/arch/ppc/configs/ocotea_defconfig b/arch/ppc/configs/ocotea_defconfig index 292d04b0b991..893d7a68a7a8 100644 --- a/arch/ppc/configs/ocotea_defconfig +++ b/arch/ppc/configs/ocotea_defconfig @@ -21,18 +21,22 @@ CONFIG_BROKEN_ON_SMP=y # CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set # @@ -54,6 +58,8 @@ CONFIG_44x=y # CONFIG_POWER3 is not set # CONFIG_POWER4 is not set # CONFIG_8xx is not set +# CONFIG_E500 is not set +CONFIG_BOOKE=y CONFIG_PTE_64BIT=y # CONFIG_MATH_EMULATION is not set # CONFIG_CPU_FREQ is not set @@ -66,9 +72,7 @@ CONFIG_4xx=y CONFIG_OCOTEA=y CONFIG_440GX=y CONFIG_440A=y -CONFIG_BOOKE=y CONFIG_IBM_OCP=y -CONFIG_PPC_OCP=y CONFIG_IBM_EMAC4=y # CONFIG_PM is not set CONFIG_NOT_COHERENT_CACHE=y @@ -106,6 +110,8 @@ CONFIG_HIGHMEM_START=0xfe000000 CONFIG_LOWMEM_SIZE=0x30000000 CONFIG_KERNEL_START=0xc0000000 CONFIG_TASK_SIZE=0x80000000 +CONFIG_CONSISTENT_START=0xff100000 +CONFIG_CONSISTENT_SIZE=0x00200000 CONFIG_BOOT_LOAD=0x01000000 # @@ -115,6 +121,7 @@ CONFIG_BOOT_LOAD=0x01000000 # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_DEBUG_DRIVER is not set # @@ -141,7 +148,7 @@ CONFIG_BOOT_LOAD=0x01000000 # CONFIG_BLK_DEV_UMEM is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set +# CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_LBD is not set @@ -163,7 +170,6 @@ CONFIG_BOOT_LOAD=0x01000000 # # Fusion MPT device support # -# CONFIG_FUSION is not set # # IEEE 1394 (FireWire) support @@ -212,8 +218,6 @@ CONFIG_IP_PNP_BOOTP=y # # CONFIG_IP_VS is not set # CONFIG_IPV6 is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set @@ -232,7 +236,9 @@ CONFIG_NETFILTER=y # # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set @@ -248,21 +254,27 @@ CONFIG_NETFILTER=y # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set +# CONFIG_NET_CLS_ROUTE is not set # # Network testing # # CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # # ARCnet devices # # CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set # # Ethernet (10 or 100Mbit) @@ -279,6 +291,12 @@ CONFIG_NET_ETHERNET=y # # CONFIG_NET_TULIP is not set # CONFIG_HP100 is not set +CONFIG_IBM_EMAC=y +# CONFIG_IBM_EMAC_ERRMSG is not set +CONFIG_IBM_EMAC_RXB=128 +CONFIG_IBM_EMAC_TXB=128 +CONFIG_IBM_EMAC_FGAP=8 +CONFIG_IBM_EMAC_SKBRES=0 # CONFIG_NET_PCI is not set # @@ -291,7 +309,6 @@ CONFIG_NET_ETHERNET=y # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set -# CONFIG_SIS190 is not set # CONFIG_SK98LIN is not set # CONFIG_TIGON3 is not set @@ -299,51 +316,28 @@ CONFIG_NET_ETHERNET=y # Ethernet (10000 Mbit) # # CONFIG_IXGB is not set -CONFIG_IBM_EMAC=y -# CONFIG_IBM_EMAC_ERRMSG is not set -CONFIG_IBM_EMAC_RXB=128 -CONFIG_IBM_EMAC_TXB=128 -CONFIG_IBM_EMAC_FGAP=8 -CONFIG_IBM_EMAC_SKBRES=0 -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set +# CONFIG_S2IO is not set # # Token Ring devices # # CONFIG_TR is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set # -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set - -# -# IrDA (infrared) support +# Wireless LAN (non-hamradio) # -# CONFIG_IRDA is not set +# CONFIG_NET_RADIO is not set # -# Bluetooth support +# Wan interfaces # -# CONFIG_BT is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem @@ -515,6 +509,7 @@ CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set # CONFIG_TMPFS is not set @@ -555,7 +550,6 @@ CONFIG_SUNRPC=y # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # @@ -573,6 +567,12 @@ CONFIG_MSDOS_PARTITION=y # Library routines # CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set + +# +# Profiling support +# +# CONFIG_PROFILING is not set # # Kernel hacking @@ -587,7 +587,7 @@ CONFIG_DEBUG_KERNEL=y CONFIG_BDI_SWITCH=y CONFIG_DEBUG_INFO=y # CONFIG_SERIAL_TEXT_DEBUG is not set -CONFIG_OCP=y +CONFIG_PPC_OCP=y # # Security options diff --git a/arch/ppc/kernel/head_44x.S b/arch/ppc/kernel/head_44x.S index f38298cbba86..6c7a98471565 100644 --- a/arch/ppc/kernel/head_44x.S +++ b/arch/ppc/kernel/head_44x.S @@ -177,11 +177,11 @@ skpinv: addi r4,r4,1 /* Increment */ rfi /* If necessary, invalidate original entry we used */ -3: cmpwi r23,62 +3: cmpwi r23,63 beq 4f li r6,0 tlbwe r6,r23,PPC44x_TLB_PAGEID - sync + isync 4: #ifdef CONFIG_SERIAL_TEXT_DEBUG @@ -680,7 +680,7 @@ interrupt_base: mfspr r4,SPRN_ESR /* Grab the ESR and save it */ stw r4,_ESR(r11) addi r3,r1,STACK_FRAME_OVERHEAD - EXC_XFER_EE(0x700, ProgramCheckException) + EXC_XFER_STD(0x700, ProgramCheckException) /* Floating Point Unavailable Interrupt */ EXCEPTION(0x2010, FloatingPointUnavailable, UnknownException, EXC_XFER_EE) diff --git a/arch/ppc/kernel/head_4xx.S b/arch/ppc/kernel/head_4xx.S index 54de9b5bb858..5a8933688fbf 100644 --- a/arch/ppc/kernel/head_4xx.S +++ b/arch/ppc/kernel/head_4xx.S @@ -451,7 +451,7 @@ label: mfspr r4,SPRN_ESR /* Grab the ESR and save it */ stw r4,_ESR(r11) addi r3,r1,STACK_FRAME_OVERHEAD - EXC_XFER_EE(0x700, ProgramCheckException) + EXC_XFER_STD(0x700, ProgramCheckException) EXCEPTION(0x0800, Trap_08, UnknownException, EXC_XFER_EE) EXCEPTION(0x0900, Trap_09, UnknownException, EXC_XFER_EE) diff --git a/arch/ppc/platforms/lopec_setup.c b/arch/ppc/platforms/lopec_setup.c index d675b76a9838..8e98f260759b 100644 --- a/arch/ppc/platforms/lopec_setup.c +++ b/arch/ppc/platforms/lopec_setup.c @@ -192,21 +192,8 @@ lopec_init_IRQ(void) OpenPIC_InitSenses = lopec_openpic_initsenses; OpenPIC_NumInitSenses = sizeof(lopec_openpic_initsenses); - /* - * We need to tell openpic_set_sources where things actually are. - * mpc10x_common will setup OpenPIC_Addr at ioremap(EUMB phys base + - * EPIC offset (0x40000)); The EPIC IRQ Register Address Map - - * Interrupt Source Configuration Registers gives these numbers - * as offsets starting at 0x50200, we need to adjust occordinly. - */ - /* Map serial interrupts 0-15 */ - openpic_set_sources(0, 16, OpenPIC_Addr + 0x10200); - /* Skip reserved space and map i2c and DMA Ch[01] */ - openpic_set_sources(16, 3, OpenPIC_Addr + 0x11020); - /* Skip reserved space and map Message Unit Interrupt (I2O) */ - openpic_set_sources(19, 1, OpenPIC_Addr + 0x110C0); - - openpic_init(NUM_8259_INTERRUPTS); + mpc10x_set_openpic(); + /* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */ openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", &i8259_irq); diff --git a/arch/ppc/platforms/powerpmc250.c b/arch/ppc/platforms/powerpmc250.c index 39677320c025..0abe15159e6c 100644 --- a/arch/ppc/platforms/powerpmc250.c +++ b/arch/ppc/platforms/powerpmc250.c @@ -197,7 +197,7 @@ powerpmc250_init_IRQ(void) OpenPIC_InitSenses = powerpmc250_openpic_initsenses; OpenPIC_NumInitSenses = sizeof(powerpmc250_openpic_initsenses); - openpic_init(1, 0, 0, -1); + mpc10x_set_openpic(); } /* diff --git a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c index ab682fa5d773..fdcbcf24004b 100644 --- a/arch/ppc/platforms/sandpoint.c +++ b/arch/ppc/platforms/sandpoint.c @@ -433,17 +433,7 @@ sandpoint_init_IRQ(void) OpenPIC_InitSenses = sandpoint_openpic_initsenses; OpenPIC_NumInitSenses = sizeof(sandpoint_openpic_initsenses); - /* - * We need to tell openpic_set_sources where things actually are. - * mpc10x_common will setup OpenPIC_Addr at ioremap(EUMB phys base + - * EPIC offset (0x40000)); The EPIC IRQ Register Address Map - - * Interrupt Source Configuration Registers gives these numbers - * as offsets starting at 0x50200, we need to adjust occordinly. - */ - /* Map serial interrupts 0-15 */ - openpic_set_sources(0, 16, OpenPIC_Addr + 0x10200); - - openpic_init(NUM_8259_INTERRUPTS); + mpc10x_set_openpic(); openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", i8259_irq); diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile index 426b3c001f64..313fe208e734 100644 --- a/arch/ppc/syslib/Makefile +++ b/arch/ppc/syslib/Makefile @@ -48,7 +48,7 @@ obj-$(CONFIG_EV64260) += gt64260_common.o gt64260_pic.o \ obj-$(CONFIG_GEMINI) += open_pic.o indirect_pci.o obj-$(CONFIG_K2) += i8259.o indirect_pci.o todc_time.o \ pci_auto.o -obj-$(CONFIG_LOPEC) += pci_auto.o open_pic.o i8259.o todc_time.o +obj-$(CONFIG_LOPEC) += i8259.o pci_auto.o todc_time.o obj-$(CONFIG_MCPN765) += todc_time.o indirect_pci.o pci_auto.o \ open_pic.o i8259.o hawk_common.o obj-$(CONFIG_MENF1) += todc_time.o i8259.o mpc10x_common.o \ @@ -58,14 +58,14 @@ obj-$(CONFIG_MVME5100) += open_pic.o todc_time.o indirect_pci.o \ obj-$(CONFIG_OCOTEA) += indirect_pci.o pci_auto.o todc_time.o obj-$(CONFIG_PAL4) += cpc700_pic.o obj-$(CONFIG_PCORE) += todc_time.o i8259.o pci_auto.o -obj-$(CONFIG_POWERPMC250) += open_pic.o pci_auto.o +obj-$(CONFIG_POWERPMC250) += pci_auto.o obj-$(CONFIG_PPLUS) += hawk_common.o open_pic.o i8259.o \ indirect_pci.o todc_time.o pci_auto.o obj-$(CONFIG_PRPMC750) += open_pic.o indirect_pci.o pci_auto.o \ hawk_common.o obj-$(CONFIG_HARRIER) += harrier.o obj-$(CONFIG_PRPMC800) += open_pic.o indirect_pci.o pci_auto.o -obj-$(CONFIG_SANDPOINT) += i8259.o open_pic.o pci_auto.o todc_time.o +obj-$(CONFIG_SANDPOINT) += i8259.o pci_auto.o todc_time.o obj-$(CONFIG_SBC82xx) += todc_time.o obj-$(CONFIG_SPRUCE) += cpc700_pic.o indirect_pci.o pci_auto.o \ todc_time.o @@ -79,6 +79,7 @@ obj-$(CONFIG_SERIAL_TEXT_DEBUG) += gen550_dbg.o endif obj-$(CONFIG_BOOTX_TEXT) += btext.o obj-$(CONFIG_MPC10X_BRIDGE) += mpc10x_common.o indirect_pci.o +obj-$(CONFIG_MPC10X_OPENPIC) += open_pic.o obj-$(CONFIG_40x) += dcr.o obj-$(CONFIG_BOOKE) += dcr.o obj-$(CONFIG_85xx) += open_pic.o ppc85xx_common.o ppc85xx_setup.o diff --git a/arch/ppc/syslib/ibm440gp_common.c b/arch/ppc/syslib/ibm440gp_common.c index d1ce1435f50a..0d6be2d6dd67 100644 --- a/arch/ppc/syslib/ibm440gp_common.c +++ b/arch/ppc/syslib/ibm440gp_common.c @@ -30,7 +30,8 @@ void __init ibm440gp_get_clocks(struct ibm44x_clocks* p, { u32 cpc0_sys0 = mfdcr(DCRN_CPC0_SYS0); u32 cpc0_cr0 = mfdcr(DCRN_CPC0_CR0); - u32 opdv, epdv; + u32 opdv = ((cpc0_sys0 >> 10) & 0x3) + 1; + u32 epdv = ((cpc0_sys0 >> 8) & 0x3) + 1; if (cpc0_sys0 & 0x2){ /* Bypass system PLL */ @@ -60,9 +61,6 @@ void __init ibm440gp_get_clocks(struct ibm44x_clocks* p, p->plb = vco / fwdvb; } - opdv = ((cpc0_sys0 >> 10) & 0x3) + 1; - epdv = ((cpc0_sys0 >> 8) & 0x3) + 1; - p->opb = p->plb / opdv; p->ebc = p->opb / epdv; diff --git a/arch/ppc/syslib/mpc10x_common.c b/arch/ppc/syslib/mpc10x_common.c index 80c71501bb5e..153c811b13d2 100644 --- a/arch/ppc/syslib/mpc10x_common.c +++ b/arch/ppc/syslib/mpc10x_common.c @@ -30,7 +30,60 @@ #include <asm/pci-bridge.h> #include <asm/open_pic.h> #include <asm/mpc10x.h> +#include <asm/ocp.h> + +/* The OCP structure is fixed by code below, before OCP initialises. + paddr depends on where the board places the EUMB. + - fixed in mpc10x_bridge_init(). + irq depends on two things: + > does the board use the EPIC at all? (PCORE does not). + > is the EPIC in serial or parallel mode? + - fixed in mpc10x_set_openpic(). +*/ + +#ifdef CONFIG_MPC10X_OPENPIC +#ifdef CONFIG_EPIC_SERIAL_MODE +#define EPIC_IRQ_BASE 16 +#else +#define EPIC_IRQ_BASE 5 +#endif +#define MPC10X_I2C_IRQ (EPIC_IRQ_BASE + NUM_8259_INTERRUPTS) +#define MPC10X_DMA0_IRQ (EPIC_IRQ_BASE + 1 + NUM_8259_INTERRUPTS) +#define MPC10X_DMA1_IRQ (EPIC_IRQ_BASE + 2 + NUM_8259_INTERRUPTS) +#else +#define MPC10X_I2C_IRQ OCP_IRQ_NA +#define MPC10X_DMA0_IRQ OCP_IRQ_NA +#define MPC10X_DMA1_IRQ OCP_IRQ_NA +#endif + +struct ocp_def core_ocp[] = { + { .vendor = OCP_VENDOR_INVALID + } +}; + +static struct ocp_fs_i2c_data mpc10x_i2c_data = { + .flags = 0 +}; +static struct ocp_def mpc10x_i2c_ocp = { + .vendor = OCP_VENDOR_MOTOROLA, + .function = OCP_FUNC_IIC, + .index = 0, + .irq = MPC10X_I2C_IRQ, + .additions = &mpc10x_i2c_data +}; + +static struct ocp_def mpc10x_dma_ocp[2] = { +{ .vendor = OCP_VENDOR_MOTOROLA, + .function = OCP_FUNC_DMA, + .index = 0, + .irq = MPC10X_DMA0_IRQ +}, +{ .vendor = OCP_VENDOR_MOTOROLA, + .function = OCP_FUNC_DMA, + .index = 1, + .irq = MPC10X_DMA1_IRQ } +}; /* Set resources to match bridge memory map */ void __init @@ -231,11 +284,21 @@ mpc10x_bridge_init(struct pci_controller *hose, PCI_DEVFN(0,0), MPC10X_CFG_EUMBBAR, phys_eumb_base); - - /* Map EPIC register part of EUMB into vitual memory */ +#ifdef CONFIG_MPC10X_OPENPIC + /* Map EPIC register part of EUMB into vitual memory - PCORE + uses an i8259 instead of EPIC. */ OpenPIC_Addr = ioremap(phys_eumb_base + MPC10X_EUMB_EPIC_OFFSET, MPC10X_EUMB_EPIC_SIZE); +#endif + mpc10x_i2c_ocp.paddr = phys_eumb_base + MPC10X_EUMB_I2C_OFFSET; + ocp_add_one_device(&mpc10x_i2c_ocp); + mpc10x_dma_ocp[0].paddr = phys_eumb_base + + MPC10X_EUMB_DMA_OFFSET + 0x100; + ocp_add_one_device(&mpc10x_dma_ocp[0]); + mpc10x_dma_ocp[1].paddr = phys_eumb_base + + MPC10X_EUMB_DMA_OFFSET + 0x200; + ocp_add_one_device(&mpc10x_dma_ocp[1]); } #ifdef CONFIG_MPC10X_STORE_GATHERING @@ -397,3 +460,17 @@ mpc10x_disable_store_gathering(struct pci_controller *hose) return 0; } + +#ifdef CONFIG_MPC10X_OPENPIC +void __init mpc10x_set_openpic(void) +{ + /* Map external IRQs */ + openpic_set_sources(0, EPIC_IRQ_BASE, OpenPIC_Addr + 0x10200); + /* Skip reserved space and map i2c and DMA Ch[01] */ + openpic_set_sources(EPIC_IRQ_BASE, 3, OpenPIC_Addr + 0x11020); + /* Skip reserved space and map Message Unit Interrupt (I2O) */ + openpic_set_sources(EPIC_IRQ_BASE + 3, 1, OpenPIC_Addr + 0x110C0); + + openpic_init(NUM_8259_INTERRUPTS); +} +#endif diff --git a/arch/ppc/syslib/ppc4xx_pic.c b/arch/ppc/syslib/ppc4xx_pic.c index 22c9010e5e1b..e6da0a20d8ec 100644 --- a/arch/ppc/syslib/ppc4xx_pic.c +++ b/arch/ppc/syslib/ppc4xx_pic.c @@ -234,6 +234,9 @@ ppc4xx_uic_disable_and_ack(unsigned int irq) case 1: mtdcr(DCRN_UIC_ER(UIC1), ppc_cached_irq_mask[word]); mtdcr(DCRN_UIC_SR(UIC1), (1 << (31 - bit))); +#if (NR_UICS == 2) + mtdcr(DCRN_UIC_SR(UIC0), (1 << (31 - UIC0_UIC1NC))); +#endif #if (NR_UICS > 2) mtdcr(DCRN_UIC_SR(UICB), UICB_UIC1NC); #endif @@ -285,6 +288,9 @@ ppc4xx_uic_end(unsigned int irq) break; case 1: mtdcr(DCRN_UIC_SR(UIC1), 1 << (31 - bit)); +#if (NR_UICS == 2) + mtdcr(DCRN_UIC_SR(UIC0), (1 << (31 - UIC0_UIC1NC))); +#endif #if (NR_UICS > 2) mtdcr(DCRN_UIC_SR(UICB), UICB_UIC1NC); #endif @@ -423,7 +429,7 @@ ppc4xx_extpic_init(void) bit, sense); #endif ppc_cached_sense_mask[word] |= - (sense & IRQ_SENSE_MASK) << (31 - bit); + (~sense & IRQ_SENSE_MASK) << (31 - bit); ppc_cached_pol_mask[word] |= ((sense & IRQ_POLARITY_MASK) >> 1) << (31 - bit); switch (word) { diff --git a/arch/ppc64/kernel/ItLpQueue.c b/arch/ppc64/kernel/ItLpQueue.c index 71ce7d6b2f0a..6f21bde213b9 100644 --- a/arch/ppc64/kernel/ItLpQueue.c +++ b/arch/ppc64/kernel/ItLpQueue.c @@ -161,7 +161,7 @@ unsigned ItLpQueue_process( struct ItLpQueue * lpQueue, struct pt_regs *regs ) mb(); clear_inUse( lpQueue ); - get_paca()->lpEvent_count += numIntsProcessed; + get_paca()->lpevent_count += numIntsProcessed; return numIntsProcessed; } diff --git a/arch/ppc64/kernel/asm-offsets.c b/arch/ppc64/kernel/asm-offsets.c index 27d694d6efb3..a3b589969cd6 100644 --- a/arch/ppc64/kernel/asm-offsets.c +++ b/arch/ppc64/kernel/asm-offsets.c @@ -79,33 +79,29 @@ int main(void) /* paca */ DEFINE(PACA_SIZE, sizeof(struct paca_struct)); - DEFINE(PACAPACAINDEX, offsetof(struct paca_struct, xPacaIndex)); - DEFINE(PACAPROCSTART, offsetof(struct paca_struct, xProcStart)); - DEFINE(PACAKSAVE, offsetof(struct paca_struct, xKsave)); - DEFINE(PACACURRENT, offsetof(struct paca_struct, xCurrent)); - DEFINE(PACASAVEDMSR, offsetof(struct paca_struct, xSavedMsr)); - DEFINE(PACASTABREAL, offsetof(struct paca_struct, xStab_data.real)); - DEFINE(PACASTABVIRT, offsetof(struct paca_struct, xStab_data.virt)); - DEFINE(PACASTABRR, offsetof(struct paca_struct, xStab_data.next_round_robin)); - DEFINE(PACAR1, offsetof(struct paca_struct, xR1)); - DEFINE(PACALPQUEUE, offsetof(struct paca_struct, lpQueuePtr)); - DEFINE(PACATOC, offsetof(struct paca_struct, xTOC)); - DEFINE(PACAEXCSP, offsetof(struct paca_struct, exception_sp)); - DEFINE(PACAPROCENABLED, offsetof(struct paca_struct, xProcEnabled)); + DEFINE(PACAPACAINDEX, offsetof(struct paca_struct, paca_index)); + DEFINE(PACAPROCSTART, offsetof(struct paca_struct, cpu_start)); + DEFINE(PACAKSAVE, offsetof(struct paca_struct, kstack)); + DEFINE(PACACURRENT, offsetof(struct paca_struct, __current)); + DEFINE(PACASAVEDMSR, offsetof(struct paca_struct, saved_msr)); + DEFINE(PACASTABREAL, offsetof(struct paca_struct, stab_real)); + DEFINE(PACASTABVIRT, offsetof(struct paca_struct, stab_addr)); + DEFINE(PACASTABRR, offsetof(struct paca_struct, stab_next_rr)); + DEFINE(PACAR1, offsetof(struct paca_struct, saved_r1)); + DEFINE(PACATOC, offsetof(struct paca_struct, kernel_toc)); + DEFINE(PACAPROCENABLED, offsetof(struct paca_struct, proc_enabled)); DEFINE(PACADEFAULTDECR, offsetof(struct paca_struct, default_decr)); DEFINE(PACAPROFENABLED, offsetof(struct paca_struct, prof_enabled)); DEFINE(PACAPROFLEN, offsetof(struct paca_struct, prof_len)); DEFINE(PACAPROFSHIFT, offsetof(struct paca_struct, prof_shift)); DEFINE(PACAPROFBUFFER, offsetof(struct paca_struct, prof_buffer)); DEFINE(PACAPROFSTEXT, offsetof(struct paca_struct, prof_stext)); - DEFINE(PACALPPACA, offsetof(struct paca_struct, xLpPaca)); - DEFINE(LPPACA, offsetof(struct paca_struct, xLpPaca)); - DEFINE(PACAREGSAV, offsetof(struct paca_struct, xRegSav)); DEFINE(PACA_EXGEN, offsetof(struct paca_struct, exgen)); DEFINE(PACA_EXMC, offsetof(struct paca_struct, exmc)); DEFINE(PACA_EXSLB, offsetof(struct paca_struct, exslb)); DEFINE(PACA_EXDSI, offsetof(struct paca_struct, exdsi)); - DEFINE(PACAGUARD, offsetof(struct paca_struct, guard)); + DEFINE(PACAEMERGSP, offsetof(struct paca_struct, emergency_sp)); + DEFINE(PACALPPACA, offsetof(struct paca_struct, lppaca)); DEFINE(LPPACASRR0, offsetof(struct ItLpPaca, xSavedSrr0)); DEFINE(LPPACASRR1, offsetof(struct ItLpPaca, xSavedSrr1)); DEFINE(LPPACAANYINT, offsetof(struct ItLpPaca, xIntDword.xAnyInt)); diff --git a/arch/ppc64/kernel/chrp_setup.c b/arch/ppc64/kernel/chrp_setup.c index 123c889aa39a..e57717e194a5 100644 --- a/arch/ppc64/kernel/chrp_setup.c +++ b/arch/ppc64/kernel/chrp_setup.c @@ -189,7 +189,7 @@ chrp_init2(void) */ void __init fwnmi_init(void) { - long ret; + int ret; int ibm_nmi_register = rtas_token("ibm,nmi-register"); if (ibm_nmi_register == RTAS_UNKNOWN_SERVICE) return; diff --git a/arch/ppc64/kernel/eeh.c b/arch/ppc64/kernel/eeh.c index 6f2d189d44c9..03ee03340dd4 100644 --- a/arch/ppc64/kernel/eeh.c +++ b/arch/ppc64/kernel/eeh.c @@ -31,6 +31,7 @@ #include <asm/io.h> #include <asm/machdep.h> #include <asm/pgtable.h> +#include <asm/rtas.h> #include "pci.h" #undef DEBUG @@ -365,7 +366,7 @@ unsigned long eeh_check_failure(void *token, unsigned long val) unsigned long addr; struct pci_dev *dev; struct device_node *dn; - unsigned long ret; + int ret; int rets[2]; static spinlock_t lock = SPIN_LOCK_UNLOCKED; /* dont want this on the stack */ @@ -419,7 +420,7 @@ unsigned long eeh_check_failure(void *token, unsigned long val) BUID_LO(dn->phb->buid)); if (ret == 0 && rets[1] == 1 && rets[0] >= 2) { - unsigned long slot_err_ret; + int slot_err_ret; spin_lock_irqsave(&lock, flags); memset(slot_err_buf, 0, RTAS_ERROR_LOG_MAX); @@ -470,7 +471,7 @@ struct eeh_early_enable_info { static void *early_enable_eeh(struct device_node *dn, void *data) { struct eeh_early_enable_info *info = data; - long ret; + int ret; char *status = get_property(dn, "status", 0); u32 *class_code = (u32 *)get_property(dn, "class-code", 0); u32 *vendor_id = (u32 *)get_property(dn, "vendor-id", 0); diff --git a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S index 115138551d81..375a29d67c22 100644 --- a/arch/ppc64/kernel/head.S +++ b/arch/ppc64/kernel/head.S @@ -238,8 +238,8 @@ exception_marker: #define EXCEPTION_PROLOG_ISERIES_2 \ mfmsr r10; \ - ld r11,LPPACA+LPPACASRR0(r13); \ - ld r12,LPPACA+LPPACASRR1(r13); \ + ld r11,PACALPPACA+LPPACASRR0(r13); \ + ld r12,PACALPPACA+LPPACASRR1(r13); \ ori r10,r10,MSR_RI; \ mtmsrd r10,1 @@ -327,10 +327,10 @@ label##_Iseries_prof_ret: \ EXCEPTION_PROLOG_ISERIES_2; \ b label##_common; \ label##_Iseries_profile: \ - ld r12,LPPACA+LPPACASRR1(r13); \ + ld r12,PACALPPACA+LPPACASRR1(r13); \ andi. r12,r12,MSR_PR; /* Test if in kernel */ \ bne label##_Iseries_prof_ret; \ - ld r11,LPPACA+LPPACASRR0(r13); \ + ld r11,PACALPPACA+LPPACASRR0(r13); \ ld r12,PACAPROFSTEXT(r13); /* _stext */ \ subf r11,r12,r11; /* offset into kernel */ \ lwz r12,PACAPROFSHIFT(r13); \ @@ -690,8 +690,8 @@ Decrementer_Iseries_masked: .globl HardwareInterrupt_Iseries_masked HardwareInterrupt_Iseries_masked: mtcrf 0x80,r9 /* Restore regs */ - ld r11,LPPACA+LPPACASRR0(r13) - ld r12,LPPACA+LPPACASRR1(r13) + ld r11,PACALPPACA+LPPACASRR0(r13) + ld r12,PACALPPACA+LPPACASRR1(r13) mtspr SRR0,r11 mtspr SRR1,r12 ld r9,PACA_EXGEN+EX_R9(r13) @@ -776,7 +776,8 @@ MachineCheck_common: * save the registers there, and call kernel_bad_stack(), which panics. */ bad_stack: - addi r1,r13,8192-64-INT_FRAME_SIZE + ld r1,PACAEMERGSP(r13) + subi r1,r1,64+INT_FRAME_SIZE std r9,_CCR(r1) std r10,GPR1(r1) std r11,_NIP(r1) @@ -1319,9 +1320,7 @@ _GLOBAL(pseries_secondary_smp_init) sync /* Create a temp kernel stack for use before relocation is on. */ - mr r1,r13 - addi r1,r1,PACAGUARD - addi r1,r1,0x1000 + ld r1,PACAEMERGSP(r13) subi r1,r1,STACK_FRAME_OVERHEAD cmpwi 0,r23,0 @@ -1787,9 +1786,7 @@ _GLOBAL(pmac_secondary_start) mtspr SPRG3,r13 /* Save vaddr of paca in SPRG3 */ /* Create a temp kernel stack for use before relocation is on. */ - mr r1,r13 - addi r1,r1,PACAGUARD - addi r1,r1,0x1000 + ld r1,PACAEMERGSP(r13) subi r1,r1,STACK_FRAME_OVERHEAD b .__secondary_start @@ -1813,12 +1810,7 @@ _GLOBAL(__secondary_start) HMT_MEDIUM /* Set thread priority to MEDIUM */ - /* set up the TOC (virtual address) */ - LOADADDR(r2,__toc_start) - addi r2,r2,0x4000 - addi r2,r2,0x4000 - - std r2,PACATOC(r13) + ld r2,PACATOC(r13) li r6,0 stb r6,PACAPROCENABLED(r13) @@ -2060,11 +2052,6 @@ _STATIC(start_here_common) li r0,0 stdu r0,-STACK_FRAME_OVERHEAD(r1) - /* set up the TOC */ - LOADADDR(r2,__toc_start) - addi r2,r2,0x4000 - addi r2,r2,0x4000 - /* Apply the CPUs-specific fixups (nop out sections not relevant * to this CPU */ @@ -2093,7 +2080,8 @@ _STATIC(start_here_common) LOADADDR(r4,init_task) std r4,PACACURRENT(r13) - std r2,PACATOC(r13) + /* Load the TOC */ + ld r2,PACATOC(r13) std r1,PACAKSAVE(r13) /* Restore the parms passed in from the bootloader. */ diff --git a/arch/ppc64/kernel/iSeries_proc.c b/arch/ppc64/kernel/iSeries_proc.c index 3ba18deaf734..1babbb6b9b14 100644 --- a/arch/ppc64/kernel/iSeries_proc.c +++ b/arch/ppc64/kernel/iSeries_proc.c @@ -68,7 +68,7 @@ static int proc_lpevents_show(struct seq_file *m, void *v) seq_printf(m, "\n events processed by processor:\n"); for_each_online_cpu(i) - seq_printf(m, " CPU%02d %10u\n", i, paca[i].lpEvent_count); + seq_printf(m, " CPU%02d %10u\n", i, paca[i].lpevent_count); return 0; } diff --git a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c index a3549809aff4..e12b50f8c98c 100644 --- a/arch/ppc64/kernel/iSeries_setup.c +++ b/arch/ppc64/kernel/iSeries_setup.c @@ -571,7 +571,7 @@ static void __init build_iSeries_Memory_Map(void) static void __init setup_iSeries_cache_sizes(void) { unsigned int i, n; - unsigned int procIx = get_paca()->xLpPaca.xDynHvPhysicalProcIndex; + unsigned int procIx = get_paca()->lppaca.xDynHvPhysicalProcIndex; systemcfg->iCacheL1Size = xIoHriProcessorVpd[procIx].xInstCacheSize * 1024; @@ -665,7 +665,7 @@ extern unsigned long ppc_tb_freq; void __init iSeries_setup_arch(void) { void *eventStack; - unsigned procIx = get_paca()->xLpPaca.xDynHvPhysicalProcIndex; + unsigned procIx = get_paca()->lppaca.xDynHvPhysicalProcIndex; /* Add an eye catcher and the systemcfg layout version number */ strcpy(systemcfg->eye_catcher, "SYSTEMCFG:PPC64"); diff --git a/arch/ppc64/kernel/idle.c b/arch/ppc64/kernel/idle.c index a9a501df397c..bc7dbbd2d72e 100644 --- a/arch/ppc64/kernel/idle.c +++ b/arch/ppc64/kernel/idle.c @@ -76,7 +76,7 @@ static void yield_shared_processor(void) * The decrementer stops during the yield. Force a fake decrementer * here and let the timer_interrupt code sort out the actual time. */ - get_paca()->xLpPaca.xIntDword.xFields.xDecrInt = 1; + get_paca()->lppaca.xIntDword.xFields.xDecrInt = 1; process_iSeries_events(); } @@ -98,8 +98,8 @@ int iSeries_idle(void) lpaca = get_paca(); for (;;) { - if (lpaca->xLpPaca.xSharedProc) { - if (ItLpQueue_isLpIntPending(lpaca->lpQueuePtr)) + if (lpaca->lppaca.xSharedProc) { + if (ItLpQueue_isLpIntPending(lpaca->lpqueue_ptr)) process_iSeries_events(); if (!need_resched()) yield_shared_processor(); @@ -111,7 +111,7 @@ int iSeries_idle(void) while (!need_resched()) { HMT_medium(); - if (ItLpQueue_isLpIntPending(lpaca->lpQueuePtr)) + if (ItLpQueue_isLpIntPending(lpaca->lpqueue_ptr)) process_iSeries_events(); HMT_low(); } @@ -175,7 +175,7 @@ int dedicated_idle(void) while (1) { /* Indicate to the HV that we are idle. Now would be * a good time to find other work to dispatch. */ - lpaca->xLpPaca.xIdle = 1; + lpaca->lppaca.xIdle = 1; oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED); if (!oldval) { @@ -201,7 +201,7 @@ int dedicated_idle(void) * ST mode. */ if((naca->smt_state == SMT_DYNAMIC) && - (!(ppaca->xLpPaca.xIdle))) { + (!(ppaca->lppaca.xIdle))) { /* Indicate we are no longer polling for * work, and then clear need_resched. If * need_resched was 1, set it back to 1 @@ -216,7 +216,6 @@ int dedicated_idle(void) /* DRENG: Go HMT_medium here ? */ local_irq_disable(); - lpaca->yielded = 1; /* SMT dynamic mode. Cede will result * in this thread going dormant, if the @@ -227,8 +226,6 @@ int dedicated_idle(void) * enables external interrupts. */ cede_processor(); - - lpaca->yielded = 0; } else { /* Give the HV an opportunity at the * processor, since we are not doing @@ -242,7 +239,7 @@ int dedicated_idle(void) } HMT_medium(); - lpaca->xLpPaca.xIdle = 0; + lpaca->lppaca.xIdle = 0; schedule(); if (cpu_is_offline(smp_processor_id()) && system_state == SYSTEM_RUNNING) @@ -262,11 +259,10 @@ int shared_idle(void) /* Indicate to the HV that we are idle. Now would be * a good time to find other work to dispatch. */ - lpaca->xLpPaca.xIdle = 1; + lpaca->lppaca.xIdle = 1; if (!need_resched()) { local_irq_disable(); - lpaca->yielded = 1; /* * Yield the processor to the hypervisor. We return if @@ -276,12 +272,10 @@ int shared_idle(void) * are enabled. */ cede_processor(); - - lpaca->yielded = 0; } HMT_medium(); - lpaca->xLpPaca.xIdle = 0; + lpaca->lppaca.xIdle = 0; schedule(); } @@ -313,7 +307,7 @@ int idle_setup(void) #else if (systemcfg->platform & PLATFORM_PSERIES) { if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { - if(get_paca()->xLpPaca.xSharedProc) { + if (get_paca()->lppaca.xSharedProc) { printk("idle = shared_idle\n"); idle_loop = shared_idle; } else { diff --git a/arch/ppc64/kernel/irq.c b/arch/ppc64/kernel/irq.c index a2db269c9d4d..2f777d55f3fb 100644 --- a/arch/ppc64/kernel/irq.c +++ b/arch/ppc64/kernel/irq.c @@ -68,8 +68,8 @@ irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = { }; int __irq_offset_value; -int ppc_spurious_interrupts = 0; -unsigned long lpEvent_count = 0; +int ppc_spurious_interrupts; +unsigned long lpevent_count; int setup_irq(unsigned int irq, struct irqaction * new) @@ -613,19 +613,19 @@ int do_IRQ(struct pt_regs *regs) lpaca = get_paca(); #ifdef CONFIG_SMP - if (lpaca->xLpPaca.xIntDword.xFields.xIpiCnt) { - lpaca->xLpPaca.xIntDword.xFields.xIpiCnt = 0; + if (lpaca->lppaca.xIntDword.xFields.xIpiCnt) { + lpaca->lppaca.xIntDword.xFields.xIpiCnt = 0; iSeries_smp_message_recv(regs); } #endif /* CONFIG_SMP */ - lpq = lpaca->lpQueuePtr; + lpq = lpaca->lpqueue_ptr; if (lpq && ItLpQueue_isLpIntPending(lpq)) - lpEvent_count += ItLpQueue_process(lpq, regs); + lpevent_count += ItLpQueue_process(lpq, regs); irq_exit(); - if (lpaca->xLpPaca.xIntDword.xFields.xDecrInt) { - lpaca->xLpPaca.xIntDword.xFields.xDecrInt = 0; + if (lpaca->lppaca.xIntDword.xFields.xDecrInt) { + lpaca->lppaca.xIntDword.xFields.xDecrInt = 0; /* Signal a fake decrementer interrupt */ timer_interrupt(regs); } diff --git a/arch/ppc64/kernel/lparcfg.c b/arch/ppc64/kernel/lparcfg.c index 860f07e8c4e6..bb8d6abeb1fb 100644 --- a/arch/ppc64/kernel/lparcfg.c +++ b/arch/ppc64/kernel/lparcfg.c @@ -28,6 +28,7 @@ #include <asm/iSeries/ItLpPaca.h> #include <asm/hvcall.h> #include <asm/cputable.h> +#include <asm/rtas.h> #define MODULE_VERS "1.0" #define MODULE_NAME "lparcfg" @@ -133,7 +134,7 @@ static int lparcfg_data(unsigned char *buf, unsigned long size) } memset(buf, 0, size); - shared = (int)(lpaca->xLpPacaPtr->xSharedProc); + shared = (int)(lpaca->lppaca.xSharedProc); n += scnprintf(buf, LPARCFG_BUFF_SIZE - n, "serial_number=%c%c%c%c%c%c%c\n", e2a(xItExtVpdPanel.mfgID[2]), @@ -244,7 +245,7 @@ unsigned int get_splpar_potential_characteristics(void) /* return 0 for now. Underlying rtas functionality is not yet complete. 12/01/2003*/ return 0; #if 0 - long call_status; + int call_status; unsigned long ret[2]; char * buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL); diff --git a/arch/ppc64/kernel/pSeries_pci.c b/arch/ppc64/kernel/pSeries_pci.c index 3a88ae49a2a7..7312d6c35eaf 100644 --- a/arch/ppc64/kernel/pSeries_pci.c +++ b/arch/ppc64/kernel/pSeries_pci.c @@ -40,6 +40,7 @@ #include <asm/ppcdebug.h> #include <asm/naca.h> #include <asm/iommu.h> +#include <asm/rtas.h> #include "open_pic.h" #include "pci.h" diff --git a/arch/ppc64/kernel/pacaData.c b/arch/ppc64/kernel/pacaData.c index 2cf631bb82fe..29105376072e 100644 --- a/arch/ppc64/kernel/pacaData.c +++ b/arch/ppc64/kernel/pacaData.c @@ -16,12 +16,22 @@ #include <asm/ptrace.h> #include <asm/iSeries/ItLpPaca.h> +#include <asm/iSeries/ItLpQueue.h> #include <asm/naca.h> #include <asm/paca.h> struct naca_struct *naca; struct systemcfg *systemcfg; +/* This symbol is provided by the linker - let it fill in the paca + * field correctly */ +extern unsigned long __toc_start; + +/* Stack space used when we detect a bad kernel stack pointer, and + * early in SMP boots before relocation is enabled. + */ +char emergency_stack[PAGE_SIZE * NR_CPUS]; + /* The Paca is an array with one entry per processor. Each contains an * ItLpPaca, which contains the information shared between the * hypervisor and Linux. Each also contains an ItLpRegSave area which @@ -34,22 +44,19 @@ struct systemcfg *systemcfg; */ #define PACAINITDATA(number,start,lpq,asrr,asrv) \ { \ - .xLpPacaPtr = &paca[number].xLpPaca, \ - .xLpRegSavePtr = &paca[number].xRegSav, \ + .lppaca_ptr = &paca[number].lppaca, \ + .reg_save_ptr = &paca[number].reg_save, \ .lock_token = 0x8000, \ - .xPacaIndex = (number), /* Paca Index */ \ + .paca_index = (number), /* Paca Index */ \ + .lpqueue_ptr = (lpq), /* &xItLpQueue, */ \ .default_decr = 0x00ff0000, /* Initial Decr */ \ - .xStab_data = { \ - .real = (asrr), /* Real pointer to segment table */ \ - .virt = (asrv), /* Virt pointer to segment table */ \ - .next_round_robin = 1, \ - }, \ - .lpQueuePtr = (lpq), /* &xItLpQueue, */ \ - /* .xRtas = { \ - .lock = SPIN_LOCK_UNLOCKED \ - }, */ \ - .xProcStart = (start), /* Processor start */ \ - .xLpPaca = { \ + .kernel_toc = (unsigned long)(&__toc_start) + 0x8000UL, \ + .stab_real = (asrr), /* Real pointer to segment table */ \ + .stab_addr = (asrv), /* Virt pointer to segment table */ \ + .emergency_sp = &emergency_stack[((number)+1) * PAGE_SIZE], \ + .cpu_start = (start), /* Processor start */ \ + .stab_next_rr = 1, \ + .lppaca = { \ .xDesc = 0xd397d781, /* "LpPa" */ \ .xSize = sizeof(struct ItLpPaca), \ .xFPRegsInUse = 1, \ @@ -58,7 +65,7 @@ struct systemcfg *systemcfg; .xEndOfQuantum = 0xfffffffffffffffful, \ .xSLBCount = 64, \ }, \ - .xRegSav = { \ + .reg_save = { \ .xDesc = 0xd397d9e2, /* "LpRS" */ \ .xSize = sizeof(struct ItLpRegSave) \ }, \ diff --git a/arch/ppc64/kernel/pmac_smp.c b/arch/ppc64/kernel/pmac_smp.c index a96cbbb80dd2..a67e2a595c59 100644 --- a/arch/ppc64/kernel/pmac_smp.c +++ b/arch/ppc64/kernel/pmac_smp.c @@ -120,7 +120,7 @@ static void __init smp_core99_kick_cpu(int nr) /* Put some life in our friend */ pmac_call_feature(PMAC_FTR_RESET_CPU, NULL, nr, 0); - paca[nr].xProcStart = 1; + paca[nr].cpu_start = 1; /* FIXME: We wait a bit for the CPU to take the exception, I should * instead wait for the entry code to set something for me. Well, diff --git a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c index d9c8703572ba..a4318c378651 100644 --- a/arch/ppc64/kernel/prom.c +++ b/arch/ppc64/kernel/prom.c @@ -919,7 +919,7 @@ static void __init prom_hold_cpus(unsigned long mem) unsigned long secondary_hold = virt_to_abs(*PTRRELOC((unsigned long *)__secondary_hold)); struct systemcfg *_systemcfg = RELOC(systemcfg); - struct paca_struct *_xPaca = PTRRELOC(&paca[0]); + struct paca_struct *lpaca = PTRRELOC(&paca[0]); struct prom_t *_prom = PTRRELOC(&prom); #ifdef CONFIG_SMP struct naca_struct *_naca = RELOC(naca); @@ -937,7 +937,7 @@ static void __init prom_hold_cpus(unsigned long mem) continue; reg = -1; prom_getprop(node, "reg", ®, sizeof(reg)); - _xPaca[cpuid].xHwProcNum = reg; + lpaca[cpuid].hw_cpu_id = reg; #ifdef CONFIG_SMP cpu_set(cpuid, RELOC(cpu_available_map)); @@ -997,7 +997,7 @@ static void __init prom_hold_cpus(unsigned long mem) prom_debug("\ncpuid = 0x%x\n", cpuid); prom_debug("cpu hw idx = 0x%x\n", reg); - _xPaca[cpuid].xHwProcNum = reg; + lpaca[cpuid].hw_cpu_id = reg; /* Init the acknowledge var which will be reset by * the secondary cpu when it awakens from its OF @@ -1066,7 +1066,7 @@ next: cpuid++; if (cpuid >= NR_CPUS) continue; - _xPaca[cpuid].xHwProcNum = interrupt_server[i]; + lpaca[cpuid].hw_cpu_id = interrupt_server[i]; prom_printf("%x : preparing thread ... ", interrupt_server[i]); if (_naca->smt_state) { @@ -1664,7 +1664,7 @@ prom_init(unsigned long r3, unsigned long r4, unsigned long pp, unsigned long phys; u32 getprop_rval; struct systemcfg *_systemcfg; - struct paca_struct *_xPaca = PTRRELOC(&paca[0]); + struct paca_struct *lpaca = PTRRELOC(&paca[0]); struct prom_t *_prom = PTRRELOC(&prom); /* First zero the BSS -- use memset, some arches don't have @@ -1735,7 +1735,7 @@ prom_init(unsigned long r3, unsigned long r4, unsigned long pp, cpu_pkg = call_prom("instance-to-package", 1, 1, prom_cpu); prom_getprop(cpu_pkg, "reg", &getprop_rval, sizeof(getprop_rval)); _prom->cpu = getprop_rval; - _xPaca[0].xHwProcNum = _prom->cpu; + lpaca[0].hw_cpu_id = _prom->cpu; RELOC(boot_cpuid) = 0; diff --git a/arch/ppc64/kernel/ras.c b/arch/ppc64/kernel/ras.c index c21e797a3c6d..9ed9ab01dcab 100644 --- a/arch/ppc64/kernel/ras.c +++ b/arch/ppc64/kernel/ras.c @@ -124,7 +124,7 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct rtas_error_log log_entry; unsigned int size = sizeof(log_entry); - long status = 0xdeadbeef; + int status = 0xdeadbeef; spin_lock(&log_lock); @@ -138,10 +138,10 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs) spin_unlock(&log_lock); - udbg_printf("EPOW <0x%lx 0x%lx>\n", + udbg_printf("EPOW <0x%lx 0x%x>\n", *((unsigned long *)&log_entry), status); printk(KERN_WARNING - "EPOW <0x%lx 0x%lx>\n",*((unsigned long *)&log_entry), status); + "EPOW <0x%lx 0x%x>\n",*((unsigned long *)&log_entry), status); /* format and print the extended information */ log_error((char *)&log_entry, ERR_TYPE_RTAS_LOG, 0); @@ -162,7 +162,7 @@ ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct rtas_error_log log_entry; unsigned int size = sizeof(log_entry); - long status = 0xdeadbeef; + int status = 0xdeadbeef; int fatal; spin_lock(&log_lock); @@ -186,10 +186,10 @@ ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs) log_error((char *)&log_entry, ERR_TYPE_RTAS_LOG, fatal); if (fatal) { - udbg_printf("HW Error <0x%lx 0x%lx>\n", + udbg_printf("HW Error <0x%lx 0x%x>\n", *((unsigned long *)&log_entry), status); printk(KERN_EMERG - "Error: Fatal hardware error <0x%lx 0x%lx>\n", + "Error: Fatal hardware error <0x%lx 0x%x>\n", *((unsigned long *)&log_entry), status); #ifndef DEBUG @@ -200,10 +200,10 @@ ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs) ppc_md.power_off(); #endif } else { - udbg_printf("Recoverable HW Error <0x%lx 0x%lx>\n", + udbg_printf("Recoverable HW Error <0x%lx 0x%x>\n", *((unsigned long *)&log_entry), status); printk(KERN_WARNING - "Warning: Recoverable hardware error <0x%lx 0x%lx>\n", + "Warning: Recoverable hardware error <0x%lx 0x%x>\n", *((unsigned long *)&log_entry), status); } return IRQ_HANDLED; diff --git a/arch/ppc64/kernel/rtas.c b/arch/ppc64/kernel/rtas.c index 251439160a2a..44c7ae9a67f8 100644 --- a/arch/ppc64/kernel/rtas.c +++ b/arch/ppc64/kernel/rtas.c @@ -45,11 +45,10 @@ char rtas_data_buf[RTAS_DATA_BUF_SIZE]__page_aligned; void call_rtas_display_status(char c) { - struct rtas_args *args; + struct rtas_args *args = &rtas.args; unsigned long s; spin_lock_irqsave(&rtas.lock, s); - args = &(get_paca()->xRtas); args->token = 10; args->nargs = 1; @@ -76,9 +75,9 @@ rtas_token(const char *service) static int -__log_rtas_error(struct rtas_args *rtas_args) +__log_rtas_error(void) { - struct rtas_args err_args, temp_args; + struct rtas_args err_args, save_args; err_args.token = rtas_token("rtas-last-error"); err_args.nargs = 2; @@ -89,28 +88,28 @@ __log_rtas_error(struct rtas_args *rtas_args) err_args.args[1] = RTAS_ERROR_LOG_MAX; err_args.args[2] = 0; - temp_args = *rtas_args; - get_paca()->xRtas = err_args; + save_args = rtas.args; + rtas.args = err_args; PPCDBG(PPCDBG_RTAS, "\tentering rtas with 0x%lx\n", __pa(&err_args)); - enter_rtas(__pa(&get_paca()->xRtas)); + enter_rtas(__pa(&rtas.args)); PPCDBG(PPCDBG_RTAS, "\treturned from rtas ...\n"); - err_args = get_paca()->xRtas; - get_paca()->xRtas = temp_args; + err_args = rtas.args; + rtas.args = save_args; return err_args.rets[0]; } void -log_rtas_error(struct rtas_args *rtas_args) +log_rtas_error(void) { unsigned long s; int rc; spin_lock_irqsave(&rtas.lock, s); - rc = __log_rtas_error(rtas_args); + rc = __log_rtas_error(); spin_unlock_irqrestore(&rtas.lock, s); if (rc == 0) log_error(rtas_err_buf, ERR_TYPE_RTAS_LOG, 0); @@ -134,7 +133,7 @@ int rtas_call(int token, int nargs, int nret, int *outputs, ...) /* Gotta do something different here, use global lock for now... */ spin_lock_irqsave(&rtas.lock, s); - rtas_args = &(get_paca()->xRtas); + rtas_args = &rtas.args; rtas_args->token = token; rtas_args->nargs = nargs; @@ -156,7 +155,7 @@ int rtas_call(int token, int nargs, int nret, int *outputs, ...) PPCDBG(PPCDBG_RTAS, "\treturned from rtas ...\n"); if (rtas_args->rets[0] == -1) - logit = (__log_rtas_error(rtas_args) == 0); + logit = (__log_rtas_error() == 0); ifppcdebug(PPCDBG_RTAS) { for(i=0; i < nret ;i++) @@ -440,15 +439,15 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs) spin_lock_irqsave(&rtas.lock, flags); - get_paca()->xRtas = args; - enter_rtas(__pa(&get_paca()->xRtas)); - args = get_paca()->xRtas; + rtas.args = args; + enter_rtas(__pa(&rtas.args)); + args = rtas.args; spin_unlock_irqrestore(&rtas.lock, flags); args.rets = (rtas_arg_t *)&(args.args[nargs]); if (args.rets[0] == -1) - log_rtas_error(&args); + log_rtas_error(); /* Copy out args. */ if (copy_to_user(uargs->args + nargs, @@ -460,19 +459,23 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs) } #ifdef CONFIG_HOTPLUG_CPU -/* This version can't take the spinlock. */ +/* This version can't take the spinlock, because it never returns */ + +struct rtas_args rtas_stop_self_args = { + /* The token is initialized for real in setup_system() */ + .token = RTAS_UNKNOWN_SERVICE, + .nargs = 0, + .nret = 1, + .rets = &rtas_stop_self_args.args[0], +}; void rtas_stop_self(void) { - struct rtas_args *rtas_args = &(get_paca()->xRtas); + struct rtas_args *rtas_args = &rtas_stop_self_args; local_irq_disable(); - rtas_args->token = rtas_token("stop-self"); BUG_ON(rtas_args->token == RTAS_UNKNOWN_SERVICE); - rtas_args->nargs = 0; - rtas_args->nret = 1; - rtas_args->rets = &(rtas_args->args[0]); printk("%u %u Ready to die...\n", smp_processor_id(), hard_smp_processor_id()); diff --git a/arch/ppc64/kernel/rtc.c b/arch/ppc64/kernel/rtc.c index a08da09ed1a5..57a708dd546f 100644 --- a/arch/ppc64/kernel/rtc.c +++ b/arch/ppc64/kernel/rtc.c @@ -40,6 +40,7 @@ #include <asm/uaccess.h> #include <asm/system.h> #include <asm/time.h> +#include <asm/rtas.h> #include <asm/iSeries/LparData.h> #include <asm/iSeries/mf.h> diff --git a/arch/ppc64/kernel/scanlog.c b/arch/ppc64/kernel/scanlog.c index 8f61669ad61a..b61d90edd84c 100644 --- a/arch/ppc64/kernel/scanlog.c +++ b/arch/ppc64/kernel/scanlog.c @@ -118,7 +118,7 @@ static ssize_t scanlog_read(struct file *file, char *buf, wait_time = ms / (1000000/HZ); /* round down is fine */ /* Fall through to sleep */ } else { - printk(KERN_ERR "scanlog: unknown error from rtas: %ld\n", status); + printk(KERN_ERR "scanlog: unknown error from rtas: %d\n", status); return -EIO; } } diff --git a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c index 0bf553cf535d..dc090d425e21 100644 --- a/arch/ppc64/kernel/setup.c +++ b/arch/ppc64/kernel/setup.c @@ -46,6 +46,7 @@ #include <asm/nvram.h> #include <asm/setup.h> #include <asm/system.h> +#include <asm/rtas.h> extern unsigned long klimit; /* extern void *stab; */ @@ -254,6 +255,10 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5, } #endif /* CONFIG_PPC_PMAC */ +#if defined(CONFIG_HOTPLUG_CPU) && !defined(CONFIG_PPC_PMAC) + rtas_stop_self_args.token = rtas_token("stop-self"); +#endif /* CONFIG_HOTPLUG_CPU && !CONFIG_PPC_PMAC */ + /* Finish initializing the hash table (do the dynamic * patching for the fast-path hashtable.S code) */ @@ -698,7 +703,7 @@ int set_spread_lpevents( char * str ) unsigned long val = simple_strtoul( str, NULL, 0 ); if ( ( val > 0 ) && ( val <= NR_CPUS ) ) { for ( i=1; i<val; ++i ) - paca[i].lpQueuePtr = paca[0].lpQueuePtr; + paca[i].lpqueue_ptr = paca[0].lpqueue_ptr; printk("lpevent processing spread over %ld processors\n", val); } else diff --git a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c index 0a341cf1e75c..ee2f18a327c0 100644 --- a/arch/ppc64/kernel/smp.c +++ b/arch/ppc64/kernel/smp.c @@ -52,6 +52,7 @@ #include <asm/xics.h> #include <asm/cputable.h> #include <asm/system.h> +#include <asm/rtas.h> int smp_threads_ready; unsigned long cache_decay_ticks; @@ -119,12 +120,10 @@ static void smp_iSeries_message_pass(int target, int msg) static int smp_iSeries_numProcs(void) { unsigned np, i; - struct ItLpPaca * lpPaca; np = 0; for (i=0; i < NR_CPUS; ++i) { - lpPaca = paca[i].xLpPacaPtr; - if ( lpPaca->xDynProcStatus < 2 ) { + if (paca[i].lppaca.xDynProcStatus < 2) { cpu_set(i, cpu_available_map); cpu_set(i, cpu_possible_map); cpu_set(i, cpu_present_at_boot); @@ -138,11 +137,9 @@ static int smp_iSeries_probe(void) { unsigned i; unsigned np = 0; - struct ItLpPaca *lpPaca; for (i=0; i < NR_CPUS; ++i) { - lpPaca = paca[i].xLpPacaPtr; - if (lpPaca->xDynProcStatus < 2) { + if (paca[i].lppaca.xDynProcStatus < 2) { /*paca[i].active = 1;*/ ++np; } @@ -153,21 +150,18 @@ static int smp_iSeries_probe(void) static void smp_iSeries_kick_cpu(int nr) { - struct ItLpPaca *lpPaca; - BUG_ON(nr < 0 || nr >= NR_CPUS); /* Verify that our partition has a processor nr */ - lpPaca = paca[nr].xLpPacaPtr; - if (lpPaca->xDynProcStatus >= 2) + if (paca[nr].lppaca.xDynProcStatus >= 2) return; /* The processor is currently spinning, waiting - * for the xProcStart field to become non-zero - * After we set xProcStart, the processor will + * for the cpu_start field to become non-zero + * After we set cpu_start, the processor will * continue on to secondary_start in iSeries_head.S */ - paca[nr].xProcStart = 1; + paca[nr].cpu_start = 1; } static void __devinit smp_iSeries_setup_cpu(int nr) @@ -296,7 +290,7 @@ void __cpu_die(unsigned int cpu) * done here. Change isolate state to Isolate and * change allocation-state to Unusable. */ - paca[cpu].xProcStart = 0; + paca[cpu].cpu_start = 0; /* So we can recognize if it fails to come up next time. */ cpu_callin_map[cpu] = 0; @@ -390,12 +384,12 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu) } /* Fixup atomic count: it exited inside IRQ handler. */ - paca[lcpu].xCurrent->thread_info->preempt_count = 0; + paca[lcpu].__current->thread_info->preempt_count = 0; /* Fixup SLB round-robin so next segment (kernel) goes in segment 0 */ - paca[lcpu].xStab_data.next_round_robin = 0; + paca[lcpu].stab_next_rr = 0; /* At boot this is done in prom.c. */ - paca[lcpu].xHwProcNum = pcpu; + paca[lcpu].hw_cpu_id = pcpu; status = rtas_call(rtas_token("start-cpu"), 3, 1, NULL, pcpu, start_here, lcpu); @@ -460,12 +454,12 @@ static void smp_pSeries_kick_cpu(int nr) if (!smp_startup_cpu(nr)) return; - /* The processor is currently spinning, waiting - * for the xProcStart field to become non-zero - * After we set xProcStart, the processor will - * continue on to secondary_start + /* + * The processor is currently spinning, waiting for the + * cpu_start field to become non-zero After we set cpu_start, + * the processor will continue on to secondary_start */ - paca[nr].xProcStart = 1; + paca[nr].cpu_start = 1; } #endif /* CONFIG_PPC_PSERIES */ @@ -490,10 +484,8 @@ void vpa_init(int cpu) unsigned long flags; /* Register the Virtual Processor Area (VPA) */ - printk(KERN_INFO "register_vpa: cpu 0x%x\n", cpu); flags = 1UL << (63 - 18); - paca[cpu].xLpPaca.xSLBCount = 64; /* SLB restore highwater mark */ - register_vpa(flags, cpu, __pa((unsigned long)&(paca[cpu].xLpPaca))); + register_vpa(flags, cpu, __pa((unsigned long)&(paca[cpu].lppaca))); } static inline void smp_xics_do_message(int cpu, int msg) @@ -816,7 +808,7 @@ static void __init smp_create_idle(unsigned int cpu) init_idle(p, cpu); unhash_process(p); - paca[cpu].xCurrent = p; + paca[cpu].__current = p; current_set[cpu] = p->thread_info; } @@ -868,7 +860,7 @@ void __devinit smp_prepare_boot_cpu(void) /* cpu_possible is set up in prom.c */ cpu_set(boot_cpuid, cpu_online_map); - paca[boot_cpuid].xCurrent = current; + paca[boot_cpuid].__current = current; current_set[boot_cpuid] = current->thread_info; } @@ -893,8 +885,8 @@ int __devinit __cpu_up(unsigned int cpu) tmp = &stab_array[PAGE_SIZE * cpu]; memset(tmp, 0, PAGE_SIZE); - paca[cpu].xStab_data.virt = (unsigned long)tmp; - paca[cpu].xStab_data.real = virt_to_abs(tmp); + paca[cpu].stab_addr = (unsigned long)tmp; + paca[cpu].stab_real = virt_to_abs(tmp); } /* The information for processor bringup must @@ -956,8 +948,6 @@ int __devinit start_secondary(void *unused) if (smp_ops->take_timebase) smp_ops->take_timebase(); - get_paca()->yielded = 0; - #ifdef CONFIG_PPC_PSERIES if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { vpa_init(cpu); diff --git a/arch/ppc64/kernel/stab.c b/arch/ppc64/kernel/stab.c index 0618904494b3..0c0dc272a7f8 100644 --- a/arch/ppc64/kernel/stab.c +++ b/arch/ppc64/kernel/stab.c @@ -36,7 +36,7 @@ static inline void slb_add_bolted(void) * Bolt in the first vmalloc segment. Since modules end * up there it gets hit very heavily. */ - get_paca()->xStab_data.next_round_robin = 1; + get_paca()->stab_next_rr = 1; make_slbe(esid, vsid, 0, 1); #endif } @@ -65,7 +65,7 @@ void stab_initialize(unsigned long stab) asm volatile("isync":::"memory"); asm volatile("slbmte %0,%0"::"r" (0) : "memory"); asm volatile("isync; slbia; isync":::"memory"); - get_paca()->xStab_data.next_round_robin = 0; + get_paca()->stab_next_rr = 0; make_slbe(esid, vsid, seg0_largepages, 1); asm volatile("isync":::"memory"); #endif @@ -129,7 +129,7 @@ static int make_ste(unsigned long stab, unsigned long esid, unsigned long vsid) * Could not find empty entry, pick one with a round robin selection. * Search all entries in the two groups. */ - castout_entry = get_paca()->xStab_data.next_round_robin; + castout_entry = get_paca()->stab_next_rr; for (i = 0; i < 16; i++) { if (castout_entry < 8) { global_entry = (esid & 0x1f) << 3; @@ -148,7 +148,7 @@ static int make_ste(unsigned long stab, unsigned long esid, unsigned long vsid) castout_entry = (castout_entry + 1) & 0xf; } - get_paca()->xStab_data.next_round_robin = (castout_entry + 1) & 0xf; + get_paca()->stab_next_rr = (castout_entry + 1) & 0xf; /* Modify the old entry to the new value. */ @@ -181,7 +181,7 @@ static inline void __ste_allocate(unsigned long esid, unsigned long vsid) unsigned long offset; int region_id = REGION_ID(esid << SID_SHIFT); - stab_entry = make_ste(get_paca()->xStab_data.virt, esid, vsid); + stab_entry = make_ste(get_paca()->stab_addr, esid, vsid); if (region_id != USER_REGION_ID) return; @@ -275,7 +275,7 @@ static void preload_stab(struct task_struct *tsk, struct mm_struct *mm) /* Flush all user entries from the segment table of the current processor. */ void flush_stab(struct task_struct *tsk, struct mm_struct *mm) { - STE *stab = (STE *) get_paca()->xStab_data.virt; + STE *stab = (STE *) get_paca()->stab_addr; STE *ste; unsigned long offset = __get_cpu_var(stab_cache_ptr); @@ -355,7 +355,7 @@ static void make_slbe(unsigned long esid, unsigned long vsid, int large, * paca Ksave is always valid (even when on the interrupt stack) * so we use that. */ - castout_entry = lpaca->xStab_data.next_round_robin; + castout_entry = lpaca->stab_next_rr; do { entry = castout_entry; castout_entry++; @@ -367,9 +367,9 @@ static void make_slbe(unsigned long esid, unsigned long vsid, int large, castout_entry = 2; asm volatile("slbmfee %0,%1" : "=r" (esid_data) : "r" (entry)); } while (esid_data.data.v && - esid_data.data.esid == GET_ESID(lpaca->xKsave)); + esid_data.data.esid == GET_ESID(lpaca->kstack)); - lpaca->xStab_data.next_round_robin = castout_entry; + lpaca->stab_next_rr = castout_entry; /* slbie not needed as the previous mapping is still valid. */ diff --git a/arch/ppc64/kernel/sysfs.c b/arch/ppc64/kernel/sysfs.c index d271d7f7fafc..057c1382ed83 100644 --- a/arch/ppc64/kernel/sysfs.c +++ b/arch/ppc64/kernel/sysfs.c @@ -156,7 +156,7 @@ void ppc64_enable_pmcs(void) /* instruct hypervisor to maintain PMCs */ if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { - char *ptr = (char *)&paca[smp_processor_id()].xLpPaca; + char *ptr = (char *)&paca[smp_processor_id()].lppaca; ptr[0xBB] = 1; } diff --git a/arch/ppc64/kernel/time.c b/arch/ppc64/kernel/time.c index 33229ac0ac0b..64844df4a532 100644 --- a/arch/ppc64/kernel/time.c +++ b/arch/ppc64/kernel/time.c @@ -56,6 +56,7 @@ #include <asm/cache.h> #include <asm/machdep.h> #ifdef CONFIG_PPC_ISERIES +#include <asm/iSeries/ItLpQueue.h> #include <asm/iSeries/HvCallXm.h> #endif #include <asm/uaccess.h> @@ -97,7 +98,7 @@ unsigned long tb_to_ns_shift; struct gettimeofday_struct do_gtod; extern unsigned long wall_jiffies; -extern unsigned long lpEvent_count; +extern unsigned long lpevent_count; extern int smp_tb_synchronized; void ppc_adjtimex(void); @@ -275,7 +276,7 @@ int timer_interrupt(struct pt_regs * regs) ppc64_do_profile(regs); #endif - lpaca->xLpPaca.xIntDword.xFields.xDecrInt = 0; + lpaca->lppaca.xIntDword.xFields.xDecrInt = 0; while (lpaca->next_jiffy_update_tb <= (cur_tb = get_tb())) { @@ -302,9 +303,9 @@ int timer_interrupt(struct pt_regs * regs) #ifdef CONFIG_PPC_ISERIES { - struct ItLpQueue *lpq = lpaca->lpQueuePtr; + struct ItLpQueue *lpq = lpaca->lpqueue_ptr; if (lpq && ItLpQueue_isLpIntPending(lpq)) - lpEvent_count += ItLpQueue_process(lpq, regs); + lpevent_count += ItLpQueue_process(lpq, regs); } #endif diff --git a/arch/ppc64/kernel/traps.c b/arch/ppc64/kernel/traps.c index ce6654ef0210..14cc3bbdf425 100644 --- a/arch/ppc64/kernel/traps.c +++ b/arch/ppc64/kernel/traps.c @@ -36,6 +36,7 @@ #include <asm/io.h> #include <asm/processor.h> #include <asm/ppcdebug.h> +#include <asm/rtas.h> #ifdef CONFIG_PPC_PSERIES /* This is true if we are using the firmware NMI handler (typically LPAR) */ diff --git a/arch/ppc64/lib/locks.c b/arch/ppc64/lib/locks.c index 4610cb938427..b2679d6e2671 100644 --- a/arch/ppc64/lib/locks.c +++ b/arch/ppc64/lib/locks.c @@ -16,6 +16,7 @@ #include <linux/kernel.h> #include <linux/spinlock.h> #include <linux/module.h> +#include <linux/stringify.h> #include <asm/hvcall.h> #include <asm/iSeries/HvCall.h> @@ -48,7 +49,7 @@ void __spin_yield(spinlock_t *lock) holder_cpu = lock_value & 0xffff; BUG_ON(holder_cpu >= NR_CPUS); holder_paca = &paca[holder_cpu]; - yield_count = holder_paca->xLpPaca.xYieldCount; + yield_count = holder_paca->lppaca.xYieldCount; if ((yield_count & 1) == 0) return; /* virtual cpu is currently running */ rmb(); @@ -75,7 +76,7 @@ static __inline__ unsigned long __spin_trylock(spinlock_t *lock) unsigned long tmp, tmp2; __asm__ __volatile__( -" lwz %1,24(13) # __spin_trylock\n\ +" lwz %1,%3(13) # __spin_trylock\n\ 1: lwarx %0,0,%2\n\ cmpwi 0,%0,0\n\ bne- 2f\n\ @@ -83,7 +84,7 @@ static __inline__ unsigned long __spin_trylock(spinlock_t *lock) bne- 1b\n\ isync\n\ 2:" : "=&r" (tmp), "=&r" (tmp2) - : "r" (&lock->lock) + : "r" (&lock->lock), "i" (offsetof(struct paca_struct, lock_token)) : "cr0", "memory"); return tmp; @@ -157,7 +158,7 @@ void __rw_yield(rwlock_t *rw) holder_cpu = lock_value & 0xffff; BUG_ON(holder_cpu >= NR_CPUS); holder_paca = &paca[holder_cpu]; - yield_count = holder_paca->xLpPaca.xYieldCount; + yield_count = holder_paca->lppaca.xYieldCount; if ((yield_count & 1) == 0) return; /* virtual cpu is currently running */ rmb(); @@ -246,7 +247,7 @@ static __inline__ long __write_trylock(rwlock_t *rw) long tmp, tmp2; __asm__ __volatile__( -" lwz %1,24(13) # write_trylock\n\ +" lwz %1,%3(13) # write_trylock\n\ 1: lwarx %0,0,%2\n\ cmpwi 0,%0,0\n\ bne- 2f\n\ @@ -254,7 +255,7 @@ static __inline__ long __write_trylock(rwlock_t *rw) bne- 1b\n\ isync\n\ 2:" : "=&r" (tmp), "=&r" (tmp2) - : "r" (&rw->lock) + : "r" (&rw->lock), "i" (offsetof(struct paca_struct, lock_token)) : "cr0", "memory"); return tmp; diff --git a/arch/ppc64/xmon/xmon.c b/arch/ppc64/xmon/xmon.c index 679a4846e64b..d84ac32fa3b8 100644 --- a/arch/ppc64/xmon/xmon.c +++ b/arch/ppc64/xmon/xmon.c @@ -30,6 +30,7 @@ #include <asm/paca.h> #include <asm/ppcdebug.h> #include <asm/cputable.h> +#include <asm/rtas.h> #include "nonstdio.h" #include "privinst.h" @@ -1611,7 +1612,7 @@ super_regs() ptrPaca = get_paca(); printf(" Local Processor Control Area (LpPaca): \n"); - ptrLpPaca = ptrPaca->xLpPacaPtr; + ptrLpPaca = ptrPaca->lppaca_ptr; printf(" Saved Srr0=%.16lx Saved Srr1=%.16lx \n", ptrLpPaca->xSavedSrr0, ptrLpPaca->xSavedSrr1); printf(" Saved Gpr3=%.16lx Saved Gpr4=%.16lx \n", @@ -1619,7 +1620,7 @@ super_regs() printf(" Saved Gpr5=%.16lx \n", ptrLpPaca->xSavedGpr5); printf(" Local Processor Register Save Area (LpRegSave): \n"); - ptrLpRegSave = ptrPaca->xLpRegSavePtr; + ptrLpRegSave = ptrPaca->reg_save_ptr; printf(" Saved Sprg0=%.16lx Saved Sprg1=%.16lx \n", ptrLpRegSave->xSPRG0, ptrLpRegSave->xSPRG0); printf(" Saved Sprg2=%.16lx Saved Sprg3=%.16lx \n", @@ -2521,7 +2522,7 @@ static void dump_slb(void) static void dump_stab(void) { int i; - unsigned long *tmp = (unsigned long *)get_paca()->xStab_data.virt; + unsigned long *tmp = (unsigned long *)get_paca()->stab_addr; printf("Segment table contents of cpu %x\n", smp_processor_id()); diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index eab5d1e96988..778c21724bc7 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -67,9 +67,9 @@ config MARCH_Z900 on older 31 bit only CPUs. config MARCH_Z990 - bool "IBM eServer zSeries model z990" + bool "IBM eServer zSeries model z890 and z990" help - Select this enable optimizations for model z990. + Select this enable optimizations for model z890/z990. This will be slightly faster but does not work on older machines such as the z900. @@ -154,7 +154,7 @@ config QDIO tristate "QDIO support" ---help--- This driver provides the Queued Direct I/O base support for the - IBM S/390 (G5 and G6) and eServer zSeries (z800, z900 and z990). + IBM S/390 (G5 and G6) and eServer zSeries (z800, z890, z900 and z990). For details please refer to the documentation provided by IBM at <http://www10.software.ibm.com/developerworks/opensource/linux390> diff --git a/arch/s390/defconfig b/arch/s390/defconfig index d258019e54f3..3b8924c05cf7 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig @@ -29,6 +29,7 @@ CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y @@ -45,6 +46,7 @@ CONFIG_MODULES=y CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set CONFIG_KMOD=y +CONFIG_STOP_MACHINE=y # # Base setup @@ -84,12 +86,14 @@ CONFIG_PFAULT=y # CONFIG_SHARED_KERNEL is not set # CONFIG_CMM is not set # CONFIG_VIRT_TIMER is not set -# CONFIG_NO_IDLE_HZ is not set +CONFIG_NO_IDLE_HZ=y +CONFIG_NO_IDLE_HZ_INIT=y # CONFIG_PCMCIA is not set # # Generic Driver Options # +CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set # CONFIG_DEBUG_DRIVER is not set @@ -120,13 +124,12 @@ CONFIG_SCSI_LOGGING=y # SCSI Transport Attributes # # CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set +CONFIG_SCSI_FC_ATTRS=y # # SCSI low-level drivers # # CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_DPT_I2O is not set # CONFIG_SCSI_SATA is not set # CONFIG_SCSI_EATA_PIO is not set # CONFIG_SCSI_DEBUG is not set @@ -277,6 +280,7 @@ CONFIG_NET_SCH_TBF=m CONFIG_NET_SCH_GRED=m CONFIG_NET_SCH_DSMARK=m # CONFIG_NET_SCH_DELAY is not set +# CONFIG_NET_SCH_INGRESS is not set CONFIG_NET_QOS=y CONFIG_NET_ESTIMATOR=y CONFIG_NET_CLS=y @@ -285,8 +289,11 @@ CONFIG_NET_CLS_ROUTE4=m CONFIG_NET_CLS_ROUTE=y CONFIG_NET_CLS_FW=m CONFIG_NET_CLS_U32=m +# CONFIG_CLS_U32_PERF is not set +# CONFIG_NET_CLS_IND is not set CONFIG_NET_CLS_RSVP=m CONFIG_NET_CLS_RSVP6=m +# CONFIG_NET_CLS_ACT is not set CONFIG_NET_CLS_POLICE=y # @@ -311,7 +318,11 @@ CONFIG_NET_ETHERNET=y # CONFIG_MII is not set # -# Gigabit Ethernet (1000/10000 Mbit) +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) # # @@ -450,7 +461,6 @@ CONFIG_MSDOS_PARTITION=y # CONFIG_SOLARIS_X86_PARTITION is not set # CONFIG_UNIXWARE_DISKLABEL is not set # CONFIG_LDM_PARTITION is not set -# CONFIG_NEC98_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set @@ -509,5 +519,6 @@ CONFIG_CRYPTO=y # # Library routines # +# CONFIG_CRC16 is not set # CONFIG_CRC32 is not set # CONFIG_LIBCRC32C is not set diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 540a9a8bc9a8..f1e538c9dfe0 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c @@ -54,7 +54,7 @@ typedef struct * */ long args[0]; -} debug_sprintf_entry; +} debug_sprintf_entry_t; extern void tod_to_timeval(uint64_t todval, struct timeval *xtime); @@ -88,7 +88,7 @@ static int debug_raw_header_fn(debug_info_t * id, struct debug_view *view, int area, debug_entry_t * entry, char *out_buf); static int debug_sprintf_format_fn(debug_info_t * id, struct debug_view *view, - char *out_buf, debug_sprintf_entry *curr_event); + char *out_buf, debug_sprintf_entry_t *curr_event); /* globals */ @@ -692,31 +692,21 @@ extern inline debug_entry_t *get_active_entry(debug_info_t * id) } /* - * debug_common: + * debug_finish_entry: * - set timestamp, caller address, cpu number etc. */ -extern inline debug_entry_t *debug_common(debug_info_t * id, int level, - const void *buf, int len, int exception) +extern inline void debug_finish_entry(debug_info_t * id, debug_entry_t* active, + int level, int exception) { - unsigned long flags; - debug_entry_t *active; - - spin_lock_irqsave(&id->lock, flags); - active = get_active_entry(id); STCK(active->id.stck); active->id.fields.cpuid = smp_processor_id(); active->caller = __builtin_return_address(0); active->id.fields.exception = exception; active->id.fields.level = level; - memset(DEBUG_DATA(active), 0, id->buf_size); - memcpy(DEBUG_DATA(active), buf, MIN(len, id->buf_size)); proceed_active_entry(id); if(exception) proceed_active_area(id); - spin_unlock_irqrestore(&id->lock, flags); - - return active; } /* @@ -727,7 +717,17 @@ extern inline debug_entry_t *debug_common(debug_info_t * id, int level, debug_entry_t *debug_event_common(debug_info_t * id, int level, const void *buf, int len) { - return debug_common(id, level, buf, len, 0); + unsigned long flags; + debug_entry_t *active; + + spin_lock_irqsave(&id->lock, flags); + active = get_active_entry(id); + memset(DEBUG_DATA(active), 0, id->buf_size); + memcpy(DEBUG_DATA(active), buf, MIN(len, id->buf_size)); + debug_finish_entry(id, active, level, 0); + spin_unlock_irqrestore(&id->lock, flags); + + return active; } /* @@ -738,7 +738,17 @@ debug_entry_t *debug_event_common(debug_info_t * id, int level, const void *buf, debug_entry_t *debug_exception_common(debug_info_t * id, int level, const void *buf, int len) { - return debug_common(id, level, buf, len, 1); + unsigned long flags; + debug_entry_t *active; + + spin_lock_irqsave(&id->lock, flags); + active = get_active_entry(id); + memset(DEBUG_DATA(active), 0, id->buf_size); + memcpy(DEBUG_DATA(active), buf, MIN(len, id->buf_size)); + debug_finish_entry(id, active, level, 1); + spin_unlock_irqrestore(&id->lock, flags); + + return active; } /* @@ -764,27 +774,28 @@ debug_entry_t *debug_sprintf_event(debug_info_t* id, int level,char *string,...) { va_list ap; - int numargs,alloc_size,idx; - debug_sprintf_entry *curr_event; - debug_entry_t *retval = NULL; + int numargs,idx; + unsigned long flags; + debug_sprintf_entry_t *curr_event; + debug_entry_t *active; if((!id) || (level > id->level)) return NULL; - else { - numargs=debug_count_numargs(string); - alloc_size=offsetof(debug_sprintf_entry,args[numargs]); - curr_event=alloca(alloc_size); - - if(curr_event){ - va_start(ap,string); - curr_event->string=string; - for(idx=0;idx<numargs;idx++) - curr_event->args[idx]=va_arg(ap,long); - retval=debug_common(id,level, curr_event,alloc_size,0); - va_end(ap); - } - return retval; - } + + numargs=debug_count_numargs(string); + + spin_lock_irqsave(&id->lock, flags); + active = get_active_entry(id); + curr_event=(debug_sprintf_entry_t *) DEBUG_DATA(active); + va_start(ap,string); + curr_event->string=string; + for(idx=0;idx<MIN(numargs,((id->buf_size / sizeof(long))-1));idx++) + curr_event->args[idx]=va_arg(ap,long); + va_end(ap); + debug_finish_entry(id, active, level, 0); + spin_unlock_irqrestore(&id->lock, flags); + + return active; } /* @@ -795,27 +806,28 @@ debug_entry_t *debug_sprintf_exception(debug_info_t* id, int level,char *string,...) { va_list ap; - int numargs,alloc_size,idx; - debug_sprintf_entry *curr_event; - debug_entry_t *retval = NULL; + int numargs,idx; + unsigned long flags; + debug_sprintf_entry_t *curr_event; + debug_entry_t *active; if((!id) || (level > id->level)) return NULL; - else { - numargs=debug_count_numargs(string); - alloc_size=offsetof(debug_sprintf_entry,args[numargs]); - curr_event=alloca(alloc_size); - - if(curr_event){ - va_start(ap,string); - curr_event->string=string; - for(idx=0;idx<numargs;idx++) - curr_event->args[idx]=va_arg(ap,long); - retval=debug_common(id,level, curr_event,alloc_size,1); - va_end(ap); - } - return retval; - } + + numargs=debug_count_numargs(string); + + spin_lock_irqsave(&id->lock, flags); + active = get_active_entry(id); + curr_event=(debug_sprintf_entry_t *)DEBUG_DATA(active); + va_start(ap,string); + curr_event->string=string; + for(idx=0;idx<MIN(numargs,((id->buf_size / sizeof(long))-1));idx++) + curr_event->args[idx]=va_arg(ap,long); + va_end(ap); + debug_finish_entry(id, active, level, 1); + spin_unlock_irqrestore(&id->lock, flags); + + return active; } /* @@ -1127,7 +1139,7 @@ int debug_dflt_header_fn(debug_info_t * id, struct debug_view *view, #define DEBUG_SPRINTF_MAX_ARGS 10 int debug_sprintf_format_fn(debug_info_t * id, struct debug_view *view, - char *out_buf, debug_sprintf_entry *curr_event) + char *out_buf, debug_sprintf_entry_t *curr_event) { int num_longs, num_used_args = 0,i, rc = 0; int index[DEBUG_SPRINTF_MAX_ARGS]; diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 533fa85ce3e7..926b58e1f890 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S @@ -305,7 +305,8 @@ sysc_restart: # sysc_singlestep: ni __TI_flags+7(%r9),255-_TIF_SINGLE_STEP # clear TIF_SINGLE_STEP - mvi SP_TRAP+1(%r15),0x28 # set trap indication to pgm check + lhi %r0,__LC_PGM_OLD_PSW + sth %r0,SP_TRAP(%r15) # set trap indication to pgm check la %r2,SP_PTREGS(%r15) # address of register-save area larl %r14,sysc_return # load adr. of system return jg do_debugger_trap # branch to do_debugger_trap diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S index 068653a5e77e..fb295b79fed4 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S @@ -613,10 +613,6 @@ startup:basr %r13,0 # get base bne .Lnop390-.LPG1(%r13) oi 3(%r12),4 # set P/390 flag .Lnop390: - chi %r0,0x2084 # new stidp format? - bne .Loldfmt-.LPG1(%r13) - oi 3(%r12),64 # set new stidp flag -.Loldfmt: # # find out if we have an IEEE fpu diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index 26caebd7d676..e32a8e90febb 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S @@ -623,10 +623,6 @@ startup:basr %r13,0 # get base bne 1f-.LPG1(%r13) oi 7(%r12),4 # set P/390 flag 1: - chi %r0,0x2084 # new stidp format? - bne 2f-.LPG1(%r13) - oi 7(%r12),64 # set new stidp flag -2: # # find out if we have the MVPG instruction diff --git a/arch/s390/kernel/s390_ksyms.c b/arch/s390/kernel/s390_ksyms.c index 90e7fe6687ba..90ccb07c1c65 100644 --- a/arch/s390/kernel/s390_ksyms.c +++ b/arch/s390/kernel/s390_ksyms.c @@ -72,7 +72,8 @@ EXPORT_SYMBOL(__udelay); EXPORT_SYMBOL(kernel_thread); EXPORT_SYMBOL(csum_fold); EXPORT_SYMBOL(console_mode); -EXPORT_SYMBOL(console_device); +EXPORT_SYMBOL(console_devno); +EXPORT_SYMBOL(console_irq); EXPORT_SYMBOL_NOVERS(do_call_softirq); EXPORT_SYMBOL(sys_wait4); EXPORT_SYMBOL(cpcmd); diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 8b4c40d8f7bf..f75cc79ae099 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -49,7 +49,7 @@ * Machine setup.. */ unsigned int console_mode = 0; -unsigned int console_device = -1; +unsigned int console_devno = -1; unsigned int console_irq = -1; unsigned long memory_size = 0; unsigned long machine_flags = 0; @@ -160,7 +160,7 @@ static int __init condev_setup(char *str) vdev = simple_strtoul(str, &str, 0); if (vdev >= 0 && vdev < 65536) { - console_device = vdev; + console_devno = vdev; console_irq = -1; } return 1; @@ -194,7 +194,7 @@ static void __init conmode_default(void) if (MACHINE_IS_VM) { cpcmd("QUERY CONSOLE", query_buffer, 1024); - console_device = simple_strtoul(query_buffer + 5, NULL, 16); + console_devno = simple_strtoul(query_buffer + 5, NULL, 16); ptr = strstr(query_buffer, "SUBCHANNEL ="); console_irq = simple_strtoul(ptr + 13, NULL, 16); cpcmd("QUERY TERM", query_buffer, 1024); @@ -649,3 +649,13 @@ int show_interrupts(struct seq_file *p, void *v) return 0; } + +/* + * For compatibilty only. S/390 specific setup of interrupts et al. is done + * much later in init_channel_subsystem(). + */ +void __init +init_IRQ(void) +{ + /* nothing... */ +} diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index e687d0aa4fb8..084cc5e3af07 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -518,19 +518,19 @@ void start_hz_timer(struct pt_regs *regs) * Stop the HZ tick on the current CPU. * Only cpu_idle may call this function. */ -int stop_hz_timer(void) +void stop_hz_timer(void) { __u64 timer; if (sysctl_hz_timer != 0) - return 1; + return; /* * Leave the clock comparator set up for the next timer * tick if either rcu or a softirq is pending. */ if (rcu_pending(smp_processor_id()) || local_softirq_pending()) - return 1; + return; /* * This cpu is going really idle. Set up the clock comparator @@ -540,8 +540,6 @@ int stop_hz_timer(void) timer = (__u64) (next_timer_interrupt() - jiffies) + jiffies_64; timer = jiffies_timer_cc + timer * CLK_TICKS_PER_JIFFY; asm volatile ("SCKC %0" : : "m" (timer)); - - return 0; } #endif @@ -572,8 +570,7 @@ int stop_timers(void) #endif #ifdef CONFIG_NO_IDLE_HZ - if (stop_hz_timer()) - return 1; + stop_hz_timer(); #endif /* enable monitor call class 0 */ diff --git a/arch/sparc64/kernel/itlb_base.S b/arch/sparc64/kernel/itlb_base.S index 36c41501a344..b5e32dfa4fbc 100644 --- a/arch/sparc64/kernel/itlb_base.S +++ b/arch/sparc64/kernel/itlb_base.S @@ -41,6 +41,9 @@ CREATE_VPTE_OFFSET2(%g4, %g6) ! Create VPTE offset ldxa [%g3 + %g6] ASI_P, %g5 ! Load VPTE 1: brgez,pn %g5, 3f ! Not valid, branch out + sethi %hi(_PAGE_EXEC), %g4 ! Delay-slot + andcc %g5, %g4, %g0 ! Executable? + be,pn %xcc, 3f ! Nope, branch. nop ! Delay-slot 2: stxa %g5, [%g0] ASI_ITLB_DATA_IN ! Load PTE into TLB retry ! Trap return @@ -73,9 +76,6 @@ winfix_trampoline: nop nop nop - nop - nop - nop CREATE_VPTE_NOP #undef CREATE_VPTE_OFFSET1 diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c index 5fc4644aad99..ac57b9e7960d 100644 --- a/arch/sparc64/mm/fault.c +++ b/arch/sparc64/mm/fault.c @@ -257,7 +257,7 @@ static void do_kernel_fault(struct pt_regs *regs, int si_code, int fault_code, * in that case. */ - if (!(fault_code & FAULT_CODE_WRITE) && + if (!(fault_code & (FAULT_CODE_WRITE|FAULT_CODE_ITLB)) && (insn & 0xc0800000) == 0xc0800000) { if (insn & 0x2000) asi = (regs->tstate >> 24); @@ -408,6 +408,16 @@ continue_fault: */ good_area: si_code = SEGV_ACCERR; + + /* If we took a ITLB miss on a non-executable page, catch + * that here. + */ + if ((fault_code & FAULT_CODE_ITLB) && !(vma->vm_flags & VM_EXEC)) { + BUG_ON(address != regs->tpc); + BUG_ON(regs->tstate & TSTATE_PRIV); + goto bad_area; + } + if (fault_code & FAULT_CODE_WRITE) { if (!(vma->vm_flags & VM_WRITE)) goto bad_area; diff --git a/arch/x86_64/kernel/suspend.c b/arch/x86_64/kernel/suspend.c index d8cdbe131c73..751982df5939 100644 --- a/arch/x86_64/kernel/suspend.c +++ b/arch/x86_64/kernel/suspend.c @@ -35,40 +35,45 @@ unsigned long saved_context_r08, saved_context_r09, saved_context_r10, saved_con unsigned long saved_context_r12, saved_context_r13, saved_context_r14, saved_context_r15; unsigned long saved_context_eflags; -void save_processor_state (void) +void __save_processor_state(struct saved_context *ctxt) { kernel_fpu_begin(); /* * descriptor tables */ - asm volatile ("sgdt %0" : "=m" (saved_context.gdt_limit)); - asm volatile ("sidt %0" : "=m" (saved_context.idt_limit)); - asm volatile ("sldt %0" : "=m" (saved_context.ldt)); - asm volatile ("str %0" : "=m" (saved_context.tr)); + asm volatile ("sgdt %0" : "=m" (ctxt->gdt_limit)); + asm volatile ("sidt %0" : "=m" (ctxt->idt_limit)); + asm volatile ("sldt %0" : "=m" (ctxt->ldt)); + asm volatile ("str %0" : "=m" (ctxt->tr)); /* XMM0..XMM15 should be handled by kernel_fpu_begin(). */ /* EFER should be constant for kernel version, no need to handle it. */ /* * segment registers */ - asm volatile ("movw %%ds, %0" : "=m" (saved_context.ds)); - asm volatile ("movw %%es, %0" : "=m" (saved_context.es)); - asm volatile ("movw %%fs, %0" : "=m" (saved_context.fs)); - asm volatile ("movw %%gs, %0" : "=m" (saved_context.gs)); - asm volatile ("movw %%ss, %0" : "=m" (saved_context.ss)); + asm volatile ("movw %%ds, %0" : "=m" (ctxt->ds)); + asm volatile ("movw %%es, %0" : "=m" (ctxt->es)); + asm volatile ("movw %%fs, %0" : "=m" (ctxt->fs)); + asm volatile ("movw %%gs, %0" : "=m" (ctxt->gs)); + asm volatile ("movw %%ss, %0" : "=m" (ctxt->ss)); - rdmsrl(MSR_FS_BASE, saved_context.fs_base); - rdmsrl(MSR_GS_BASE, saved_context.gs_base); - rdmsrl(MSR_KERNEL_GS_BASE, saved_context.gs_kernel_base); + rdmsrl(MSR_FS_BASE, ctxt->fs_base); + rdmsrl(MSR_GS_BASE, ctxt->gs_base); + rdmsrl(MSR_KERNEL_GS_BASE, ctxt->gs_kernel_base); /* * control registers */ - asm volatile ("movq %%cr0, %0" : "=r" (saved_context.cr0)); - asm volatile ("movq %%cr2, %0" : "=r" (saved_context.cr2)); - asm volatile ("movq %%cr3, %0" : "=r" (saved_context.cr3)); - asm volatile ("movq %%cr4, %0" : "=r" (saved_context.cr4)); + asm volatile ("movq %%cr0, %0" : "=r" (ctxt->cr0)); + asm volatile ("movq %%cr2, %0" : "=r" (ctxt->cr2)); + asm volatile ("movq %%cr3, %0" : "=r" (ctxt->cr3)); + asm volatile ("movq %%cr4, %0" : "=r" (ctxt->cr4)); +} + +void save_processor_state(void) +{ + __save_processor_state(&saved_context); } static void @@ -80,42 +85,47 @@ do_fpu_end(void) mxcsr_feature_mask_init(); } -void restore_processor_state(void) +void __restore_processor_state(struct saved_context *ctxt) { /* * control registers */ - asm volatile ("movq %0, %%cr4" :: "r" (saved_context.cr4)); - asm volatile ("movq %0, %%cr3" :: "r" (saved_context.cr3)); - asm volatile ("movq %0, %%cr2" :: "r" (saved_context.cr2)); - asm volatile ("movq %0, %%cr0" :: "r" (saved_context.cr0)); + asm volatile ("movq %0, %%cr4" :: "r" (ctxt->cr4)); + asm volatile ("movq %0, %%cr3" :: "r" (ctxt->cr3)); + asm volatile ("movq %0, %%cr2" :: "r" (ctxt->cr2)); + asm volatile ("movq %0, %%cr0" :: "r" (ctxt->cr0)); /* * segment registers */ - asm volatile ("movw %0, %%ds" :: "r" (saved_context.ds)); - asm volatile ("movw %0, %%es" :: "r" (saved_context.es)); - asm volatile ("movw %0, %%fs" :: "r" (saved_context.fs)); - load_gs_index(saved_context.gs); - asm volatile ("movw %0, %%ss" :: "r" (saved_context.ss)); + asm volatile ("movw %0, %%ds" :: "r" (ctxt->ds)); + asm volatile ("movw %0, %%es" :: "r" (ctxt->es)); + asm volatile ("movw %0, %%fs" :: "r" (ctxt->fs)); + load_gs_index(ctxt->gs); + asm volatile ("movw %0, %%ss" :: "r" (ctxt->ss)); - wrmsrl(MSR_FS_BASE, saved_context.fs_base); - wrmsrl(MSR_GS_BASE, saved_context.gs_base); - wrmsrl(MSR_KERNEL_GS_BASE, saved_context.gs_kernel_base); + wrmsrl(MSR_FS_BASE, ctxt->fs_base); + wrmsrl(MSR_GS_BASE, ctxt->gs_base); + wrmsrl(MSR_KERNEL_GS_BASE, ctxt->gs_kernel_base); /* * now restore the descriptor tables to their proper values * ltr is done i fix_processor_context(). */ - asm volatile ("lgdt %0" :: "m" (saved_context.gdt_limit)); - asm volatile ("lidt %0" :: "m" (saved_context.idt_limit)); - asm volatile ("lldt %0" :: "m" (saved_context.ldt)); + asm volatile ("lgdt %0" :: "m" (ctxt->gdt_limit)); + asm volatile ("lidt %0" :: "m" (ctxt->idt_limit)); + asm volatile ("lldt %0" :: "m" (ctxt->ldt)); fix_processor_context(); do_fpu_end(); } +void restore_processor_state(void) +{ + __restore_processor_state(&saved_context); +} + void fix_processor_context(void) { int cpu = smp_processor_id(); diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index a8b61668d17c..14aff78cd404 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -349,7 +349,7 @@ config ISTALLION module will be called istallion. config SERIAL_TX3912 - bool "TMPTX3912/PR31700 serial port support" + bool "TX3912/PR31700 serial port support" depends on SERIAL_NONSTANDARD && MIPS && BROKEN_ON_SMP help The TX3912 is a Toshiba RISC processor based o the MIPS 3900 core; @@ -357,7 +357,7 @@ config SERIAL_TX3912 Say Y here to enable kernel support for the on-board serial port. config SERIAL_TX3912_CONSOLE - bool "Console on TMPTX3912/PR31700 serial port" + bool "Console on TX3912/PR31700 serial port" depends on SERIAL_TX3912 help The TX3912 is a Toshiba RISC processor based o the MIPS 3900 core; diff --git a/drivers/char/ftape/lowlevel/fdc-io.c b/drivers/char/ftape/lowlevel/fdc-io.c index a41a8e31917e..3b78eda30b19 100644 --- a/drivers/char/ftape/lowlevel/fdc-io.c +++ b/drivers/char/ftape/lowlevel/fdc-io.c @@ -31,6 +31,7 @@ #include <linux/sched.h> #include <linux/ioport.h> #include <linux/interrupt.h> +#include <linux/kernel.h> #include <asm/system.h> #include <asm/io.h> #include <asm/dma.h> @@ -786,8 +787,8 @@ int fdc_seek(int track) } } #ifdef TESTING - time = ftape_timediff(time, ftape_timestamp()) / ABS(track - ftape_current_cylinder); - if ((time < 900 || time > 3100) && ABS(track - ftape_current_cylinder) > 5) { + time = ftape_timediff(time, ftape_timestamp()) / abs(track - ftape_current_cylinder); + if ((time < 900 || time > 3100) && abs(track - ftape_current_cylinder) > 5) { TRACE(ft_t_warn, "Wrong FDC STEP interval: %d usecs (%d)", time, track - ftape_current_cylinder); } diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index 207a8b8bba5f..ae93abc07272 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c @@ -508,7 +508,7 @@ static int rtc_do_ioctl(unsigned int cmd, unsigned long arg, int kernel) unsigned char mon, day, hrs, min, sec, leap_yr; unsigned char save_control, save_freq_select; unsigned int yrs; -#ifdef CONFIG_DECSTATION +#ifdef CONFIG_MACH_DECSTATION unsigned int real_yrs; #endif @@ -544,7 +544,7 @@ static int rtc_do_ioctl(unsigned int cmd, unsigned long arg, int kernel) return -EINVAL; spin_lock_irq(&rtc_lock); -#ifdef CONFIG_DECSTATION +#ifdef CONFIG_MACH_DECSTATION real_yrs = yrs; yrs = 72; @@ -583,7 +583,7 @@ static int rtc_do_ioctl(unsigned int cmd, unsigned long arg, int kernel) save_freq_select = CMOS_READ(RTC_FREQ_SELECT); CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT); -#ifdef CONFIG_DECSTATION +#ifdef CONFIG_MACH_DECSTATION CMOS_WRITE(real_yrs, RTC_DEC_YEAR); #endif CMOS_WRITE(yrs, RTC_YEAR); @@ -1213,7 +1213,7 @@ void rtc_get_rtc_time(struct rtc_time *rtc_tm) { unsigned long uip_watchdog = jiffies; unsigned char ctrl; -#ifdef CONFIG_DECSTATION +#ifdef CONFIG_MACH_DECSTATION unsigned int real_year; #endif @@ -1246,7 +1246,7 @@ void rtc_get_rtc_time(struct rtc_time *rtc_tm) rtc_tm->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH); rtc_tm->tm_mon = CMOS_READ(RTC_MONTH); rtc_tm->tm_year = CMOS_READ(RTC_YEAR); -#ifdef CONFIG_DECSTATION +#ifdef CONFIG_MACH_DECSTATION real_year = CMOS_READ(RTC_DEC_YEAR); #endif ctrl = CMOS_READ(RTC_CONTROL); @@ -1262,7 +1262,7 @@ void rtc_get_rtc_time(struct rtc_time *rtc_tm) BCD_TO_BIN(rtc_tm->tm_year); } -#ifdef CONFIG_DECSTATION +#ifdef CONFIG_MACH_DECSTATION rtc_tm->tm_year += real_year - 72; #endif diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index 56539af545d7..28418d57fb10 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c @@ -44,6 +44,7 @@ #include <linux/wait.h> #include <linux/acpi.h> #include <linux/dmi.h> +#include <linux/sysdev.h> #include <asm/uaccess.h> #include <asm/io.h> @@ -603,44 +604,68 @@ struct miscdevice sonypi_misc_device = { }; #ifdef CONFIG_PM +static int old_camera_power; + +static int sonypi_suspend(struct sys_device *dev, u32 state) { + sonypi_call2(0x81, 0); /* make sure we don't get any more events */ + if (camera) { + old_camera_power = sonypi_device.camera_power; + sonypi_camera_off(); + } + if (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE2) + sonypi_type2_dis(); + else + sonypi_type1_dis(); + /* disable ACPI mode */ + if (!SONYPI_ACPI_ACTIVE && fnkeyinit) + outb(0xf1, 0xb2); + return 0; +} + +static int sonypi_resume(struct sys_device *dev) { + /* Enable ACPI mode to get Fn key events */ + if (!SONYPI_ACPI_ACTIVE && fnkeyinit) + outb(0xf0, 0xb2); + if (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE2) + sonypi_type2_srs(); + else + sonypi_type1_srs(); + sonypi_call1(0x82); + sonypi_call2(0x81, 0xff); + if (compat) + sonypi_call1(0x92); + else + sonypi_call1(0x82); + if (camera && old_camera_power) + sonypi_camera_on(); + return 0; +} + +/* Old PM scheme */ static int sonypi_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data) { - static int old_camera_power; switch (rqst) { - case PM_SUSPEND: - sonypi_call2(0x81, 0); /* make sure we don't get any more events */ - if (camera) { - old_camera_power = sonypi_device.camera_power; - sonypi_camera_off(); - } - if (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE2) - sonypi_type2_dis(); - else - sonypi_type1_dis(); - /* disable ACPI mode */ - if (!SONYPI_ACPI_ACTIVE && fnkeyinit) - outb(0xf1, 0xb2); - break; - case PM_RESUME: - /* Enable ACPI mode to get Fn key events */ - if (!SONYPI_ACPI_ACTIVE && fnkeyinit) - outb(0xf0, 0xb2); - if (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE2) - sonypi_type2_srs(); - else - sonypi_type1_srs(); - sonypi_call1(0x82); - sonypi_call2(0x81, 0xff); - if (compat) - sonypi_call1(0x92); - else - sonypi_call1(0x82); - if (camera && old_camera_power) - sonypi_camera_on(); - break; + case PM_SUSPEND: + sonypi_suspend(NULL, 0); + break; + case PM_RESUME: + sonypi_resume(NULL); + break; } return 0; } + +/* New PM scheme (device model) */ +static struct sysdev_class sonypi_sysclass = { + set_kset_name("sonypi"), + .suspend = sonypi_suspend, + .resume = sonypi_resume, +}; + +static struct sys_device sonypi_sysdev = { + .id = 0, + .cls = &sonypi_sysclass, +}; #endif static int __devinit sonypi_probe(struct pci_dev *pcidev) { @@ -735,6 +760,21 @@ static int __devinit sonypi_probe(struct pci_dev *pcidev) { goto out3; } +#ifdef CONFIG_PM + sonypi_device.pm = pm_register(PM_PCI_DEV, 0, sonypi_pm_callback); + + if (sysdev_class_register(&sonypi_sysclass) != 0) { + printk(KERN_ERR "sonypi: sysdev_class_register failed\n"); + ret = -ENODEV; + goto out4; + } + if (sysdev_register(&sonypi_sysdev) != 0) { + printk(KERN_ERR "sonypi: sysdev_register failed\n"); + ret = -ENODEV; + goto out5; + } +#endif + /* Enable ACPI mode to get Fn key events */ if (!SONYPI_ACPI_ACTIVE && fnkeyinit) outb(0xf0, 0xb2); @@ -744,7 +784,7 @@ static int __devinit sonypi_probe(struct pci_dev *pcidev) { SONYPI_DRIVER_MINORVERSION); printk(KERN_INFO "sonypi: detected %s model, " "verbose = %d, fnkeyinit = %s, camera = %s, " - "compat = %s, mask = 0x%08lx, useinput = %s\n", + "compat = %s, mask = 0x%08lx, useinput = %s, acpi = %s\n", (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE1) ? "type1" : "type2", verbose, @@ -752,10 +792,12 @@ static int __devinit sonypi_probe(struct pci_dev *pcidev) { camera ? "on" : "off", compat ? "on" : "off", mask, - useinput ? "on" : "off"); + useinput ? "on" : "off", + SONYPI_ACPI_ACTIVE ? "on" : "off"); printk(KERN_INFO "sonypi: enabled at irq=%d, port1=0x%x, port2=0x%x\n", sonypi_device.irq, sonypi_device.ioport1, sonypi_device.ioport2); + if (minor == -1) printk(KERN_INFO "sonypi: device allocated minor is %d\n", sonypi_misc_device.minor); @@ -777,12 +819,14 @@ static int __devinit sonypi_probe(struct pci_dev *pcidev) { } #endif /* SONYPI_USE_INPUT */ -#ifdef CONFIG_PM - sonypi_device.pm = pm_register(PM_PCI_DEV, 0, sonypi_pm_callback); -#endif - return 0; +#ifdef CONFIG_PM +out5: + sysdev_class_unregister(&sonypi_sysclass); +out4: + free_irq(sonypi_device.irq, sonypi_irq); +#endif out3: release_region(sonypi_device.ioport1, sonypi_device.region_size); out2: @@ -795,6 +839,9 @@ static void __devexit sonypi_remove(void) { #ifdef CONFIG_PM pm_unregister(sonypi_device.pm); + + sysdev_unregister(&sonypi_sysdev); + sysdev_class_unregister(&sonypi_sysclass); #endif sonypi_call2(0x81, 0); /* make sure we don't get any more events */ @@ -829,6 +876,13 @@ static struct dmi_system_id __initdata sonypi_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "PCG-"), }, }, + { + .ident = "Sony Vaio", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "VGN-"), + }, + }, { } }; diff --git a/drivers/char/sonypi.h b/drivers/char/sonypi.h index 83a6c5b120ef..d22a496b90ce 100644 --- a/drivers/char/sonypi.h +++ b/drivers/char/sonypi.h @@ -37,7 +37,7 @@ #ifdef __KERNEL__ #define SONYPI_DRIVER_MAJORVERSION 1 -#define SONYPI_DRIVER_MINORVERSION 22 +#define SONYPI_DRIVER_MINORVERSION 23 #define SONYPI_DEVICE_MODEL_TYPE1 1 #define SONYPI_DEVICE_MODEL_TYPE2 2 diff --git a/drivers/firmware/pcdp.c b/drivers/firmware/pcdp.c index 86b9fbc1a2d7..55d1a04102e1 100644 --- a/drivers/firmware/pcdp.c +++ b/drivers/firmware/pcdp.c @@ -13,6 +13,7 @@ #include <linux/tty.h> #include <linux/serial.h> #include <linux/serial_core.h> +#include <asm/io.h> #include <asm/serial.h> #include "pcdp.h" diff --git a/drivers/media/dvb/frontends/stv0299.c b/drivers/media/dvb/frontends/stv0299.c index be9d86a1b051..c6a98de01e08 100644 --- a/drivers/media/dvb/frontends/stv0299.c +++ b/drivers/media/dvb/frontends/stv0299.c @@ -418,8 +418,6 @@ static int tsa5059_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype, in } - -#define ABS(x) ((x) < 0 ? -(x) : (x)) #define MIN2(a,b) ((a) < (b) ? (a) : (b)) #define MIN3(a,b,c) MIN2(MIN2(a,b),c) @@ -436,8 +434,8 @@ static int tua6100_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, first_ZF = (freq) / 1000; - if (ABS(MIN2(ABS(first_ZF-1190),ABS(first_ZF-1790))) < - ABS(MIN3(ABS(first_ZF-1202),ABS(first_ZF-1542),ABS(first_ZF-1890)))) + if (abs(MIN2(abs(first_ZF-1190),abs(first_ZF-1790))) < + abs(MIN3(abs(first_ZF-1202),abs(first_ZF-1542),abs(first_ZF-1890)))) _fband = 2; else _fband = 3; diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c index bb6e40dcb4b0..d312d3995724 100644 --- a/drivers/media/video/meye.c +++ b/drivers/media/video/meye.c @@ -473,16 +473,6 @@ static u16 *jpeg_huffman_tables(int *size) { /* MCHIP low-level functions */ /****************************************************************************/ -/* waits for the specified miliseconds */ -static inline void wait_ms(unsigned int ms) { - if (!in_interrupt()) { - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(1 + ms * HZ / 1000); - } - else - mdelay(ms); -} - /* returns the horizontal capture size */ static inline int mchip_hsize(void) { return meye.params.subsample ? 320 : 640; @@ -640,12 +630,12 @@ static void mchip_hic_stop(void) { for (j = 0; j < 100; ++j) { if (mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE)) return; - wait_ms(1); + msleep(1); } printk(KERN_ERR "meye: need to reset HIC!\n"); mchip_set(MCHIP_HIC_CTL, MCHIP_HIC_CTL_SOFT_RESET); - wait_ms(250); + msleep(250); } printk(KERN_ERR "meye: resetting HIC hanged!\n"); } @@ -741,7 +731,7 @@ static void mchip_take_picture(void) { for (i = 0; i < 100; ++i) { if (mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE)) break; - wait_ms(1); + msleep(1); } } @@ -757,7 +747,7 @@ static void mchip_get_picture(u8 *buf, int bufsize) { for (i = 0; i < 100; ++i) { if (mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE)) break; - wait_ms(1); + msleep(1); } for (i = 0; i < 4 ; ++i) { v = mchip_get_frame(); @@ -799,7 +789,7 @@ static int mchip_compress_frame(u8 *buf, int bufsize) { for (i = 0; i < 100; ++i) { if (mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE)) break; - wait_ms(1); + msleep(1); } for (i = 0; i < 4 ; ++i) { @@ -1260,11 +1250,11 @@ static int meye_resume(struct pci_dev *pdev) mchip_delay(MCHIP_HIC_CMD, 0); mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE); - wait_ms(1); + msleep(1); mchip_set(MCHIP_VRJ_SOFT_RESET, 1); - wait_ms(1); + msleep(1); mchip_set(MCHIP_MM_PCI_MODE, 5); - wait_ms(1); + msleep(1); mchip_set(MCHIP_MM_INTA, MCHIP_MM_INTA_HIC_1_MASK); switch (meye.pm_mchip_mode) { @@ -1349,13 +1339,13 @@ static int __devinit meye_probe(struct pci_dev *pcidev, mchip_delay(MCHIP_HIC_CMD, 0); mchip_delay(MCHIP_HIC_STATUS, MCHIP_HIC_STATUS_IDLE); - wait_ms(1); + msleep(1); mchip_set(MCHIP_VRJ_SOFT_RESET, 1); - wait_ms(1); + msleep(1); mchip_set(MCHIP_MM_PCI_MODE, 5); - wait_ms(1); + msleep(1); mchip_set(MCHIP_MM_INTA, MCHIP_MM_INTA_HIC_1_MASK); if (video_register_device(meye.video_dev, VFL_TYPE_GRABBER, video_nr) < 0) { diff --git a/drivers/media/video/meye.h b/drivers/media/video/meye.h index 2a2f79ed41ab..0983b8e5792b 100644 --- a/drivers/media/video/meye.h +++ b/drivers/media/video/meye.h @@ -31,7 +31,7 @@ #define _MEYE_PRIV_H_ #define MEYE_DRIVER_MAJORVERSION 1 -#define MEYE_DRIVER_MINORVERSION 9 +#define MEYE_DRIVER_MINORVERSION 10 #include <linux/config.h> #include <linux/types.h> diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig index 1556a1209a9f..d1df462069b1 100644 --- a/drivers/mtd/devices/Kconfig +++ b/drivers/mtd/devices/Kconfig @@ -40,7 +40,7 @@ config MTD_PMC551_DEBUG config MTD_MS02NV tristate "DEC MS02-NV NVRAM module support" - depends on CONFIG_DECSTATION + depends on CONFIG_MACH_DECSTATION help Support for NVRAM module on DECstation. diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index 6cc14fde4695..58290c5bbc39 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c @@ -777,7 +777,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, u8 tmp8; int rc; unsigned int i; - u32 pio_start, pio_end, pio_flags, pio_len; + unsigned long pio_start, pio_end, pio_flags, pio_len; unsigned long mmio_start, mmio_end, mmio_flags, mmio_len; u32 version; diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c index 57c1b7d2d362..5912a24a3670 100644 --- a/drivers/net/arcnet/arcnet.c +++ b/drivers/net/arcnet/arcnet.c @@ -479,7 +479,7 @@ static int arcnet_header(struct sk_buff *skb, struct net_device *dev, *(uint16_t *) skb_push(skb, 2) = type; if (skb->nh.raw - skb->mac.raw != 2) BUGMSG(D_NORMAL, "arcnet_header: Yikes! diff (%d) is not 2!\n", - skb->nh.raw - skb->mac.raw); + (int)(skb->nh.raw - skb->mac.raw)); return -2; /* return error -- can't transmit yet! */ } /* otherwise, we can just add the header as usual. */ @@ -514,7 +514,7 @@ static int arcnet_rebuild_header(struct sk_buff *skb) if (skb->nh.raw - skb->mac.raw != 2) { BUGMSG(D_NORMAL, "rebuild_header: shouldn't be here! (hdrsize=%d)\n", - skb->nh.raw - skb->mac.raw); + (int)(skb->nh.raw - skb->mac.raw)); return 0; } type = *(uint16_t *) skb_pull(skb, 2); diff --git a/drivers/net/irda/Kconfig b/drivers/net/irda/Kconfig index e052547caea1..8d12144ad16d 100644 --- a/drivers/net/irda/Kconfig +++ b/drivers/net/irda/Kconfig @@ -333,7 +333,7 @@ config WINBOND_FIR config TOSHIBA_FIR tristate "Toshiba Type-O IR Port" - depends on IRDA + depends on IRDA && !64BIT help Say Y here if you want to build support for the Toshiba Type-O IR and Donau oboe chipsets. These chipsets are used by the Toshiba diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c index 49f6d5308282..4cc3f5c1e3c6 100644 --- a/drivers/net/irda/donauboe.c +++ b/drivers/net/irda/donauboe.c @@ -1622,6 +1622,10 @@ toshoboe_open (struct pci_dev *pci_dev, const struct pci_device_id *pdid) goto freeregion; } +#if (BITS_PER_LONG == 64) +#error broken on 64-bit: casts pointer to 32-bit, and then back to pointer. +#endif + /*We need to align the taskfile on a taskfile size boundary */ { unsigned long addr; diff --git a/drivers/net/rrunner.c b/drivers/net/rrunner.c index d77314518f2d..ef88746b5e4b 100644 --- a/drivers/net/rrunner.c +++ b/drivers/net/rrunner.c @@ -1335,10 +1335,10 @@ static void rr_dump(struct net_device *dev) if (rrpriv->tx_skbuff[cons]){ len = min_t(int, 0x80, rrpriv->tx_skbuff[cons]->len); printk("skbuff for cons %i is valid - dumping data (0x%x bytes - skbuff len 0x%x)\n", cons, len, rrpriv->tx_skbuff[cons]->len); - printk("mode 0x%x, size 0x%x,\n phys %08x, skbuff-addr %08lx, truesize 0x%x\n", + printk("mode 0x%x, size 0x%x,\n phys %08Lx, skbuff-addr %08lx, truesize 0x%x\n", rrpriv->tx_ring[cons].mode, rrpriv->tx_ring[cons].size, - rrpriv->tx_ring[cons].addr.addrlo, + (unsigned long long) rrpriv->tx_ring[cons].addr.addrlo, (unsigned long)rrpriv->tx_skbuff[cons]->data, (unsigned int)rrpriv->tx_skbuff[cons]->truesize); for (i = 0; i < len; i++){ @@ -1351,10 +1351,10 @@ static void rr_dump(struct net_device *dev) printk("dumping TX ring info:\n"); for (i = 0; i < TX_RING_ENTRIES; i++) - printk("mode 0x%x, size 0x%x, phys-addr %08x\n", + printk("mode 0x%x, size 0x%x, phys-addr %08Lx\n", rrpriv->tx_ring[i].mode, rrpriv->tx_ring[i].size, - rrpriv->tx_ring[i].addr.addrlo); + (unsigned long long) rrpriv->tx_ring[i].addr.addrlo); } diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c index 53da48163496..503fdff54bc1 100644 --- a/drivers/net/sk98lin/skge.c +++ b/drivers/net/sk98lin/skge.c @@ -1927,6 +1927,7 @@ struct sk_buff *pMessage) /* pointer to send-message */ */ if (BytesSend < C_LEN_ETHERNET_MINSIZE) { if ((pMessage = skb_padto(pMessage, C_LEN_ETHERNET_MINSIZE)) == NULL) { + spin_unlock_irqrestore(&pTxPort->TxDesRingLock, Flags); return 0; } pMessage->len = C_LEN_ETHERNET_MINSIZE; diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 6b2a16825fbf..f82c58505056 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -1,8 +1,9 @@ /* * tg3.c: Broadcom Tigon3 ethernet driver. * - * Copyright (C) 2001, 2002, 2003 David S. Miller (davem@redhat.com) + * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com) * Copyright (C) 2001, 2002, 2003 Jeff Garzik (jgarzik@pobox.com) + * Copyright (C) 2004 Sun Microsystems Inc. */ #include <linux/config.h> @@ -56,8 +57,8 @@ #define DRV_MODULE_NAME "tg3" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "3.6" -#define DRV_MODULE_RELDATE "June 12, 2004" +#define DRV_MODULE_VERSION "3.7" +#define DRV_MODULE_RELDATE "July 2, 2004" #define TG3_DEF_MAC_MODE 0 #define TG3_DEF_RX_MODE 0 @@ -1961,6 +1962,67 @@ static int tg3_fiber_aneg_smachine(struct tg3 *tp, return ret; } +static int fiber_autoneg(struct tg3 *tp, u32 *flags) +{ + int res = 0; + + if (tp->tg3_flags2 & TG3_FLG2_HW_AUTONEG) { + u32 dig_status; + + dig_status = tr32(SG_DIG_STATUS); + *flags = 0; + if (dig_status & SG_DIG_PARTNER_ASYM_PAUSE) + *flags |= MR_LP_ADV_ASYM_PAUSE; + if (dig_status & SG_DIG_PARTNER_PAUSE_CAPABLE) + *flags |= MR_LP_ADV_SYM_PAUSE; + + if ((dig_status & SG_DIG_AUTONEG_COMPLETE) && + !(dig_status & (SG_DIG_AUTONEG_ERROR | + SG_DIG_PARTNER_FAULT_MASK))) + res = 1; + } else { + struct tg3_fiber_aneginfo aninfo; + int status = ANEG_FAILED; + unsigned int tick; + u32 tmp; + + tw32_f(MAC_TX_AUTO_NEG, 0); + + tmp = tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK; + tw32_f(MAC_MODE, tmp | MAC_MODE_PORT_MODE_GMII); + udelay(40); + + tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_SEND_CONFIGS); + udelay(40); + + memset(&aninfo, 0, sizeof(aninfo)); + aninfo.flags |= MR_AN_ENABLE; + aninfo.state = ANEG_STATE_UNKNOWN; + aninfo.cur_time = 0; + tick = 0; + while (++tick < 195000) { + status = tg3_fiber_aneg_smachine(tp, &aninfo); + if (status == ANEG_DONE || status == ANEG_FAILED) + break; + + udelay(1); + } + + tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS; + tw32_f(MAC_MODE, tp->mac_mode); + udelay(40); + + *flags = aninfo.flags; + + if (status == ANEG_DONE && + (aninfo.flags & (MR_AN_COMPLETE | MR_LINK_OK | + MR_LP_ADV_FULL_DUPLEX))) + res = 1; + } + + return res; +} + static int tg3_setup_fiber_phy(struct tg3 *tp, int force_reset) { u32 orig_pause_cfg; @@ -1980,6 +2042,20 @@ static int tg3_setup_fiber_phy(struct tg3 *tp, int force_reset) tw32_f(MAC_MODE, tp->mac_mode); udelay(40); + if (tp->tg3_flags2 & TG3_FLG2_HW_AUTONEG) { + /* Allow time for the hardware to auto-negotiate (195ms) */ + unsigned int tick = 0; + + while (++tick < 195000) { + if (tr32(SG_DIG_STATUS) & SG_DIG_AUTONEG_COMPLETE) + break; + udelay(1); + } + if (tick >= 195000) + printk(KERN_INFO PFX "%s: HW autoneg failed !\n", + tp->dev->name); + } + /* Reset when initting first time or we have a link. */ if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) || (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED)) { @@ -2031,53 +2107,18 @@ static int tg3_setup_fiber_phy(struct tg3 *tp, int force_reset) udelay(40); current_link_up = 0; - if (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) { - if (tp->link_config.autoneg == AUTONEG_ENABLE && - !(tp->tg3_flags & TG3_FLAG_GOT_SERDES_FLOWCTL)) { - struct tg3_fiber_aneginfo aninfo; - int status = ANEG_FAILED; - unsigned int tick; - u32 tmp; - - memset(&aninfo, 0, sizeof(aninfo)); - aninfo.flags |= (MR_AN_ENABLE); - - tw32(MAC_TX_AUTO_NEG, 0); - - tmp = tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK; - tw32_f(MAC_MODE, tmp | MAC_MODE_PORT_MODE_GMII); - udelay(40); - - tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_SEND_CONFIGS); - udelay(40); - - aninfo.state = ANEG_STATE_UNKNOWN; - aninfo.cur_time = 0; - tick = 0; - while (++tick < 195000) { - status = tg3_fiber_aneg_smachine(tp, &aninfo); - if (status == ANEG_DONE || - status == ANEG_FAILED) - break; - - udelay(1); - } - - tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS; - tw32_f(MAC_MODE, tp->mac_mode); - udelay(40); - - if (status == ANEG_DONE && - (aninfo.flags & - (MR_AN_COMPLETE | MR_LINK_OK | - MR_LP_ADV_FULL_DUPLEX))) { + if (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) { + if (tp->link_config.autoneg == AUTONEG_ENABLE) { + u32 flags; + + if (fiber_autoneg(tp, &flags)) { u32 local_adv, remote_adv; local_adv = ADVERTISE_PAUSE_CAP; remote_adv = 0; - if (aninfo.flags & MR_LP_ADV_SYM_PAUSE) - remote_adv |= LPA_PAUSE_CAP; - if (aninfo.flags & MR_LP_ADV_ASYM_PAUSE) + if (flags & MR_LP_ADV_SYM_PAUSE) + remote_adv |= LPA_PAUSE_CAP; + if (flags & MR_LP_ADV_ASYM_PAUSE) remote_adv |= LPA_PAUSE_ASYM; tg3_setup_flow_control(tp, local_adv, remote_adv); @@ -2104,8 +2145,10 @@ static int tg3_setup_fiber_phy(struct tg3 *tp, int force_reset) } else { /* Forcing 1000FD link up. */ current_link_up = 1; + tp->tg3_flags |= TG3_FLAG_GOT_SERDES_FLOWCTL; } - } + } else + tp->tg3_flags &= ~TG3_FLAG_GOT_SERDES_FLOWCTL; tp->mac_mode &= ~MAC_MODE_LINK_POLARITY; tw32_f(MAC_MODE, tp->mac_mode); @@ -2811,11 +2854,10 @@ static inline int tg3_4g_overflow_test(dma_addr_t mapping, int len) u32 base = (u32) mapping & 0xffffffff; return ((base > 0xffffdcc0) && - ((u64) mapping >> 32) == 0 && (base + len + 8 < base)); } -static int tg3_start_xmit_4gbug(struct sk_buff *skb, struct net_device *dev) +static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct tg3 *tp = netdev_priv(dev); dma_addr_t mapping; @@ -3019,165 +3061,6 @@ out_unlock: return 0; } -static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) -{ - struct tg3 *tp = netdev_priv(dev); - dma_addr_t mapping; - u32 len, entry, base_flags, mss; - unsigned long flags; - - len = skb_headlen(skb); - - /* No BH disabling for tx_lock here. We are running in BH disabled - * context and TX reclaim runs via tp->poll inside of a software - * interrupt. Rejoice! - * - * Actually, things are not so simple. If we are to take a hw - * IRQ here, we can deadlock, consider: - * - * CPU1 CPU2 - * tg3_start_xmit - * take tp->tx_lock - * tg3_timer - * take tp->lock - * tg3_interrupt - * spin on tp->lock - * spin on tp->tx_lock - * - * So we really do need to disable interrupts when taking - * tx_lock here. - */ - spin_lock_irqsave(&tp->tx_lock, flags); - - /* This is a hard error, log it. */ - if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->nr_frags + 1))) { - netif_stop_queue(dev); - spin_unlock_irqrestore(&tp->tx_lock, flags); - printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n", - dev->name); - return 1; - } - - entry = tp->tx_prod; - base_flags = 0; - if (skb->ip_summed == CHECKSUM_HW) - base_flags |= TXD_FLAG_TCPUDP_CSUM; -#if TG3_TSO_SUPPORT != 0 - mss = 0; - if (skb->len > (tp->dev->mtu + ETH_HLEN) && - (mss = skb_shinfo(skb)->tso_size) != 0) { - int tcp_opt_len, ip_tcp_len; - - tcp_opt_len = ((skb->h.th->doff - 5) * 4); - ip_tcp_len = (skb->nh.iph->ihl * 4) + sizeof(struct tcphdr); - - base_flags |= (TXD_FLAG_CPU_PRE_DMA | - TXD_FLAG_CPU_POST_DMA); - - skb->nh.iph->check = 0; - skb->nh.iph->tot_len = ntohs(mss + ip_tcp_len + tcp_opt_len); - skb->h.th->check = ~csum_tcpudp_magic(skb->nh.iph->saddr, - skb->nh.iph->daddr, - 0, IPPROTO_TCP, 0); - - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { - if (tcp_opt_len || skb->nh.iph->ihl > 5) { - int tsflags; - - tsflags = ((skb->nh.iph->ihl - 5) + - (tcp_opt_len >> 2)); - mss |= (tsflags << 11); - } - } else { - if (tcp_opt_len || skb->nh.iph->ihl > 5) { - int tsflags; - - tsflags = ((skb->nh.iph->ihl - 5) + - (tcp_opt_len >> 2)); - base_flags |= tsflags << 12; - } - } - } -#else - mss = 0; -#endif -#if TG3_VLAN_TAG_USED - if (tp->vlgrp != NULL && vlan_tx_tag_present(skb)) - base_flags |= (TXD_FLAG_VLAN | - (vlan_tx_tag_get(skb) << 16)); -#endif - - /* Queue skb data, a.k.a. the main skb fragment. */ - mapping = pci_map_single(tp->pdev, skb->data, len, PCI_DMA_TODEVICE); - - tp->tx_buffers[entry].skb = skb; - pci_unmap_addr_set(&tp->tx_buffers[entry], mapping, mapping); - - tg3_set_txd(tp, entry, mapping, len, base_flags, - (skb_shinfo(skb)->nr_frags == 0) | (mss << 1)); - - entry = NEXT_TX(entry); - - /* Now loop through additional data fragments, and queue them. */ - if (skb_shinfo(skb)->nr_frags > 0) { - unsigned int i, last; - - last = skb_shinfo(skb)->nr_frags - 1; - for (i = 0; i <= last; i++) { - skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; - - - len = frag->size; - mapping = pci_map_page(tp->pdev, - frag->page, - frag->page_offset, - len, PCI_DMA_TODEVICE); - - tp->tx_buffers[entry].skb = NULL; - pci_unmap_addr_set(&tp->tx_buffers[entry], mapping, mapping); - - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) - tg3_set_txd(tp, entry, mapping, len, - base_flags, (i == last)|(mss << 1)); - else - tg3_set_txd(tp, entry, mapping, len, - base_flags, (i == last)); - - entry = NEXT_TX(entry); - } - } - - /* Packets are ready, update Tx producer idx local and on card. - * We know this is not a 5700 (by virtue of not being a chip - * requiring the 4GB overflow workaround) so we can safely omit - * the double-write bug tests. - */ - if (tp->tg3_flags & TG3_FLAG_HOST_TXDS) { - tw32_tx_mbox((MAILBOX_SNDHOST_PROD_IDX_0 + - TG3_64BIT_REG_LOW), entry); - } else { - /* First, make sure tg3 sees last descriptor fully - * in SRAM. - */ - if (tp->tg3_flags & TG3_FLAG_MBOX_WRITE_REORDER) - tr32(MAILBOX_SNDNIC_PROD_IDX_0 + - TG3_64BIT_REG_LOW); - - tw32_tx_mbox((MAILBOX_SNDNIC_PROD_IDX_0 + - TG3_64BIT_REG_LOW), entry); - } - - tp->tx_prod = entry; - if (TX_BUFFS_AVAIL(tp) <= (MAX_SKB_FRAGS + 1)) - netif_stop_queue(dev); - - spin_unlock_irqrestore(&tp->tx_lock, flags); - - dev->trans_start = jiffies; - - return 0; -} - static inline void tg3_set_mtu(struct net_device *dev, struct tg3 *tp, int new_mtu) { @@ -5363,6 +5246,26 @@ static int tg3_reset_hw(struct tg3 *tp) */ tw32_f(MAC_LOW_WMARK_MAX_RX_FRAME, 2); + if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 && + tp->phy_id == PHY_ID_SERDES) { + /* Enable hardware link auto-negotiation */ + u32 digctrl, txctrl; + + digctrl = SG_DIG_USING_HW_AUTONEG | SG_DIG_CRC16_CLEAR_N | + SG_DIG_LOCAL_DUPLEX_STATUS | SG_DIG_LOCAL_LINK_STATUS | + (2 << SG_DIG_SPEED_STATUS_SHIFT) | SG_DIG_FIBER_MODE | + SG_DIG_GBIC_ENABLE; + + txctrl = tr32(MAC_SERDES_CFG); + tw32_f(MAC_SERDES_CFG, txctrl | MAC_SERDES_CFG_EDGE_SELECT); + tw32_f(SG_DIG_CTRL, digctrl | SG_DIG_SOFT_RESET); + tr32(SG_DIG_CTRL); + udelay(5); + tw32_f(SG_DIG_CTRL, digctrl); + + tp->tg3_flags2 |= TG3_FLG2_HW_AUTONEG; + } + err = tg3_setup_phy(tp, 1); if (err) return err; @@ -6696,6 +6599,9 @@ static int tg3_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) case SIOCGMIIREG: { u32 mii_regval; + if (tp->phy_id == PHY_ID_SERDES) + break; /* We have no PHY */ + spin_lock_irq(&tp->lock); err = tg3_readphy(tp, data->reg_num & 0x1f, &mii_regval); spin_unlock_irq(&tp->lock); @@ -6706,6 +6612,9 @@ static int tg3_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) } case SIOCSMIIREG: + if (tp->phy_id == PHY_ID_SERDES) + break; /* We have no PHY */ + if (!capable(CAP_NET_ADMIN)) return -EPERM; @@ -7636,13 +7545,10 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) else tp->tg3_flags &= ~TG3_FLAG_TXD_MBOX_HWBUG; - /* 5700 chips can get confused if TX buffers straddle the - * 4GB address boundary in some cases. + /* It seems all chips can get confused if TX buffers + * straddle the 4GB address boundary in some cases. */ - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) - tp->dev->hard_start_xmit = tg3_start_xmit_4gbug; - else - tp->dev->hard_start_xmit = tg3_start_xmit; + tp->dev->hard_start_xmit = tg3_start_xmit; tp->rx_offset = 2; if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701 && diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index fabc65f7adc7..5c0c104f441e 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h @@ -1,8 +1,9 @@ /* $Id: tg3.h,v 1.37.2.32 2002/03/11 12:18:18 davem Exp $ * tg3.h: Definitions for Broadcom Tigon3 ethernet driver. * - * Copyright (C) 2001, 2002 David S. Miller (davem@redhat.com) + * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com) * Copyright (C) 2001 Jeff Garzik (jgarzik@pobox.com) + * Copyright (C) 2004 Sun Microsystems Inc. */ #ifndef _T3_H @@ -116,6 +117,7 @@ #define CHIPREV_ID_5704_A0 0x2000 #define CHIPREV_ID_5704_A1 0x2001 #define CHIPREV_ID_5704_A2 0x2002 +#define CHIPREV_ID_5704_A3 0x2003 #define CHIPREV_ID_5705_A0 0x3000 #define CHIPREV_ID_5705_A1 0x3001 #define CHIPREV_ID_5705_A2 0x3002 @@ -518,8 +520,50 @@ #define MAC_EXTADDR_11_HIGH 0x00000588 #define MAC_EXTADDR_11_LOW 0x0000058c #define MAC_SERDES_CFG 0x00000590 +#define MAC_SERDES_CFG_EDGE_SELECT 0x00001000 #define MAC_SERDES_STAT 0x00000594 -/* 0x598 --> 0x600 unused */ +/* 0x598 --> 0x5b0 unused */ +#define SG_DIG_CTRL 0x000005b0 +#define SG_DIG_USING_HW_AUTONEG 0x80000000 +#define SG_DIG_SOFT_RESET 0x40000000 +#define SG_DIG_DISABLE_LINKRDY 0x20000000 +#define SG_DIG_CRC16_CLEAR_N 0x01000000 +#define SG_DIG_EN10B 0x00800000 +#define SG_DIG_CLEAR_STATUS 0x00400000 +#define SG_DIG_LOCAL_DUPLEX_STATUS 0x00200000 +#define SG_DIG_LOCAL_LINK_STATUS 0x00100000 +#define SG_DIG_SPEED_STATUS_MASK 0x000c0000 +#define SG_DIG_SPEED_STATUS_SHIFT 18 +#define SG_DIG_JUMBO_PACKET_DISABLE 0x00020000 +#define SG_DIG_RESTART_AUTONEG 0x00010000 +#define SG_DIG_FIBER_MODE 0x00008000 +#define SG_DIG_REMOTE_FAULT_MASK 0x00006000 +#define SG_DIG_PAUSE_MASK 0x00001800 +#define SG_DIG_GBIC_ENABLE 0x00000400 +#define SG_DIG_CHECK_END_ENABLE 0x00000200 +#define SG_DIG_SGMII_AUTONEG_TIMER 0x00000100 +#define SG_DIG_CLOCK_PHASE_SELECT 0x00000080 +#define SG_DIG_GMII_INPUT_SELECT 0x00000040 +#define SG_DIG_MRADV_CRC16_SELECT 0x00000020 +#define SG_DIG_COMMA_DETECT_ENABLE 0x00000010 +#define SG_DIG_AUTONEG_TIMER_REDUCE 0x00000008 +#define SG_DIG_AUTONEG_LOW_ENABLE 0x00000004 +#define SG_DIG_REMOTE_LOOPBACK 0x00000002 +#define SG_DIG_LOOPBACK 0x00000001 +#define SG_DIG_STATUS 0x000005b4 +#define SG_DIG_CRC16_BUS_MASK 0xffff0000 +#define SG_DIG_PARTNER_FAULT_MASK 0x00600000 /* If !MRADV_CRC16_SELECT */ +#define SG_DIG_PARTNER_ASYM_PAUSE 0x00100000 /* If !MRADV_CRC16_SELECT */ +#define SG_DIG_PARTNER_PAUSE_CAPABLE 0x00080000 /* If !MRADV_CRC16_SELECT */ +#define SG_DIG_PARTNER_HALF_DUPLEX 0x00040000 /* If !MRADV_CRC16_SELECT */ +#define SG_DIG_PARTNER_FULL_DUPLEX 0x00020000 /* If !MRADV_CRC16_SELECT */ +#define SG_DIG_PARTNER_NEXT_PAGE 0x00010000 /* If !MRADV_CRC16_SELECT */ +#define SG_DIG_AUTONEG_STATE_MASK 0x00000ff0 +#define SG_DIG_COMMA_DETECTOR 0x00000008 +#define SG_DIG_MAC_ACK_STATUS 0x00000004 +#define SG_DIG_AUTONEG_COMPLETE 0x00000002 +#define SG_DIG_AUTONEG_ERROR 0x00000001 +/* 0x5b8 --> 0x600 unused */ #define MAC_TX_MAC_STATE_BASE 0x00000600 /* 16 bytes */ #define MAC_RX_MAC_STATE_BASE 0x00000610 /* 20 bytes */ /* 0x624 --> 0x800 unused */ @@ -2044,6 +2088,7 @@ struct tg3 { #define TG3_FLG2_PHY_BER_BUG 0x00000100 #define TG3_FLG2_PCI_EXPRESS 0x00000200 #define TG3_FLG2_ASF_NEW_HANDSHAKE 0x00000400 +#define TG3_FLG2_HW_AUTONEG 0x00000800 u32 split_mode_max_reqs; #define SPLIT_MODE_5704_MAX_REQ 3 diff --git a/drivers/net/tokenring/Kconfig b/drivers/net/tokenring/Kconfig index 90cd1f285d23..e83c7415d3e4 100644 --- a/drivers/net/tokenring/Kconfig +++ b/drivers/net/tokenring/Kconfig @@ -54,7 +54,7 @@ config IBMOL config IBMLS tristate "IBM Lanstreamer chipset PCI adapter support" - depends on TR && PCI + depends on TR && PCI && !64BIT help This is support for IBM Lanstreamer PCI Token Ring Cards. diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c index 3eee454402cb..e41cc71142c7 100644 --- a/drivers/net/tokenring/lanstreamer.c +++ b/drivers/net/tokenring/lanstreamer.c @@ -129,6 +129,11 @@ #include "lanstreamer.h" +#if (BITS_PER_LONG == 64) +#error broken on 64-bit: stores pointer to rx_ring->buffer in 32-bit int +#endif + + /* I've got to put some intelligence into the version number so that Peter and I know * which version of the code somebody has got. * Version Number = a.b.c.d where a.b.c is the level of code and d is the latest author. diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index 06b09a0327c2..cccec2b32049 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c @@ -348,9 +348,19 @@ static struct { }; /* This is strictly temporary, until PCMCIA devices get integrated into the device model. */ -static struct device atmel_device = { - .bus_id = "pcmcia", -}; +static struct device *atmel_device(void) +{ + static char *kobj_name = "atmel_cs"; + + static struct device dev = { + .bus_id = "pcmcia", + }; + dev.kobj.k_name = kmalloc(strlen(kobj_name)+1, GFP_KERNEL); + strcpy(dev.kobj.k_name, kobj_name); + kobject_init(&dev.kobj); + + return &dev; +} static void atmel_config(dev_link_t *link) { @@ -537,12 +547,12 @@ static void atmel_config(dev_link_t *link) "atmel: cannot assign IRQ: check that CONFIG_ISA is set in kernel config."); goto cs_failed; } - + ((local_info_t*)link->priv)->eth_dev = init_atmel_card(link->irq.AssignedIRQ, link->io.BasePort1, card_index == -1 ? NULL : card_table[card_index].firmware, - &atmel_device, + atmel_device(), card_present, link); if (!((local_info_t*)link->priv)->eth_dev) diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c index 34d691cbe080..ed4b23c3c5e0 100644 --- a/drivers/pci/hotplug/rpadlpar_core.c +++ b/drivers/pci/hotplug/rpadlpar_core.c @@ -18,6 +18,7 @@ #include <linux/pci.h> #include <asm/pci-bridge.h> #include <asm/semaphore.h> +#include <asm/rtas.h> #include "../pci.h" #include "rpaphp.h" #include "rpadlpar.h" diff --git a/drivers/pci/hotplug/rpaphp.h b/drivers/pci/hotplug/rpaphp.h index eb0d6ba596bf..e155c4c974dc 100644 --- a/drivers/pci/hotplug/rpaphp.h +++ b/drivers/pci/hotplug/rpaphp.h @@ -85,6 +85,7 @@ struct rpaphp_pci_func { * struct slot - slot information for each *physical* slot */ struct slot { + struct list_head rpaphp_slot_list; int state; u32 index; u32 type; @@ -92,6 +93,7 @@ struct slot { char *name; char *location; u8 removable; + u8 dev_type; /* VIO or PCI */ struct device_node *dn; /* slot's device_node in OFDT */ /* dn has phb info */ struct pci_dev *bridge; /* slot's pci_dev in pci_devices */ @@ -99,9 +101,7 @@ struct slot { struct list_head pci_funcs; /* pci_devs in PCI slot */ struct vio_dev *vio_dev; /* vio_dev in VIO slot */ } dev; - u8 dev_type; /* VIO or PCI */ struct hotplug_slot *hotplug_slot; - struct list_head rpaphp_slot_list; }; extern struct hotplug_slot_ops rpaphp_hotplug_slot_ops; diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c index 1fc2c3b820e8..0dd2d23699e5 100644 --- a/drivers/pci/hotplug/rpaphp_pci.c +++ b/drivers/pci/hotplug/rpaphp_pci.c @@ -24,6 +24,7 @@ */ #include <linux/pci.h> #include <asm/pci-bridge.h> +#include <asm/rtas.h> #include "../pci.h" /* for pci_add_new_bus */ #include "rpaphp.h" @@ -378,8 +379,8 @@ int rpaphp_unconfig_pci_adapter(struct slot *slot) func = list_entry(ln, struct rpaphp_pci_func, sibling); if (func->pci_dev) { - rpaphp_eeh_remove_bus_device(func->pci_dev); pci_remove_bus_device(func->pci_dev); + rpaphp_eeh_remove_bus_device(func->pci_dev); } kfree(func); } @@ -513,9 +514,18 @@ struct hotplug_slot *rpaphp_find_hotplug_slot(struct pci_dev *dev) struct list_head *ln; slot = list_entry(tmp, struct slot, rpaphp_slot_list); + if (slot->bridge == NULL) { + if (slot->dev_type == PCI_DEV) { + printk(KERN_WARNING "PCI slot missing bridge %s %s \n", + slot->name, slot->location); + } + continue; + } + bus = slot->bridge->subordinate; - if (!bus) - return NULL; /* shouldn't be here */ + if (!bus) { + continue; /* should never happen? */ + } for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) { struct pci_dev *pdev = pci_dev_b(ln); if (pdev == dev) diff --git a/drivers/pci/hotplug/rpaphp_slot.c b/drivers/pci/hotplug/rpaphp_slot.c index b8ba8920f433..c58541addf50 100644 --- a/drivers/pci/hotplug/rpaphp_slot.c +++ b/drivers/pci/hotplug/rpaphp_slot.c @@ -27,6 +27,7 @@ #include <linux/kobject.h> #include <linux/sysfs.h> #include <linux/pci.h> +#include <asm/rtas.h> #include "rpaphp.h" static ssize_t removable_read_file (struct hotplug_slot *php_slot, char *buf) diff --git a/drivers/pci/pci.ids b/drivers/pci/pci.ids index 6e4965e6616a..c1f3d74cc057 100644 --- a/drivers/pci/pci.ids +++ b/drivers/pci/pci.ids @@ -5535,6 +5535,7 @@ 132d Integrated Silicon Solution, Inc. 1330 MMC Networks 1331 Radisys Corp. + 0030 ENP-2611 8200 82600 Host Bridge 8201 82600 IDE 8202 82600 USB diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 736a56f7f98b..ee7b9feb60b5 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -326,7 +326,7 @@ struct pci_bus * __devinit pci_add_new_bus(struct pci_bus *parent, struct pci_de return child; } -static unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus); +unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus); /* * If it's a bridge, configure it and scan the bus behind it. @@ -694,7 +694,7 @@ int __devinit pci_scan_slot(struct pci_bus *bus, int devfn) return nr; } -static unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus) +unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus) { unsigned int devfn, pass, max = bus->secondary; struct pci_dev *dev; @@ -801,4 +801,5 @@ EXPORT_SYMBOL(pci_do_scan_bus); EXPORT_SYMBOL(pci_scan_slot); EXPORT_SYMBOL(pci_scan_bridge); EXPORT_SYMBOL(pci_scan_single_device); +EXPORT_SYMBOL_GPL(pci_scan_child_bus); #endif diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 6997d61dcc67..0eb2d3331900 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -7,7 +7,7 @@ * Bugreports.to..: <Linux390@de.ibm.com> * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 * - * $Revision: 1.142 $ + * $Revision: 1.146 $ */ #include <linux/config.h> @@ -623,8 +623,6 @@ dasd_kfree_request(struct dasd_ccw_req * cqr, struct dasd_device * device) clear_normalized_cda(ccw); } while (ccw++->flags & (CCW_FLAG_CC | CCW_FLAG_DC)); #endif - if (cqr->dstat != NULL) - kfree(cqr->dstat); debug_text_event ( dasd_debug_area, 1, "FREE"); debug_int_event ( dasd_debug_area, 1, (long) cqr); if (cqr->cpaddr != NULL) @@ -640,8 +638,6 @@ dasd_sfree_request(struct dasd_ccw_req * cqr, struct dasd_device * device) { unsigned long flags; - if (cqr->dstat != NULL) - kfree(cqr->dstat); debug_text_event(dasd_debug_area, 1, "FREE"); debug_int_event(dasd_debug_area, 1, (long) cqr); spin_lock_irqsave(&device->mem_lock, flags); @@ -673,7 +669,8 @@ dasd_check_cqr(struct dasd_ccw_req *cqr) } /* - * Terminate the current i/o and set the request to failed. + * Terminate the current i/o and set the request to clear_pending. + * Timer keeps device runnig. * ccw_device_clear can fail if the i/o subsystem * is in a bad mood. */ @@ -695,7 +692,7 @@ dasd_term_IO(struct dasd_ccw_req * cqr) case 0: /* termination successful */ if (cqr->retries > 0) { cqr->retries--; - cqr->status = DASD_CQR_QUEUED; + cqr->status = DASD_CQR_CLEAR; } else cqr->status = DASD_CQR_FAILED; cqr->stopclk = get_clock(); @@ -826,41 +823,6 @@ dasd_clear_timer(struct dasd_device *device) del_timer(&device->timer); } -/* - * Handles the state change pending interrupt. - */ -static void -do_state_change_pending(void *data) -{ - struct { - struct work_struct work; - struct dasd_device *device; - } *p; - struct dasd_device *device; - struct dasd_ccw_req *cqr; - struct list_head *l, *n; - unsigned long flags; - - p = data; - device = p->device; - DBF_EVENT(DBF_NOTICE, "State change Interrupt for bus_id %s", - device->cdev->dev.bus_id); - device->stopped &= ~DASD_STOPPED_PENDING; - - /* restart all 'running' IO on queue */ - spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); - list_for_each_safe(l, n, &device->ccw_queue) { - cqr = list_entry(l, struct dasd_ccw_req, list); - if (cqr->status == DASD_CQR_IN_IO) - cqr->status = DASD_CQR_QUEUED; - } - spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags); - dasd_set_timer (device, 0); - dasd_schedule_bh(device); - dasd_put_device(device); - kfree(p); -} - static void dasd_handle_killed_request(struct ccw_device *cdev, unsigned long intparm) { @@ -896,19 +858,20 @@ dasd_handle_killed_request(struct ccw_device *cdev, unsigned long intparm) static void dasd_handle_state_change_pending(struct dasd_device *device) { - struct { - struct work_struct work; - struct dasd_device *device; - } *p; + struct dasd_ccw_req *cqr; + struct list_head *l, *n; - p = kmalloc(sizeof(*p), GFP_ATOMIC); - if (p == NULL) - /* No memory, let the timeout do the reactivation. */ - return; - INIT_WORK(&p->work, (void *) do_state_change_pending, p); - p->device = device; - dasd_get_device(device); - schedule_work(&p->work); + device->stopped &= ~DASD_STOPPED_PENDING; + + /* restart all 'running' IO on queue */ + list_for_each_safe(l, n, &device->ccw_queue) { + cqr = list_entry(l, struct dasd_ccw_req, list); + if (cqr->status == DASD_CQR_IN_IO) { + cqr->status = DASD_CQR_QUEUED; + } + } + dasd_clear_timer(device); + dasd_schedule_bh(device); } /* @@ -944,8 +907,9 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, now = get_clock(); - DBF_EVENT(DBF_DEBUG, "Interrupt: stat %02x, bus_id %s", - irb->scsw.dstat, cdev->dev.bus_id); + DBF_EVENT(DBF_ERR, "Interrupt: bus_id %s CS/DS %04x ip %08x", + cdev->dev.bus_id, ((irb->scsw.cstat<<8)|irb->scsw.dstat), + (unsigned int) intparm); /* first of all check for state change pending interrupt */ mask = DEV_STAT_ATTENTION | DEV_STAT_DEV_END | DEV_STAT_UNIT_EXCEP; @@ -959,14 +923,12 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, } cqr = (struct dasd_ccw_req *) intparm; - /* - * check status - the request might have been killed - * because of dyn detach - */ - if (cqr->status != DASD_CQR_IN_IO) { + + /* check for unsolicited interrupts */ + if (cqr == NULL) { MESSAGE(KERN_DEBUG, - "invalid status: bus_id %s, status %02x", - cdev->dev.bus_id, cqr->status); + "unsolicited interrupt received: bus_id %s", + cdev->dev.bus_id); return; } @@ -978,6 +940,22 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, return; } + /* Check for clear pending */ + if (cqr->status == DASD_CQR_CLEAR && + irb->scsw.fctl & SCSW_FCTL_CLEAR_FUNC) { + cqr->status = DASD_CQR_QUEUED; + dasd_clear_timer(device); + dasd_schedule_bh(device); + return; + } + + /* check status - the request might have been killed by dyn detach */ + if (cqr->status != DASD_CQR_IN_IO) { + MESSAGE(KERN_DEBUG, + "invalid status: bus_id %s, status %02x", + cdev->dev.bus_id, cqr->status); + return; + } DBF_DEV_EVENT(DBF_DEBUG, device, "Int: CS/DS 0x%04x", ((irb->scsw.cstat << 8) | irb->scsw.dstat)); @@ -1015,13 +993,7 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, } } } else { /* error */ - if (cqr->dstat == NULL) - cqr->dstat = kmalloc(sizeof(struct irb), GFP_ATOMIC); - if (cqr->dstat) - memcpy(cqr->dstat, irb, sizeof (struct irb)); - else - DEV_MESSAGE(KERN_ERR, device, "%s", - "no memory for dstat...ignoring"); + memcpy(&cqr->irb, irb, sizeof (struct irb)); #ifdef ERP_DEBUG /* dump sense data */ dasd_log_sense(cqr, irb); @@ -1096,11 +1068,11 @@ restart: /* Process requests with DASD_CQR_ERROR */ if (cqr->status == DASD_CQR_ERROR) { cqr->retries--; - if (cqr->dstat->scsw.fctl & SCSW_FCTL_HALT_FUNC) { + if (cqr->irb.scsw.fctl & SCSW_FCTL_HALT_FUNC) { cqr->status = DASD_CQR_FAILED; cqr->stopclk = get_clock(); } else { - if (cqr->dstat->esw.esw0.erw.cons) { + if (cqr->irb.esw.esw0.erw.cons) { erp_fn = device->discipline->erp_action(cqr); erp_fn(cqr); } else @@ -1221,8 +1193,8 @@ __dasd_check_expire(struct dasd_device * device) if (cqr->status == DASD_CQR_IN_IO && cqr->expires != 0) { if (time_after_eq(jiffies, cqr->expires + cqr->starttime)) { if (device->discipline->term_IO(cqr) != 0) - /* Hmpf, try again in 1/100 sec */ - dasd_set_timer(device, 1); + /* Hmpf, try again in 1/10 sec */ + dasd_set_timer(device, 10); } } } @@ -1246,9 +1218,9 @@ __dasd_start_head(struct dasd_device * device) rc = device->discipline->start_IO(cqr); if (rc == 0) dasd_set_timer(device, cqr->expires); - else if (rc == -EBUSY) - /* Hmpf, try again in 1/100 sec */ - dasd_set_timer(device, 1); + else + /* Hmpf, try again in 1/2 sec */ + dasd_set_timer(device, 50); } } @@ -1980,7 +1952,7 @@ dasd_init(void) init_waitqueue_head(&dasd_init_waitq); - /* register 'common' DASD debug area, used faor all DBF_XXX calls */ + /* register 'common' DASD debug area, used for all DBF_XXX calls */ dasd_debug_area = debug_register("dasd", 0, 2, 8 * sizeof (long)); if (dasd_debug_area == NULL) { rc = -ENOMEM; diff --git a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c index e90c1c93e19a..680f2e4d933b 100644 --- a/drivers/s390/block/dasd_3990_erp.c +++ b/drivers/s390/block/dasd_3990_erp.c @@ -5,7 +5,7 @@ * Bugreports.to..: <Linux390@de.ibm.com> * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 2000, 2001 * - * $Revision: 1.30 $ + * $Revision: 1.33 $ */ #include <linux/timer.h> @@ -301,15 +301,15 @@ dasd_3990_erp_alternate_path(struct dasd_ccw_req * erp) opm = ccw_device_get_path_mask(device->cdev); //FIXME: start with get_opm ? if (erp->lpm == 0) - erp->lpm = LPM_ANYPATH & ~(erp->dstat->esw.esw0.sublog.lpum); + erp->lpm = LPM_ANYPATH & ~(erp->irb.esw.esw0.sublog.lpum); else - erp->lpm &= ~(erp->dstat->esw.esw0.sublog.lpum); + erp->lpm &= ~(erp->irb.esw.esw0.sublog.lpum); if ((erp->lpm & opm) != 0x00) { DEV_MESSAGE(KERN_DEBUG, device, "try alternate lpm=%x (lpum=%x / opm=%x)", - erp->lpm, erp->dstat->esw.esw0.sublog.lpum, opm); + erp->lpm, erp->irb.esw.esw0.sublog.lpum, opm); /* reset status to queued to handle the request again... */ if (erp->status > DASD_CQR_QUEUED) @@ -319,7 +319,7 @@ dasd_3990_erp_alternate_path(struct dasd_ccw_req * erp) DEV_MESSAGE(KERN_ERR, device, "No alternate channel path left (lpum=%x / " "opm=%x) -> permanent error", - erp->dstat->esw.esw0.sublog.lpum, opm); + erp->irb.esw.esw0.sublog.lpum, opm); /* post request with permanent error */ if (erp->status > DASD_CQR_QUEUED) @@ -443,6 +443,10 @@ dasd_3990_erp_action_4(struct dasd_ccw_req * erp, char *sense) /* interrupt (this enables easier enqueing of the cqr) */ if (erp->function != dasd_3990_erp_action_4) { + DEV_MESSAGE(KERN_INFO, device, + "dasd_3990_erp_action_4: first time retry" + "%s", " "); + erp->retries = 256; erp->function = dasd_3990_erp_action_4; @@ -1677,7 +1681,7 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense) /* determine the address of the CCW to be restarted */ /* Imprecise ending is not set -> addr from IRB-SCSW */ - cpa = default_erp->refers->dstat->scsw.cpa; + cpa = default_erp->refers->irb.scsw.cpa; if (cpa == 0) { @@ -1763,7 +1767,7 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense) erp->magic = default_erp->magic; erp->expires = 0; erp->retries = 256; - cqr->buildclk = get_clock(); + erp->buildclk = get_clock(); erp->status = DASD_CQR_FILLED; /* remove the default erp */ @@ -1823,7 +1827,7 @@ dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense) /* determine the address of the CCW to be restarted */ /* Imprecise ending is not set -> addr from IRB-SCSW */ - cpa = previous_erp->dstat->scsw.cpa; + cpa = previous_erp->irb.scsw.cpa; if (cpa == 0) { @@ -2233,7 +2237,7 @@ dasd_3990_erp_inspect(struct dasd_ccw_req * erp) struct dasd_ccw_req *erp_new = NULL; /* sense data are located in the refers record of the */ /* already set up new ERP ! */ - char *sense = erp->refers->dstat->ecw; + char *sense = erp->refers->irb.ecw; /* distinguish between 24 and 32 byte sense data */ if (sense[27] & DASD_SENSE_BIT_0) { @@ -2306,6 +2310,7 @@ dasd_3990_erp_add_erp(struct dasd_ccw_req * cqr) erp->magic = cqr->magic; erp->expires = 0; erp->retries = 256; + erp->buildclk = get_clock(); erp->status = DASD_CQR_FILLED; @@ -2369,14 +2374,14 @@ dasd_3990_erp_error_match(struct dasd_ccw_req *cqr1, struct dasd_ccw_req *cqr2) { /* check failed CCW */ - if (cqr1->dstat->scsw.cpa != cqr2->dstat->scsw.cpa) { + if (cqr1->irb.scsw.cpa != cqr2->irb.scsw.cpa) { // return 0; /* CCW doesn't match */ } /* check sense data; byte 0-2,25,27 */ - if (!((memcmp (cqr1->dstat->ecw, cqr2->dstat->ecw, 3) == 0) && - (cqr1->dstat->ecw[27] == cqr2->dstat->ecw[27]) && - (cqr1->dstat->ecw[25] == cqr2->dstat->ecw[25]))) { + if (!((memcmp (cqr1->irb.ecw, cqr2->irb.ecw, 3) == 0) && + (cqr1->irb.ecw[27] == cqr2->irb.ecw[27]) && + (cqr1->irb.ecw[25] == cqr2->irb.ecw[25]))) { return 0; /* sense doesn't match */ } @@ -2449,7 +2454,7 @@ dasd_3990_erp_further_erp(struct dasd_ccw_req *erp) { struct dasd_device *device = erp->device; - char *sense = erp->dstat->ecw; + char *sense = erp->irb.ecw; /* check for 24 byte sense ERP */ if ((erp->function == dasd_3990_erp_bus_out) || @@ -2562,7 +2567,7 @@ dasd_3990_erp_handle_match_erp(struct dasd_ccw_req *erp_head, if (erp->retries > 0) { - char *sense = erp->refers->dstat->ecw; + char *sense = erp->refers->irb.ecw; /* check for special retries */ if (erp->function == dasd_3990_erp_action_4) { @@ -2620,7 +2625,7 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr) struct dasd_ccw_req *erp = NULL; struct dasd_device *device = cqr->device; - __u32 cpa = cqr->dstat->scsw.cpa; + __u32 cpa = cqr->irb.scsw.cpa; #ifdef ERP_DEBUG /* print current erp_chain */ @@ -2641,8 +2646,8 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr) #endif /* ERP_DEBUG */ /* double-check if current erp/cqr was successfull */ - if ((cqr->dstat->scsw.cstat == 0x00) && - (cqr->dstat->scsw.dstat == (DEV_STAT_CHN_END|DEV_STAT_DEV_END))) { + if ((cqr->irb.scsw.cstat == 0x00) && + (cqr->irb.scsw.dstat == (DEV_STAT_CHN_END|DEV_STAT_DEV_END))) { DEV_MESSAGE(KERN_DEBUG, device, "ERP called for successful request %p" @@ -2653,7 +2658,7 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr) return cqr; } /* check if sense data are available */ - if (!cqr->dstat->ecw) { + if (!cqr->irb.ecw) { DEV_MESSAGE(KERN_DEBUG, device, "ERP called witout sense data avail ..." "request %p - NO ERP possible", cqr); diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 5ea567ee240e..812bb006625a 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c @@ -11,7 +11,7 @@ * functions may not be called from interrupt context. In particular * dasd_get_device is a no-no from interrupt context. * - * $Revision: 1.28 $ + * $Revision: 1.30 $ */ #include <linux/config.h> @@ -430,16 +430,9 @@ dasd_devmap_from_cdev(struct ccw_device *cdev) { struct dasd_devmap *devmap; - if (cdev->dev.driver_data) - return (struct dasd_devmap *) cdev->dev.driver_data; devmap = dasd_find_busid(cdev->dev.bus_id); - if (!IS_ERR(devmap)) { - cdev->dev.driver_data = devmap; - return devmap; - } - devmap = dasd_add_busid(cdev->dev.bus_id, DASD_FEATURE_DEFAULT); - if (!IS_ERR(devmap)) - cdev->dev.driver_data = devmap; + if (IS_ERR(devmap)) + devmap = dasd_add_busid(cdev->dev.bus_id, DASD_FEATURE_DEFAULT); return devmap; } @@ -456,6 +449,7 @@ dasd_create_device(struct ccw_device *cdev) devmap = dasd_devmap_from_cdev(cdev); if (IS_ERR(devmap)) return (void *) devmap; + cdev->dev.driver_data = devmap; device = dasd_alloc_device(); if (IS_ERR(device)) diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c index 888aeb3998ed..cc79775b09f0 100644 --- a/drivers/s390/block/dasd_diag.c +++ b/drivers/s390/block/dasd_diag.c @@ -6,7 +6,7 @@ * Bugreports.to..: <Linux390@de.ibm.com> * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 * - * $Revision: 1.36 $ + * $Revision: 1.37 $ */ #include <linux/config.h> @@ -158,7 +158,7 @@ dasd_ext_handler(struct pt_regs *regs, __u16 code) unsigned long long expires; unsigned long flags; char status; - int ip, cpu; + int ip; /* * Get the external interruption subcode. VM stores @@ -171,8 +171,6 @@ dasd_ext_handler(struct pt_regs *regs, __u16 code) status = *((char *) &S390_lowcore.ext_params + 5); ip = S390_lowcore.ext_params; - cpu = smp_processor_id(); - if (!ip) { /* no intparm: unsolicited interrupt */ MESSAGE(KERN_DEBUG, "%s", "caught unsolicited interrupt"); return; diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 9b667cd5aed3..27bf674af1c2 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c @@ -7,7 +7,7 @@ * Bugreports.to..: <Linux390@de.ibm.com> * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 * - * $Revision: 1.55 $ + * $Revision: 1.57 $ */ #include <linux/config.h> @@ -983,8 +983,8 @@ dasd_eckd_build_cp(struct dasd_device * device, struct request *req) return ERR_PTR(-EINVAL); count += bv->bv_len >> (device->s2b_shift + 9); #if defined(CONFIG_ARCH_S390X) - cidaw += idal_nr_words(page_address(bv->bv_page) + - bv->bv_offset, bv->bv_len); + if (idal_is_needed (page_address(bv->bv_page), bv->bv_len)) + cidaw += bv->bv_len >> (device->s2b_shift + 9); #endif } } diff --git a/drivers/s390/block/dasd_erp.c b/drivers/s390/block/dasd_erp.c index 9c91710b7997..4c7423ac3190 100644 --- a/drivers/s390/block/dasd_erp.c +++ b/drivers/s390/block/dasd_erp.c @@ -7,7 +7,7 @@ * Bugreports.to..: <Linux390@de.ibm.com> * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 * - * $Revision: 1.11 $ + * $Revision: 1.12 $ */ #include <linux/config.h> @@ -77,8 +77,6 @@ dasd_free_erp_request(struct dasd_ccw_req * cqr, struct dasd_device * device) { unsigned long flags; - if (cqr->dstat != NULL) - kfree(cqr->dstat); debug_text_event(dasd_debug_area, 1, "FREE"); debug_int_event(dasd_debug_area, 1, (long) cqr); spin_lock_irqsave(&device->mem_lock, flags); diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c index 35b8f37b1d53..8116381cf917 100644 --- a/drivers/s390/block/dasd_fba.c +++ b/drivers/s390/block/dasd_fba.c @@ -4,7 +4,7 @@ * Bugreports.to..: <Linux390@de.ibm.com> * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 * - * $Revision: 1.33 $ + * $Revision: 1.34 $ */ #include <linux/config.h> @@ -270,8 +270,8 @@ dasd_fba_build_cp(struct dasd_device * device, struct request *req) return ERR_PTR(-EINVAL); count += bv->bv_len >> (device->s2b_shift + 9); #if defined(CONFIG_ARCH_S390X) - cidaw += idal_nr_words(page_address(bv->bv_page) + - bv->bv_offset, bv->bv_len); + if (idal_is_needed (page_address(bv->bv_page), bv->bv_len)) + cidaw += bv->bv_len / blksize; #endif } } diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c index 44b6e73f06e6..32507131a755 100644 --- a/drivers/s390/block/dasd_genhd.c +++ b/drivers/s390/block/dasd_genhd.c @@ -9,7 +9,7 @@ * * gendisk related functions for the dasd driver. * - * $Revision: 1.46 $ + * $Revision: 1.48 $ */ #include <linux/config.h> @@ -152,8 +152,9 @@ dasd_destroy_partitions(struct dasd_device * device) memset(&bpart, sizeof(struct blkpg_partition), 0); memset(&barg, sizeof(struct blkpg_ioctl_arg), 0); barg.data = &bpart; + barg.op = BLKPG_DEL_PARTITION; for (bpart.pno = device->gdp->minors - 1; bpart.pno > 0; bpart.pno--) - ioctl_by_bdev(bdev, BLKPG_DEL_PARTITION, (unsigned long) &barg); + ioctl_by_bdev(bdev, BLKPG, (unsigned long) &barg); invalidate_partition(device->gdp, 0); /* Matching blkdev_put to the blkdev_get in dasd_scan_partitions. */ diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index b222f9503c1f..9bdf82fca40c 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h @@ -6,7 +6,7 @@ * Bugreports.to..: <Linux390@de.ibm.com> * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 * - * $Revision: 1.58 $ + * $Revision: 1.60 $ */ #ifndef DASD_INT_H @@ -168,7 +168,7 @@ struct dasd_ccw_req { void *data; /* pointer to data area */ /* these are important for recovering erroneous requests */ - struct irb *dstat; /* device status in case of an error */ + struct irb irb; /* device status in case of an error */ struct dasd_ccw_req *refers; /* ERP-chain queueing. */ void *function; /* originating ERP action */ @@ -192,6 +192,7 @@ struct dasd_ccw_req { #define DASD_CQR_DONE 0x03 /* request is completed successfully */ #define DASD_CQR_ERROR 0x04 /* request is completed with error */ #define DASD_CQR_FAILED 0x05 /* request is finally failed */ +#define DASD_CQR_CLEAR 0x06 /* request is clear pending */ /* per dasd_ccw_req flags */ #define DASD_CQR_FLAGS_USE_ERP 0 /* use ERP for this request */ diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index e36307dedf16..2efa4daa17b6 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c @@ -52,6 +52,9 @@ static char sclp_init_sccb[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); /* Timer for init mask retries. */ static struct timer_list retry_timer; +/* Timer for busy retries. */ +static struct timer_list sclp_busy_timer; + static volatile unsigned long sclp_status = 0; /* some status flags */ #define SCLP_INIT 0 @@ -59,6 +62,7 @@ static volatile unsigned long sclp_status = 0; #define SCLP_READING 2 #define SCLP_INIT_POLL_INTERVAL 1 +#define SCLP_BUSY_POLL_INTERVAL 1 #define SCLP_COMMAND_INITIATED 0 #define SCLP_BUSY 2 @@ -93,45 +97,61 @@ __service_call(sclp_cmdw_t command, void *sccb) */ if (cc == SCLP_NOT_OPERATIONAL) return -EIO; - /* - * We set the SCLP_RUNNING bit for cc 2 as well because if - * service_call returns cc 2 some old request is running - * that has to complete first - */ - set_bit(SCLP_RUNNING, &sclp_status); if (cc == SCLP_BUSY) return -EBUSY; return 0; } -static int +static void sclp_start_request(void) { struct sclp_req *req; int rc; unsigned long flags; - /* quick exit if sclp is already in use */ - if (test_bit(SCLP_RUNNING, &sclp_status)) - return -EBUSY; spin_lock_irqsave(&sclp_lock, flags); - /* Get first request on queue if available */ - req = NULL; - if (!list_empty(&sclp_req_queue)) + /* quick exit if sclp is already in use */ + if (test_bit(SCLP_RUNNING, &sclp_status)) { + spin_unlock_irqrestore(&sclp_lock, flags); + return; + } + /* Try to start requests from the request queue. */ + while (!list_empty(&sclp_req_queue)) { req = list_entry(sclp_req_queue.next, struct sclp_req, list); - if (req) { rc = __service_call(req->command, req->sccb); - if (rc) { - req->status = SCLP_REQ_FAILED; - list_del(&req->list); - } else + if (rc == 0) { + /* Sucessfully started request. */ req->status = SCLP_REQ_RUNNING; - } else - rc = -EINVAL; + /* Request active. Set running indication. */ + set_bit(SCLP_RUNNING, &sclp_status); + break; + } + if (rc == -EBUSY) { + /** + * SCLP is busy but no request is running. + * Try again later. + */ + if (!timer_pending(&sclp_busy_timer) || + !mod_timer(&sclp_busy_timer, + jiffies + SCLP_BUSY_POLL_INTERVAL*HZ)) { + sclp_busy_timer.function = + (void *) sclp_start_request; + sclp_busy_timer.expires = + jiffies + SCLP_BUSY_POLL_INTERVAL*HZ; + add_timer(&sclp_busy_timer); + } + break; + } + /* Request failed. */ + req->status = SCLP_REQ_FAILED; + list_del(&req->list); + if (req->callback) { + spin_unlock_irqrestore(&sclp_lock, flags); + req->callback(req, req->callback_data); + spin_lock_irqsave(&sclp_lock, flags); + } + } spin_unlock_irqrestore(&sclp_lock, flags); - if (rc == -EIO && req->callback != NULL) - req->callback(req, req->callback_data); - return rc; } static int @@ -613,6 +633,8 @@ sclp_init_mask(void) */ do { rc = __service_call(req->command, req->sccb); + if (rc == 0) + set_bit(SCLP_RUNNING, &sclp_status); spin_unlock_irqrestore(&sclp_lock, flags); if (rc == -EIO) return -ENOSYS; @@ -685,6 +707,7 @@ sclp_init(void) ctl_set_bit(0, 9); init_timer(&retry_timer); + init_timer(&sclp_busy_timer); /* do the initial write event mask */ rc = sclp_init_mask(); if (rc == 0) { diff --git a/drivers/s390/cio/Makefile b/drivers/s390/cio/Makefile index 321ed179ca82..c490c2a1c2fc 100644 --- a/drivers/s390/cio/Makefile +++ b/drivers/s390/cio/Makefile @@ -2,7 +2,7 @@ # Makefile for the S/390 common i/o drivers # -obj-y += airq.o blacklist.o chsc.o cio.o css.o requestirq.o +obj-y += airq.o blacklist.o chsc.o cio.o css.o ccw_device-objs += device.o device_fsm.o device_ops.o ccw_device-objs += device_id.o device_pgid.o device_status.o obj-y += ccw_device.o cmf.o diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 4c8d6df0605d..e5a9b0158748 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c @@ -1,7 +1,7 @@ /* * drivers/s390/cio/chsc.c * S/390 common I/O routines -- channel subsystem call - * $Revision: 1.112 $ + * $Revision: 1.114 $ * * Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH, * IBM Corporation @@ -942,3 +942,59 @@ chsc_alloc_sei_area(void) } subsys_initcall(chsc_alloc_sei_area); + +struct css_general_char css_general_characteristics; +struct css_chsc_char css_chsc_characteristics; + +int __init +chsc_determine_css_characteristics(void) +{ + int result; + struct { + struct chsc_header request; + u32 reserved1; + u32 reserved2; + u32 reserved3; + struct chsc_header response; + u32 reserved4; + u32 general_char[510]; + u32 chsc_char[518]; + } *scsc_area; + + scsc_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); + if (!scsc_area) { + printk(KERN_WARNING"cio: Was not able to determine available" \ + "CHSCs due to no memory.\n"); + return -ENOMEM; + } + + scsc_area->request = (struct chsc_header) { + .length = 0x0010, + .code = 0x0010, + }; + + result = chsc(scsc_area); + if (result) { + printk(KERN_WARNING"cio: Was not able to determine " \ + "available CHSCs, cc=%i.\n", result); + result = -EIO; + goto exit; + } + + if (scsc_area->response.code != 1) { + printk(KERN_WARNING"cio: Was not able to determine " \ + "available CHSCs.\n"); + result = -EIO; + goto exit; + } + memcpy(&css_general_characteristics, scsc_area->general_char, + sizeof(css_general_characteristics)); + memcpy(&css_chsc_characteristics, scsc_area->chsc_char, + sizeof(css_chsc_characteristics)); +exit: + free_page ((unsigned long) scsc_area); + return result; +} + +EXPORT_SYMBOL_GPL(css_general_characteristics); +EXPORT_SYMBOL_GPL(css_chsc_characteristics); diff --git a/drivers/s390/cio/chsc.h b/drivers/s390/cio/chsc.h index 90f5a9e739e6..a3390f99ab4c 100644 --- a/drivers/s390/cio/chsc.h +++ b/drivers/s390/cio/chsc.h @@ -23,4 +23,32 @@ extern struct channel_path *chps[]; extern void s390_process_css( void ); extern void chsc_validate_chpids(struct subchannel *); extern void chpid_is_actually_online(int); + +struct css_general_char { + u64 : 41; + u32 aif : 1; /* bit 41 */ + u32 : 3; + u32 mcss : 1; /* bit 45 */ + u32 : 2; + u32 ext_mb : 1; /* bit 48 */ + u32 : 7; + u32 aif_tdd : 1; /* bit 56 */ + u32 : 10; + u32 aif_osa : 1; /* bit 67 */ + u32 : 28; +}__attribute__((packed)); + +struct css_chsc_char { + u64 res; + u64 : 43; + u32 scssc : 1; /* bit 107 */ + u32 scsscf : 1; /* bit 108 */ + u32 : 19; +}__attribute__((packed)); + +extern struct css_general_char css_general_characteristics; +extern struct css_chsc_char css_chsc_characteristics; + +extern int chsc_determine_css_characteristics(void); +extern int css_characteristics_avail; #endif diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index a16f061fdc69..38e59dd24332 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c @@ -688,15 +688,15 @@ cio_console_irq(void) if (stsch(console_irq, &console_subchannel.schib) != 0 || !console_subchannel.schib.pmcw.dnv) return -1; - console_device = console_subchannel.schib.pmcw.dev; - } else if (console_device != -1) { + console_devno = console_subchannel.schib.pmcw.dev; + } else if (console_devno != -1) { /* At least the console device number is known. */ for (irq = 0; irq < __MAX_SUBCHANNELS; irq++) { if (stsch(irq, &console_subchannel.schib) != 0) break; if (console_subchannel.schib.pmcw.dnv && console_subchannel.schib.pmcw.dev == - console_device) { + console_devno) { console_irq = irq; break; } diff --git a/drivers/s390/cio/cmf.c b/drivers/s390/cio/cmf.c index 06fb41f382a6..788ae49c5795 100644 --- a/drivers/s390/cio/cmf.c +++ b/drivers/s390/cio/cmf.c @@ -1,5 +1,5 @@ /* - * linux/drivers/s390/cio/cmf.c ($Revision: 1.13 $) + * linux/drivers/s390/cio/cmf.c ($Revision: 1.15 $) * * Linux on zSeries Channel Measurement Facility support * @@ -39,6 +39,7 @@ #include "css.h" #include "device.h" #include "ioasm.h" +#include "chsc.h" /* parameter to enable cmf during boot, possible uses are: * "s390cmf" -- enable cmf and allocate 2 MB of ram so measuring can be @@ -996,7 +997,8 @@ init_cmf(void) see if we are running on z990 or up, otherwise fall back to basic mode. */ if (format == CMF_AUTODETECT) { - if (!MACHINE_NEW_STIDP) { + if (!css_characteristics_avail || + !css_general_characteristics.ext_mb) { format = CMF_BASIC; } else { format = CMF_EXTENDED; diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index f99652855084..dba1bfb9aab2 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -1,7 +1,7 @@ /* * drivers/s390/cio/css.c * driver for channel subsystem - * $Revision: 1.77 $ + * $Revision: 1.80 $ * * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, * IBM Corporation @@ -19,11 +19,15 @@ #include "cio.h" #include "cio_debug.h" #include "ioasm.h" +#include "chsc.h" unsigned int highest_subchannel; int need_rescan = 0; int css_init_done = 0; +struct pgid global_pgid; +int css_characteristics_avail = 0; + struct device css_bus_device = { .bus_id = "css0", }; @@ -201,6 +205,20 @@ css_evaluate_subchannel(int irq, int slow) ret = 0; break; } + if (disc && (event == CIO_NO_PATH)) { + /* + * Uargh, hack again. Because we don't get a machine + * check on configure on, our path bookkeeping can + * be out of date here (it's fine while we only do + * logical varying or get chsc machine checks). We + * need to force reprobing or we might miss devices + * coming operational again. It won't do harm in real + * no path situations. + */ + device_trigger_reprobe(sch); + ret = 0; + break; + } if (sch->driver && sch->driver->notify && sch->driver->notify(&sch->dev, event)) { cio_disable_subchannel(sch); @@ -352,9 +370,26 @@ css_process_crw(int irq) return ret; } +static void __init +css_generate_pgid(void) +{ + /* Let's build our path group ID here. */ + if (css_characteristics_avail && css_general_characteristics.mcss) + global_pgid.cpu_addr = 0x8000; + else { +#ifdef CONFIG_SMP + global_pgid.cpu_addr = hard_smp_processor_id(); +#else + global_pgid.cpu_addr = 0; +#endif + } + global_pgid.cpu_id = ((cpuid_t *) __LC_CPUID)->ident; + global_pgid.cpu_model = ((cpuid_t *) __LC_CPUID)->machine; + global_pgid.tod_high = (__u32) (get_clock() >> 32); +} + /* - * some of the initialization has already been done from init_IRQ(), - * here we do the rest now that the driver core is running. + * Now that the driver core is running, we can setup our channel subsystem. * The struct subchannel's are created during probing (except for the * static console subchannel). */ @@ -363,6 +398,11 @@ init_channel_subsystem (void) { int ret, irq; + if (chsc_determine_css_characteristics() == 0) + css_characteristics_avail = 1; + + css_generate_pgid(); + if ((ret = bus_register(&css_bus_type))) goto out; if ((ret = device_register (&css_bus_device))) @@ -517,3 +557,4 @@ MODULE_LICENSE("GPL"); EXPORT_SYMBOL(css_bus_type); EXPORT_SYMBOL(s390_root_dev_register); EXPORT_SYMBOL(s390_root_dev_unregister); +EXPORT_SYMBOL_GPL(css_characteristics_avail); diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index 508f1a7fbb20..fe10f20da40a 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c @@ -672,8 +672,20 @@ ccw_device_irq(struct ccw_device *cdev, enum dev_event dev_event) irb = (struct irb *) __LC_IRB; /* Check for unsolicited interrupt. */ - if (irb->scsw.stctl == - (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { + if ((irb->scsw.stctl == + (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) + && (!irb->scsw.cc)) { + if ((irb->scsw.dstat & DEV_STAT_UNIT_CHECK) && + !irb->esw.esw0.erw.cons) { + /* Unit check but no sense data. Need basic sense. */ + if (ccw_device_do_sense(cdev, irb) != 0) + goto call_handler_unsol; + memcpy(irb, &cdev->private->irb, sizeof(struct irb)); + cdev->private->state = DEV_STATE_W4SENSE; + cdev->private->intparm = 0; + return; + } +call_handler_unsol: if (cdev->handler) cdev->handler (cdev, 0, irb); return; @@ -735,11 +747,15 @@ ccw_device_w4sense(struct ccw_device *cdev, enum dev_event dev_event) /* Check for unsolicited interrupt. */ if (irb->scsw.stctl == (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { - if (cdev->handler) - cdev->handler (cdev, 0, irb); if (irb->scsw.cc == 1) /* Basic sense hasn't started. Try again. */ ccw_device_do_sense(cdev, irb); + else { + printk("Huh? %s(%s): unsolicited interrupt...\n", + __FUNCTION__, cdev->dev.bus_id); + if (cdev->handler) + cdev->handler (cdev, 0, irb); + } return; } /* Add basic sense info to irb. */ @@ -762,13 +778,6 @@ ccw_device_clear_verify(struct ccw_device *cdev, enum dev_event dev_event) struct irb *irb; irb = (struct irb *) __LC_IRB; - /* Check for unsolicited interrupt. */ - if (irb->scsw.stctl == - (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { - if (cdev->handler) - cdev->handler (cdev, 0, irb); - return; - } /* Accumulate status. We don't do basic sense. */ ccw_device_accumulate_irb(cdev, irb); /* Try to start delayed device verification. */ @@ -834,15 +843,6 @@ ccw_device_wait4io_irq(struct ccw_device *cdev, enum dev_event dev_event) struct subchannel *sch; irb = (struct irb *) __LC_IRB; - /* Check for unsolicited interrupt. */ - if (irb->scsw.stctl == - (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { - if (cdev->handler) - cdev->handler (cdev, 0, irb); - if (irb->scsw.cc == 1) - goto call_handler; - return; - } /* * Accumulate status and find out if a basic sense is needed. * This is fine since we have already adapted the lpm. @@ -854,7 +854,7 @@ ccw_device_wait4io_irq(struct ccw_device *cdev, enum dev_event dev_event) } return; } -call_handler: + /* Iff device is idle, reset timeout. */ sch = to_subchannel(cdev->dev.parent); if (!stsch(sch->irq, &sch->schib)) @@ -923,8 +923,9 @@ ccw_device_stlck_done(struct ccw_device *cdev, enum dev_event dev_event) case DEV_EVENT_INTERRUPT: irb = (struct irb *) __LC_IRB; /* Check for unsolicited interrupt. */ - if (irb->scsw.stctl == - (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) + if ((irb->scsw.stctl == + (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) && + (!irb->scsw.cc)) /* FIXME: we should restart stlck here, but this * is extremely unlikely ... */ goto out_wakeup; diff --git a/drivers/s390/cio/device_id.c b/drivers/s390/cio/device_id.c index aae28c3bb748..32365959c231 100644 --- a/drivers/s390/cio/device_id.c +++ b/drivers/s390/cio/device_id.c @@ -303,15 +303,14 @@ ccw_device_sense_id_irq(struct ccw_device *cdev, enum dev_event dev_event) sch = to_subchannel(cdev->dev.parent); irb = (struct irb *) __LC_IRB; - /* - * Unsolicited interrupts may pertain to an earlier status pending or - * busy condition on the subchannel. Retry sense id. - */ + /* Retry sense id for cc=1. */ if (irb->scsw.stctl == (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { - ret = __ccw_device_sense_id_start(cdev); - if (ret && ret != -EBUSY) - ccw_device_sense_id_done(cdev, ret); + if (irb->scsw.cc == 1) { + ret = __ccw_device_sense_id_start(cdev); + if (ret && ret != -EBUSY) + ccw_device_sense_id_done(cdev, ret); + } return; } if (ccw_device_accumulate_and_sense(cdev, irb) != 0) diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index 84dc9bb54748..6c617ddc13ca 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c @@ -1,7 +1,7 @@ /* * drivers/s390/cio/device_ops.c * - * $Revision: 1.34 $ + * $Revision: 1.47 $ * * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, * IBM Corporation diff --git a/drivers/s390/cio/device_pgid.c b/drivers/s390/cio/device_pgid.c index 35ceeac214d4..7a808019956e 100644 --- a/drivers/s390/cio/device_pgid.c +++ b/drivers/s390/cio/device_pgid.c @@ -143,15 +143,14 @@ ccw_device_sense_pgid_irq(struct ccw_device *cdev, enum dev_event dev_event) int ret; irb = (struct irb *) __LC_IRB; - /* - * Unsolicited interrupts may pertain to an earlier status pending or - * busy condition on the subchannel. Retry sense pgid. - */ + /* Retry sense pgid for cc=1. */ if (irb->scsw.stctl == (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { - ret = __ccw_device_sense_pgid_start(cdev); - if (ret && ret != -EBUSY) - ccw_device_sense_pgid_done(cdev, ret); + if (irb->scsw.cc == 1) { + ret = __ccw_device_sense_pgid_start(cdev); + if (ret && ret != -EBUSY) + ccw_device_sense_pgid_done(cdev, ret); + } return; } if (ccw_device_accumulate_and_sense(cdev, irb) != 0) @@ -310,13 +309,11 @@ ccw_device_verify_irq(struct ccw_device *cdev, enum dev_event dev_event) struct irb *irb; irb = (struct irb *) __LC_IRB; - /* - * Unsolicited interrupts may pertain to an earlier status pending or - * busy condition on the subchannel. Restart path verification. - */ + /* Retry set pgid for cc=1. */ if (irb->scsw.stctl == (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { - __ccw_device_verify_start(cdev); + if (irb->scsw.cc == 1) + __ccw_device_verify_start(cdev); return; } if (ccw_device_accumulate_and_sense(cdev, irb) != 0) @@ -397,10 +394,13 @@ ccw_device_disband_irq(struct ccw_device *cdev, enum dev_event dev_event) int ret; irb = (struct irb *) __LC_IRB; - /* Ignore unsolicited interrupts. */ + /* Retry set pgid for cc=1. */ if (irb->scsw.stctl == - (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) + (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) { + if (irb->scsw.cc == 1) + __ccw_device_disband_start(cdev); return; + } if (ccw_device_accumulate_and_sense(cdev, irb) != 0) return; sch = to_subchannel(cdev->dev.parent); diff --git a/drivers/s390/cio/device_status.c b/drivers/s390/cio/device_status.c index c345e694df25..cf8e573dec74 100644 --- a/drivers/s390/cio/device_status.c +++ b/drivers/s390/cio/device_status.c @@ -35,7 +35,7 @@ ccw_device_msg_control_check(struct ccw_device *cdev, struct irb *irb) return; CIO_MSG_EVENT(0, "Channel-Check or Interface-Control-Check " - "received\n" + "received" " ... device %04X on subchannel %04X, dev_stat " ": %02X sch_stat : %02X\n", cdev->private->devno, cdev->private->irq, @@ -216,8 +216,9 @@ ccw_device_accumulate_irb(struct ccw_device *cdev, struct irb *irb) /* * Don't accumulate unsolicited interrupts. */ - if (irb->scsw.stctl == - (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) + if ((irb->scsw.stctl == + (SCSW_STCTL_STATUS_PEND | SCSW_STCTL_ALERT_STATUS)) && + (!irb->scsw.cc)) return; cdev_irb = &cdev->private->irb; diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c index f4c9779d2d4a..4c788065d815 100644 --- a/drivers/s390/cio/qdio.c +++ b/drivers/s390/cio/qdio.c @@ -56,7 +56,7 @@ #include "ioasm.h" #include "chsc.h" -#define VERSION_QDIO_C "$Revision: 1.80 $" +#define VERSION_QDIO_C "$Revision: 1.83 $" /****************** MODULE PARAMETER VARIABLES ********************/ MODULE_AUTHOR("Utz Bacher <utz.bacher@de.ibm.com>"); @@ -354,7 +354,8 @@ qdio_stop_polling(struct qdio_q *q) SLSB_P_INPUT_NOT_INIT); /* * we don't issue this SYNC_MEMORY, as we trust Rick T and - * moreover will not use the PROCESSING state, so q->polling was 0 + * moreover will not use the PROCESSING state under VM, so + * q->polling was 0 anyway */ /*SYNC_MEMORY;*/ if (q->slsb.acc.val[gsf]!=SLSB_P_INPUT_PRIMED) @@ -732,6 +733,9 @@ qdio_get_inbound_buffer_frontier(struct qdio_q *q) volatile char *slsb; int first_not_to_check; char dbf_text[15]; +#ifdef QDIO_USE_PROCESSING_STATE + int last_position=-1; +#endif /* QDIO_USE_PROCESSING_STATE */ QDIO_DBF_TEXT4(0,trace,"getibfro"); QDIO_DBF_HEX4(0,trace,&q,sizeof(void*)); @@ -774,8 +778,14 @@ check_next: if (q->siga_sync) { set_slsb(&slsb[f_mod_no],SLSB_P_INPUT_NOT_INIT); } else { - set_slsb(&slsb[f_mod_no],SLSB_P_INPUT_PROCESSING); + /* set the previous buffer to NOT_INIT. The current + * buffer will be set to PROCESSING at the end of + * this function to avoid further interrupts. */ + if (last_position>=0) + set_slsb(&slsb[last_position], + SLSB_P_INPUT_NOT_INIT); atomic_set(&q->polling,1); + last_position=f_mod_no; } #else /* QDIO_USE_PROCESSING_STATE */ set_slsb(&slsb[f_mod_no],SLSB_P_INPUT_NOT_INIT); @@ -814,6 +824,10 @@ check_next: f_mod_no=(f_mod_no+1)&(QDIO_MAX_BUFFERS_PER_Q-1); atomic_dec(&q->number_of_buffers_used); +#ifdef QDIO_USE_PROCESSING_STATE + last_position=-1; +#endif /* QDIO_USE_PROCESSING_STATE */ + break; /* everything else means frontier not changed (HALTED or so) */ @@ -823,6 +837,11 @@ check_next: out: q->first_to_check=f_mod_no; +#ifdef QDIO_USE_PROCESSING_STATE + if (last_position>=0) + set_slsb(&slsb[last_position],SLSB_P_INPUT_PROCESSING); +#endif /* QDIO_USE_PROCESSING_STATE */ + QDIO_DBF_HEX4(0,trace,&q->first_to_check,sizeof(int)); return q->first_to_check; @@ -1160,7 +1179,7 @@ qdio_inbound_processing(struct qdio_q *q) #ifdef QDIO_USE_PROCESSING_STATE static inline int -tiqdio_do_inbound_checks(struct qdio_q *q, int q_laps) +tiqdio_reset_processing_state(struct qdio_q *q, int q_laps) { if (!q) { tiqdio_sched_tl(); @@ -1247,7 +1266,7 @@ again: do { int ret; - ret = tiqdio_do_inbound_checks(q, q_laps); + ret = tiqdio_reset_processing_state(q, q_laps); switch (ret) { case 0: return; @@ -1971,77 +1990,36 @@ out: static unsigned int tiqdio_check_chsc_availability(void) { - int result; char dbf_text[15]; - struct { - struct chsc_header request; - u32 reserved1; - u32 reserved2; - u32 reserved3; - struct chsc_header response; - u32 reserved4; - u32 general_char[510]; - u32 chsc_char[518]; - } *scsc_area; - - scsc_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); - if (!scsc_area) { - QDIO_PRINT_WARN("Was not able to determine available" \ - "CHSCs due to no memory.\n"); - return -ENOMEM; - } - - scsc_area->request = (struct chsc_header) { - .length = 0x0010, - .code = 0x0010, - }; - - result=chsc(scsc_area); - if (result) { - QDIO_PRINT_WARN("Was not able to determine " \ - "available CHSCs, cc=%i.\n", - result); - result=-EIO; - goto exit; - } + if (!css_characteristics_avail) + return -EIO; - if (scsc_area->response.code != 1) { - QDIO_PRINT_WARN("Was not able to determine " \ - "available CHSCs.\n"); - result=-EIO; - goto exit; - } /* Check for bit 41. */ - if ((scsc_area->general_char[1] & 0x00400000) != 0x00400000) { + if (!css_general_characteristics.aif) { QDIO_PRINT_WARN("Adapter interruption facility not " \ "installed.\n"); - result=-ENOENT; - goto exit; + return -ENOENT; } /* Check for bits 107 and 108. */ - if ((scsc_area->chsc_char[3] & 0x00180000) != 0x00180000) { + if (!css_chsc_characteristics.scssc || + !css_chsc_characteristics.scsscf) { QDIO_PRINT_WARN("Set Chan Subsys. Char. & Fast-CHSCs " \ "not available.\n"); - result=-ENOENT; - goto exit; + return -ENOENT; } /* Check for OSA/FCP thin interrupts (bit 67). */ - hydra_thinints = ((scsc_area->general_char[2] & 0x10000000) - == 0x10000000); + hydra_thinints = css_general_characteristics.aif_osa; sprintf(dbf_text,"hydrati%1x", hydra_thinints); QDIO_DBF_TEXT0(0,setup,dbf_text); /* Check for aif time delay disablement fac (bit 56). If installed, * omit svs even under lpar (good point by rick again) */ - omit_svs = ((scsc_area->general_char[1] & 0x00000080) - == 0x00000080); + omit_svs = css_general_characteristics.aif_tdd; sprintf(dbf_text,"omitsvs%1x", omit_svs); QDIO_DBF_TEXT0(0,setup,dbf_text); -exit: - free_page ((unsigned long) scsc_area); - return result; + return 0; } diff --git a/drivers/s390/cio/qdio.h b/drivers/s390/cio/qdio.h index 0922d4dacf72..4c75d4428046 100644 --- a/drivers/s390/cio/qdio.h +++ b/drivers/s390/cio/qdio.h @@ -1,7 +1,7 @@ #ifndef _CIO_QDIO_H #define _CIO_QDIO_H -#define VERSION_CIO_QDIO_H "$Revision: 1.23 $" +#define VERSION_CIO_QDIO_H "$Revision: 1.24 $" //#define QDIO_DBF_LIKE_HELL @@ -518,6 +518,8 @@ struct qdio_perf_stats { struct qdio_q { volatile struct slsb slsb; + char unused[QDIO_MAX_BUFFERS_PER_Q]; + __u32 * volatile dev_st_chg_ind; int is_input_q; diff --git a/drivers/s390/cio/requestirq.c b/drivers/s390/cio/requestirq.c deleted file mode 100644 index 0ce71a219b96..000000000000 --- a/drivers/s390/cio/requestirq.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * drivers/s390/cio/requestirq.c - * S/390 common I/O routines -- enabling and disabling of devices - * $Revision: 1.46 $ - * - * Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH, - * IBM Corporation - * Author(s): Ingo Adlung (adlung@de.ibm.com) - * Cornelia Huck (cohuck@de.ibm.com) - * Arnd Bergmann (arndb@de.ibm.com) - */ - -#include <linux/module.h> -#include <linux/config.h> -#include <linux/device.h> -#include <linux/init.h> -#include <asm/lowcore.h> - -#include "css.h" - -struct pgid global_pgid; -EXPORT_SYMBOL_GPL(global_pgid); - -/* - * init_IRQ is now only used to set the pgid as early as possible - */ -void __init -init_IRQ(void) -{ - /* - * Let's build our path group ID here. - */ - if (MACHINE_NEW_STIDP) - global_pgid.cpu_addr = 0x8000; - else { -#ifdef CONFIG_SMP - global_pgid.cpu_addr = hard_smp_processor_id(); -#else - global_pgid.cpu_addr = 0; -#endif - } - global_pgid.cpu_id = ((cpuid_t *) __LC_CPUID)->ident; - global_pgid.cpu_model = ((cpuid_t *) __LC_CPUID)->machine; - global_pgid.tod_high = (__u32) (get_clock() >> 32); -} diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c index bb534b7ec4a1..49705d85af5a 100644 --- a/drivers/s390/net/ctcmain.c +++ b/drivers/s390/net/ctcmain.c @@ -1,5 +1,5 @@ /* - * $Id: ctcmain.c,v 1.59 2004/04/21 17:10:13 ptiedem Exp $ + * $Id: ctcmain.c,v 1.60 2004/06/18 15:13:51 ptiedem Exp $ * * CTC / ESCON network driver * @@ -36,7 +36,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.59 $ + * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.60 $ * */ @@ -319,7 +319,7 @@ static void print_banner(void) { static int printed = 0; - char vbuf[] = "$Revision: 1.59 $"; + char vbuf[] = "$Revision: 1.60 $"; char *version = vbuf; if (printed) @@ -3052,9 +3052,9 @@ ctc_new_device(struct ccwgroup_device *cgdev) } if (privptr->protocol == CTC_PROTO_LINUX_TTY) - snprintf(dev->name, 8, "ctctty%%d"); + strlcpy(dev->name, "ctctty%d", IFNAMSIZ); else - snprintf(dev->name, 8, "ctc%%d"); + strlcpy(dev->name, "ctc%d", IFNAMSIZ); for (direction = READ; direction <= WRITE; direction++) { privptr->channel[direction] = diff --git a/drivers/s390/net/cu3088.c b/drivers/s390/net/cu3088.c index b79d08b42cff..1b0a9f16024c 100644 --- a/drivers/s390/net/cu3088.c +++ b/drivers/s390/net/cu3088.c @@ -1,5 +1,5 @@ /* - * $Id: cu3088.c,v 1.33 2003/10/14 12:10:19 cohuck Exp $ + * $Id: cu3088.c,v 1.34 2004/06/15 13:16:27 pavlic Exp $ * * CTC / LCS ccw_device driver * @@ -38,7 +38,7 @@ const char *cu3088_type[] = { "ESCON channel", "FICON channel", "P390 LCS card", - "OSA2 card", + "OSA LCS card", "unknown channel type", "unsupported channel type", }; diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index cd581306d850..e29e6c673e28 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c @@ -11,7 +11,7 @@ * Frank Pavlic (pavlic@de.ibm.com) and * Martin Schwidefsky <schwidefsky@de.ibm.com> * - * $Revision: 1.81 $ $Date: 2004/05/14 13:54:33 $ + * $Revision: 1.83 $ $Date: 2004/06/30 12:48:14 $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -58,7 +58,7 @@ /** * initialization string for output */ -#define VERSION_LCS_C "$Revision: 1.81 $" +#define VERSION_LCS_C "$Revision: 1.83 $" static char version[] __initdata = "LCS driver ("VERSION_LCS_C "/" VERSION_LCS_H ")"; static char debug_buffer[255]; @@ -1046,8 +1046,8 @@ lcs_register_mc_addresses(void *data) } spin_unlock(&card->ipm_lock); read_unlock(&in4_dev->lock); - lcs_fix_multicast_list(card); in_dev_put(in4_dev); + lcs_fix_multicast_list(card); return 0; } /** diff --git a/drivers/s390/net/lcs.h b/drivers/s390/net/lcs.h index 36d9ebd923c4..44cf9906085e 100644 --- a/drivers/s390/net/lcs.h +++ b/drivers/s390/net/lcs.h @@ -6,7 +6,7 @@ #include <linux/workqueue.h> #include <asm/ccwdev.h> -#define VERSION_LCS_H "$Revision: 1.16 $" +#define VERSION_LCS_H "$Revision: 1.17 $" #define LCS_DBF_TEXT(level, name, text) \ do { \ @@ -221,8 +221,8 @@ struct lcs_cmd { struct lcs_ip_mac_pair ip_mac_pair[32]; __u32 response_data; - } lcs_ipass_ctlmsg; - } lcs_qipassist; + } lcs_ipass_ctlmsg __attribute ((packed)); + } lcs_qipassist __attribute__ ((packed)); #endif /*CONFIG_IP_MULTICAST */ } cmd __attribute__ ((packed)); } __attribute__ ((packed)); diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index 570a93b67391..484f718159e5 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c @@ -1,5 +1,5 @@ /* - * $Id: netiucv.c,v 1.54 2004/05/28 08:04:14 braunu Exp $ + * $Id: netiucv.c,v 1.57 2004/06/30 09:26:40 braunu Exp $ * * IUCV network driver * @@ -30,7 +30,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * RELEASE-TAG: IUCV network driver $Revision: 1.54 $ + * RELEASE-TAG: IUCV network driver $Revision: 1.57 $ * */ @@ -98,7 +98,6 @@ struct iucv_connection { spinlock_t collect_lock; int collect_len; int max_buffsize; - int flags; fsm_timer timer; fsm_instance *fsm; struct net_device *netdev; @@ -106,8 +105,6 @@ struct iucv_connection { char userid[9]; }; -#define CONN_FLAGS_BUFSIZE_CHANGED 1 - /** * Linked list of all connection structs. */ @@ -131,7 +128,6 @@ struct netiucv_priv { fsm_instance *fsm; struct iucv_connection *conn; struct device *dev; - fsm_timer timer; }; /** @@ -232,7 +228,6 @@ enum dev_events { DEV_EVENT_STOP, DEV_EVENT_CONUP, DEV_EVENT_CONDOWN, - DEV_EVENT_TIMER, /** * MUST be always the last element!! */ @@ -244,7 +239,6 @@ static const char *dev_event_names[] = { "Stop", "Connection up", "Connection down", - "Timer", }; /** @@ -701,7 +695,7 @@ conn_action_connreject(fsm_instance *fi, int event, void *arg) iucv_sever(eib->ippathid, udata); if (eib->ippathid != conn->pathid) { printk(KERN_INFO - "%s: IR pathid %d does not match original pathid %d\n", + "%s: IR Connection Pending; pathid %d does not match original pathid %d\n", netdev->name, eib->ippathid, conn->pathid); iucv_sever(conn->pathid, udata); } @@ -722,7 +716,7 @@ conn_action_connack(fsm_instance *fi, int event, void *arg) fsm_newstate(fi, CONN_STATE_IDLE); if (eib->ippathid != conn->pathid) { printk(KERN_INFO - "%s: IR pathid %d does not match original pathid %d\n", + "%s: IR Connection Complete; pathid %d does not match original pathid %d\n", netdev->name, eib->ippathid, conn->pathid); conn->pathid = eib->ippathid; } @@ -1372,7 +1366,6 @@ buffer_write (struct device *dev, const char *buf, size_t count) priv->conn->max_buffsize = bs1; if (!(ndev->flags & IFF_RUNNING)) ndev->mtu = bs1 - NETIUCV_HDRLEN - NETIUCV_HDRLEN; - priv->conn->flags |= CONN_FLAGS_BUFSIZE_CHANGED; return count; @@ -1756,8 +1749,6 @@ netiucv_free_netdevice(struct net_device *dev) privptr = (struct netiucv_priv *)dev->priv; if (privptr) { - if (privptr->fsm) - fsm_deltimer(&privptr->timer); if (privptr->conn) netiucv_remove_connection(privptr->conn); if (privptr->fsm) @@ -1819,7 +1810,6 @@ netiucv_init_netdevice(char *username) free_netdev(dev); return NULL; } - fsm_settimer(privptr->fsm, &privptr->timer); fsm_newstate(privptr->fsm, DEV_STATE_STOPPED); return dev; @@ -1949,7 +1939,7 @@ static struct device_driver netiucv_driver = { static void netiucv_banner(void) { - char vbuf[] = "$Revision: 1.54 $"; + char vbuf[] = "$Revision: 1.57 $"; char *version = vbuf; if ((version = strchr(version, ':'))) { diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h index 96c4243a2c79..dc5a6f98c2ab 100644 --- a/drivers/s390/net/qeth.h +++ b/drivers/s390/net/qeth.h @@ -23,7 +23,7 @@ #include "qeth_mpc.h" -#define VERSION_QETH_H "$Revision: 1.110 $" +#define VERSION_QETH_H "$Revision: 1.111 $" #ifdef CONFIG_QETH_IPV6 #define QETH_VERSION_IPV6 ":IPv6" @@ -610,14 +610,14 @@ struct qeth_seqno { __u32 trans_hdr; __u32 pdu_hdr; __u32 pdu_hdr_ack; - __u32 ipa; + __u16 ipa; }; struct qeth_reply { struct list_head list; wait_queue_head_t wait_q; int (*callback)(struct qeth_card *,struct qeth_reply *,unsigned long); - int seqno; + u32 seqno; unsigned long offset; int received; int rc; diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 8aefa28c2e92..0f75e58f988d 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_main.c ($Revision: 1.121 $) + * linux/drivers/s390/net/qeth_main.c ($Revision: 1.125 $) * * Linux on zSeries OSA Express and HiperSockets support * @@ -12,7 +12,7 @@ * Frank Pavlic (pavlic@de.ibm.com) and * Thomas Spatzier <tspat@de.ibm.com> * - * $Revision: 1.121 $ $Date: 2004/06/11 16:32:15 $ + * $Revision: 1.125 $ $Date: 2004/06/29 17:28:24 $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -78,7 +78,7 @@ qeth_eyecatcher(void) #include "qeth_mpc.h" #include "qeth_fs.h" -#define VERSION_QETH_C "$Revision: 1.121 $" +#define VERSION_QETH_C "$Revision: 1.125 $" static const char *version = "qeth S/390 OSA-Express driver"; /** @@ -818,14 +818,20 @@ static void qeth_add_multicast_ipv4(struct qeth_card *); static void qeth_add_multicast_ipv6(struct qeth_card *); #endif -static void +static inline int qeth_set_thread_start_bit(struct qeth_card *card, unsigned long thread) { unsigned long flags; spin_lock_irqsave(&card->thread_mask_lock, flags); + if ( !(card->thread_allowed_mask & thread) || + (card->thread_start_mask & thread) ) { + spin_unlock_irqrestore(&card->thread_mask_lock, flags); + return -EPERM; + } card->thread_start_mask |= thread; spin_unlock_irqrestore(&card->thread_mask_lock, flags); + return 0; } static void @@ -952,8 +958,8 @@ qeth_schedule_recovery(struct qeth_card *card) { QETH_DBF_TEXT(trace,2,"startrec"); - qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD); - schedule_work(&card->kernel_thread_starter); + if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0) + schedule_work(&card->kernel_thread_starter); } static int @@ -1568,9 +1574,9 @@ qeth_reset_ip_addresses(struct qeth_card *card) QETH_DBF_TEXT(trace, 2, "rstipadd"); qeth_clear_ip_list(card, 0, 1); - qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD); - qeth_set_thread_start_bit(card, QETH_SET_MC_THREAD); - schedule_work(&card->kernel_thread_starter); + if ( (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) || + (qeth_set_thread_start_bit(card, QETH_SET_MC_THREAD) == 0) ) + schedule_work(&card->kernel_thread_starter); } static struct qeth_ipa_cmd * @@ -4718,10 +4724,9 @@ qeth_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) if (card->vlangrp) card->vlangrp->vlan_devices[vid] = NULL; spin_unlock_irqrestore(&card->vlanlock, flags); - qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD); - /* delete mc addresses for this vlan dev */ - qeth_set_thread_start_bit(card, QETH_SET_MC_THREAD); - schedule_work(&card->kernel_thread_starter); + if ( (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) || + (qeth_set_thread_start_bit(card, QETH_SET_MC_THREAD) == 0) ) + schedule_work(&card->kernel_thread_starter); } #endif @@ -4950,8 +4955,8 @@ qeth_set_multicast_list(struct net_device *dev) QETH_DBF_TEXT(trace,3,"setmulti"); card = (struct qeth_card *) dev->priv; - qeth_set_thread_start_bit(card, QETH_SET_MC_THREAD); - schedule_work(&card->kernel_thread_starter); + if (qeth_set_thread_start_bit(card, QETH_SET_MC_THREAD) == 0) + schedule_work(&card->kernel_thread_starter); } static void @@ -6422,8 +6427,8 @@ qeth_start_again(struct qeth_card *card) rtnl_lock(); dev_open(card->dev); rtnl_unlock(); - qeth_set_thread_start_bit(card, QETH_SET_MC_THREAD); - schedule_work(&card->kernel_thread_starter); + if (qeth_set_thread_start_bit(card, QETH_SET_MC_THREAD) == 0) + schedule_work(&card->kernel_thread_starter); } static int @@ -6809,8 +6814,8 @@ qeth_add_vipa(struct qeth_card *card, enum qeth_prot_versions proto, } if (!qeth_add_ip(card, ipaddr)) kfree(ipaddr); - qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD); - schedule_work(&card->kernel_thread_starter); + if (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) + schedule_work(&card->kernel_thread_starter); return rc; } @@ -6838,8 +6843,8 @@ qeth_del_vipa(struct qeth_card *card, enum qeth_prot_versions proto, return; if (!qeth_delete_ip(card, ipaddr)) kfree(ipaddr); - qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD); - schedule_work(&card->kernel_thread_starter); + if (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) + schedule_work(&card->kernel_thread_starter); } /* @@ -6882,8 +6887,8 @@ qeth_add_rxip(struct qeth_card *card, enum qeth_prot_versions proto, } if (!qeth_add_ip(card, ipaddr)) kfree(ipaddr); - qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD); - schedule_work(&card->kernel_thread_starter); + if (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) + schedule_work(&card->kernel_thread_starter); return 0; } @@ -6911,8 +6916,8 @@ qeth_del_rxip(struct qeth_card *card, enum qeth_prot_versions proto, return; if (!qeth_delete_ip(card, ipaddr)) kfree(ipaddr); - qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD); - schedule_work(&card->kernel_thread_starter); + if (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) + schedule_work(&card->kernel_thread_starter); } /** @@ -6952,8 +6957,8 @@ qeth_ip_event(struct notifier_block *this, default: break; } - qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD); - schedule_work(&card->kernel_thread_starter); + if (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) + schedule_work(&card->kernel_thread_starter); out: return NOTIFY_DONE; } @@ -7005,8 +7010,8 @@ qeth_ip6_event(struct notifier_block *this, default: break; } - qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD); - schedule_work(&card->kernel_thread_starter); + if (qeth_set_thread_start_bit(card, QETH_SET_IP_THREAD) == 0) + schedule_work(&card->kernel_thread_starter); out: return NOTIFY_DONE; } diff --git a/drivers/s390/net/qeth_mpc.h b/drivers/s390/net/qeth_mpc.h index b4d0d7b10df3..a6272361f1df 100644 --- a/drivers/s390/net/qeth_mpc.h +++ b/drivers/s390/net/qeth_mpc.h @@ -14,7 +14,7 @@ #include <asm/qeth.h> -#define VERSION_QETH_MPC_H "$Revision: 1.35 $" +#define VERSION_QETH_MPC_H "$Revision: 1.36 $" extern const char *VERSION_QETH_MPC_C; @@ -36,7 +36,7 @@ extern unsigned char IPA_PDU_HEADER[]; #define QETH_TIMEOUT (10 * HZ) #define QETH_IPA_TIMEOUT (45 * HZ) -#define QETH_IDX_COMMAND_SEQNO -1 +#define QETH_IDX_COMMAND_SEQNO 0xffff0000 #define SR_INFO_LEN 16 #define QETH_CLEAR_CHANNEL_PARM -10 diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 4f4fd5a8eea7..939bbad0f549 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c @@ -29,7 +29,7 @@ */ /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_AUX_REVISION "$Revision: 1.108 $" +#define ZFCP_AUX_REVISION "$Revision: 1.114 $" #include "zfcp_ext.h" @@ -310,6 +310,10 @@ zfcp_module_init(void) /* initialize adapters to be removed list head */ INIT_LIST_HEAD(&zfcp_data.adapter_remove_lh); + zfcp_transport_template = fc_attach_transport(&zfcp_transport_functions); + if (!zfcp_transport_template) + return -ENODEV; + #ifdef CONFIG_S390_SUPPORT retval = register_ioctl32_conversion(zfcp_ioctl_trans.cmd, zfcp_ioctl_trans.handler); @@ -414,7 +418,7 @@ zfcp_cfdc_dev_ioctl(struct inode *inode, struct file *file, retval = -ENOMEM; goto out; } - sg_list->count = 0; + memset(sg_list, 0, sizeof(*sg_list)); if (command != ZFCP_CFDC_IOC) { ZFCP_LOG_INFO("IOC request code 0x%x invalid\n", command); @@ -599,6 +603,7 @@ zfcp_sg_list_alloc(struct zfcp_sg_list *sg_list, size_t size) sg_list->sg = kmalloc(sg_list->count * sizeof(struct scatterlist), GFP_KERNEL); if (sg_list->sg == NULL) { + sg_list->count = 0; retval = -ENOMEM; goto out; } @@ -635,11 +640,13 @@ zfcp_sg_list_free(struct zfcp_sg_list *sg_list) unsigned int i; int retval = 0; - BUG_ON((sg_list->sg == NULL) || (sg_list == NULL)); + BUG_ON(sg_list == NULL); for (i = 0, sg = sg_list->sg; i < sg_list->count; i++, sg++) __free_pages(sg->page, 0); + kfree(sg_list->sg); + return retval; } diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index 65c89d3358f9..19fe2766da1c 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h @@ -33,7 +33,7 @@ #define ZFCP_DEF_H /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_DEF_REVISION "$Revision: 1.73 $" +#define ZFCP_DEF_REVISION "$Revision: 1.75 $" /*************************** INCLUDES *****************************************/ @@ -47,6 +47,8 @@ #include <scsi/scsi_cmnd.h> #include <scsi/scsi_device.h> #include <scsi/scsi_host.h> +#include <scsi/scsi_transport.h> +#include <scsi/scsi_transport_fc.h> #include "../../fc4/fc.h" #include "zfcp_fsf.h" #include <asm/ccwdev.h> @@ -509,14 +511,14 @@ struct zfcp_ls_rnid_acc { /* all log-level defaults are combined to generate initial log-level */ #define ZFCP_LOG_LEVEL_DEFAULTS \ - (ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_INFO, ZFCP_LOG_AREA_OTHER) | \ - ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_INFO, ZFCP_LOG_AREA_SCSI) | \ - ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_INFO, ZFCP_LOG_AREA_FSF) | \ - ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_INFO, ZFCP_LOG_AREA_CONFIG) | \ - ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_INFO, ZFCP_LOG_AREA_CIO) | \ - ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_INFO, ZFCP_LOG_AREA_QDIO) | \ - ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_INFO, ZFCP_LOG_AREA_ERP) | \ - ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_INFO, ZFCP_LOG_AREA_FC)) + (ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_NORMAL, ZFCP_LOG_AREA_OTHER) | \ + ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_NORMAL, ZFCP_LOG_AREA_SCSI) | \ + ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_NORMAL, ZFCP_LOG_AREA_FSF) | \ + ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_NORMAL, ZFCP_LOG_AREA_CONFIG) | \ + ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_NORMAL, ZFCP_LOG_AREA_CIO) | \ + ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_NORMAL, ZFCP_LOG_AREA_QDIO) | \ + ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_NORMAL, ZFCP_LOG_AREA_ERP) | \ + ZFCP_SET_LOG_NIBBLE(ZFCP_LOG_LEVEL_NORMAL, ZFCP_LOG_AREA_FC)) /* check whether we have the right level for logging */ #define ZFCP_LOG_CHECK(level) \ diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 505e16ff5d0f..a927b912bbde 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c @@ -31,7 +31,7 @@ #define ZFCP_LOG_AREA ZFCP_LOG_AREA_ERP /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_ERP_REVISION "$Revision: 1.54 $" +#define ZFCP_ERP_REVISION "$Revision: 1.56 $" #include "zfcp_ext.h" @@ -435,8 +435,20 @@ zfcp_els_handler(unsigned long data) u8 req_code, resp_code; int retval = 0; - if (send_els->status != 0) + if (send_els->status != 0) { + ZFCP_LOG_NORMAL("ELS request timed out, physical port reopen " + "of port 0x%016Lx on adapter %s failed\n", + port->wwpn, zfcp_get_busid_by_port(port)); + debug_text_event(port->adapter->erp_dbf, 3, "forcreop"); + retval = zfcp_erp_port_forced_reopen(port, 0); + if (retval != 0) { + ZFCP_LOG_NORMAL("reopen of remote port 0x%016Lx " + "on adapter %s failed\n", port->wwpn, + zfcp_get_busid_by_port(port)); + retval = -EPERM; + } goto skip_fsfstatus; + } req = (void*)((page_to_pfn(send_els->req->page) << PAGE_SHIFT) + send_els->req->offset); resp = (void*)((page_to_pfn(send_els->resp->page) << PAGE_SHIFT) + send_els->resp->offset); @@ -2286,7 +2298,6 @@ zfcp_erp_adapter_strategy_open_qdio(struct zfcp_erp_action *erp_action) int i; volatile struct qdio_buffer_element *sbale; struct zfcp_adapter *adapter = erp_action->adapter; - int retval_cleanup = 0; if (atomic_test_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &adapter->status)) { ZFCP_LOG_NORMAL("bug: second attempt to set up QDIO on " @@ -2301,7 +2312,7 @@ zfcp_erp_adapter_strategy_open_qdio(struct zfcp_erp_action *erp_action) zfcp_get_busid_by_adapter(adapter)); goto failed_qdio_establish; } - ZFCP_LOG_DEBUG("queues established\n"); + debug_text_event(adapter->erp_dbf, 3, "qdio_est"); if (qdio_activate(adapter->ccw_device, 0) != 0) { ZFCP_LOG_INFO("error: activation of QDIO queues failed " @@ -2309,7 +2320,7 @@ zfcp_erp_adapter_strategy_open_qdio(struct zfcp_erp_action *erp_action) zfcp_get_busid_by_adapter(adapter)); goto failed_qdio_activate; } - ZFCP_LOG_DEBUG("queues activated\n"); + debug_text_event(adapter->erp_dbf, 3, "qdio_act"); /* * put buffers into response queue, @@ -2357,19 +2368,15 @@ zfcp_erp_adapter_strategy_open_qdio(struct zfcp_erp_action *erp_action) /* NOP */ failed_qdio_activate: - /* DEBUG */ - //__ZFCP_WAIT_EVENT_TIMEOUT(timeout, 0); - /* cleanup queues previously established */ - retval_cleanup = qdio_shutdown(adapter->ccw_device, - QDIO_FLAG_CLEANUP_USING_CLEAR); - if (retval_cleanup) { - ZFCP_LOG_NORMAL("bug: shutdown of QDIO queues failed " - "(retval=%d)\n", retval_cleanup); + debug_text_event(adapter->erp_dbf, 3, "qdio_down1a"); + while (qdio_shutdown(adapter->ccw_device, + QDIO_FLAG_CLEANUP_USING_CLEAR) == -EINPROGRESS) { + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(HZ); } + debug_text_event(adapter->erp_dbf, 3, "qdio_down1b"); failed_qdio_establish: - atomic_clear_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &adapter->status); - failed_sanity: retval = ZFCP_ERP_FAILED; @@ -2401,42 +2408,22 @@ zfcp_erp_adapter_strategy_close_qdio(struct zfcp_erp_action *erp_action) goto out; } - /* cleanup queues previously established */ - /* - * MUST NOT LOCK - qdio_cleanup might call schedule - * FIXME: need another way to make cleanup safe + * Get queue_lock and clear QDIOUP flag. Thus it's guaranteed that + * do_QDIO won't be called while qdio_shutdown is in progress. */ - /* Note: - * We need the request_queue lock here, otherwise there exists the - * following race: - * - * queuecommand calls create_fcp_commmand_task...calls req_create, - * gets sbal x to x+y - meanwhile adapter reopen is called, completes - * - req_send calls do_QDIO for sbal x to x+y, i.e. wrong indices. - * - * with lock: - * queuecommand calls create_fcp_commmand_task...calls req_create, - * gets sbal x to x+y - meanwhile adapter reopen is called, waits - * - req_send calls do_QDIO for sbal x to x+y, i.e. wrong indices - * but do_QDIO fails as adapter_reopen is still waiting for the lock - * OR - * queuecommand calls create_fcp_commmand_task...calls req_create - * - meanwhile adapter reopen is called...completes, - * - gets sbal 0 to 0+y, - req_send calls do_QDIO for sbal 0 to 0+y, - * i.e. correct indices...though an fcp command is called before - * exchange config data...that should be fine, however - */ - if (qdio_shutdown(adapter->ccw_device, QDIO_FLAG_CLEANUP_USING_CLEAR)) { - /* - * FIXME(design): - * What went wrong? What to do best? Proper retval? - */ - ZFCP_LOG_NORMAL("bug: shutdown of QDIO queues failed on " - "adapter %s\n", - zfcp_get_busid_by_adapter(adapter)); - } else - ZFCP_LOG_DEBUG("queues cleaned up\n"); + + write_lock_irq(&adapter->request_queue.queue_lock); + atomic_clear_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &adapter->status); + write_unlock_irq(&adapter->request_queue.queue_lock); + + debug_text_event(adapter->erp_dbf, 3, "qdio_down2a"); + while (qdio_shutdown(adapter->ccw_device, + QDIO_FLAG_CLEANUP_USING_CLEAR) == -EINPROGRESS) { + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(HZ); + } + debug_text_event(adapter->erp_dbf, 3, "qdio_down2b"); /* * First we had to stop QDIO operation. @@ -2459,8 +2446,6 @@ zfcp_erp_adapter_strategy_close_qdio(struct zfcp_erp_action *erp_action) adapter->request_queue.free_index = 0; atomic_set(&adapter->request_queue.free_count, 0); adapter->request_queue.distance_from_int = 0; - - atomic_clear_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &adapter->status); out: return retval; } diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h index 2db1695545c7..d99005c01a8d 100644 --- a/drivers/s390/scsi/zfcp_ext.h +++ b/drivers/s390/scsi/zfcp_ext.h @@ -31,7 +31,7 @@ #ifndef ZFCP_EXT_H #define ZFCP_EXT_H /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_EXT_REVISION "$Revision: 1.50 $" +#define ZFCP_EXT_REVISION "$Revision: 1.51 $" #include "zfcp_def.h" @@ -136,6 +136,8 @@ extern int zfcp_scsi_command_async(struct zfcp_adapter *,struct zfcp_unit *unit, struct scsi_cmnd *scsi_cmnd); extern int zfcp_scsi_command_sync(struct zfcp_unit *unit, struct scsi_cmnd *scsi_cmnd); +extern struct scsi_transport_template *zfcp_transport_template; +extern struct fc_function_template zfcp_transport_functions; /******************************** ERP ****************************************/ extern void zfcp_erp_modify_adapter_status(struct zfcp_adapter *, u32, int); diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 85120ce9f886..67a8202b9b6c 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -29,7 +29,7 @@ */ /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_FSF_C_REVISION "$Revision: 1.47 $" +#define ZFCP_FSF_C_REVISION "$Revision: 1.49 $" #include "zfcp_ext.h" @@ -3997,15 +3997,14 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) scpnt->result |= fcp_rsp_iu->scsi_status; if (unlikely(fcp_rsp_iu->scsi_status)) { /* DEBUG */ - ZFCP_LOG_NORMAL("status for SCSI Command:\n"); - ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, + ZFCP_LOG_DEBUG("status for SCSI Command:\n"); + ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, scpnt->cmnd, scpnt->cmd_len); - - ZFCP_LOG_NORMAL("SCSI status code 0x%x\n", + ZFCP_LOG_DEBUG("SCSI status code 0x%x\n", fcp_rsp_iu->scsi_status); - ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, + ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, (void *) fcp_rsp_iu, sizeof (struct fcp_rsp_iu)); - ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, + ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, zfcp_get_fcp_sns_info_ptr(fcp_rsp_iu), fcp_rsp_iu->fcp_sns_len); } @@ -4782,6 +4781,16 @@ zfcp_fsf_req_create(struct zfcp_adapter *adapter, u32 fsf_cmd, int req_flags, goto failed_sbals; } + /* + * We hold queue_lock here. Check if QDIOUP is set and let request fail + * if it is not set (see also *_open_qdio and *_close_qdio). + */ + + if (!atomic_test_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &adapter->status)) { + write_unlock_irqrestore(&req_queue->queue_lock, *lock_flags); + goto failed_sbals; + } + fsf_req->adapter = adapter; /* pointer to "parent" adapter */ fsf_req->fsf_command = fsf_cmd; fsf_req->sbal_number = 1; diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index 34a73f2f02c0..d0a879f0a182 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c @@ -31,7 +31,7 @@ #define ZFCP_LOG_AREA ZFCP_LOG_AREA_SCSI /* this drivers version (do not edit !!! generated and updated by cvs) */ -#define ZFCP_SCSI_REVISION "$Revision: 1.62 $" +#define ZFCP_SCSI_REVISION "$Revision: 1.65 $" #include "zfcp_ext.h" @@ -51,6 +51,8 @@ static struct zfcp_unit *zfcp_unit_lookup(struct zfcp_adapter *, int, scsi_id_t, static struct device_attribute *zfcp_sysfs_sdev_attrs[]; +struct scsi_transport_template *zfcp_transport_template; + struct zfcp_data zfcp_data = { .scsi_host_template = { name: ZFCP_NAME, @@ -508,8 +510,7 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) ZFCP_LOG_DEBUG("unit 0x%016Lx (%p)\n", unit->fcp_lun, unit); /* - * The 'Abort FCP Command' routine may block (call schedule) - * because it may wait for a free SBAL. + * We block (call schedule) * That's why we must release the lock and enable the * interrupts before. * On the other hand we do not need the lock anymore since @@ -518,8 +519,7 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) write_unlock_irqrestore(&adapter->abort_lock, flags); /* call FSF routine which does the abort */ new_fsf_req = zfcp_fsf_abort_fcp_command((unsigned long) old_fsf_req, - adapter, - unit, ZFCP_WAIT_FOR_SBAL); + adapter, unit, 0); ZFCP_LOG_DEBUG("new_fsf_req=%p\n", new_fsf_req); if (!new_fsf_req) { retval = FAILED; @@ -657,7 +657,7 @@ zfcp_task_management_function(struct zfcp_unit *unit, u8 tm_flags) /* issue task management function */ fsf_req = zfcp_fsf_send_fcp_command_task_management - (adapter, unit, tm_flags, ZFCP_WAIT_FOR_SBAL); + (adapter, unit, tm_flags, 0); if (!fsf_req) { ZFCP_LOG_INFO("error: creation of task management request " "failed for unit 0x%016Lx on port 0x%016Lx on " @@ -768,6 +768,7 @@ zfcp_adapter_scsi_register(struct zfcp_adapter *adapter) adapter->scsi_host->max_channel = 0; adapter->scsi_host->unique_id = unique_id++; /* FIXME */ adapter->scsi_host->max_cmd_len = ZFCP_MAX_SCSI_CMND_LENGTH; + adapter->scsi_host->transportt = zfcp_transport_template; /* * Reverse mapping of the host number to avoid race condition */ @@ -823,6 +824,44 @@ zfcp_fsf_start_scsi_er_timer(struct zfcp_adapter *adapter) add_timer(&adapter->scsi_er_timer); } +/* + * Support functions for FC transport class + */ +static void +zfcp_get_port_id(struct scsi_device *sdev) +{ + struct zfcp_unit *unit; + + unit = (struct zfcp_unit *) sdev->hostdata; + fc_port_id(sdev) = unit->port->d_id; +} + +static void +zfcp_get_port_name(struct scsi_device *sdev) +{ + struct zfcp_unit *unit; + + unit = (struct zfcp_unit *) sdev->hostdata; + fc_port_name(sdev) = unit->port->wwpn; +} + +static void +zfcp_get_node_name(struct scsi_device *sdev) +{ + struct zfcp_unit *unit; + + unit = (struct zfcp_unit *) sdev->hostdata; + fc_node_name(sdev) = unit->port->wwnn; +} + +struct fc_function_template zfcp_transport_functions = { + .get_port_id = zfcp_get_port_id, + .get_port_name = zfcp_get_port_name, + .get_node_name = zfcp_get_node_name, + .show_port_id = 1, + .show_port_name = 1, + .show_node_name = 1, +}; /** * ZFCP_DEFINE_SCSI_ATTR diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index f938a9835a51..c107a6e7f629 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -1738,6 +1738,7 @@ config SCSI_SUNESP config ZFCP tristate "FCP host bus adapter driver for IBM eServer zSeries" depends on ARCH_S390 && SCSI + select SCSI_FC_ATTRS help If you want to access SCSI devices attached to your IBM eServer zSeries by means of Fibre Channel interfaces say Y. diff --git a/drivers/tc/zs.c b/drivers/tc/zs.c index 2904b0a28cda..7391ae649029 100644 --- a/drivers/tc/zs.c +++ b/drivers/tc/zs.c @@ -67,7 +67,7 @@ #include <asm/uaccess.h> #include <asm/wbflush.h> #include <asm/bootinfo.h> -#ifdef CONFIG_DECSTATION +#ifdef CONFIG_MACH_DECSTATION #include <asm/dec/interrupts.h> #include <asm/dec/machtype.h> #include <asm/dec/tc.h> @@ -111,7 +111,7 @@ struct zs_parms { static struct zs_parms *zs_parms; -#ifdef CONFIG_DECSTATION +#ifdef CONFIG_MACH_DECSTATION static struct zs_parms ds_parms = { scc0 : SCC0, scc1 : SCC1, @@ -132,7 +132,7 @@ static struct zs_parms baget_parms = { }; #endif -#ifdef CONFIG_DECSTATION +#ifdef CONFIG_MACH_DECSTATION #define DS_BUS_PRESENT (IOASIC) #else #define DS_BUS_PRESENT 0 @@ -1689,7 +1689,7 @@ static void __init probe_sccs(void) * system_base for this case :-(. HK */ switch(mips_machtype) { -#ifdef CONFIG_DECSTATION +#ifdef CONFIG_MACH_DECSTATION case MACH_DS5000_2X0: system_base = 0xbf800000; n_chips = 2; diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c index b6cfcd240e4e..1d0a2e1a7f77 100644 --- a/drivers/telephony/ixj.c +++ b/drivers/telephony/ixj.c @@ -7757,6 +7757,7 @@ int __init ixj_probe_isapnp(int *cnt) } j = ixj_alloc(); + j->DSPbase = pnp_port_start(dev,0); request_region(j->DSPbase, 16, "ixj DSP"); if (func != 0x110) diff --git a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c index 034ec299613d..1563b0d27d71 100644 --- a/drivers/video/asiliantfb.c +++ b/drivers/video/asiliantfb.c @@ -571,7 +571,7 @@ asiliantfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent) } pci_write_config_dword(dp, 4, 0x02800083); - writeb(3, addr + 0x400784); + writeb(3, p->screen_base + 0x400784); init_asiliant(p, addr); diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 2a4a79760cc1..d61374eb4917 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -326,30 +326,37 @@ int set_con2fb_map(int unit, int newidx) struct vc_data *vc = vc_cons[unit].d; int oldidx = con2fb_map[unit]; struct fb_info *info = registered_fb[newidx]; - struct fb_info *oldinfo = registered_fb[oldidx]; + struct fb_info *oldinfo = NULL; int found; + if (oldidx == newidx) + return 0; + + if (!vc) + return -ENODEV; + if (!search_for_mapped_con()) { info_idx = newidx; fb_console_init(); return 0; } - if (oldidx == newidx) - return 0; - if (!vc) - return -ENODEV; + if (oldidx != -1) + oldinfo = registered_fb[oldidx]; + found = search_fb_in_map(newidx); acquire_console_sem(); con2fb_map[unit] = newidx; if (!found) { if (!try_module_get(info->fbops->owner)) { + con2fb_map[unit] = oldidx; release_console_sem(); return -ENODEV; } if (info->fbops->fb_open && info->fbops->fb_open(info, 0)) { module_put(info->fbops->owner); + con2fb_map[unit] = oldidx; release_console_sem(); return -ENODEV; } @@ -360,18 +367,18 @@ int set_con2fb_map(int unit, int newidx) * fbcon should release it. */ if (oldinfo && !search_fb_in_map(oldidx)) { - int err; - - if (info->queue.func == fb_flashcursor) - del_timer_sync(&oldinfo->cursor_timer); - if (oldinfo->fbops->fb_release) { - err = oldinfo->fbops->fb_release(oldinfo, 0); - if (err) { - con2fb_map[unit] = oldidx; - release_console_sem(); - return err; - } + if (oldinfo->fbops->fb_release && + oldinfo->fbops->fb_release(oldinfo, 0)) { + con2fb_map[unit] = oldidx; + if (!found && info->fbops->fb_release) + info->fbops->fb_release(info, 0); + if (!found) + module_put(info->fbops->owner); + release_console_sem(); + return -ENODEV; } + if (oldinfo->queue.func == fb_flashcursor) + del_timer_sync(&oldinfo->cursor_timer); module_put(oldinfo->fbops->owner); } info->currcon = -1; @@ -1624,8 +1631,10 @@ static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int s height, width); } -static __inline__ void updatescrollmode(struct display *p, struct fb_info *info, struct vc_data *vc) +static __inline__ void updatescrollmode(struct display *p, struct fb_info *info, + struct vc_data *vc) { + int fh = vc->vc_font.height; int cap = info->flags; int good_pan = (cap & FBINFO_HWACCEL_YPAN) && divides(info->fix.ypanstep, vc->vc_font.height) @@ -1636,6 +1645,13 @@ static __inline__ void updatescrollmode(struct display *p, struct fb_info *info, int reading_fast = cap & FBINFO_READS_FAST; int fast_copyarea = (cap & FBINFO_HWACCEL_COPYAREA) && !(cap & FBINFO_HWACCEL_DISABLED); + p->vrows = info->var.yres_virtual/fh; + if (info->var.yres > (fh * (vc->vc_rows + 1))) + p->vrows -= (info->var.yres - (fh * vc->vc_rows)) / fh; + if ((info->var.yres % fh) && (info->var.yres_virtual % fh < + info->var.yres % fh)) + p->vrows--; + if (good_wrap || good_pan) { if (reading_fast || fast_copyarea) p->scrollmode = good_wrap ? SCROLL_WRAP : SCROLL_PAN; @@ -1663,7 +1679,8 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width, var.yres = height * fh; x_diff = info->var.xres - var.xres; y_diff = info->var.yres - var.yres; - if (x_diff < 0 || x_diff > fw || (y_diff < 0 || y_diff > fh)) { + if (x_diff < 0 || x_diff > fw || (y_diff < 0 || y_diff > fh) || + (info->flags & FBINFO_MISC_MODESWITCH)) { char mode[40]; DPRINTK("attempting resize %ix%i\n", var.xres, var.yres); @@ -1678,15 +1695,13 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width, return -EINVAL; DPRINTK("resize now %ix%i\n", var.xres, var.yres); if (CON_IS_VISIBLE(vc)) { - var.activate = FB_ACTIVATE_NOW; + var.activate = FB_ACTIVATE_NOW | + (info->flags & FBINFO_MISC_MODESWITCH) ? + FB_ACTIVATE_FORCE : 0; fb_set_var(info, &var); } + info->flags &= ~FBINFO_MISC_MODESWITCH; } - p->vrows = var.yres_virtual/fh; - if (var.yres > (fh * (height + 1))) - p->vrows -= (var.yres - (fh * height)) / fh; - if ((var.yres % fh) && (var.yres_virtual % fh < var.yres % fh)) - p->vrows--; updatescrollmode(p, info, vc); return 0; } @@ -1762,7 +1777,6 @@ static int fbcon_switch(struct vc_data *vc) struct fb_fillrect rect; int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; - logo_shown = fg_console; rect.color = attr_bgcol_ec(bgshift, vc); rect.rop = ROP_COPY; rect.dx = rect.dy = 0; @@ -1788,17 +1802,8 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; struct display *p = &fb_display[vc->vc_num]; - if (mode_switch) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; - struct fb_var_screeninfo var = info->var; - - if (blank) { - fbcon_cursor(vc, CM_ERASE); - return 0; - } - var.activate = FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE; - fb_set_var(info, &var); - } + if (mode_switch) + info->flags |= FBINFO_MISC_MODESWITCH; fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW); @@ -2388,19 +2393,7 @@ static void fbcon_modechanged(struct fb_info *info) cols = info->var.xres / vc->vc_font.width; rows = info->var.yres / vc->vc_font.height; vc_resize(vc->vc_num, cols, rows); - switch (p->scrollmode) { - case SCROLL_WRAP: - scrollback_phys_max = p->vrows - vc->vc_rows; - break; - case SCROLL_PAN: - scrollback_phys_max = p->vrows - 2 * vc->vc_rows; - if (scrollback_phys_max < 0) - scrollback_phys_max = 0; - break; - default: - scrollback_phys_max = 0; - break; - } + updatescrollmode(p, info, vc); scrollback_max = 0; scrollback_current = 0; update_var(vc->vc_num, info); @@ -2471,7 +2464,8 @@ static struct notifier_block fbcon_event_notifier = { }; static int fbcon_event_notifier_registered; -int __init fb_console_init(void) +/* can't be __init as it can be called by set_con2fb_map() later */ +int fb_console_init(void) { int err, i; diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 447005f6dae1..abf511da0227 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -999,9 +999,9 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var) fb_set_cmap(&info->cmap, 1, info); if (info->flags & FBINFO_MISC_MODECHANGEUSER) { + info->flags &= ~FBINFO_MISC_MODECHANGEUSER; notifier_call_chain(&fb_notifier_list, FB_EVENT_MODE_CHANGE, info); - info->flags &= ~FBINFO_MISC_MODECHANGEUSER; } } } diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index 316e461ab87f..d9569ae0f1a6 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c @@ -882,13 +882,13 @@ static int rivafb_do_maximize(struct fb_info *info, var->xres_virtual, var->yres_virtual); } else if (var->xres_virtual == -1) { var->xres_virtual = (info->fix.smem_len * den / - (nom * var->yres_virtual * 2)) & ~15; + (nom * var->yres_virtual)) & ~15; printk(KERN_WARNING PFX "setting virtual X resolution to %d\n", var->xres_virtual); } else if (var->yres_virtual == -1) { var->xres_virtual = (var->xres_virtual + 15) & ~15; var->yres_virtual = info->fix.smem_len * den / - (nom * var->xres_virtual * 2); + (nom * var->xres_virtual); printk(KERN_WARNING PFX "setting virtual Y resolution to %d\n", var->yres_virtual); } else { @@ -920,10 +920,11 @@ static int rivafb_do_maximize(struct fb_info *info, "virtual Y resolution (%d) is smaller than real\n", var->yres_virtual); return -EINVAL; } - if (var->xres_virtual > 0x7fff) - var->xres_virtual = 0x7fff; - if (var->yres_virtual > 0x7fff) - var->yres_virtual = 0x7fff; + if (var->yres_virtual > 0x7fff/nom) + var->yres_virtual = 0x7fff/nom; + if (var->xres_virtual > 0x7fff/nom) + var->xres_virtual = 0x7fff/nom; + return 0; } @@ -955,11 +956,14 @@ riva_set_rop_solid(struct riva_par *par, int rop) } -void riva_setup_accel(struct riva_par *par) +void riva_setup_accel(struct fb_info *info) { + struct riva_par *par = (struct riva_par *) info->par; + RIVA_FIFO_FREE(par->riva, Clip, 2); par->riva.Clip->TopLeft = 0x0; - par->riva.Clip->WidthHeight = 0x7fff7fff; + par->riva.Clip->WidthHeight = (info->var.xres_virtual & 0xffff) | + (info->var.yres_virtual << 16); riva_set_rop_solid(par, 0xcc); wait_for_idle(par); } @@ -1194,9 +1198,16 @@ static int rivafb_set_par(struct fb_info *info) { struct riva_par *par = (struct riva_par *) info->par; + riva_common_setup(par); + RivaGetConfig(&par->riva, par->Chipset); + /* vgaHWunlock() + riva unlock (0x7F) */ + CRTCout(par, 0x11, 0xFF); + par->riva.LockUnlock(&par->riva, 0); + riva_load_video_mode(info); - riva_setup_accel(par); + riva_setup_accel(info); + memset_io(par->riva.CURSOR, 0, MAX_CURS * MAX_CURS * 2); info->fix.line_length = (info->var.xres_virtual * (info->var.bits_per_pixel >> 3)); info->fix.visual = (info->var.bits_per_pixel == 8) ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR; @@ -1444,8 +1455,8 @@ static void rivafb_copyarea(struct fb_info *info, const struct fb_copyarea *regi static inline void convert_bgcolor_16(u32 *col) { - *col = ((*col & 0x00007C00) << 9) - | ((*col & 0x000003E0) << 6) + *col = ((*col & 0x0000F800) << 8) + | ((*col & 0x00007E0) << 5) | ((*col & 0x0000001F) << 3) | 0xFF000000; mb(); @@ -1759,9 +1770,16 @@ static void riva_get_EDID(struct fb_info *info, struct pci_dev *pdev) /* XXX use other methods later */ #ifdef CONFIG_FB_RIVA_I2C struct riva_par *par = (struct riva_par *) info->par; + int i; riva_create_i2c_busses(par); - riva_probe_i2c_connector(par, 1, &par->EDID); + for (i = par->bus; i >= 1; i--) { + riva_probe_i2c_connector(par, i, &par->EDID); + if (par->EDID) { + printk("rivafb: Found EDID Block from BUS %i\n", i); + break; + } + } riva_delete_i2c_busses(par); #endif #endif @@ -1814,6 +1832,16 @@ static int __devinit rivafb_probe(struct pci_dev *pd, goto err_out_kfree1; memset(info->pixmap.addr, 0, 64 * 1024); + if (pci_enable_device(pd)) { + printk(KERN_ERR PFX "cannot enable PCI device\n"); + goto err_out_enable; + } + + if (pci_request_regions(pd, "rivafb")) { + printk(KERN_ERR PFX "cannot request PCI regions\n"); + goto err_out_request; + } + strcat(rivafb_fix.id, rci->name); default_par->riva.Architecture = rci->arch_rev; @@ -1840,12 +1868,6 @@ static int __devinit rivafb_probe(struct pci_dev *pd, rivafb_fix.mmio_start = pci_resource_start(pd, 0); rivafb_fix.smem_start = pci_resource_start(pd, 1); - if (!request_mem_region(rivafb_fix.mmio_start, - rivafb_fix.mmio_len, "rivafb")) { - printk(KERN_ERR PFX "cannot reserve MMIO region\n"); - goto err_out_kfree2; - } - default_par->ctrl_base = ioremap(rivafb_fix.mmio_start, rivafb_fix.mmio_len); if (!default_par->ctrl_base) { @@ -1861,17 +1883,13 @@ static int __devinit rivafb_probe(struct pci_dev *pd, * Since these cards were never made with more than 8 megabytes * we can safely allocate this separately. */ - if (!request_mem_region(rivafb_fix.smem_start + 0x00C00000, - 0x00008000, "rivafb")) { - printk(KERN_ERR PFX "cannot reserve PRAMIN region\n"); - goto err_out_iounmap_ctrl; - } default_par->riva.PRAMIN = ioremap(rivafb_fix.smem_start + 0x00C00000, 0x00008000); if (!default_par->riva.PRAMIN) { printk(KERN_ERR PFX "cannot ioremap PRAMIN region\n"); goto err_out_free_nv3_pramin; } rivafb_fix.accel = FB_ACCEL_NV3; + default_par->bus = 1; break; case NV_ARCH_04: case NV_ARCH_10: @@ -1879,6 +1897,7 @@ static int __devinit rivafb_probe(struct pci_dev *pd, default_par->riva.PCRTC0 = (unsigned *)(default_par->ctrl_base + 0x00600000); default_par->riva.PRAMIN = (unsigned *)(default_par->ctrl_base + 0x00710000); rivafb_fix.accel = FB_ACCEL_NV4; + default_par->bus = 2; break; } @@ -1891,12 +1910,6 @@ static int __devinit rivafb_probe(struct pci_dev *pd, rivafb_fix.smem_len = riva_get_memlen(default_par) * 1024; default_par->dclk_max = riva_get_maxdclk(default_par) * 1000; - if (!request_mem_region(rivafb_fix.smem_start, - rivafb_fix.smem_len, "rivafb")) { - printk(KERN_ERR PFX "cannot reserve FB region\n"); - goto err_out_iounmap_nv3_pramin; - } - info->screen_base = ioremap(rivafb_fix.smem_start, rivafb_fix.smem_len); if (!info->screen_base) { @@ -1949,18 +1962,15 @@ static int __devinit rivafb_probe(struct pci_dev *pd, err_out_iounmap_fb: iounmap(info->screen_base); err_out_free_base1: - release_mem_region(rivafb_fix.smem_start, rivafb_fix.smem_len); -err_out_iounmap_nv3_pramin: if (default_par->riva.Architecture == NV_ARCH_03) iounmap((caddr_t)default_par->riva.PRAMIN); err_out_free_nv3_pramin: - if (default_par->riva.Architecture == NV_ARCH_03) - release_mem_region(rivafb_fix.smem_start + 0x00C00000, 0x00008000); -err_out_iounmap_ctrl: iounmap(default_par->ctrl_base); err_out_free_base0: - release_mem_region(rivafb_fix.mmio_start, rivafb_fix.mmio_len); -err_out_kfree2: + pci_release_regions(pd); +err_out_request: + pci_disable_device(pd); +err_out_enable: kfree(info->pixmap.addr); err_out_kfree1: kfree(default_par); @@ -1987,16 +1997,11 @@ static void __exit rivafb_remove(struct pci_dev *pd) iounmap(par->ctrl_base); iounmap(info->screen_base); - - release_mem_region(info->fix.mmio_start, - info->fix.mmio_len); - release_mem_region(info->fix.smem_start, - info->fix.smem_len); - - if (par->riva.Architecture == NV_ARCH_03) { + if (par->riva.Architecture == NV_ARCH_03) iounmap((caddr_t)par->riva.PRAMIN); - release_mem_region(info->fix.smem_start + 0x00C00000, 0x00008000); - } + pci_release_regions(pd); + pci_disable_device(pd); + fb_destroy_modedb(info->monspecs.modedb); kfree(info->pixmap.addr); kfree(par); kfree(info); diff --git a/drivers/video/riva/riva_hw.c b/drivers/video/riva/riva_hw.c index 03365f5038b7..9272785c03ad 100644 --- a/drivers/video/riva/riva_hw.c +++ b/drivers/video/riva/riva_hw.c @@ -46,6 +46,7 @@ /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/riva_hw.c,v 1.33 2002/08/05 20:47:06 mvojkovi Exp $ */ +#include <linux/kernel.h> #include <linux/pci.h> #include <linux/pci_ids.h> #include "riva_hw.h" @@ -147,7 +148,7 @@ static int ShowHideCursor #define GFIFO_SIZE_128 256 #define MFIFO_SIZE 120 #define VFIFO_SIZE 256 -#define ABS(a) (a>0?a:-a) + typedef struct { int gdrain_rate; int vdrain_rate; @@ -376,44 +377,44 @@ static int nv3_iterate(nv3_fifo_info *res_info, nv3_sim_state * state, nv3_arb_i } ns = 1000000*ainfo->gburst_size/(state->memory_width/8)/state->mclk_khz; tmp = ns * ainfo->gdrain_rate/1000000; - if (ABS(ainfo->gburst_size) + ((ABS(ainfo->wcglwm) + 16 ) & ~0x7) - tmp > max_gfsize) + if (abs(ainfo->gburst_size) + ((abs(ainfo->wcglwm) + 16 ) & ~0x7) - tmp > max_gfsize) { ainfo->converged = 0; return (1); } ns = 1000000*ainfo->vburst_size/(state->memory_width/8)/state->mclk_khz; tmp = ns * ainfo->vdrain_rate/1000000; - if (ABS(ainfo->vburst_size) + (ABS(ainfo->wcvlwm + 32) & ~0xf) - tmp> VFIFO_SIZE) + if (abs(ainfo->vburst_size) + (abs(ainfo->wcvlwm + 32) & ~0xf) - tmp> VFIFO_SIZE) { ainfo->converged = 0; return (1); } - if (ABS(ainfo->gocc) > max_gfsize) + if (abs(ainfo->gocc) > max_gfsize) { ainfo->converged = 0; return (1); } - if (ABS(ainfo->vocc) > VFIFO_SIZE) + if (abs(ainfo->vocc) > VFIFO_SIZE) { ainfo->converged = 0; return (1); } - if (ABS(ainfo->mocc) > MFIFO_SIZE) + if (abs(ainfo->mocc) > MFIFO_SIZE) { ainfo->converged = 0; return (1); } - if (ABS(vfsize) > VFIFO_SIZE) + if (abs(vfsize) > VFIFO_SIZE) { ainfo->converged = 0; return (1); } - if (ABS(gfsize) > max_gfsize) + if (abs(gfsize) > max_gfsize) { ainfo->converged = 0; return (1); } - if (ABS(mfsize) > MFIFO_SIZE) + if (abs(mfsize) > MFIFO_SIZE) { ainfo->converged = 0; return (1); @@ -493,8 +494,8 @@ static char nv3_arb(nv3_fifo_info * res_info, nv3_sim_state * state, nv3_arb_in } if (ainfo->converged) { - res_info->graphics_lwm = (int)ABS(ainfo->wcglwm) + 16; - res_info->video_lwm = (int)ABS(ainfo->wcvlwm) + 32; + res_info->graphics_lwm = (int)abs(ainfo->wcglwm) + 16; + res_info->video_lwm = (int)abs(ainfo->wcvlwm) + 32; res_info->graphics_burst_size = ainfo->gburst_size; res_info->video_burst_size = ainfo->vburst_size; res_info->graphics_hi_priority = (ainfo->priority == GRAPHICS); diff --git a/drivers/video/riva/rivafb.h b/drivers/video/riva/rivafb.h index beb2df6c57d2..198a29c3ce58 100644 --- a/drivers/video/riva/rivafb.h +++ b/drivers/video/riva/rivafb.h @@ -60,6 +60,7 @@ struct riva_par { Bool SecondCRTC; int FlatPanel; struct pci_dev *pdev; + int bus; #ifdef CONFIG_MTRR struct { int vram; int vram_valid; } mtrr; #endif diff --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c index d57b394929a2..f732dbbf89f5 100644 --- a/drivers/video/sstfb.c +++ b/drivers/video/sstfb.c @@ -349,10 +349,10 @@ static int sst_calc_pll(const int freq, int *freq_out, struct pll_timing *t) if (m >= 128) break; fout = (DAC_FREF * (m + 2)) / ((1 << p) * (n + 2)); - if ((ABS(fout - freq) < best_err) && (m > 0)) { + if ((abs(fout - freq) < best_err) && (m > 0)) { best_n = n; best_m = m; - best_err = ABS(fout - freq); + best_err = abs(fout - freq); /* we get the lowest m , allowing 0.5% error in freq*/ if (200*best_err < freq) break; } diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index 149fac70deec..8f69595f9f0a 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c @@ -320,7 +320,7 @@ int journal_extend(handle_t *handle, int nblocks) result = -EIO; if (is_handle_aborted(handle)) - goto error_out; + goto out; result = 1; @@ -357,6 +357,7 @@ unlock: spin_unlock(&transaction->t_handle_lock); error_out: spin_unlock(&journal->j_state_lock); +out: return result; } diff --git a/fs/proc/generic.c b/fs/proc/generic.c index b16a42d5f682..72febc00fa3b 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -231,14 +231,21 @@ out: static int proc_notify_change(struct dentry *dentry, struct iattr *iattr) { struct inode *inode = dentry->d_inode; - int error = inode_setattr(inode, iattr); - if (!error) { - struct proc_dir_entry *de = PDE(inode); - de->uid = inode->i_uid; - de->gid = inode->i_gid; - de->mode = inode->i_mode; - } + struct proc_dir_entry *de = PDE(inode); + int error; + + error = inode_change_ok(inode, iattr); + if (error) + goto out; + error = inode_setattr(inode, iattr); + if (error) + goto out; + + de->uid = inode->i_uid; + de->gid = inode->i_gid; + de->mode = inode->i_mode; +out: return error; } diff --git a/include/asm-generic/rtc.h b/include/asm-generic/rtc.h index 1a1ea0200e1f..cef08db34ada 100644 --- a/include/asm-generic/rtc.h +++ b/include/asm-generic/rtc.h @@ -46,7 +46,7 @@ static inline unsigned int get_rtc_time(struct rtc_time *time) { unsigned long uip_watchdog = jiffies; unsigned char ctrl; -#ifdef CONFIG_DECSTATION +#ifdef CONFIG_MACH_DECSTATION unsigned int real_year; #endif @@ -79,7 +79,7 @@ static inline unsigned int get_rtc_time(struct rtc_time *time) time->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH); time->tm_mon = CMOS_READ(RTC_MONTH); time->tm_year = CMOS_READ(RTC_YEAR); -#ifdef CONFIG_DECSTATION +#ifdef CONFIG_MACH_DECSTATION real_year = CMOS_READ(RTC_DEC_YEAR); #endif ctrl = CMOS_READ(RTC_CONTROL); @@ -95,7 +95,7 @@ static inline unsigned int get_rtc_time(struct rtc_time *time) BCD_TO_BIN(time->tm_year); } -#ifdef CONFIG_DECSTATION +#ifdef CONFIG_MACH_DECSTATION time->tm_year += real_year - 72; #endif @@ -117,7 +117,7 @@ static inline int set_rtc_time(struct rtc_time *time) unsigned char mon, day, hrs, min, sec; unsigned char save_control, save_freq_select; unsigned int yrs; -#ifdef CONFIG_DECSTATION +#ifdef CONFIG_MACH_DECSTATION unsigned int real_yrs, leap_yr; #endif @@ -132,7 +132,7 @@ static inline int set_rtc_time(struct rtc_time *time) return -EINVAL; spin_lock_irq(&rtc_lock); -#ifdef CONFIG_DECSTATION +#ifdef CONFIG_MACH_DECSTATION real_yrs = yrs; leap_yr = ((!((yrs + 1900) % 4) && ((yrs + 1900) % 100)) || !((yrs + 1900) % 400)); @@ -174,7 +174,7 @@ static inline int set_rtc_time(struct rtc_time *time) save_freq_select = CMOS_READ(RTC_FREQ_SELECT); CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT); -#ifdef CONFIG_DECSTATION +#ifdef CONFIG_MACH_DECSTATION CMOS_WRITE(real_yrs, RTC_DEC_YEAR); #endif CMOS_WRITE(yrs, RTC_YEAR); diff --git a/include/asm-i386/mach-es7000/mach_apic.h b/include/asm-i386/mach-es7000/mach_apic.h index 888f7f04262d..ceab2c464b13 100644 --- a/include/asm-i386/mach-es7000/mach_apic.h +++ b/include/asm-i386/mach-es7000/mach_apic.h @@ -16,7 +16,7 @@ static inline cpumask_t target_cpus(void) #if defined CONFIG_ES7000_CLUSTERED_APIC return CPU_MASK_ALL; #else - return cpumask_of_cpu(bios_cpu_apicid[smp_processor_id()]); + return cpumask_of_cpu(smp_processor_id()); #endif } #define TARGET_CPUS (target_cpus()) diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h index 082da3739373..f544cc131b28 100644 --- a/include/asm-i386/page.h +++ b/include/asm-i386/page.h @@ -41,6 +41,7 @@ */ #ifdef CONFIG_X86_PAE extern unsigned long long __supported_pte_mask; +extern int nx_enabled; typedef struct { unsigned long pte_low, pte_high; } pte_t; typedef struct { unsigned long long pmd; } pmd_t; typedef struct { unsigned long long pgd; } pgd_t; @@ -48,6 +49,7 @@ typedef struct { unsigned long long pgprot; } pgprot_t; #define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32)) #define HPAGE_SHIFT 21 #else +#define nx_enabled 0 typedef struct { unsigned long pte_low; } pte_t; typedef struct { unsigned long pmd; } pmd_t; typedef struct { unsigned long pgd; } pgd_t; diff --git a/include/asm-i386/pgtable-2level-defs.h b/include/asm-i386/pgtable-2level-defs.h new file mode 100644 index 000000000000..2a16f7a268bc --- /dev/null +++ b/include/asm-i386/pgtable-2level-defs.h @@ -0,0 +1,20 @@ +#ifndef _I386_PGTABLE_2LEVEL_DEFS_H +#define _I386_PGTABLE_2LEVEL_DEFS_H + +/* + * traditional i386 two-level paging structure: + */ + +#define PGDIR_SHIFT 22 +#define PTRS_PER_PGD 1024 + +/* + * the i386 is two-level, so we don't really have any + * PMD directory physically. + */ +#define PMD_SHIFT 22 +#define PTRS_PER_PMD 1 + +#define PTRS_PER_PTE 1024 + +#endif /* _I386_PGTABLE_2LEVEL_DEFS_H */ diff --git a/include/asm-i386/pgtable-2level.h b/include/asm-i386/pgtable-2level.h index cea397939b51..de51110560b9 100644 --- a/include/asm-i386/pgtable-2level.h +++ b/include/asm-i386/pgtable-2level.h @@ -1,22 +1,6 @@ #ifndef _I386_PGTABLE_2LEVEL_H #define _I386_PGTABLE_2LEVEL_H -/* - * traditional i386 two-level paging structure: - */ - -#define PGDIR_SHIFT 22 -#define PTRS_PER_PGD 1024 - -/* - * the i386 is two-level, so we don't really have any - * PMD directory physically. - */ -#define PMD_SHIFT 22 -#define PTRS_PER_PMD 1 - -#define PTRS_PER_PTE 1024 - #define pte_ERROR(e) \ printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, (e).pte_low) #define pmd_ERROR(e) \ @@ -64,6 +48,22 @@ static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) #define pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) /* + * All present user pages are user-executable: + */ +static inline int pte_exec(pte_t pte) +{ + return pte_user(pte); +} + +/* + * All present pages are kernel-executable: + */ +static inline int pte_exec_kernel(pte_t pte) +{ + return 1; +} + +/* * Bits 0, 6 and 7 are taken, split up the 29 bits of offset * into this range: */ diff --git a/include/asm-i386/pgtable-3level-defs.h b/include/asm-i386/pgtable-3level-defs.h new file mode 100644 index 000000000000..eb3a1ea88671 --- /dev/null +++ b/include/asm-i386/pgtable-3level-defs.h @@ -0,0 +1,22 @@ +#ifndef _I386_PGTABLE_3LEVEL_DEFS_H +#define _I386_PGTABLE_3LEVEL_DEFS_H + +/* + * PGDIR_SHIFT determines what a top-level page table entry can map + */ +#define PGDIR_SHIFT 30 +#define PTRS_PER_PGD 4 + +/* + * PMD_SHIFT determines the size of the area a middle-level + * page table can map + */ +#define PMD_SHIFT 21 +#define PTRS_PER_PMD 512 + +/* + * entries per page directory level + */ +#define PTRS_PER_PTE 512 + +#endif /* _I386_PGTABLE_3LEVEL_DEFS_H */ diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h index a4c24db82403..d78e3493da72 100644 --- a/include/asm-i386/pgtable-3level.h +++ b/include/asm-i386/pgtable-3level.h @@ -8,24 +8,6 @@ * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com> */ -/* - * PGDIR_SHIFT determines what a top-level page table entry can map - */ -#define PGDIR_SHIFT 30 -#define PTRS_PER_PGD 4 - -/* - * PMD_SHIFT determines the size of the area a middle-level - * page table can map - */ -#define PMD_SHIFT 21 -#define PTRS_PER_PMD 512 - -/* - * entries per page directory level - */ -#define PTRS_PER_PTE 512 - #define pte_ERROR(e) \ printk("%s:%d: bad pte %p(%08lx%08lx).\n", __FILE__, __LINE__, &(e), (e).pte_high, (e).pte_low) #define pmd_ERROR(e) \ @@ -37,6 +19,29 @@ static inline int pgd_none(pgd_t pgd) { return 0; } static inline int pgd_bad(pgd_t pgd) { return 0; } static inline int pgd_present(pgd_t pgd) { return 1; } +/* + * Is the pte executable? + */ +static inline int pte_x(pte_t pte) +{ + return !(pte_val(pte) & _PAGE_NX); +} + +/* + * All present user-pages with !NX bit are user-executable: + */ +static inline int pte_exec(pte_t pte) +{ + return pte_user(pte) && pte_x(pte); +} +/* + * All present pages with !NX bit are kernel-executable: + */ +static inline int pte_exec_kernel(pte_t pte) +{ + return pte_x(pte); +} + /* Rules for using set_pte: the pte being assigned *must* be * either not present or in a state where the hardware will * not attempt to update the pte. In places where this is diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index a22128c2604e..8f9fcab61f5c 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h @@ -43,19 +43,15 @@ void pgd_dtor(void *, kmem_cache_t *, unsigned long); void pgtable_cache_init(void); void paging_init(void); -#endif /* !__ASSEMBLY__ */ - /* * The Linux x86 paging architecture is 'compile-time dual-mode', it * implements both the traditional 2-level x86 page tables and the * newer 3-level PAE-mode page tables. */ -#ifndef __ASSEMBLY__ #ifdef CONFIG_X86_PAE -# include <asm/pgtable-3level.h> +# include <asm/pgtable-3level-defs.h> #else -# include <asm/pgtable-2level.h> -#endif +# include <asm/pgtable-2level-defs.h> #endif #define PMD_SIZE (1UL << PMD_SHIFT) @@ -73,8 +69,6 @@ void paging_init(void); #define BOOT_USER_PGD_PTRS (__PAGE_OFFSET >> TWOLEVEL_PGDIR_SHIFT) #define BOOT_KERNEL_PGD_PTRS (1024-BOOT_USER_PGD_PTRS) - -#ifndef __ASSEMBLY__ /* Just any arbitrary offset to the start of the vmalloc VM area: the * current 8MB value just means that there will be a 8MB "hole" after the * physical memory until the kernel virtual memory starts. That means that @@ -223,7 +217,6 @@ extern unsigned long pg0[]; */ static inline int pte_user(pte_t pte) { return (pte).pte_low & _PAGE_USER; } static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_USER; } -static inline int pte_exec(pte_t pte) { return (pte).pte_low & _PAGE_USER; } static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_DIRTY; } static inline int pte_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; } static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_RW; } @@ -244,6 +237,12 @@ static inline pte_t pte_mkdirty(pte_t pte) { (pte).pte_low |= _PAGE_DIRTY; retur static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte_low |= _PAGE_ACCESSED; return pte; } static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte_low |= _PAGE_RW; return pte; } +#ifdef CONFIG_X86_PAE +# include <asm/pgtable-3level.h> +#else +# include <asm/pgtable-2level.h> +#endif + static inline int ptep_test_and_clear_dirty(pte_t *ptep) { if (!pte_dirty(*ptep)) diff --git a/include/asm-i386/suspend.h b/include/asm-i386/suspend.h index 2febd2d28532..2794a173f64d 100644 --- a/include/asm-i386/suspend.h +++ b/include/asm-i386/suspend.h @@ -36,9 +36,6 @@ struct saved_context { : /* no output */ \ :"r" ((thread)->debugreg[register])) -extern void save_processor_state(void); -extern void restore_processor_state(void); - #ifdef CONFIG_ACPI_SLEEP extern unsigned long saved_eip; extern unsigned long saved_esp; diff --git a/include/asm-mips/gt64240.h b/include/asm-mips/gt64240.h index 12964c2c3e34..8f9bd341ed49 100644 --- a/include/asm-mips/gt64240.h +++ b/include/asm-mips/gt64240.h @@ -10,7 +10,7 @@ #define __ASM_MIPS_MV64240_H #include <asm/addrspace.h> -#include <asm/byteorder.h> +#include <asm/marvell.h> /* * CPU Control Registers @@ -1232,33 +1232,4 @@ #define MPSC1_CAUSE 0xb80c #define MPSC1_MASK 0xb88c -extern unsigned long gt64240_base; - -#define GT64240_BASE (gt64240_base) - -/* - * Because of an error/peculiarity in the Galileo chip, we need to swap the - * bytes when running bigendian. - */ -#define __GT_READ(ofs) \ - (*(volatile u32 *)(GT64240_BASE+(ofs))) -#define __GT_WRITE(ofs, data) \ - do { *(volatile u32 *)(GT64240_BASE+(ofs)) = (data); } while (0) - -#define GT_READ(ofs) le32_to_cpu(__GT_READ(ofs)) -#define GT_WRITE(ofs, data) __GT_WRITE(ofs, cpu_to_le32(data)) - -#define GT_READ_16(ofs, data) \ - le16_to_cpu(*(volatile u16 *)(GT64240_BASE+(ofs))) -#define GT_WRITE_16(ofs, data) \ - *(volatile u16 *)(GT64240_BASE+(ofs)) = cpu_to_le16(data) - -#define GT_READ_8(ofs, data) \ - *(data) = *(volatile u8 *)(GT64240_BASE+(ofs)) -#define GT_WRITE_8(ofs, data) \ - *(volatile u8 *)(GT64240_BASE+(ofs)) = data - -extern struct pci_ops gt_bus0_pci_ops; -extern struct pci_ops gt_bus1_pci_ops; - #endif /* __ASM_MIPS_MV64240_H */ diff --git a/include/asm-mips/marvell.h b/include/asm-mips/marvell.h new file mode 100644 index 000000000000..2e3bc6732d1c --- /dev/null +++ b/include/asm-mips/marvell.h @@ -0,0 +1,57 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 2004 by Ralf Baechle + */ +#ifndef __ASM_MIPS_MARVELL_H +#define __ASM_MIPS_MARVELL_H + +#include <linux/pci.h> + +#include <asm/byteorder.h> +#include <asm/pci_channel.h> + +extern unsigned long marvell_base; + +/* + * Because of an error/peculiarity in the Galileo chip, we need to swap the + * bytes when running bigendian. + */ +#define __MV_READ(ofs) \ + (*(volatile u32 *)(marvell_base+(ofs))) +#define __MV_WRITE(ofs, data) \ + do { *(volatile u32 *)(marvell_base+(ofs)) = (data); } while (0) + +#define MV_READ(ofs) le32_to_cpu(__MV_READ(ofs)) +#define MV_WRITE(ofs, data) __MV_WRITE(ofs, cpu_to_le32(data)) + +#define MV_READ_16(ofs) \ + le16_to_cpu(*(volatile u16 *)(marvell_base+(ofs))) +#define MV_WRITE_16(ofs, data) \ + *(volatile u16 *)(marvell_base+(ofs)) = cpu_to_le16(data) + +#define MV_READ_8(ofs) \ + *(volatile u8 *)(marvell_base+(ofs)) +#define MV_WRITE_8(ofs, data) \ + *(volatile u8 *)(marvell_base+(ofs)) = data + +#define MV_SET_REG_BITS(ofs, bits) \ + (*((volatile u32 *)(marvell_base + (ofs)))) |= ((u32)cpu_to_le32(bits)) +#define MV_RESET_REG_BITS(ofs, bits) \ + (*((volatile u32 *)(marvell_base + (ofs)))) &= ~((u32)cpu_to_le32(bits)) + +extern struct pci_ops mv_pci_ops; + +struct mv_pci_controller { + struct pci_controller pcic; + + /* + * GT-64240/MV-64340 specific, per host bus information + */ + unsigned long config_addr; + unsigned long config_vreg; +}; + +#endif /* __ASM_MIPS_MARVELL_H */ diff --git a/include/asm-mips/mv64340.h b/include/asm-mips/mv64340.h index 442f2fbf7341..a889dd9788ff 100644 --- a/include/asm-mips/mv64340.h +++ b/include/asm-mips/mv64340.h @@ -14,7 +14,7 @@ #define __ASM_MV64340_H #include <asm/addrspace.h> -#include <asm/byteorder.h> +#include <asm/marvell.h> /****************************************/ /* Processor Address Space */ @@ -1034,38 +1034,6 @@ #define MV64340_SERIAL_INIT_CONTROL 0xf328 #define MV64340_SERIAL_INIT_STATUS 0xf32c -extern unsigned long mv64340_base; - -#define MV64340_BASE (mv64340_base) - -/* - * Because of an error/peculiarity in the Galileo chip, we need to swap the - * bytes when running bigendian. - */ - -#define MV_WRITE(ofs, data) \ - *(volatile u32 *)(MV64340_BASE + (ofs)) = cpu_to_le32((u32)data) -#define MV_READ(ofs) \ - (le32_to_cpu(*(volatile u32 *)(MV64340_BASE + (ofs)))) - -#define MV_WRITE_16(ofs, data) \ - *(volatile u16 *)(MV64340_BASE + (ofs)) = cpu_to_le16((u16)data) -#define MV_READ_16(ofs) \ - le16_to_cpu(*(volatile u16 *)(MV64340_BASE + (ofs))) - -#define MV_WRITE_8(ofs, data) \ - *(volatile u8 *)(MV64340_BASE + (ofs)) = ((u16)data) -#define MV_READ_8(ofs) \ - (*(volatile u8 *)(MV64340_BASE + (ofs))) - -#define MV_SET_REG_BITS(ofs, bits) \ - (*((volatile u32 *)(MV64340_BASE + (ofs)))) |= ((u32)cpu_to_le32(bits)) -#define MV_RESET_REG_BITS(ofs, bits) \ - (*((volatile u32 *)(MV64340_BASE + (ofs)))) &= ~((u32)cpu_to_le32(bits)) - extern void mv64340_irq_init(unsigned int base); -extern struct pci_ops mv64340_bus0_pci_ops; -extern struct pci_ops mv64340_bus1_pci_ops; - #endif /* __ASM_MV64340_H */ diff --git a/include/asm-mips/pgtable-bits.h b/include/asm-mips/pgtable-bits.h index 76c1ae1c7dee..6a890420643f 100644 --- a/include/asm-mips/pgtable-bits.h +++ b/include/asm-mips/pgtable-bits.h @@ -82,7 +82,7 @@ #define _CACHE_FPC (7 << 9) #define _CACHE_UNCACHED _CACHE_UC_B -#define _CACHE_CACHABLE_NONCOHERENT _CACHE_UC_B +#define _CACHE_CACHABLE_NONCOHERENT _CACHE_WB #else diff --git a/include/asm-mips/vr41xx/eagle.h b/include/asm-mips/vr41xx/eagle.h deleted file mode 100644 index 9cbd61c4b31a..000000000000 --- a/include/asm-mips/vr41xx/eagle.h +++ /dev/null @@ -1,265 +0,0 @@ -/* - * FILE NAME - * include/asm-mips/vr41xx/eagle.h - * - * BRIEF MODULE DESCRIPTION - * Include file for NEC Eagle board. - * - * Author: MontaVista Software, Inc. - * yyuasa@mvista.com or source@mvista.com - * - * Copyright 2001-2003 MontaVista Software Inc. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 675 Mass Ave, Cambridge, MA 02139, USA. - */ -#ifndef __NEC_EAGLE_H -#define __NEC_EAGLE_H - -#include <asm/addrspace.h> -#include <asm/vr41xx/vr41xx.h> - -/* - * Board specific address mapping - */ -#define VR41XX_PCI_MEM1_BASE 0x10000000 -#define VR41XX_PCI_MEM1_SIZE 0x04000000 -#define VR41XX_PCI_MEM1_MASK 0x7c000000 - -#define VR41XX_PCI_MEM2_BASE 0x14000000 -#define VR41XX_PCI_MEM2_SIZE 0x02000000 -#define VR41XX_PCI_MEM2_MASK 0x7e000000 - -#define VR41XX_PCI_IO_BASE 0x16000000 -#define VR41XX_PCI_IO_SIZE 0x02000000 -#define VR41XX_PCI_IO_MASK 0x7e000000 - -#define VR41XX_PCI_IO_START 0x01000000 -#define VR41XX_PCI_IO_END 0x01ffffff - -#define VR41XX_PCI_MEM_START 0x12000000 -#define VR41XX_PCI_MEM_END 0x15ffffff - -#define IO_PORT_BASE KSEG1ADDR(VR41XX_PCI_IO_BASE) -#define IO_PORT_RESOURCE_START 0 -#define IO_PORT_RESOURCE_END VR41XX_PCI_IO_SIZE -#define IO_MEM1_RESOURCE_START VR41XX_PCI_MEM1_BASE -#define IO_MEM1_RESOURCE_END (VR41XX_PCI_MEM1_BASE + VR41XX_PCI_MEM1_SIZE) -#define IO_MEM2_RESOURCE_START VR41XX_PCI_MEM2_BASE -#define IO_MEM2_RESOURCE_END (VR41XX_PCI_MEM2_BASE + VR41XX_PCI_MEM2_SIZE) - -/* - * General-Purpose I/O Pin Number - */ -#define VRC4173_PIN 1 -#define PCISLOT_PIN 4 -#define FPGA_PIN 5 -#define DCD_PIN 15 - -/* - * Interrupt Number - */ -#define VRC4173_CASCADE_IRQ GIU_IRQ(VRC4173_PIN) -#define PCISLOT_IRQ GIU_IRQ(PCISLOT_PIN) -#define FPGA_CASCADE_IRQ GIU_IRQ(FPGA_PIN) -#define DCD_IRQ GIU_IRQ(DCD_PIN) - -#define SDBINT_IRQ_BASE 88 -#define SDBINT_IRQ(x) (SDBINT_IRQ_BASE + (x)) -/* RFU */ -#define DEG_IRQ SDBINT_IRQ(1) -#define ENUM_IRQ SDBINT_IRQ(2) -#define SIO1INT_IRQ SDBINT_IRQ(3) -#define SIO2INT_IRQ SDBINT_IRQ(4) -#define PARINT_IRQ SDBINT_IRQ(5) -#define SDBINT_IRQ_LAST PARINT_IRQ - -#define PCIINT_IRQ_BASE 96 -#define PCIINT_IRQ(x) (PCIINT_IRQ_BASE + (x)) -#define CP_INTA_IRQ PCIINT_IRQ(0) -#define CP_INTB_IRQ PCIINT_IRQ(1) -#define CP_INTC_IRQ PCIINT_IRQ(2) -#define CP_INTD_IRQ PCIINT_IRQ(3) -#define LANINTA_IRQ PCIINT_IRQ(4) -#define PCIINT_IRQ_LAST LANINTA_IRQ - -/* - * On board Devices I/O Mapping - */ -#define NEC_EAGLE_SIO1RB KSEG1ADDR(0x0DFFFEC0) -#define NEC_EAGLE_SIO1TH KSEG1ADDR(0x0DFFFEC0) -#define NEC_EAGLE_SIO1IE KSEG1ADDR(0x0DFFFEC2) -#define NEC_EAGLE_SIO1IID KSEG1ADDR(0x0DFFFEC4) -#define NEC_EAGLE_SIO1FC KSEG1ADDR(0x0DFFFEC4) -#define NEC_EAGLE_SIO1LC KSEG1ADDR(0x0DFFFEC6) -#define NEC_EAGLE_SIO1MC KSEG1ADDR(0x0DFFFEC8) -#define NEC_EAGLE_SIO1LS KSEG1ADDR(0x0DFFFECA) -#define NEC_EAGLE_SIO1MS KSEG1ADDR(0x0DFFFECC) -#define NEC_EAGLE_SIO1SC KSEG1ADDR(0x0DFFFECE) - -#define NEC_EAGLE_SIO2TH KSEG1ADDR(0x0DFFFED0) -#define NEC_EAGLE_SIO2IE KSEG1ADDR(0x0DFFFED2) -#define NEC_EAGLE_SIO2IID KSEG1ADDR(0x0DFFFED4) -#define NEC_EAGLE_SIO2FC KSEG1ADDR(0x0DFFFED4) -#define NEC_EAGLE_SIO2LC KSEG1ADDR(0x0DFFFED6) -#define NEC_EAGLE_SIO2MC KSEG1ADDR(0x0DFFFED8) -#define NEC_EAGLE_SIO2LS KSEG1ADDR(0x0DFFFEDA) -#define NEC_EAGLE_SIO2MS KSEG1ADDR(0x0DFFFEDC) -#define NEC_EAGLE_SIO2SC KSEG1ADDR(0x0DFFFEDE) - -#define NEC_EAGLE_PIOPP_DATA KSEG1ADDR(0x0DFFFEE0) -#define NEC_EAGLE_PIOPP_STATUS KSEG1ADDR(0x0DFFFEE2) -#define NEC_EAGLE_PIOPP_CNT KSEG1ADDR(0x0DFFFEE4) -#define NEC_EAGLE_PIOPP_EPPADDR KSEG1ADDR(0x0DFFFEE6) -#define NEC_EAGLE_PIOPP_EPPDATA0 KSEG1ADDR(0x0DFFFEE8) -#define NEC_EAGLE_PIOPP_EPPDATA1 KSEG1ADDR(0x0DFFFEEA) -#define NEC_EAGLE_PIOPP_EPPDATA2 KSEG1ADDR(0x0DFFFEEC) - -#define NEC_EAGLE_PIOECP_DATA KSEG1ADDR(0x0DFFFEF0) -#define NEC_EAGLE_PIOECP_CONFIG KSEG1ADDR(0x0DFFFEF2) -#define NEC_EAGLE_PIOECP_EXTCNT KSEG1ADDR(0x0DFFFEF4) - -/* - * FLSHCNT Register - */ -#define NEC_EAGLE_FLSHCNT KSEG1ADDR(0x0DFFFFA0) -#define NEC_EAGLE_FLSHCNT_FRDY 0x80 -#define NEC_EAGLE_FLSHCNT_VPPE 0x40 -#define NEC_EAGLE_FLSHCNT_WP2 0x01 - -/* - * FLSHBANK Register - */ -#define NEC_EAGLE_FLSHBANK KSEG1ADDR(0x0DFFFFA4) -#define NEC_EAGLE_FLSHBANK_S_BANK2 0x40 -#define NEC_EAGLE_FLSHBANK_S_BANK1 0x20 -#define NEC_EAGLE_FLSHBANK_BNKQ4 0x10 -#define NEC_EAGLE_FLSHBANK_BNKQ3 0x08 -#define NEC_EAGLE_FLSHBANK_BNKQ2 0x04 -#define NEC_EAGLE_FLSHBANK_BNKQ1 0x02 -#define NEC_EAGLE_FLSHBANK_BNKQ0 0x01 - -/* - * SWITCH Setting Register - */ -#define NEC_EAGLE_SWTCHSET KSEG1ADDR(0x0DFFFFA8) -#define NEC_EAGLE_SWTCHSET_DP2SW4 0x80 -#define NEC_EAGLE_SWTCHSET_DP2SW3 0x40 -#define NEC_EAGLE_SWTCHSET_DP2SW2 0x20 -#define NEC_EAGLE_SWTCHSET_DP2SW1 0x10 -#define NEC_EAGLE_SWTCHSET_DP1SW4 0x08 -#define NEC_EAGLE_SWTCHSET_DP1SW3 0x04 -#define NEC_EAGLE_SWTCHSET_DP1SW2 0x02 -#define NEC_EAGLE_SWTCHSET_DP1SW1 0x01 - -/* - * PPT Parallel Port Device Controller - */ -#define NEC_EAGLE_PPT_WRITE_DATA KSEG1ADDR(0x0DFFFFB0) -#define NEC_EAGLE_PPT_READ_DATA KSEG1ADDR(0x0DFFFFB2) -#define NEC_EAGLE_PPT_CNT KSEG1ADDR(0x0DFFFFB4) -#define NEC_EAGLE_PPT_CNT2 KSEG1ADDR(0x0DFFFFB4) - -/* Control Register */ -#define NEC_EAGLE_PPT_INTMSK 0x20 -#define NEC_EAGLE_PPT_PARIINT 0x10 -#define NEC_EAGLE_PPT_SELECTIN 0x08 -#define NEC_EAGLE_PPT_INIT 0x04 -#define NEC_EAGLE_PPT_AUTOFD 0x02 -#define NEC_EAGLE_PPT_STROBE 0x01 - -/* Control Rgister 2 */ -#define NEC_EAGLE_PPT_PAREN 0x80 -#define NEC_EAGLE_PPT_AUTOEN 0x20 -#define NEC_EAGLE_PPT_BUSY 0x10 -#define NEC_EAGLE_PPT_ACK 0x08 -#define NEC_EAGLE_PPT_PE 0x04 -#define NEC_EAGLE_PPT_SELECT 0x02 -#define NEC_EAGLE_PPT_FAULT 0x01 - -/* - * LEDWR Register - */ -#define NEC_EAGLE_LEDWR1 KSEG1ADDR(0x0DFFFFC0) -#define NEC_EAGLE_LEDWR2 KSEG1ADDR(0x0DFFFFC4) - -/* - * SDBINT Register - */ -#define NEC_EAGLE_SDBINT KSEG1ADDR(0x0DFFFFD0) -#define NEC_EAGLE_SDBINT_PARINT 0x20 -#define NEC_EAGLE_SDBINT_SIO2INT 0x10 -#define NEC_EAGLE_SDBINT_SIO1INT 0x08 -#define NEC_EAGLE_SDBINT_ENUM 0x04 -#define NEC_EAGLE_SDBINT_DEG 0x02 - -/* - * SDB INTMSK Register - */ -#define NEC_EAGLE_SDBINTMSK KSEG1ADDR(0x0DFFFFD4) -#define NEC_EAGLE_SDBINTMSK_MSKPAR 0x20 -#define NEC_EAGLE_SDBINTMSK_MSKSIO2 0x10 -#define NEC_EAGLE_SDBINTMSK_MSKSIO1 0x08 -#define NEC_EAGLE_SDBINTMSK_MSKENUM 0x04 -#define NEC_EAGLE_SDBINTMSK_MSKDEG 0x02 - -/* - * RSTREG Register - */ -#define NEC_EAGLE_RSTREG KSEG1ADDR(0x0DFFFFD8) -#define NEC_EAGLE_RST_RSTSW 0x02 -#define NEC_EAGLE_RST_LEDOFF 0x01 - -/* - * PCI INT Rgister - */ -#define NEC_EAGLE_PCIINTREG KSEG1ADDR(0x0DFFFFDC) -#define NEC_EAGLE_PCIINT_LANINT 0x10 -#define NEC_EAGLE_PCIINT_CP_INTD 0x08 -#define NEC_EAGLE_PCIINT_CP_INTC 0x04 -#define NEC_EAGLE_PCIINT_CP_INTB 0x02 -#define NEC_EAGLE_PCIINT_CP_INTA 0x01 - -/* - * PCI INT Mask Register - */ -#define NEC_EAGLE_PCIINTMSKREG KSEG1ADDR(0x0DFFFFE0) -#define NEC_EAGLE_PCIINTMSK_MSKLANINT 0x10 -#define NEC_EAGLE_PCIINTMSK_MSKCP_INTD 0x08 -#define NEC_EAGLE_PCIINTMSK_MSKCP_INTC 0x04 -#define NEC_EAGLE_PCIINTMSK_MSKCP_INTB 0x02 -#define NEC_EAGLE_PCIINTMSK_MSKCP_INTA 0x01 - -/* - * CLK Division Register - */ -#define NEC_EAGLE_CLKDIV KSEG1ADDR(0x0DFFFFE4) -#define NEC_EAGLE_CLKDIV_PCIDIV1 0x10 -#define NEC_EAGLE_CLKDIV_PCIDIV0 0x08 -#define NEC_EAGLE_CLKDIV_VTDIV2 0x04 -#define NEC_EAGLE_CLKDIV_VTDIV1 0x02 -#define NEC_EAGLE_CLKDIV_VTDIV0 0x01 - -/* - * Source Revision Register - */ -#define NEC_EAGLE_REVISION KSEG1ADDR(0x0DFFFFE8) - -#endif /* __NEC_EAGLE_H */ diff --git a/include/asm-ppc/mpc10x.h b/include/asm-ppc/mpc10x.h index f413daf79e31..dbdc7cd2966d 100644 --- a/include/asm-ppc/mpc10x.h +++ b/include/asm-ppc/mpc10x.h @@ -164,4 +164,7 @@ unsigned long mpc10x_get_mem_size(uint mem_map); int mpc10x_enable_store_gathering(struct pci_controller *hose); int mpc10x_disable_store_gathering(struct pci_controller *hose); +/* For MPC107 boards that use the built-in openpic */ +void mpc10x_set_openpic(void); + #endif /* __PPC_KERNEL_MPC10X_H */ diff --git a/include/asm-ppc64/current.h b/include/asm-ppc64/current.h index 24ea6e1ab6e8..52ddc60c8b65 100644 --- a/include/asm-ppc64/current.h +++ b/include/asm-ppc64/current.h @@ -10,9 +10,7 @@ * 2 of the License, or (at your option) any later version. */ -#include <asm/thread_info.h> - -#define get_current() (get_paca()->xCurrent) +#define get_current() (get_paca()->__current) #define current get_current() #endif /* !(_PPC64_CURRENT_H) */ diff --git a/include/asm-ppc64/eeh.h b/include/asm-ppc64/eeh.h index 3ca700cb04bc..d5e44bf36c7b 100644 --- a/include/asm-ppc64/eeh.h +++ b/include/asm-ppc64/eeh.h @@ -24,6 +24,7 @@ #include <linux/init.h> struct pci_dev; +struct device_node; /* I/O addresses are converted to EEH "tokens" such that a driver will cause * a bad page fault if the address is used directly (i.e. these addresses are diff --git a/include/asm-ppc64/iSeries/HvCall.h b/include/asm-ppc64/iSeries/HvCall.h index d91eaa28434e..d9a2e74e2399 100644 --- a/include/asm-ppc64/iSeries/HvCall.h +++ b/include/asm-ppc64/iSeries/HvCall.h @@ -183,7 +183,7 @@ void HvCall_writeLogBuffer(const void *buffer, u64 bufLen); //===================================================================== static inline void HvCall_sendIPI(struct paca_struct * targetPaca) { - HvCall1( HvCallBaseSendIPI, targetPaca->xPacaIndex ); + HvCall1( HvCallBaseSendIPI, targetPaca->paca_index ); } //===================================================================== diff --git a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h index f9823b2ac584..54a1466fe104 100644 --- a/include/asm-ppc64/mmu.h +++ b/include/asm-ppc64/mmu.h @@ -100,16 +100,6 @@ typedef struct { } dw1; } SLBE; -/* - * This structure is used in paca.h where the layout depends on the - * size being 24B. - */ -typedef struct { - unsigned long real; - unsigned long virt; - unsigned long next_round_robin; -} STAB; - /* Hardware Page Table Entry */ #define HPTES_PER_GROUP 8 diff --git a/include/asm-ppc64/paca.h b/include/asm-ppc64/paca.h index 218ab7178fc3..0eab9114c225 100644 --- a/include/asm-ppc64/paca.h +++ b/include/asm-ppc64/paca.h @@ -1,11 +1,8 @@ #ifndef _PPC64_PACA_H #define _PPC64_PACA_H -/*============================================================================ - * Header File Id - * Name______________: paca.h - * - * Description_______: +/* + * include/asm-ppc64/paca.h * * This control block defines the PACA which defines the processor * specific data for each logical processor on the system. @@ -18,139 +15,105 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -#include <asm/types.h> - -#define N_EXC_STACK 2 -/*----------------------------------------------------------------------------- - * Other Includes - *----------------------------------------------------------------------------- - */ +#include <asm/types.h> #include <asm/iSeries/ItLpPaca.h> #include <asm/iSeries/ItLpRegSave.h> -#include <asm/iSeries/ItLpQueue.h> -#include <asm/rtas.h> #include <asm/mmu.h> -#include <asm/processor.h> extern struct paca_struct paca[]; register struct paca_struct *local_paca asm("r13"); #define get_paca() local_paca struct task_struct; +struct ItLpQueue; -/*============================================================================ - * Name_______: paca - * - * Description: +/* + * Defines the layout of the paca. * - * Defines the layout of the paca. - * - * This structure is not directly accessed by PLIC or the SP except - * for the first two pointers that point to the ItLpPaca area and the - * ItLpRegSave area for this processor. Both the ItLpPaca and - * ItLpRegSave objects are currently contained within the - * PACA but they do not need to be. - * - *============================================================================ + * This structure is not directly accessed by firmware or the service + * processor except for the first two pointers that point to the + * ItLpPaca area and the ItLpRegSave area for this CPU. Both the + * ItLpPaca and ItLpRegSave objects are currently contained within the + * PACA but they do not need to be. */ struct paca_struct { -/*===================================================================================== - * CACHE_LINE_1 0x0000 - 0x007F - *===================================================================================== - */ - struct ItLpPaca *xLpPacaPtr; /* Pointer to LpPaca for PLIC 0x00 */ - struct ItLpRegSave *xLpRegSavePtr; /* Pointer to LpRegSave for PLIC 0x08 */ - struct task_struct *xCurrent; /* Pointer to current 0x10 */ - /* Note: the spinlock functions in arch/ppc64/lib/locks.c load lock_token and - xPacaIndex with a single lwz instruction, using the constant offset 24. - If you move either field, fix the spinlocks and rwlocks. */ - u16 lock_token; /* Constant 0x8000, used in spinlocks 0x18 */ - u16 xPacaIndex; /* Logical processor number 0x1A */ - u32 default_decr; /* Default decrementer value 0x1c */ - u64 xKsave; /* Saved Kernel stack addr or zero 0x20 */ - struct ItLpQueue *lpQueuePtr; /* LpQueue handled by this processor 0x28 */ - u64 xTOC; /* Kernel TOC address 0x30 */ - STAB xStab_data; /* Segment table information 0x38,0x40,0x48 */ - u8 *exception_sp; /* 0x50 */ - u8 xProcEnabled; /* 0x58 */ - u8 prof_enabled; /* 1=iSeries profiling enabled 0x59 */ - u16 xHwProcNum; /* Physical processor number 0x5a */ - u8 resv1[36]; /* 0x5c */ - -/*===================================================================================== - * CACHE_LINE_2 0x0080 - 0x00FF - *===================================================================================== - */ - u64 spare1; /* 0x00 */ - u64 spare2; /* 0x08 */ - u64 spare3; /* 0x10 */ - u64 spare4; /* 0x18 */ - u64 next_jiffy_update_tb; /* TB value for next jiffy update 0x20 */ - u32 lpEvent_count; /* lpEvents processed 0x28 */ - u32 prof_multiplier; /* 0x2C */ - u32 prof_counter; /* 0x30 */ - u32 prof_shift; /* iSeries shift for profile bucket size0x34 */ - u32 *prof_buffer; /* iSeries profiling buffer 0x38 */ - u32 *prof_stext; /* iSeries start of kernel text 0x40 */ - u32 prof_len; /* iSeries length of profile buffer -1 0x48 */ - u8 yielded; /* 0 = this processor is running 0x4c */ - /* 1 = this processor is yielded */ - u8 rsvd2[128-77]; /* 0x49 */ + /* + * Because hw_cpu_id, unlike other paca fields, is accessed + * routinely from other CPUs (from the IRQ code), we stick to + * read-only (after boot) fields in the first cacheline to + * avoid cacheline bouncing. + */ -/*===================================================================================== - * CACHE_LINE_3 0x0100 - 0x017F - *===================================================================================== - */ - u8 xProcStart; /* At startup, processor spins until 0x100 */ - /* xProcStart becomes non-zero. */ - u8 rsvd3[127]; - -/*===================================================================================== - * CACHE_LINE_4-8 0x0180 - 0x03FF Contains ItLpPaca - *===================================================================================== - */ - struct ItLpPaca xLpPaca; /* Space for ItLpPaca */ + /* + * MAGIC: These first two pointers can't be moved - they're + * accessed by the firmware + */ + struct ItLpPaca *lppaca_ptr; /* Pointer to LpPaca for PLIC */ + struct ItLpRegSave *reg_save_ptr; /* Pointer to LpRegSave for PLIC */ -/*===================================================================================== - * CACHE_LINE_9-16 0x0400 - 0x07FF Contains ItLpRegSave - *===================================================================================== - */ - struct ItLpRegSave xRegSav; /* Register save for proc */ + /* + * MAGIC: the spinlock functions in arch/ppc64/lib/locks.c + * load lock_token and paca_index with a single lwz + * instruction. They must travel together and be properly + * aligned. + */ + u16 lock_token; /* Constant 0x8000, used in locks */ + u16 paca_index; /* Logical processor number */ -/*===================================================================================== - * CACHE_LINE_17-18 0x0800 - 0x08FF Reserved - *===================================================================================== - */ - struct rtas_args xRtas; /* Per processor RTAS struct */ - u64 xR1; /* r1 save for RTAS calls */ - u64 xSavedMsr; /* Old msr saved here by HvCall */ - u8 rsvd5[256-16-sizeof(struct rtas_args)]; + u32 default_decr; /* Default decrementer value */ + struct ItLpQueue *lpqueue_ptr; /* LpQueue handled by this CPU */ + u64 kernel_toc; /* Kernel TOC address */ + u64 stab_real; /* Absolute address of segment table */ + u64 stab_addr; /* Virtual address of segment table */ + void *emergency_sp; /* pointer to emergency stack */ + u16 hw_cpu_id; /* Physical processor number */ + u8 cpu_start; /* At startup, processor spins until */ + /* this becomes non-zero. */ -/*===================================================================================== - * CACHE_LINE_19-30 0x0900 - 0x0EFF Reserved - *===================================================================================== - */ - u64 slb_shadow[0x20]; - u64 dispatch_log; - u8 rsvd6[0x500 - 0x8]; - -/*===================================================================================== - * CACHE_LINE_31-32 0x0F00 - 0x0FFF Exception register save areas - *===================================================================================== - */ - u64 exgen[8]; /* used for most interrupts/exceptions */ + /* + * Now, starting in cacheline 2, the exception save areas + */ + u64 exgen[8] __attribute__((aligned(0x80))); /* used for most interrupts/exceptions */ u64 exmc[8]; /* used for machine checks */ u64 exslb[8]; /* used for SLB/segment table misses * on the linear mapping */ u64 exdsi[8]; /* used for linear mapping hash table misses */ -/*===================================================================================== - * Page 2 used as a stack when we detect a bad kernel stack pointer, - * and early in SMP boots before relocation is enabled. - *===================================================================================== - */ - u8 guard[0x1000]; + /* + * then miscellaneous read-write fields + */ + struct task_struct *__current; /* Pointer to current */ + u64 kstack; /* Saved Kernel stack addr */ + u64 stab_next_rr; /* stab/slb round-robin counter */ + u64 next_jiffy_update_tb; /* TB value for next jiffy update */ + u64 saved_r1; /* r1 save for RTAS calls */ + u64 saved_msr; /* MSR saved here by enter_rtas */ + u32 lpevent_count; /* lpevents processed */ + u8 proc_enabled; /* irq soft-enable flag */ + + /* + * iSeries structues which the hypervisor knows about - Not + * sure if these particularly need to be cacheline aligned. + * The lppaca is also used on POWER5 pSeries boxes. + */ + struct ItLpPaca lppaca __attribute__((aligned(0x80))); + struct ItLpRegSave reg_save; + + /* + * iSeries profiling support + * + * FIXME: do we still want this, or can we ditch it in favour + * of oprofile? + */ + u32 *prof_buffer; /* iSeries profiling buffer */ + u32 *prof_stext; /* iSeries start of kernel text */ + u32 prof_multiplier; + u32 prof_counter; + u32 prof_shift; /* iSeries shift for profile + * bucket size */ + u32 prof_len; /* iSeries length of profile */ + u8 prof_enabled; /* 1=iSeries profiling enabled */ }; #endif /* _PPC64_PACA_H */ diff --git a/include/asm-ppc64/rtas.h b/include/asm-ppc64/rtas.h index 4ce9bddc62a2..d596ec5b4c9f 100644 --- a/include/asm-ppc64/rtas.h +++ b/include/asm-ppc64/rtas.h @@ -51,18 +51,17 @@ struct rtas_args { u32 nargs; u32 nret; rtas_arg_t args[16]; -#if 0 - spinlock_t lock; -#endif rtas_arg_t *rets; /* Pointer to return values in args[]. */ }; +extern struct rtas_args rtas_stop_self_args; + struct rtas_t { unsigned long entry; /* physical address pointer */ unsigned long base; /* physical address pointer */ unsigned long size; spinlock_t lock; - + struct rtas_args args; struct device_node *dev; /* virtual address pointer */ }; diff --git a/include/asm-ppc64/smp.h b/include/asm-ppc64/smp.h index 3b14c7145546..139e88e5018a 100644 --- a/include/asm-ppc64/smp.h +++ b/include/asm-ppc64/smp.h @@ -33,8 +33,8 @@ struct pt_regs; extern void smp_message_recv(int, struct pt_regs *); -#define smp_processor_id() (get_paca()->xPacaIndex) -#define hard_smp_processor_id() (get_paca()->xHwProcNum) +#define smp_processor_id() (get_paca()->paca_index) +#define hard_smp_processor_id() (get_paca()->hw_cpu_id) /* * Retrieve the state of a CPU: @@ -75,9 +75,9 @@ extern void __cpu_die(unsigned int cpu); extern void cpu_die(void) __attribute__((noreturn)); #endif /* !(CONFIG_SMP) */ -#define get_hard_smp_processor_id(CPU) (paca[(CPU)].xHwProcNum) +#define get_hard_smp_processor_id(CPU) (paca[(CPU)].hw_cpu_id) #define set_hard_smp_processor_id(CPU, VAL) \ - do { (paca[(CPU)].xHwProcNum = VAL); } while (0) + do { (paca[(CPU)].hw_proc_num = (VAL)); } while (0) #endif /* __ASSEMBLY__ */ diff --git a/include/asm-ppc64/spinlock.h b/include/asm-ppc64/spinlock.h index a16b2ff58d41..d2074c44f898 100644 --- a/include/asm-ppc64/spinlock.h +++ b/include/asm-ppc64/spinlock.h @@ -15,6 +15,7 @@ * 2 of the License, or (at your option) any later version. */ #include <linux/config.h> +#include <asm/paca.h> typedef struct { volatile unsigned int lock; @@ -57,12 +58,12 @@ static __inline__ int _raw_spin_trylock(spinlock_t *lock) "1: lwarx %0,0,%2 # spin_trylock\n\ cmpwi 0,%0,0\n\ bne- 2f\n\ - lwz %1,24(13)\n\ + lwz %1,%3(13)\n\ stwcx. %1,0,%2\n\ bne- 1b\n\ isync\n\ 2:" : "=&r"(tmp), "=&r"(tmp2) - : "r"(&lock->lock) + : "r"(&lock->lock), "i"(offsetof(struct paca_struct, lock_token)) : "cr0", "memory"); return tmp == 0; @@ -83,12 +84,12 @@ static __inline__ void _raw_spin_lock(spinlock_t *lock) "2: lwarx %0,0,%1\n\ cmpwi 0,%0,0\n\ bne- 1b\n\ - lwz %0,24(13)\n\ + lwz %0,%2(13)\n\ stwcx. %0,0,%1\n\ bne- 2b\n\ isync" : "=&r"(tmp) - : "r"(&lock->lock) + : "r"(&lock->lock), "i"(offsetof(struct paca_struct, lock_token)) : "cr0", "memory"); } @@ -115,12 +116,13 @@ static __inline__ void _raw_spin_lock_flags(spinlock_t *lock, 3: lwarx %0,0,%2\n\ cmpwi 0,%0,0\n\ bne- 1b\n\ - lwz %1,24(13)\n\ + lwz %1,%4(13)\n\ stwcx. %1,0,%2\n\ bne- 3b\n\ isync" : "=&r"(tmp), "=&r"(tmp2) - : "r"(&lock->lock), "r"(flags) + : "r"(&lock->lock), "r"(flags), + "i" (offsetof(struct paca_struct, lock_token)) : "cr0", "memory"); } diff --git a/include/asm-ppc64/time.h b/include/asm-ppc64/time.h index dfa720214d89..1e0162c2ff27 100644 --- a/include/asm-ppc64/time.h +++ b/include/asm-ppc64/time.h @@ -78,8 +78,8 @@ static __inline__ void set_dec(int val) struct paca_struct *lpaca = get_paca(); int cur_dec; - if (lpaca->xLpPaca.xSharedProc) { - lpaca->xLpPaca.xVirtualDecr = val; + if (lpaca->lppaca.xSharedProc) { + lpaca->lppaca.xVirtualDecr = val; cur_dec = get_dec(); if (cur_dec > val) HvCall_setVirtualDecr(); diff --git a/include/asm-s390/debug.h b/include/asm-s390/debug.h index 3148d5b2ca36..d8a34532b876 100644 --- a/include/asm-s390/debug.h +++ b/include/asm-s390/debug.h @@ -34,7 +34,6 @@ struct __debug_entry{ #define __DEBUG_FEATURE_VERSION 1 /* version of debug feature */ #ifdef __KERNEL__ -#include <linux/version.h> #include <linux/spinlock.h> #include <linux/kernel.h> #include <linux/time.h> diff --git a/include/asm-s390/percpu.h b/include/asm-s390/percpu.h index 7adef697ad1d..123fcaca295e 100644 --- a/include/asm-s390/percpu.h +++ b/include/asm-s390/percpu.h @@ -1,30 +1,70 @@ #ifndef __ARCH_S390_PERCPU__ #define __ARCH_S390_PERCPU__ -#include <asm-generic/percpu.h> +#include <linux/compiler.h> #include <asm/lowcore.h> +#define __GENERIC_PER_CPU + /* - * For builtin kernel code s390 uses the generic implementation for - * per cpu data, with the exception that the offset of the cpu local - * data area is cached in the cpu's lowcore memory + * s390 uses its own implementation for per cpu data, the offset of + * the cpu local data area is cached in the cpu's lowcore memory. * For 64 bit module code s390 forces the use of a GOT slot for the * address of the per cpu variable. This is needed because the module * may be more than 4G above the per cpu area. */ #if defined(__s390x__) && defined(MODULE) -#define __get_got_cpu_var(var,offset) \ + +#define __reloc_hide(var,offset) \ (*({ unsigned long *__ptr; \ - asm ( "larl %0,per_cpu__"#var"@GOTENT" : "=a" (__ptr) ); \ - ((typeof(&per_cpu__##var))((*__ptr) + offset)); \ - })) -#undef __get_cpu_var -#define __get_cpu_var(var) __get_got_cpu_var(var,S390_lowcore.percpu_offset) -#undef per_cpu -#define per_cpu(var,cpu) __get_got_cpu_var(var,__per_cpu_offset[cpu]) + asm ( "larl %0,per_cpu__"#var"@GOTENT" \ + : "=a" (__ptr) : "X" (per_cpu__##var) ); \ + (typeof(&per_cpu__##var))((*__ptr) + (offset)); })) + #else -#undef __get_cpu_var -#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, S390_lowcore.percpu_offset)) + +#define __reloc_hide(var, offset) \ + (*({ unsigned long __ptr; \ + asm ( "" : "=a" (__ptr) : "0" (&per_cpu__##var) ); \ + (typeof(&per_cpu__##var)) (__ptr + (offset)); })) + #endif +#ifdef CONFIG_SMP + +extern unsigned long __per_cpu_offset[NR_CPUS]; + +/* Separate out the type, so (int[3], foo) works. */ +#define DEFINE_PER_CPU(type, name) \ + __attribute__((__section__(".data.percpu"))) \ + __typeof__(type) per_cpu__##name + +#define __get_cpu_var(var) __reloc_hide(var,S390_lowcore.percpu_offset) +#define per_cpu(var,cpu) __reloc_hide(var,__per_cpu_offset[cpu]) + +/* A macro to avoid #include hell... */ +#define percpu_modcopy(pcpudst, src, size) \ +do { \ + unsigned int __i; \ + for (__i = 0; __i < NR_CPUS; __i++) \ + if (cpu_possible(__i)) \ + memcpy((pcpudst)+__per_cpu_offset[__i], \ + (src), (size)); \ +} while (0) + +#else /* ! SMP */ + +#define DEFINE_PER_CPU(type, name) \ + __typeof__(type) per_cpu__##name + +#define __get_cpu_var(var) __reloc_hide(var,0) +#define per_cpu(var,cpu) __reloc_hide(var,0) + +#endif /* SMP */ + +#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name + +#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) +#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) + #endif /* __ARCH_S390_PERCPU__ */ diff --git a/include/asm-s390/setup.h b/include/asm-s390/setup.h index ba3b3510e9a7..0d51c484c2ea 100644 --- a/include/asm-s390/setup.h +++ b/include/asm-s390/setup.h @@ -36,7 +36,6 @@ extern unsigned long machine_flags; #define MACHINE_IS_P390 (machine_flags & 4) #define MACHINE_HAS_MVPG (machine_flags & 16) #define MACHINE_HAS_DIAG44 (machine_flags & 32) -#define MACHINE_NEW_STIDP (machine_flags & 64) #define MACHINE_HAS_IDTE (machine_flags & 128) #ifndef __s390x__ @@ -54,7 +53,7 @@ extern unsigned long machine_flags; * Console mode. Override with conmode= */ extern unsigned int console_mode; -extern unsigned int console_device; +extern unsigned int console_devno; extern unsigned int console_irq; #define CONSOLE_IS_UNDEFINED (console_mode == 0) diff --git a/include/asm-s390/vtoc.h b/include/asm-s390/vtoc.h index f805a0b46697..a14e34e80b88 100644 --- a/include/asm-s390/vtoc.h +++ b/include/asm-s390/vtoc.h @@ -14,7 +14,6 @@ #include <linux/fs.h> #include <linux/types.h> #include <linux/hdreg.h> -#include <linux/version.h> #include <asm/dasd.h> #endif diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index 44b67330f500..e3d4f6575a0e 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h @@ -106,33 +106,49 @@ #endif /* !(__ASSEMBLY__) */ /* Spitfire/Cheetah TTE bits. */ -#define _PAGE_VALID _AC(0x8000000000000000,UL) /* Valid TTE */ -#define _PAGE_R _AC(0x8000000000000000,UL) /* Keep ref bit up to date */ -#define _PAGE_SZ4MB _AC(0x6000000000000000,UL) /* 4MB Page */ -#define _PAGE_SZ512K _AC(0x4000000000000000,UL) /* 512K Page */ -#define _PAGE_SZ64K _AC(0x2000000000000000,UL) /* 64K Page */ -#define _PAGE_SZ8K _AC(0x0000000000000000,UL) /* 8K Page */ -#define _PAGE_NFO _AC(0x1000000000000000,UL) /* No Fault Only */ -#define _PAGE_IE _AC(0x0800000000000000,UL) /* Invert Endianness */ -#define _PAGE_SN _AC(0x0000800000000000,UL) /* (Cheetah) Snoop */ -#define _PAGE_PADDR_SF _AC(0x000001FFFFFFE000,UL) /* (Spitfire) paddr [40:13]*/ -#define _PAGE_PADDR _AC(0x000007FFFFFFE000,UL) /* (Cheetah) paddr [42:13] */ -#define _PAGE_SOFT _AC(0x0000000000001F80,UL) /* Software bits */ -#define _PAGE_L _AC(0x0000000000000040,UL) /* Locked TTE */ -#define _PAGE_CP _AC(0x0000000000000020,UL) /* Cacheable in P-Cache */ -#define _PAGE_CV _AC(0x0000000000000010,UL) /* Cacheable in V-Cache */ -#define _PAGE_E _AC(0x0000000000000008,UL) /* side-Effect */ -#define _PAGE_P _AC(0x0000000000000004,UL) /* Privileged Page */ -#define _PAGE_W _AC(0x0000000000000002,UL) /* Writable */ -#define _PAGE_G _AC(0x0000000000000001,UL) /* Global */ - -/* Here are the SpitFire software bits we use in the TTE's. */ -#define _PAGE_FILE _AC(0x0000000000001000,UL) /* Pagecache page */ -#define _PAGE_MODIFIED _AC(0x0000000000000800,UL) /* Modified (dirty) */ -#define _PAGE_ACCESSED _AC(0x0000000000000400,UL) /* Accessed (ref'd) */ -#define _PAGE_READ _AC(0x0000000000000200,UL) /* Readable SW Bit */ -#define _PAGE_WRITE _AC(0x0000000000000100,UL) /* Writable SW Bit */ -#define _PAGE_PRESENT _AC(0x0000000000000080,UL) /* Present */ +#define _PAGE_VALID _AC(0x8000000000000000,UL) /* Valid TTE */ +#define _PAGE_R _AC(0x8000000000000000,UL) /* Keep ref bit up to date*/ +#define _PAGE_SZ4MB _AC(0x6000000000000000,UL) /* 4MB Page */ +#define _PAGE_SZ512K _AC(0x4000000000000000,UL) /* 512K Page */ +#define _PAGE_SZ64K _AC(0x2000000000000000,UL) /* 64K Page */ +#define _PAGE_SZ8K _AC(0x0000000000000000,UL) /* 8K Page */ +#define _PAGE_NFO _AC(0x1000000000000000,UL) /* No Fault Only */ +#define _PAGE_IE _AC(0x0800000000000000,UL) /* Invert Endianness */ +#define _PAGE_SOFT2 _AC(0x07FC000000000000,UL) /* Software bits, set 2 */ +#define _PAGE_RES1 _AC(0x0003000000000000,UL) /* Reserved */ +#define _PAGE_SN _AC(0x0000800000000000,UL) /* (Cheetah) Snoop */ +#define _PAGE_RES2 _AC(0x0000780000000000,UL) /* Reserved */ +#define _PAGE_PADDR_SF _AC(0x000001FFFFFFE000,UL) /* (Spitfire) paddr[40:13]*/ +#define _PAGE_PADDR _AC(0x000007FFFFFFE000,UL) /* (Cheetah) paddr[42:13] */ +#define _PAGE_SOFT _AC(0x0000000000001F80,UL) /* Software bits */ +#define _PAGE_L _AC(0x0000000000000040,UL) /* Locked TTE */ +#define _PAGE_CP _AC(0x0000000000000020,UL) /* Cacheable in P-Cache */ +#define _PAGE_CV _AC(0x0000000000000010,UL) /* Cacheable in V-Cache */ +#define _PAGE_E _AC(0x0000000000000008,UL) /* side-Effect */ +#define _PAGE_P _AC(0x0000000000000004,UL) /* Privileged Page */ +#define _PAGE_W _AC(0x0000000000000002,UL) /* Writable */ +#define _PAGE_G _AC(0x0000000000000001,UL) /* Global */ + +/* Here are the SpitFire software bits we use in the TTE's. + * + * WARNING: If you are going to try and start using some + * of the soft2 bits, you will need to make + * modifications to the swap entry implementation. + * For example, one thing that could happen is that + * swp_entry_to_pte() would BUG_ON() if you tried + * to use one of the soft2 bits for _PAGE_FILE. + * + * Like other architectures, I have aliased _PAGE_FILE with + * _PAGE_MODIFIED. This works because _PAGE_FILE is never + * interpreted that way unless _PAGE_PRESENT is clear. + */ +#define _PAGE_EXEC _AC(0x0000000000001000,UL) /* Executable SW bit */ +#define _PAGE_MODIFIED _AC(0x0000000000000800,UL) /* Modified (dirty) */ +#define _PAGE_FILE _AC(0x0000000000000800,UL) /* Pagecache page */ +#define _PAGE_ACCESSED _AC(0x0000000000000400,UL) /* Accessed (ref'd) */ +#define _PAGE_READ _AC(0x0000000000000200,UL) /* Readable SW Bit */ +#define _PAGE_WRITE _AC(0x0000000000000100,UL) /* Writable SW Bit */ +#define _PAGE_PRESENT _AC(0x0000000000000080,UL) /* Present */ #if PAGE_SHIFT == 13 #define _PAGE_SZBITS _PAGE_SZ8K @@ -164,16 +180,27 @@ /* Don't set the TTE _PAGE_W bit here, else the dirty bit never gets set. */ #define PAGE_SHARED __pgprot (_PAGE_PRESENT | _PAGE_VALID | _PAGE_CACHE | \ - __ACCESS_BITS | _PAGE_WRITE) + __ACCESS_BITS | _PAGE_WRITE | _PAGE_EXEC) #define PAGE_COPY __pgprot (_PAGE_PRESENT | _PAGE_VALID | _PAGE_CACHE | \ - __ACCESS_BITS) + __ACCESS_BITS | _PAGE_EXEC) #define PAGE_READONLY __pgprot (_PAGE_PRESENT | _PAGE_VALID | _PAGE_CACHE | \ - __ACCESS_BITS) + __ACCESS_BITS | _PAGE_EXEC) #define PAGE_KERNEL __pgprot (_PAGE_PRESENT | _PAGE_VALID | _PAGE_CACHE | \ - __PRIV_BITS | __ACCESS_BITS | __DIRTY_BITS) + __PRIV_BITS | \ + __ACCESS_BITS | __DIRTY_BITS | _PAGE_EXEC) + +#define PAGE_SHARED_NOEXEC __pgprot (_PAGE_PRESENT | _PAGE_VALID | \ + _PAGE_CACHE | \ + __ACCESS_BITS | _PAGE_WRITE) + +#define PAGE_COPY_NOEXEC __pgprot (_PAGE_PRESENT | _PAGE_VALID | \ + _PAGE_CACHE | __ACCESS_BITS) + +#define PAGE_READONLY_NOEXEC __pgprot (_PAGE_PRESENT | _PAGE_VALID | \ + _PAGE_CACHE | __ACCESS_BITS) #define _PFN_MASK _PAGE_PADDR @@ -181,18 +208,18 @@ __ACCESS_BITS | _PAGE_E) #define __P000 PAGE_NONE -#define __P001 PAGE_READONLY -#define __P010 PAGE_COPY -#define __P011 PAGE_COPY +#define __P001 PAGE_READONLY_NOEXEC +#define __P010 PAGE_COPY_NOEXEC +#define __P011 PAGE_COPY_NOEXEC #define __P100 PAGE_READONLY #define __P101 PAGE_READONLY #define __P110 PAGE_COPY #define __P111 PAGE_COPY #define __S000 PAGE_NONE -#define __S001 PAGE_READONLY -#define __S010 PAGE_SHARED -#define __S011 PAGE_SHARED +#define __S001 PAGE_READONLY_NOEXEC +#define __S010 PAGE_SHARED_NOEXEC +#define __S011 PAGE_SHARED_NOEXEC #define __S100 PAGE_READONLY #define __S101 PAGE_READONLY #define __S110 PAGE_SHARED diff --git a/include/asm-x86_64/suspend.h b/include/asm-x86_64/suspend.h index 914d98371eec..508e924b801f 100644 --- a/include/asm-x86_64/suspend.h +++ b/include/asm-x86_64/suspend.h @@ -38,7 +38,6 @@ extern unsigned long saved_context_r08, saved_context_r09, saved_context_r10, sa extern unsigned long saved_context_r12, saved_context_r13, saved_context_r14, saved_context_r15; extern unsigned long saved_context_eflags; - #define loaddebug(thread,register) \ __asm__("movq %0,%%db" #register \ : /* no output */ \ diff --git a/include/linux/compiler-gcc+.h b/include/linux/compiler-gcc+.h index 94e6778873a7..5629cf5cd9c9 100644 --- a/include/linux/compiler-gcc+.h +++ b/include/linux/compiler-gcc+.h @@ -13,3 +13,4 @@ #define __attribute_used__ __attribute__((__used__)) #define __attribute_pure__ __attribute__((pure)) #define __attribute_const__ __attribute__((__const__)) +#define __must_check __attribute__((warn_unused_result)) diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h index 265dad4c3cb4..7965ae53d986 100644 --- a/include/linux/compiler-gcc3.h +++ b/include/linux/compiler-gcc3.h @@ -25,3 +25,6 @@ #if __GNUC_MINOR__ >= 1 #define noinline __attribute__((noinline)) #endif +#if __GNUC_MINOR__ >= 4 +#define __must_check __attribute__((warn_unused_result)) +#endif diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 151ab34a5b5f..22d83706f4b2 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -69,6 +69,10 @@ extern void __chk_user_ptr(void __user *); # define __deprecated /* unimplemented */ #endif +#ifndef __must_check +#define __must_check +#endif + /* * Allow us to avoid 'defined but not used' warnings on functions and data, * as well as force them to be emitted to the assembly file. diff --git a/include/linux/dcookies.h b/include/linux/dcookies.h index b2ae9692dc05..c28050136164 100644 --- a/include/linux/dcookies.h +++ b/include/linux/dcookies.h @@ -50,7 +50,7 @@ int get_dcookie(struct dentry * dentry, struct vfsmount * vfsmnt, struct dcookie_user * dcookie_register(void) { - return 0; + return NULL; } void dcookie_unregister(struct dcookie_user * user) diff --git a/include/linux/fb.h b/include/linux/fb.h index 4e5f196258c8..67d506883572 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -532,6 +532,7 @@ struct fb_ops { #define FBINFO_MISC_MODECHANGEUSER 0x10000 /* mode change request from userspace */ +#define FBINFO_MISC_MODESWITCH 0x20000 /* mode switch */ struct fb_info { int node; diff --git a/include/linux/fs.h b/include/linux/fs.h index f20e583bb41e..16ed87c94ce5 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1521,7 +1521,7 @@ extern int simple_pin_fs(char *name, struct vfsmount **mount, int *count); extern void simple_release_fs(struct vfsmount **mount, int *count); extern int inode_change_ok(struct inode *, struct iattr *); -extern int inode_setattr(struct inode *, struct iattr *); +extern int __must_check inode_setattr(struct inode *, struct iattr *); extern void inode_update_time(struct inode *inode, int ctime_too); diff --git a/include/linux/ftape.h b/include/linux/ftape.h index 5774b1bfc045..c6b38d5b9186 100644 --- a/include/linux/ftape.h +++ b/include/linux/ftape.h @@ -195,7 +195,6 @@ typedef union { /* some useful macro's */ -#define ABS(a) ((a) < 0 ? -(a) : (a)) #define NR_ITEMS(x) (int)(sizeof(x)/ sizeof(*x)) #endif /* __KERNEL__ */ diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 87b9bbbb485e..1a5dce8f9346 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h @@ -7,6 +7,8 @@ #include <linux/config.h> +#define KSYM_NAME_LEN 127 + #ifdef CONFIG_KALLSYMS /* Lookup the address for a symbol. Returns 0 if not found. */ unsigned long kallsyms_lookup_name(const char *name); diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index f62586335e48..041263ab10d9 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h @@ -26,14 +26,6 @@ #define MPT_MINOR 220 #define MISC_DYNAMIC_MINOR 255 -#define SGI_GRAPHICS_MINOR 146 -#define SGI_OPENGL_MINOR 147 -#define SGI_GFX_MINOR 148 -#define SGI_STREAMS_MOUSE 149 -#define SGI_STREAMS_KEYBOARD 150 -/* drivers/sgi/char/usema.c */ -#define SGI_USEMACLONE 151 - #define TUN_MINOR 200 #define HPET_MINOR 228 diff --git a/include/linux/pci.h b/include/linux/pci.h index 2662f462b7e6..abfb688bde5f 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -321,6 +321,50 @@ #define PCI_X_STATUS_266MHZ 0x40000000 /* 266 MHz capable */ #define PCI_X_STATUS_533MHZ 0x80000000 /* 533 MHz capable */ +/* PCI Express capability registers */ + +#define PCI_EXP_FLAGS 2 /* Capabilities register */ +#define PCI_EXP_FLAGS_VERS 0x000f /* Capability version */ +#define PCI_EXP_FLAGS_TYPE 0x00f0 /* Device/Port type */ +#define PCI_EXP_TYPE_ENDPOINT 0x0 /* Express Endpoint */ +#define PCI_EXP_TYPE_LEG_END 0x1 /* Legacy Endpoint */ +#define PCI_EXP_TYPE_ROOT_PORT 0x4 /* Root Port */ +#define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */ +#define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ +#define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ +#define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ +#define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ +#define PCI_EXP_DEVCAP 4 /* Device capabilities */ +#define PCI_EXP_DEVCAP_PAYLOAD 0x07 /* Max_Payload_Size */ +#define PCI_EXP_DEVCAP_PHANTOM 0x18 /* Phantom functions */ +#define PCI_EXP_DEVCAP_EXT_TAG 0x20 /* Extended tags */ +#define PCI_EXP_DEVCAP_L0S 0x1c0 /* L0s Acceptable Latency */ +#define PCI_EXP_DEVCAP_L1 0xe00 /* L1 Acceptable Latency */ +#define PCI_EXP_DEVCAP_ATN_BUT 0x1000 /* Attention Button Present */ +#define PCI_EXP_DEVCAP_ATN_IND 0x2000 /* Attention Indicator Present */ +#define PCI_EXP_DEVCAP_PWR_IND 0x4000 /* Power Indicator Present */ +#define PCI_EXP_DEVCAP_PWR_VAL 0x3fc0000 /* Slot Power Limit Value */ +#define PCI_EXP_DEVCAP_PWR_SCL 0xc000000 /* Slot Power Limit Scale */ +#define PCI_EXP_DEVCTL 8 /* Device Control */ +#define PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */ +#define PCI_EXP_DEVCTL_NFERE 0x0002 /* Non-Fatal Error Reporting Enable */ +#define PCI_EXP_DEVCTL_FERE 0x0004 /* Fatal Error Reporting Enable */ +#define PCI_EXP_DEVCTL_URRE 0x0008 /* Unsupported Request Reporting En. */ +#define PCI_EXP_DEVCTL_RELAX_EN 0x0010 /* Enable relaxed ordering */ +#define PCI_EXP_DEVCTL_PAYLOAD 0x00e0 /* Max_Payload_Size */ +#define PCI_EXP_DEVCTL_EXT_TAG 0x0100 /* Extended Tag Field Enable */ +#define PCI_EXP_DEVCTL_PHANTOM 0x0200 /* Phantom Functions Enable */ +#define PCI_EXP_DEVCTL_AUX_PME 0x0400 /* Auxiliary Power PM Enable */ +#define PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800 /* Enable No Snoop */ +#define PCI_EXP_DEVCTL_READRQ 0x7000 /* Max_Read_Request_Size */ +#define PCI_EXP_DEVSTA 10 /* Device Status */ +#define PCI_EXP_DEVSTA_CED 0x01 /* Correctable Error Detected */ +#define PCI_EXP_DEVSTA_NFED 0x02 /* Non-Fatal Error Detected */ +#define PCI_EXP_DEVSTA_FED 0x04 /* Fatal Error Detected */ +#define PCI_EXP_DEVSTA_URD 0x08 /* Unsupported Request Detected */ +#define PCI_EXP_DEVSTA_AUXPD 0x10 /* AUX Power Detected */ +#define PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */ + /* Extended Capabilities (PCI-X 2.0 and Express) */ #define PCI_EXT_CAP_ID(header) (header & 0x0000ffff) #define PCI_EXT_CAP_VER(header) ((header >> 16) & 0xf) @@ -659,6 +703,7 @@ static inline struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *s } int pci_scan_slot(struct pci_bus *bus, int devfn); struct pci_dev * pci_scan_single_device(struct pci_bus *bus, int devfn); +unsigned int pci_scan_child_bus(struct pci_bus *bus); void pci_bus_add_devices(struct pci_bus *bus); void pci_name_device(struct pci_dev *dev); char *pci_class_name(u32 class); diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 0a73d0d2c271..519ffaca6cf0 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -1711,6 +1711,9 @@ #define PCI_DEVICE_ID_SIIG_2S1P_20x_650 0x2061 #define PCI_DEVICE_ID_SIIG_2S1P_20x_850 0x2062 +#define PCI_VENDOR_ID_RADISYS 0x1331 +#define PCI_DEVICE_ID_RADISYS_ENP2611 0x0030 + #define PCI_VENDOR_ID_DOMEX 0x134a #define PCI_DEVICE_ID_DOMEX_DMX3191D 0x0001 diff --git a/include/linux/pm.h b/include/linux/pm.h index 66e62c0df19c..d54bc441daff 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -159,7 +159,7 @@ static inline struct pm_dev *pm_register(pm_dev_t type, unsigned long id, pm_callback callback) { - return 0; + return NULL; } static inline void pm_unregister(struct pm_dev *dev) {} diff --git a/include/linux/pnpbios.h b/include/linux/pnpbios.h index 0720cd72d63a..0a282ac1f6b2 100644 --- a/include/linux/pnpbios.h +++ b/include/linux/pnpbios.h @@ -141,6 +141,7 @@ extern int pnp_bios_isapnp_config (struct pnp_isa_config_struc *data); extern int pnp_bios_escd_info (struct escd_info_struc *data); extern int pnp_bios_read_escd (char *data, u32 nvram_base); extern int pnp_bios_dock_station_info(struct pnp_docking_station_info *data); +#define needed 0 #if needed extern int pnp_bios_get_event (u16 *message); extern int pnp_bios_send_message (u16 message); diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index 637d2fb19012..ec4910e37c65 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h @@ -1,8 +1,16 @@ #ifndef _linux_POSIX_TIMERS_H #define _linux_POSIX_TIMERS_H +#include <linux/spinlock.h> +#include <linux/list.h> + +struct k_clock_abs { + struct list_head list; + spinlock_t lock; +}; struct k_clock { int res; /* in nano seconds */ + struct k_clock_abs *abs_struct; int (*clock_set) (struct timespec * tp); int (*clock_get) (struct timespec * tp); int (*nsleep) (int flags, @@ -23,8 +31,14 @@ struct now_struct { #define posix_time_before(timer, now) \ time_before((timer)->expires, (now)->jiffies) -#define posix_bump_timer(timr) do { \ - (timr)->it_timer.expires += (timr)->it_incr; \ - (timr)->it_overrun++; \ - }while (0) +#define posix_bump_timer(timr, now) \ + do { \ + long delta, orun; \ + delta = now.jiffies - (timr)->it_timer.expires; \ + if (delta >= 0) { \ + orun = 1 + (delta / (timr)->it_incr); \ + (timr)->it_timer.expires += orun * (timr)->it_incr; \ + (timr)->it_overrun += orun; \ + } \ + }while (0) #endif diff --git a/include/linux/sched.h b/include/linux/sched.h index 6eb3b3afa1a6..4dcbe972d5b5 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -343,6 +343,8 @@ struct k_itimer { struct task_struct *it_process; /* process to send signal to */ struct timer_list it_timer; struct sigqueue *sigq; /* signal queue entry. */ + struct list_head abs_timer_entry; /* clock abs_timer_list */ + struct timespec wall_to_prev; /* wall_to_monotonic used when set */ }; diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 7e4409b7c55b..d0955f06c9b4 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -67,24 +67,27 @@ extern int pm_prepare_console(void); extern void pm_restore_console(void); #else -static inline void refrigerator(unsigned long flag) -{ - -} -static inline int freeze_processes(void) -{ - return 0; -} -static inline void thaw_processes(void) -{ - -} +static inline void refrigerator(unsigned long flag) {} #endif /* CONFIG_PM */ +#ifdef CONFIG_SMP +extern void disable_nonboot_cpus(void); +extern void enable_nonboot_cpus(void); +#else +static inline void disable_nonboot_cpus(void) {} +static inline void enable_nonboot_cpus(void) {} +#endif + asmlinkage void do_magic(int is_resume); asmlinkage void do_magic_resume_1(void); asmlinkage void do_magic_resume_2(void); asmlinkage void do_magic_suspend_1(void); asmlinkage void do_magic_suspend_2(void); +void save_processor_state(void); +void restore_processor_state(void); +struct saved_context; +void __save_processor_state(struct saved_context *ctxt); +void __restore_processor_state(struct saved_context *ctxt); + #endif /* _LINUX_SWSUSP_H */ diff --git a/include/pcmcia/cs_types.h b/include/pcmcia/cs_types.h index 3a0f7476dbb3..abc32897e390 100644 --- a/include/pcmcia/cs_types.h +++ b/include/pcmcia/cs_types.h @@ -36,7 +36,7 @@ #include <sys/types.h> #endif -#ifdef __arm__ +#if defined(__arm__) || defined(__mips__) typedef u_int ioaddr_t; #else typedef u_short ioaddr_t; diff --git a/include/video/sstfb.h b/include/video/sstfb.h index dd3db89315d8..8dade38a78b4 100644 --- a/include/video/sstfb.h +++ b/include/video/sstfb.h @@ -72,10 +72,6 @@ #define BIT(x) (1ul<<(x)) #define POW2(x) (1ul<<(x)) -#ifndef ABS -# define ABS(x) (((x)<0)?-(x):(x)) -#endif - /* * * Const diff --git a/init/initramfs.c b/init/initramfs.c index 40042ef5feb0..20bd855f6f8b 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -169,7 +169,7 @@ static int __init do_collect(void) memcpy(collect, victim, n); eat(n); collect += n; - if (remains -= n) + if ((remains -= n) != 0) return 1; state = next_state; return 0; diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index b96428328e57..74ba3cb21809 100644 --- a/kernel/kallsyms.c +++ b/kernel/kallsyms.c @@ -40,14 +40,14 @@ static inline int is_kernel_text(unsigned long addr) /* Lookup the address for this symbol. Returns 0 if not found. */ unsigned long kallsyms_lookup_name(const char *name) { - char namebuf[128]; + char namebuf[KSYM_NAME_LEN+1]; unsigned long i; char *knames; for (i = 0, knames = kallsyms_names; i < kallsyms_num_syms; i++) { unsigned prefix = *knames++; - strlcpy(namebuf + prefix, knames, 127 - prefix); + strlcpy(namebuf + prefix, knames, KSYM_NAME_LEN - prefix); if (strcmp(namebuf, name) == 0) return kallsyms_addresses[i]; @@ -67,7 +67,7 @@ const char *kallsyms_lookup(unsigned long addr, /* This kernel should never had been booted. */ BUG_ON(!kallsyms_addresses); - namebuf[127] = 0; + namebuf[KSYM_NAME_LEN] = 0; namebuf[0] = 0; if (is_kernel_text(addr) || is_kernel_inittext(addr)) { @@ -84,7 +84,7 @@ const char *kallsyms_lookup(unsigned long addr, /* Grab name */ for (i = 0; i <= best; i++) { unsigned prefix = *name++; - strncpy(namebuf + prefix, name, 127 - prefix); + strncpy(namebuf + prefix, name, KSYM_NAME_LEN - prefix); name += strlen(name) + 1; } @@ -117,34 +117,22 @@ void __print_symbol(const char *fmt, unsigned long address) char *modname; const char *name; unsigned long offset, size; - char namebuf[128]; + char namebuf[KSYM_NAME_LEN+1]; + char buffer[sizeof("%s+%#lx/%#lx [%s]") + KSYM_NAME_LEN + + 2*(BITS_PER_LONG*3/10) + MODULE_NAME_LEN + 1]; name = kallsyms_lookup(address, &size, &offset, &modname, namebuf); - if (!name) { - char addrstr[sizeof("0x%lx") + (BITS_PER_LONG*3/10)]; - - sprintf(addrstr, "0x%lx", address); - printk(fmt, addrstr); - return; - } - - if (modname) { - /* This is pretty small. */ - char buffer[sizeof("%s+%#lx/%#lx [%s]") - + strlen(name) + 2*(BITS_PER_LONG*3/10) - + strlen(modname)]; - - sprintf(buffer, "%s+%#lx/%#lx [%s]", - name, offset, size, modname); - printk(fmt, buffer); - } else { - char buffer[sizeof("%s+%#lx/%#lx") - + strlen(name) + 2*(BITS_PER_LONG*3/10)]; - - sprintf(buffer, "%s+%#lx/%#lx", name, offset, size); - printk(fmt, buffer); + if (!name) + sprintf(buffer, "0x%lx", address); + else { + if (modname) + sprintf(buffer, "%s+%#lx/%#lx [%s]", name, offset, + size, modname); + else + sprintf(buffer, "%s+%#lx/%#lx", name, offset, size); } + printk(fmt, buffer); } /* To avoid O(n^2) iteration, we carry prefix along. */ @@ -155,7 +143,7 @@ struct kallsym_iter unsigned long value; unsigned int nameoff; /* If iterating in core kernel symbols */ char type; - char name[128]; + char name[KSYM_NAME_LEN+1]; }; /* Only label it "global" if it is exported. */ @@ -186,7 +174,8 @@ static unsigned long get_ksymbol_core(struct kallsym_iter *iter) shared with previous name (stem compression). */ stemlen = kallsyms_names[off++]; - strlcpy(iter->name+stemlen, kallsyms_names + off, 128-stemlen); + strlcpy(iter->name+stemlen, kallsyms_names + off, + KSYM_NAME_LEN+1-stemlen); off += strlen(kallsyms_names + off) + 1; iter->owner = NULL; iter->value = kallsyms_addresses[iter->pos]; diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index c18d947b582b..42c24868837c 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c @@ -7,6 +7,9 @@ * * Copyright (C) 2002 2003 by MontaVista Software. * + * 2004-06-01 Fix CLOCK_REALTIME clock/timer TIMER_ABSTIME bug. + * Copyright (C) 2004 Boris Hu + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at @@ -41,6 +44,7 @@ #include <linux/idr.h> #include <linux/posix-timers.h> #include <linux/wait.h> +#include <linux/workqueue.h> #ifndef div_long_long_rem #include <asm/div64.h> @@ -169,6 +173,12 @@ static spinlock_t idr_lock = SPIN_LOCK_UNLOCKED; */ static struct k_clock posix_clocks[MAX_CLOCKS]; +/* + * We only have one real clock that can be set so we need only one abs list, + * even if we should want to have several clocks with differing resolutions. + */ +static struct k_clock_abs abs_list = {.list = LIST_HEAD_INIT(abs_list.list), + .lock = SPIN_LOCK_UNLOCKED}; #define if_clock_do(clock_fun,alt_fun,parms) \ (!clock_fun) ? alt_fun parms : clock_fun parms @@ -200,8 +210,11 @@ static inline void unlock_timer(struct k_itimer *timr, unsigned long flags) */ static __init int init_posix_timers(void) { - struct k_clock clock_realtime = {.res = CLOCK_REALTIME_RES }; + struct k_clock clock_realtime = {.res = CLOCK_REALTIME_RES, + .abs_struct = &abs_list + }; struct k_clock clock_monotonic = {.res = CLOCK_REALTIME_RES, + .abs_struct = NULL, .clock_get = do_posix_clock_monotonic_gettime, .clock_set = do_posix_clock_monotonic_settime }; @@ -212,7 +225,6 @@ static __init int init_posix_timers(void) posix_timers_cache = kmem_cache_create("posix_timers_cache", sizeof (struct k_itimer), 0, 0, NULL, NULL); idr_init(&posix_timers_id); - return 0; } @@ -239,19 +251,92 @@ static void tstojiffie(struct timespec *tp, int res, u64 *jiff) (NSEC_JIFFIE_SC - SEC_JIFFIE_SC))) >> SEC_JIFFIE_SC; } +/* + * This function adjusts the timer as needed as a result of the clock + * being set. It should only be called for absolute timers, and then + * under the abs_list lock. It computes the time difference and sets + * the new jiffies value in the timer. It also updates the timers + * reference wall_to_monotonic value. It is complicated by the fact + * that tstojiffies() only handles positive times and it needs to work + * with both positive and negative times. Also, for negative offsets, + * we need to defeat the res round up. + * + * Return is true if there is a new time, else false. + */ +static long add_clockset_delta(struct k_itimer *timr, + struct timespec *new_wall_to) +{ + struct timespec delta; + int sign = 0; + u64 exp; + + set_normalized_timespec(&delta, + new_wall_to->tv_sec - + timr->wall_to_prev.tv_sec, + new_wall_to->tv_nsec - + timr->wall_to_prev.tv_nsec); + if (likely(!(delta.tv_sec | delta.tv_nsec))) + return 0; + if (delta.tv_sec < 0) { + set_normalized_timespec(&delta, + -delta.tv_sec, + 1 - delta.tv_nsec - + posix_clocks[timr->it_clock].res); + sign++; + } + tstojiffie(&delta, posix_clocks[timr->it_clock].res, &exp); + timr->wall_to_prev = *new_wall_to; + timr->it_timer.expires += (sign ? -exp : exp); + return 1; +} + +static void remove_from_abslist(struct k_itimer *timr) +{ + if (!list_empty(&timr->abs_timer_entry)) { + spin_lock(&abs_list.lock); + list_del_init(&timr->abs_timer_entry); + spin_unlock(&abs_list.lock); + } +} + static void schedule_next_timer(struct k_itimer *timr) { + struct timespec new_wall_to; struct now_struct now; + unsigned long seq; - /* Set up the timer for the next interval (if there is one) */ + /* + * Set up the timer for the next interval (if there is one). + * Note: this code uses the abs_timer_lock to protect + * wall_to_prev and must hold it until exp is set, not exactly + * obvious... + + * This function is used for CLOCK_REALTIME* and + * CLOCK_MONOTONIC* timers. If we ever want to handle other + * CLOCKs, the calling code (do_schedule_next_timer) would need + * to pull the "clock" info from the timer and dispatch the + * "other" CLOCKs "next timer" code (which, I suppose should + * also be added to the k_clock structure). + */ if (!timr->it_incr) return; - posix_get_now(&now); do { - posix_bump_timer(timr); - }while (posix_time_before(&timr->it_timer, &now)); + seq = read_seqbegin(&xtime_lock); + new_wall_to = wall_to_monotonic; + posix_get_now(&now); + } while (read_seqretry(&xtime_lock, seq)); + + if (!list_empty(&timr->abs_timer_entry)) { + spin_lock(&abs_list.lock); + add_clockset_delta(timr, &new_wall_to); + + posix_bump_timer(timr, now); + spin_unlock(&abs_list.lock); + } else { + posix_bump_timer(timr, now); + } timr->it_overrun_last = timr->it_overrun; timr->it_overrun = -1; ++timr->it_requeue_pending; @@ -312,7 +397,15 @@ static void timer_notify_task(struct k_itimer *timr) memset(&timr->sigq->info, 0, sizeof(siginfo_t)); - /* Send signal to the process that owns this timer. */ + /* + * Send signal to the process that owns this timer. + + * This code assumes that all the possible abs_lists share the + * same lock (there is only one list at this time). If this is + * not the case, the CLOCK info would need to be used to find + * the proper abs list lock. + */ + timr->sigq->info.si_signo = timr->it_sigev_signo; timr->sigq->info.si_errno = 0; timr->sigq->info.si_code = SI_TIMER; @@ -320,6 +413,9 @@ static void timer_notify_task(struct k_itimer *timr) timr->sigq->info.si_value = timr->it_sigev_value; if (timr->it_incr) timr->sigq->info.si_sys_private = ++timr->it_requeue_pending; + else { + remove_from_abslist(timr); + } if (timr->it_sigev_notify & SIGEV_THREAD_ID) { if (unlikely(timr->it_process->flags & PF_EXITING)) { @@ -350,16 +446,51 @@ static void timer_notify_task(struct k_itimer *timr) * This function gets called when a POSIX.1b interval timer expires. It * is used as a callback from the kernel internal timer. The * run_timer_list code ALWAYS calls with interrutps on. + + * This code is for CLOCK_REALTIME* and CLOCK_MONOTONIC* timers. */ static void posix_timer_fn(unsigned long __data) { struct k_itimer *timr = (struct k_itimer *) __data; unsigned long flags; + unsigned long seq; + struct timespec delta, new_wall_to; + u64 exp = 0; + int do_notify = 1; spin_lock_irqsave(&timr->it_lock, flags); set_timer_inactive(timr); - timer_notify_task(timr); - unlock_timer(timr, flags); + if (!list_empty(&timr->abs_timer_entry)) { + spin_lock(&abs_list.lock); + do { + seq = read_seqbegin(&xtime_lock); + new_wall_to = wall_to_monotonic; + } while (read_seqretry(&xtime_lock, seq)); + set_normalized_timespec(&delta, + new_wall_to.tv_sec - + timr->wall_to_prev.tv_sec, + new_wall_to.tv_nsec - + timr->wall_to_prev.tv_nsec); + if (likely((delta.tv_sec | delta.tv_nsec ) == 0)) { + /* do nothing, timer is on time */ + } else if (delta.tv_sec < 0) { + /* do nothing, timer is already late */ + } else { + /* timer is early due to a clock set */ + tstojiffie(&delta, + posix_clocks[timr->it_clock].res, + &exp); + timr->wall_to_prev = new_wall_to; + timr->it_timer.expires += exp; + add_timer(&timr->it_timer); + do_notify = 0; + } + spin_unlock(&abs_list.lock); + + } + if (do_notify) + timer_notify_task(timr); + unlock_timer(timr, flags); /* hold thru abs lock to keep irq off */ } @@ -397,6 +528,7 @@ static struct k_itimer * alloc_posix_timer(void) if (!tmr) return tmr; memset(tmr, 0, sizeof (struct k_itimer)); + INIT_LIST_HEAD(&tmr->abs_timer_entry); if (unlikely(!(tmr->sigq = sigqueue_alloc()))) { kmem_cache_free(posix_timers_cache, tmr); tmr = NULL; @@ -644,8 +776,7 @@ do_timer_gettime(struct k_itimer *timr, struct itimerspec *cur_setting) if (expires) { if (timr->it_requeue_pending & REQUEUE_PENDING || (timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE) { - while (posix_time_before(&timr->it_timer, &now)) - posix_bump_timer(timr); + posix_bump_timer(timr, now); expires = timr->it_timer.expires; } else @@ -721,11 +852,10 @@ sys_timer_getoverrun(timer_t timer_id) * time to it to get the proper time for the timer. */ static int adjust_abs_time(struct k_clock *clock, struct timespec *tp, - int abs, u64 *exp) + int abs, u64 *exp, struct timespec *wall_to) { struct timespec now; struct timespec oc = *tp; - struct timespec wall_to_mono; u64 jiffies_64_f; int rtn =0; @@ -733,15 +863,15 @@ static int adjust_abs_time(struct k_clock *clock, struct timespec *tp, /* * The mask pick up the 4 basic clocks */ - if (!(clock - &posix_clocks[0]) & ~CLOCKS_MASK) { + if (!((clock - &posix_clocks[0]) & ~CLOCKS_MASK)) { jiffies_64_f = do_posix_clock_monotonic_gettime_parts( - &now, &wall_to_mono); + &now, wall_to); /* * If we are doing a MONOTONIC clock */ if((clock - &posix_clocks[0]) & CLOCKS_MONO){ - now.tv_sec += wall_to_mono.tv_sec; - now.tv_nsec += wall_to_mono.tv_nsec; + now.tv_sec += wall_to->tv_sec; + now.tv_nsec += wall_to->tv_nsec; } } else { /* @@ -831,6 +961,8 @@ do_timer_settime(struct k_itimer *timr, int flags, #else del_timer(&timr->it_timer); #endif + remove_from_abslist(timr); + timr->it_requeue_pending = (timr->it_requeue_pending + 2) & ~REQUEUE_PENDING; timr->it_overrun_last = 0; @@ -845,24 +977,25 @@ do_timer_settime(struct k_itimer *timr, int flags, if (adjust_abs_time(clock, &new_setting->it_value, flags & TIMER_ABSTIME, - &expire_64)) { + &expire_64, &(timr->wall_to_prev))) { return -EINVAL; } timr->it_timer.expires = (unsigned long)expire_64; tstojiffie(&new_setting->it_interval, clock->res, &expire_64); timr->it_incr = (unsigned long)expire_64; - /* - * For some reason the timer does not fire immediately if expires is - * equal to jiffies, so the timer notify function is called directly. - * We do not even queue SIGEV_NONE timers! + * We do not even queue SIGEV_NONE timers! But we do put them + * in the abs list so we can do that right. */ - if (((timr->it_sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE)) { - if (timr->it_timer.expires == jiffies) - timer_notify_task(timr); - else - add_timer(&timr->it_timer); + if (((timr->it_sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE)) + add_timer(&timr->it_timer); + + if (flags & TIMER_ABSTIME && clock->abs_struct) { + spin_lock(&clock->abs_struct->lock); + list_add_tail(&(timr->abs_timer_entry), + &(clock->abs_struct->list)); + spin_unlock(&clock->abs_struct->lock); } return 0; } @@ -896,7 +1029,7 @@ retry: if (!posix_clocks[timr->it_clock].timer_set) error = do_timer_settime(timr, flags, &new_spec, rtn); else - error = posix_clocks[timr->it_clock].timer_set(timr, + error = posix_clocks[timr->it_clock].timer_set(timr, flags, &new_spec, rtn); unlock_timer(timr, flag); @@ -929,6 +1062,8 @@ static inline int do_timer_delete(struct k_itimer *timer) #else del_timer(&timer->it_timer); #endif + remove_from_abslist(timer); + return 0; } @@ -1171,13 +1306,93 @@ static void nanosleep_wake_up(unsigned long __data) * On locking, clock_was_set() is called from update_wall_clock which * holds (or has held for it) a write_lock_irq( xtime_lock) and is * called from the timer bh code. Thus we need the irq save locks. + * + * Also, on the call from update_wall_clock, that is done as part of a + * softirq thing. We don't want to delay the system that much (possibly + * long list of timers to fix), so we defer that work to keventd. */ static DECLARE_WAIT_QUEUE_HEAD(nanosleep_abs_wqueue); +static DECLARE_WORK(clock_was_set_work, (void(*)(void*))clock_was_set, NULL); + +static DECLARE_MUTEX(clock_was_set_lock); void clock_was_set(void) { + struct k_itimer *timr; + struct timespec new_wall_to; + LIST_HEAD(cws_list); + unsigned long seq; + + + if (unlikely(in_interrupt())) { + schedule_work(&clock_was_set_work); + return; + } wake_up_all(&nanosleep_abs_wqueue); + + /* + * Check if there exist TIMER_ABSTIME timers to correct. + * + * Notes on locking: This code is run in task context with irq + * on. We CAN be interrupted! All other usage of the abs list + * lock is under the timer lock which holds the irq lock as + * well. We REALLY don't want to scan the whole list with the + * interrupt system off, AND we would like a sequence lock on + * this code as well. Since we assume that the clock will not + * be set often, it seems ok to take and release the irq lock + * for each timer. In fact add_timer will do this, so this is + * not an issue. So we know when we are done, we will move the + * whole list to a new location. Then as we process each entry, + * we will move it to the actual list again. This way, when our + * copy is empty, we are done. We are not all that concerned + * about preemption so we will use a semaphore lock to protect + * aginst reentry. This way we will not stall another + * processor. It is possible that this may delay some timers + * that should have expired, given the new clock, but even this + * will be minimal as we will always update to the current time, + * even if it was set by a task that is waiting for entry to + * this code. Timers that expire too early will be caught by + * the expire code and restarted. + + * Absolute timers that repeat are left in the abs list while + * waiting for the task to pick up the signal. This means we + * may find timers that are not in the "add_timer" list, but are + * in the abs list. We do the same thing for these, save + * putting them back in the "add_timer" list. (Note, these are + * left in the abs list mainly to indicate that they are + * ABSOLUTE timers, a fact that is used by the re-arm code, and + * for which we have no other flag.) + + */ + + down(&clock_was_set_lock); + spin_lock_irq(&abs_list.lock); + list_splice_init(&abs_list.list, &cws_list); + spin_unlock_irq(&abs_list.lock); + do { + do { + seq = read_seqbegin(&xtime_lock); + new_wall_to = wall_to_monotonic; + } while (read_seqretry(&xtime_lock, seq)); + + spin_lock_irq(&abs_list.lock); + if (list_empty(&cws_list)) { + spin_unlock_irq(&abs_list.lock); + break; + } + timr = list_entry(cws_list.next, struct k_itimer, + abs_timer_entry); + + list_del_init(&timr->abs_timer_entry); + if (add_clockset_delta(timr, &new_wall_to) && + del_timer(&timr->it_timer)) /* timer run yet? */ + add_timer(&timr->it_timer); + list_add(&timr->abs_timer_entry, &abs_list.list); + spin_unlock_irq(&abs_list.lock); + } while (1); + + up(&clock_was_set_lock); } long clock_nanosleep_restart(struct restart_block *restart_block); @@ -1220,7 +1435,7 @@ sys_clock_nanosleep(clockid_t which_clock, int flags, long do_clock_nanosleep(clockid_t which_clock, int flags, struct timespec *tsave) { - struct timespec t; + struct timespec t, dum; struct timer_list new_timer; DECLARE_WAITQUEUE(abs_wqueue, current); u64 rq_time = (u64)0; @@ -1260,7 +1475,7 @@ do_clock_nanosleep(clockid_t which_clock, int flags, struct timespec *tsave) t = *tsave; if (abs || !rq_time) { adjust_abs_time(&posix_clocks[which_clock], &t, abs, - &rq_time); + &rq_time, &dum); rq_time += (t.tv_sec || t.tv_nsec); } diff --git a/kernel/power/Makefile b/kernel/power/Makefile index d00edd15c0fd..079dd4d678ce 100644 --- a/kernel/power/Makefile +++ b/kernel/power/Makefile @@ -1,4 +1,5 @@ obj-y := main.o process.o console.o pm.o +obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o obj-$(CONFIG_PM_DISK) += disk.o pmdisk.o diff --git a/kernel/power/pmdisk.c b/kernel/power/pmdisk.c index dd474ccdd1be..d4c20e05a488 100644 --- a/kernel/power/pmdisk.c +++ b/kernel/power/pmdisk.c @@ -792,7 +792,7 @@ static int __init relocate_pagedir(void) } err = -ENOMEM; - while ((m = (void *) __get_free_pages(GFP_ATOMIC, pagedir_order))) { + while ((m = (void *) __get_free_pages(GFP_ATOMIC, pagedir_order)) != NULL) { if (!does_collide_order(old_pagedir, (unsigned long)m, pagedir_order)) { pm_pagedir_nosave = diff --git a/kernel/power/smp.c b/kernel/power/smp.c new file mode 100644 index 000000000000..cda77cdfb8c1 --- /dev/null +++ b/kernel/power/smp.c @@ -0,0 +1,85 @@ +/* + * drivers/power/smp.c - Functions for stopping other CPUs. + * + * Copyright 2004 Pavel Machek <pavel@suse.cz> + * Copyright (C) 2002-2003 Nigel Cunningham <ncunningham@clear.net.nz> + * + * This file is released under the GPLv2. + */ + +#undef DEBUG + +#include <linux/smp_lock.h> +#include <linux/interrupt.h> +#include <linux/suspend.h> +#include <linux/module.h> +#include <asm/atomic.h> +#include <asm/tlbflush.h> + +static atomic_t cpu_counter, freeze; + + +static void smp_pause(void * data) +{ + struct saved_context ctxt; + __save_processor_state(&ctxt); + printk("Sleeping in:\n"); + dump_stack(); + atomic_inc(&cpu_counter); + while (atomic_read(&freeze)) { + /* FIXME: restore takes place at random piece inside this. + This should probably be written in assembly, and + preserve general-purpose registers, too + + What about stack? We may need to move to new stack here. + + This should better be ran with interrupts disabled. + */ + cpu_relax(); + barrier(); + } + atomic_dec(&cpu_counter); + __restore_processor_state(&ctxt); +} + +cpumask_t oldmask; + +void disable_nonboot_cpus(void) +{ + printk("Freezing CPUs (at %d)", smp_processor_id()); + oldmask = current->cpus_allowed; + set_cpus_allowed(current, cpumask_of_cpu(0)); + current->state = TASK_INTERRUPTIBLE; + schedule_timeout(HZ); + printk("..."); + BUG_ON(smp_processor_id() != 0); + + /* FIXME: for this to work, all the CPUs must be running + * "idle" thread (or we deadlock). Is that guaranteed? */ + + atomic_set(&cpu_counter, 0); + atomic_set(&freeze, 1); + smp_call_function(smp_pause, NULL, 0, 0); + while (atomic_read(&cpu_counter) < (num_online_cpus() - 1)) { + cpu_relax(); + barrier(); + } + printk("ok\n"); +} + +void enable_nonboot_cpus(void) +{ + printk("Restarting CPUs"); + atomic_set(&freeze, 0); + while (atomic_read(&cpu_counter)) { + cpu_relax(); + barrier(); + } + printk("..."); + set_cpus_allowed(current, oldmask); + schedule(); + printk("ok\n"); + +} + + diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c index ff8fdbc21a45..081b65103abd 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c @@ -317,7 +317,8 @@ static int write_suspend_image(void) for (i=0; i<nr_copy_pages; i++) { if (!(i%100)) printk( "." ); - if (!(entry = get_swap_page()).val) + entry = get_swap_page(); + if (!entry.val) panic("\nNot enough swapspace when writing data" ); if (swapfile_used[swp_type(entry)] != SWAPFILE_SUSPEND) @@ -334,7 +335,8 @@ static int write_suspend_image(void) cur = (union diskpage *)((char *) pagedir_nosave)+i; BUG_ON ((char *) cur != (((char *) pagedir_nosave) + i*PAGE_SIZE)); printk( "." ); - if (!(entry = get_swap_page()).val) { + entry = get_swap_page(); + if (!entry.val) { printk(KERN_CRIT "Not enough swapspace when writing pgdir\n" ); panic("Don't know how to recover"); free_page((unsigned long) buffer); @@ -356,7 +358,8 @@ static int write_suspend_image(void) BUG_ON (sizeof(struct suspend_header) > PAGE_SIZE-sizeof(swp_entry_t)); BUG_ON (sizeof(union diskpage) != PAGE_SIZE); BUG_ON (sizeof(struct link) != PAGE_SIZE); - if (!(entry = get_swap_page()).val) + entry = get_swap_page(); + if (!entry.val) panic( "\nNot enough swapspace when writing header" ); if (swapfile_used[swp_type(entry)] != SWAPFILE_SUSPEND) panic("\nNot enough swapspace for header on suspend device" ); @@ -696,6 +699,7 @@ static void suspend_power_down(void) else #endif { + device_suspend(3); device_shutdown(); machine_power_off(); } @@ -716,7 +720,7 @@ asmlinkage void do_magic_resume_1(void) mb(); spin_lock_irq(&suspend_pagedir_lock); /* Done to disable interrupts */ - device_power_down(4); + device_power_down(3); PRINTK( "Waiting for DMAs to settle down...\n"); mdelay(1000); /* We do not want some readahead with DMA to corrupt our memory, right? Do it with disabled interrupts for best effect. That way, if some @@ -785,7 +789,7 @@ asmlinkage void do_magic_suspend_2(void) { int is_problem; read_swapfiles(); - device_power_down(4); + device_power_down(3); is_problem = suspend_prepare_image(); device_power_up(); spin_unlock_irq(&suspend_pagedir_lock); @@ -802,7 +806,6 @@ asmlinkage void do_magic_suspend_2(void) barrier(); mb(); spin_lock_irq(&suspend_pagedir_lock); /* Done to disable interrupts */ - mdelay(1000); free_pages((unsigned long) pagedir_nosave, pagedir_order); spin_unlock_irq(&suspend_pagedir_lock); @@ -839,9 +842,10 @@ int software_suspend(void) need half of memory free. */ free_some_memory(); - - /* Save state of all device drivers, and stop them. */ - if ((res = device_suspend(4))==0) + disable_nonboot_cpus(); + /* Save state of all device drivers, and stop them. */ + printk("Suspending devices... "); + if ((res = device_suspend(3))==0) { /* If stopping device drivers worked, we proceed basically into * suspend_save_image. * @@ -852,7 +856,9 @@ int software_suspend(void) * using normal kernel mechanism. */ do_magic(0); + } thaw_processes(); + enable_nonboot_cpus(); } else res = -EBUSY; software_suspend_enabled = 1; @@ -922,7 +928,7 @@ static int relocate_pagedir(void) return 0; } - while ((m = (void *) __get_free_pages(GFP_ATOMIC, pagedir_order))) { + while ((m = (void *) __get_free_pages(GFP_ATOMIC, pagedir_order)) != NULL) { if (!does_collide_order(old_pagedir, (unsigned long)m, pagedir_order)) break; eaten_memory = m; @@ -1192,7 +1198,9 @@ static int __init software_resume(void) printk( "resuming from %s\n", resume_file); if (read_suspend_image(resume_file, 0)) goto read_failure; - device_suspend(4); + /* FIXME: Should we stop processes here, just to be safer? */ + disable_nonboot_cpus(); + device_suspend(3); do_magic(1); panic("This never returns"); diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 641727bab22f..0df0748d56bd 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -2162,7 +2162,7 @@ int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int write, struct ctl_table_header * register_sysctl_table(ctl_table * table, int insert_at_head) { - return 0; + return NULL; } void unregister_sysctl_table(struct ctl_table_header * table) diff --git a/lib/radix-tree.c b/lib/radix-tree.c index 8938227696db..a0a0902614e7 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c @@ -485,8 +485,8 @@ __lookup(struct radix_tree_root *root, void **results, unsigned long index, for ( ; i < RADIX_TREE_MAP_SIZE; i++) { if (slot->slots[i] != NULL) break; - index &= ~((1 << shift) - 1); - index += 1 << shift; + index &= ~((1UL << shift) - 1); + index += 1UL << shift; if (index == 0) goto out; /* 32-bit wraparound */ } @@ -575,8 +575,8 @@ __lookup_tag(struct radix_tree_root *root, void **results, unsigned long index, BUG_ON(slot->slots[i] == NULL); break; } - index &= ~((1 << shift) - 1); - index += 1 << shift; + index &= ~((1UL << shift) - 1); + index += 1UL << shift; if (index == 0) goto out; /* 32-bit wraparound */ } diff --git a/sound/core/control.c b/sound/core/control.c index 7cc19394dae8..df757e20d350 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -1116,7 +1116,7 @@ static ssize_t snd_ctl_read(struct file *file, char __user *buffer, size_t count wait_queue_t wait; if ((file->f_flags & O_NONBLOCK) != 0 || result > 0) { err = -EAGAIN; - goto __end; + goto out; } init_waitqueue_entry(&wait, current); add_wait_queue(&ctl->change_sleep, &wait); @@ -1144,8 +1144,9 @@ static ssize_t snd_ctl_read(struct file *file, char __user *buffer, size_t count count -= sizeof(snd_ctl_event_t); result += sizeof(snd_ctl_event_t); } - __end: +__end: spin_unlock_irq(&ctl->read_lock); +out: return result > 0 ? result : err; } |
