]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh64-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 3 Nov 2007 19:41:58 +0000 (12:41 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 3 Nov 2007 19:41:58 +0000 (12:41 -0700)
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh64-2.6:
  sh64: Update defconfigs.
  sh64: fix dma_cache_sync() compilation
  sh64: Move DMA macros from pci.h to scatterlist.h.

341 files changed:
Documentation/SubmittingPatches
Documentation/i386/boot.txt
Documentation/i386/zero-page.txt
Documentation/ja_JP/SubmittingPatches [new file with mode: 0644]
Documentation/kernel-parameters.txt
MAINTAINERS
Makefile
arch/arm/configs/zylonite_defconfig [new file with mode: 0644]
arch/arm/mach-ixp2000/Kconfig
arch/arm/mach-netx/xc.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap2/clock.c
arch/arm/mach-pxa/mfp.c
arch/arm/mach-pxa/pxa300.c
arch/arm/mach-pxa/pxa320.c
arch/arm/mach-pxa/pxa3xx.c
arch/arm/mach-pxa/time.c
arch/arm/mach-pxa/zylonite.c
arch/arm/mach-pxa/zylonite_pxa300.c
arch/arm/mach-pxa/zylonite_pxa320.c
arch/arm/mm/proc-arm926.S
arch/blackfin/Kconfig
arch/blackfin/configs/BF527-EZKIT_defconfig
arch/blackfin/configs/BF533-EZKIT_defconfig
arch/blackfin/configs/BF533-STAMP_defconfig
arch/blackfin/configs/BF537-STAMP_defconfig
arch/blackfin/configs/BF548-EZKIT_defconfig
arch/blackfin/configs/BF561-EZKIT_defconfig
arch/blackfin/configs/PNAV-10_defconfig
arch/blackfin/kernel/entry.S
arch/blackfin/kernel/fixed_code.S
arch/blackfin/kernel/gptimers.c
arch/blackfin/kernel/setup.c
arch/blackfin/kernel/traps.c
arch/blackfin/kernel/vmlinux.lds.S
arch/blackfin/mach-bf527/boards/ezkit.c
arch/blackfin/mach-bf533/boards/H8606.c [new file with mode: 0644]
arch/blackfin/mach-bf533/boards/Makefile
arch/blackfin/mach-bf533/boards/cm_bf533.c
arch/blackfin/mach-bf533/boards/stamp.c
arch/blackfin/mach-bf537/boards/cm_bf537.c
arch/blackfin/mach-bf537/boards/stamp.c
arch/blackfin/mach-common/entry.S
arch/h8300/Kconfig
arch/ia64/configs/sn2_defconfig
arch/ia64/kernel/efi.c
arch/ia64/kernel/gate.lds.S
arch/ia64/kernel/msi_ia64.c
arch/ia64/kernel/setup.c
arch/ia64/kernel/smpboot.c
arch/ia64/mm/init.c
arch/ia64/scripts/check-segrel.lds
arch/ia64/sn/kernel/mca.c
arch/mips/Kconfig
arch/mips/au1000/mtx-1/Makefile
arch/mips/au1000/mtx-1/platform.c
arch/mips/au1000/pb1200/Makefile
arch/mips/au1000/pb1200/board_setup.c
arch/mips/au1000/pb1200/irqmap.c
arch/mips/basler/excite/excite_setup.c
arch/mips/jazz/irq.c
arch/mips/kernel/Makefile
arch/mips/kernel/cevt-bcm1480.c [new file with mode: 0644]
arch/mips/kernel/cevt-sb1250.c [new file with mode: 0644]
arch/mips/kernel/csrc-bcm1480.c [new file with mode: 0644]
arch/mips/kernel/csrc-sb1250.c [new file with mode: 0644]
arch/mips/kernel/i8253.c
arch/mips/kernel/time.c
arch/mips/qemu/q-irq.c
arch/mips/sgi-ip27/ip27-timer.c
arch/mips/sgi-ip32/ip32-platform.c
arch/mips/sibyte/Kconfig
arch/mips/sibyte/bcm1480/irq.c
arch/mips/sibyte/bcm1480/time.c
arch/mips/sibyte/sb1250/irq.c
arch/mips/sibyte/sb1250/time.c
arch/mips/sni/time.c
arch/s390/Kconfig
arch/sh/Kconfig
arch/sh/Kconfig.debug
arch/sh/Makefile
arch/sh/boards/renesas/r7780rp/setup.c
arch/sh/boards/se/7722/setup.c
arch/sh/configs/r7785rp_defconfig
arch/sh/drivers/pci/pci-st40.c
arch/sh/kernel/cpu/irq/ipr.c
arch/sh/kernel/cpu/sh4a/setup-sh7722.c
arch/sh/kernel/irq.c
arch/sh/kernel/setup.c
arch/sh/kernel/vmlinux.lds.S
arch/sh/kernel/vsyscall/vsyscall.lds.S
arch/sh/mm/copy_page.S
arch/sh/oprofile/op_model_sh7750.c
arch/sh/tools/mach-types
arch/sh64/Kconfig
arch/sparc64/Kconfig
arch/sparc64/defconfig
arch/sparc64/kernel/sparc64_ksyms.c
arch/sparc64/kernel/time.c
arch/sparc64/mm/tsb.c
arch/sparc64/mm/ultra.S
arch/x86/Kconfig.debug
arch/x86/Kconfig.x86_64
arch/x86/configs/x86_64_defconfig
arch/x86/kernel/Makefile_64
arch/x86/kernel/aperture_64.c
arch/x86/kernel/cpu/proc.c
arch/x86/kernel/early-quirks.c
arch/x86/kernel/pci-calgary_64.c
arch/x86/kernel/pci-dma_64.c
arch/x86/kernel/pci-gart_64.c
arch/x86/kernel/pci-nommu_64.c
arch/x86/kernel/pci-swiotlb_64.c
arch/x86/kernel/reboot_64.c
arch/x86/kernel/setup_32.c
arch/x86/kernel/setup_64.c
arch/x86/mm/discontig_32.c
arch/xtensa/Kconfig
drivers/acpi/Kconfig
drivers/acpi/battery.c
drivers/acpi/bus.c
drivers/acpi/button.c
drivers/acpi/ec.c
drivers/acpi/fan.c
drivers/acpi/power.c
drivers/acpi/sleep/main.c
drivers/ata/libata-core.c
drivers/ata/libata-eh.c
drivers/ata/libata-scsi.c
drivers/ata/sata_fsl.c
drivers/ata/sata_promise.c
drivers/ata/sata_sil24.c
drivers/base/core.c
drivers/char/agp/Kconfig
drivers/char/agp/amd64-agp.c
drivers/connector/connector.c
drivers/cpuidle/cpuidle.c
drivers/cpuidle/governor.c
drivers/dma/Kconfig
drivers/firewire/fw-ohci.c
drivers/hid/hid-input.c
drivers/hid/usbhid/hid-quirks.c
drivers/hid/usbhid/hiddev.c
drivers/ieee1394/ieee1394_transactions.c
drivers/infiniband/core/fmr_pool.c
drivers/infiniband/hw/ipath/ipath_eeprom.c
drivers/infiniband/hw/ipath/ipath_intr.c
drivers/infiniband/hw/ipath/ipath_ruc.c
drivers/infiniband/hw/mlx4/qp.c
drivers/infiniband/ulp/ipoib/ipoib_cm.c
drivers/input/joystick/xpad.c
drivers/input/misc/pcspkr.c
drivers/input/mouse/appletouch.c
drivers/input/mouse/inport.c
drivers/input/mouse/logibm.c
drivers/input/serio/hp_sdc.c
drivers/media/video/ivtv/ivtv-i2c.c
drivers/media/video/ivtv/ivtv-i2c.h
drivers/misc/fujitsu-laptop.c
drivers/mmc/host/pxamci.c
drivers/net/Kconfig
drivers/net/bfin_mac.c
drivers/net/e1000/e1000.h
drivers/net/e1000/e1000_ethtool.c
drivers/net/e1000/e1000_hw.c
drivers/net/e1000/e1000_main.c
drivers/net/e1000/e1000_param.c
drivers/net/e1000e/82571.c
drivers/net/e1000e/ethtool.c
drivers/net/e1000e/param.c
drivers/net/fec_mpc52xx.c
drivers/net/ixgb/ixgb.h
drivers/net/ixgb/ixgb_ethtool.c
drivers/net/ixgb/ixgb_hw.c
drivers/net/ixgb/ixgb_main.c
drivers/net/ixgb/ixgb_param.c
drivers/net/ixgbe/ixgbe.h
drivers/net/ixgbe/ixgbe_82598.c
drivers/net/ixgbe/ixgbe_main.c
drivers/net/myri10ge/myri10ge.c
drivers/net/pppoe.c
drivers/net/pppol2tp.c
drivers/net/usb/dm9601.c
drivers/net/wan/lmc/lmc_main.c
drivers/net/wireless/iwlwifi/Kconfig
drivers/pci/intel-iommu.c
drivers/rtc/rtc-s3c.c
drivers/scsi/Kconfig
drivers/scsi/arm/scsi.h
drivers/serial/serial_txx9.c
drivers/sh/maple/maple.c
drivers/usb/core/message.c
drivers/video/Kconfig
drivers/video/aty/radeon_pm.c
drivers/video/omap/Kconfig
drivers/w1/Kconfig
drivers/watchdog/Kconfig
drivers/watchdog/alim1535_wdt.c
drivers/watchdog/davinci_wdt.c
drivers/watchdog/i6300esb.c
drivers/watchdog/iTCO_wdt.c
drivers/watchdog/ib700wdt.c
drivers/watchdog/machzwd.c
drivers/watchdog/mpc83xx_wdt.c
drivers/watchdog/pc87413_wdt.c
drivers/watchdog/pnx4008_wdt.c
drivers/watchdog/sbc8360.c
drivers/watchdog/sc1200wdt.c
drivers/watchdog/sc520_wdt.c
drivers/watchdog/smsc37b787_wdt.c
drivers/watchdog/w83627hf_wdt.c
drivers/watchdog/w83697hf_wdt.c
drivers/watchdog/w83877f_wdt.c
drivers/watchdog/w83977f_wdt.c
drivers/watchdog/wafer5823wdt.c
drivers/watchdog/wdt.c
drivers/watchdog/wdt977.c
drivers/watchdog/wdt_pci.c
fs/Kconfig
fs/compat_ioctl.c
fs/locks.c
fs/ntfs/aops.c
fs/ntfs/attrib.c
fs/ntfs/compress.c
fs/proc/array.c
fs/sysfs/dir.c
fs/sysfs/sysfs.h
fs/ufs/super.c
include/acpi/acpi_bus.h
include/asm-arm/arch-at91/board.h
include/asm-arm/arch-davinci/gpio.h
include/asm-arm/arch-pxa/mfp-pxa300.h
include/asm-arm/arch-pxa/mfp-pxa320.h
include/asm-arm/arch-pxa/mfp.h
include/asm-arm/flat.h
include/asm-arm/plat-s3c/regs-nand.h
include/asm-blackfin/bfin-global.h
include/asm-blackfin/fixed_code.h
include/asm-blackfin/gptimers.h
include/asm-blackfin/mach-bf527/defBF52x_base.h
include/asm-blackfin/mach-bf527/dma.h
include/asm-blackfin/mach-bf548/defBF549.h
include/asm-blackfin/mach-bf548/defBF54x_base.h
include/asm-blackfin/mach-bf548/portmux.h
include/asm-blackfin/mach-bf561/defBF561.h
include/asm-ia64/percpu.h
include/asm-ia64/smp.h
include/asm-mips/i8253.h
include/asm-mips/mach-au1x00/timex.h [deleted file]
include/asm-mips/mach-cobalt/irq.h
include/asm-mips/mach-generic/timex.h [deleted file]
include/asm-mips/mach-jazz/timex.h [deleted file]
include/asm-mips/mach-qemu/timex.h [deleted file]
include/asm-mips/mach-rm/timex.h [deleted file]
include/asm-mips/time.h
include/asm-mips/timex.h
include/asm-sh/cache.h
include/asm-sh/irq.h
include/asm-sh/page.h
include/asm-sh/pgtable.h
include/asm-sh/processor.h
include/asm-sh/setup.h
include/asm-sparc64/futex.h
include/asm-sparc64/system.h
include/asm-sparc64/uaccess.h
include/asm-x86/gart.h [new file with mode: 0644]
include/asm-x86/iommu.h
include/asm-x86/pci_64.h
include/linux/Kbuild
include/linux/ata.h
include/linux/input.h
include/linux/ipmi_smi.h
include/linux/libata.h
include/linux/mv643xx_eth.h
include/linux/netdevice.h
include/linux/sched.h
include/linux/string.h
include/net/net_namespace.h
include/net/sock.h
kernel/fork.c
kernel/signal.c
kernel/sys_ni.c
lib/kobject.c
mm/filemap.c
mm/shmem.c
mm/sparse-vmemmap.c
net/appletalk/ddp.c
net/atm/common.c
net/ax25/af_ax25.c
net/bluetooth/bnep/sock.c
net/bluetooth/cmtp/sock.c
net/bluetooth/hci_sock.c
net/bluetooth/hidp/sock.c
net/bluetooth/l2cap.c
net/bluetooth/rfcomm/sock.c
net/bluetooth/sco.c
net/core/dev.c
net/core/net_namespace.c
net/core/netpoll.c
net/core/skbuff.c
net/core/sock.c
net/decnet/af_decnet.c
net/econet/af_econet.c
net/ipv4/af_inet.c
net/ipv4/esp4.c
net/ipv4/ipvs/ip_vs_lblcr.c
net/ipv4/ipvs/ip_vs_sync.c
net/ipv4/netfilter/Kconfig
net/ipv4/proc.c
net/ipv4/tcp.c
net/ipv4/tcp_input.c
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_vegas.c
net/ipv6/addrconf.c
net/ipv6/af_inet6.c
net/ipv6/esp6.c
net/ipv6/ndisc.c
net/ipv6/tcp_ipv6.c
net/ipx/af_ipx.c
net/irda/af_irda.c
net/irda/irnet/irnet_ppp.c
net/iucv/af_iucv.c
net/key/af_key.c
net/llc/llc_conn.c
net/netfilter/Kconfig
net/netfilter/nf_conntrack_core.c
net/netlink/af_netlink.c
net/netrom/af_netrom.c
net/packet/af_packet.c
net/rose/af_rose.c
net/rxrpc/af_rxrpc.c
net/rxrpc/rxkad.c
net/sctp/ipv6.c
net/sctp/protocol.c
net/socket.c
net/sunrpc/auth_gss/gss_krb5_crypto.c
net/sunrpc/sysctl.c
net/sunrpc/xprtrdma/rpc_rdma.c
net/tipc/socket.c
net/unix/af_unix.c
net/x25/af_x25.c

index a30dd4480ad4f389e3eb80677870c216e3de38e1..681e2b36195c98ea5271b76383b3a574b190b04f 100644 (file)
@@ -464,8 +464,8 @@ section Linus Computer Science 101.
 Nuff said.  If your code deviates too much from this, it is likely
 to be rejected without further review, and without comment.
 
-Once significant exception is when moving code from one file to
-another in this case you should not modify the moved code at all in
+One significant exception is when moving code from one file to
+another -- in this case you should not modify the moved code at all in
 the same patch which moves it.  This clearly delineates the act of
 moving the code and your changes.  This greatly aids review of the
 actual differences and allows tools to better track the history of
index 2f75e750e4f5c650a89df593ead1a1ff320eee62..fc49b79bc1ab3341b16fe19ea49402f9fd1955e2 100644 (file)
@@ -785,3 +785,41 @@ IMPORTANT: All the hooks are required to preserve %esp, %ebp, %esi and
        After completing your hook, you should jump to the address
        that was in this field before your boot loader overwrote it
        (relocated, if appropriate.)
+
+
+**** 32-bit BOOT PROTOCOL
+
+For machine with some new BIOS other than legacy BIOS, such as EFI,
+LinuxBIOS, etc, and kexec, the 16-bit real mode setup code in kernel
+based on legacy BIOS can not be used, so a 32-bit boot protocol needs
+to be defined.
+
+In 32-bit boot protocol, the first step in loading a Linux kernel
+should be to setup the boot parameters (struct boot_params,
+traditionally known as "zero page"). The memory for struct boot_params
+should be allocated and initialized to all zero. Then the setup header
+from offset 0x01f1 of kernel image on should be loaded into struct
+boot_params and examined. The end of setup header can be calculated as
+follow:
+
+       0x0202 + byte value at offset 0x0201
+
+In addition to read/modify/write the setup header of the struct
+boot_params as that of 16-bit boot protocol, the boot loader should
+also fill the additional fields of the struct boot_params as that
+described in zero-page.txt.
+
+After setupping the struct boot_params, the boot loader can load the
+32/64-bit kernel in the same way as that of 16-bit boot protocol.
+
+In 32-bit boot protocol, the kernel is started by jumping to the
+32-bit kernel entry point, which is the start address of loaded
+32/64-bit kernel.
+
+At entry, the CPU must be in 32-bit protected mode with paging
+disabled; a GDT must be loaded with the descriptors for selectors
+__BOOT_CS(0x10) and __BOOT_DS(0x18); both descriptors must be 4G flat
+segment; __BOOS_CS must have execute/read permission, and __BOOT_DS
+must have read/write permission; CS must be __BOOT_CS and DS, ES, SS
+must be __BOOT_DS; interrupt must be disabled; %esi must hold the base
+address of the struct boot_params; %ebp, %edi and %ebx must be zero.
index 6c0817c45683fd07f6367c8234d419a4e824ee48..169ad423a3d12243023d5807d1d7a4025d1a3978 100644 (file)
@@ -1,99 +1,31 @@
----------------------------------------------------------------------------
-!!!!!!!!!!!!!!!WARNING!!!!!!!!
-The zero page is a kernel internal data structure, not a stable ABI.  It might change
-without warning and the kernel has no way to detect old version of it.
-If you're writing some external code like a boot loader you should only use
-the stable versioned real mode boot protocol described in boot.txt. Otherwise the kernel
-might break you at any time.
-!!!!!!!!!!!!!WARNING!!!!!!!!!!!
-----------------------------------------------------------------------------
+The additional fields in struct boot_params as a part of 32-bit boot
+protocol of kernel. These should be filled by bootloader or 16-bit
+real-mode setup code of the kernel. References/settings to it mainly
+are in:
 
-Summary of boot_params layout (kernel point of view)
-     ( collected by Hans Lermen and Martin Mares )
-The contents of boot_params are used to pass parameters from the
-16-bit realmode code of the kernel to the 32-bit part. References/settings
-to it mainly are in:
+  include/asm-x86/bootparam.h
 
-  arch/i386/boot/setup.S
-  arch/i386/boot/video.S
-  arch/i386/kernel/head.S
-  arch/i386/kernel/setup.c
 
-Offset Type            Description
-------  ----           -----------
-    0  32 bytes        struct screen_info, SCREEN_INFO
-                       ATTENTION, overlaps the following !!!
-    2  unsigned short  EXT_MEM_K, extended memory size in Kb (from int 0x15)
- 0x20  unsigned short  CL_MAGIC, commandline magic number (=0xA33F)
- 0x22  unsigned short  CL_OFFSET, commandline offset
-                       Address of commandline is calculated:
-                         0x90000 + contents of CL_OFFSET
-                       (only taken, when CL_MAGIC = 0xA33F)
- 0x40  20 bytes        struct apm_bios_info, APM_BIOS_INFO
- 0x60  16 bytes        Intel SpeedStep (IST) BIOS support information
- 0x80  16 bytes        hd0-disk-parameter from intvector 0x41
- 0x90  16 bytes        hd1-disk-parameter from intvector 0x46
+Offset Proto   Name            Meaning
+/Size
 
- 0xa0  16 bytes        System description table truncated to 16 bytes.
-                       ( struct sys_desc_table_struct )
- 0xb0 - 0x13f          Free. Add more parameters here if you really need them.
- 0x140- 0x1be          EDID_INFO Video mode setup
-
-0x1c4  unsigned long   EFI system table pointer
-0x1c8  unsigned long   EFI memory descriptor size
-0x1cc  unsigned long   EFI memory descriptor version
-0x1d0  unsigned long   EFI memory descriptor map pointer
-0x1d4  unsigned long   EFI memory descriptor map size
-0x1e0  unsigned long   ALT_MEM_K, alternative mem check, in Kb
-0x1e4  unsigned long   Scratch field for the kernel setup code
-0x1e8  char            number of entries in E820MAP (below)
-0x1e9  unsigned char   number of entries in EDDBUF (below)
-0x1ea  unsigned char   number of entries in EDD_MBR_SIG_BUFFER (below)
-0x1f1  char            size of setup.S, number of sectors
-0x1f2  unsigned short  MOUNT_ROOT_RDONLY (if !=0)
-0x1f4  unsigned short  size of compressed kernel-part in the
-                       (b)zImage-file (in 16 byte units, rounded up)
-0x1f6  unsigned short  swap_dev (unused AFAIK)
-0x1f8  unsigned short  RAMDISK_FLAGS
-0x1fa  unsigned short  VGA-Mode (old one)
-0x1fc  unsigned short  ORIG_ROOT_DEV (high=Major, low=minor)
-0x1ff  char            AUX_DEVICE_INFO
-
-0x200  short jump to start of setup code aka "reserved" field.
-0x202  4 bytes         Signature for SETUP-header, ="HdrS"
-0x206  unsigned short  Version number of header format
-                       Current version is 0x0201...
-0x208  8 bytes         (used by setup.S for communication with boot loaders,
-                        look there)
-0x210  char            LOADER_TYPE, = 0, old one
-                       else it is set by the loader:
-                       0xTV: T=0 for LILO
-                               1 for Loadlin
-                               2 for bootsect-loader
-                               3 for SYSLINUX
-                               4 for ETHERBOOT
-                               5 for ELILO
-                               7 for GRuB
-                               8 for U-BOOT
-                               9 for Xen
-                               V = version
-0x211  char            loadflags:
-                       bit0 = 1: kernel is loaded high (bzImage)
-                       bit7 = 1: Heap and pointer (see below) set by boot
-                                 loader.
-0x212  unsigned short  (setup.S)
-0x214  unsigned long   KERNEL_START, where the loader started the kernel
-0x218  unsigned long   INITRD_START, address of loaded ramdisk image
-0x21c  unsigned long   INITRD_SIZE, size in bytes of ramdisk image
-0x220  4 bytes         (setup.S)
-0x224  unsigned short  setup.S heap end pointer
-0x226   unsigned short zero_pad
-0x228   unsigned long  cmd_line_ptr
-0x22c   unsigned long  ramdisk_max
-0x230   16 bytes       trampoline
-0x290 - 0x2cf          EDD_MBR_SIG_BUFFER (edd.S)
-0x2d0 - 0xd00          E820MAP
-0xd00 - 0xeff          EDDBUF (edd.S) for disk signature read sector
-0xd00 - 0xeeb          EDDBUF (edd.S) for edd data
+000/040        ALL     screen_info     Text mode or frame buffer information
+                               (struct screen_info)
+040/014        ALL     apm_bios_info   APM BIOS information (struct apm_bios_info)
+060/010        ALL     ist_info        Intel SpeedStep (IST) BIOS support information
+                               (struct ist_info)
+080/010        ALL     hd0_info        hd0 disk parameter, OBSOLETE!!
+090/010        ALL     hd1_info        hd1 disk parameter, OBSOLETE!!
+0A0/010        ALL     sys_desc_table  System description table (struct sys_desc_table)
+140/080        ALL     edid_info       Video mode setup (struct edid_info)
+1C0/020        ALL     efi_info        EFI 32 information (struct efi_info)
+1E0/004        ALL     alk_mem_k       Alternative mem check, in KB
+1E4/004        ALL     scratch         Scratch field for the kernel setup code
+1E8/001        ALL     e820_entries    Number of entries in e820_map (below)
+1E9/001        ALL     eddbuf_entries  Number of entries in eddbuf (below)
+1EA/001        ALL     edd_mbr_sig_buf_entries Number of entries in edd_mbr_sig_buffer
+                               (below)
+290/040        ALL     edd_mbr_sig_buffer EDD MBR signatures
+2D0/A00        ALL     e820_map        E820 memory map table
+                               (array of struct e820entry)
+D00/1EC        ALL     eddbuf          EDD data (array of struct edd_info)
diff --git a/Documentation/ja_JP/SubmittingPatches b/Documentation/ja_JP/SubmittingPatches
new file mode 100644 (file)
index 0000000..a9dc124
--- /dev/null
@@ -0,0 +1,556 @@
+NOTE:
+This is a version of Documentation/SubmittingPatches into Japanese.
+This document is maintained by Keiichi KII <k-keiichi@bx.jp.nec.com>
+and the JF Project team <http://www.linux.or.jp/JF/>.
+If you find any difference between this document and the original file
+or a problem with the translation,
+please contact the maintainer of this file or JF project.
+
+Please also note that the purpose of this file is to be easier to read
+for non English (read: Japanese) speakers and is not intended as a
+fork. So if you have any comments or updates of this file, please try
+to update the original English file first.
+
+Last Updated: 2007/10/24
+==================================
+これは、
+linux-2.6.23/Documentation/SubmittingPatches の和訳
+です。
+翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ >
+翻訳日: 2007/10/17
+翻訳者: Keiichi Kii <k-keiichi at bx dot jp dot nec dot com>
+校正者: Masanari Kobayashi さん <zap03216 at nifty dot ne dot jp>
+         Matsukura さん <nbh--mats at nifty dot com>
+==================================
+
+        Linux カーネルに変更を加えるための Howto
+        又は
+        かの Linus Torvalds の取り扱い説明書
+
+Linux カーネルに変更を加えたいと思っている個人又は会社にとって、パッ
+チの投稿に関連した仕組みに慣れていなければ、その過程は時々みなさんを
+おじけづかせることもあります。この文章はあなたの変更を大いに受け入れ
+てもらえやすくする提案を集めたものです。
+
+コードを投稿する前に、Documentation/SubmitChecklist の項目リストに目
+を通してチェックしてください。もしあなたがドライバーを投稿しようとし
+ているなら、Documentation/SubmittingDrivers にも目を通してください。
+
+--------------------------------------------
+セクション1 パッチの作り方と送り方
+--------------------------------------------
+
+1) 「 diff -up 」
+------------
+
+パッチの作成には「 diff -up 」又は「 diff -uprN 」を使ってください。
+
+Linux カーネルに対する全ての変更は diff(1) コマンドによるパッチの形式で
+生成してください。パッチを作成するときには、diff(1) コマンドに「 -u 」引
+数を指定して、unified 形式のパッチを作成することを確認してください。また、
+変更がどの C 関数で行われたのかを表示する「 -p 」引数を使ってください。
+この引数は生成した差分をずっと読みやすくしてくれます。パッチは Linux
+カーネルソースの中のサブディレクトリではなく Linux カーネルソースのルート
+ディレクトリを基準にしないといけません。
+
+1個のファイルについてのパッチを作成するためには、ほとんどの場合、
+以下の作業を行えば十分です。
+
+       SRCTREE= linux-2.6
+       MYFILE=  drivers/net/mydriver.c
+
+       cd $SRCTREE
+       cp $MYFILE $MYFILE.orig
+       vi $MYFILE      # make your change
+       cd ..
+       diff -up $SRCTREE/$MYFILE{.orig,} > /tmp/patch
+
+複数のファイルについてのパッチを作成するためには、素の( vanilla )、す
+なわち変更を加えてない Linux カーネルを展開し、自分の Linux カーネル
+ソースとの差分を生成しないといけません。例えば、
+
+       MYSRC= /devel/linux-2.6
+
+       tar xvfz linux-2.6.12.tar.gz
+       mv linux-2.6.12 linux-2.6.12-vanilla
+       diff -uprN -X linux-2.6.12-vanilla/Documentation/dontdiff \
+               linux-2.6.12-vanilla $MYSRC > /tmp/patch
+
+dontdiff ファイルには Linux カーネルのビルドプロセスの過程で生成された
+ファイルの一覧がのっています。そして、それらはパッチを生成する diff(1)
+コマンドで無視されるべきです。dontdiff ファイルは 2.6.12 以後のバージョ
+ンの Linux カーネルソースツリーに含まれています。それより前のバージョン
+の Linux カーネルソースツリーに対する dontdiff ファイルは、
+<http://www.xenotime.net/linux/doc/dontdiff>から取得することができます。
+
+投稿するパッチの中に関係のない余分なファイルが含まれていないことを確
+認してください。diff(1) コマンドで生成したパッチがあなたの意図したとお
+りのものであることを確認してください。
+
+もしあなたのパッチが多くの差分を生み出すのであれば、あなたはパッチ
+を意味のあるひとまとまりごとに分けたいと思うかもしれません。
+これは他のカーネル開発者にとってレビューしやすくなるので、あなたの
+パッチを受け入れてもらうためにはとても重要なことです。これを補助でき
+る多くのスクリプトがあります。
+
+Quilt:
+http://savannah.nongnu.org/projects/quilt
+
+Andrew Morton's patch scripts:
+http://www.zip.com.au/~akpm/linux/patches/
+このリンクの先のスクリプトの代わりとして、quilt がパッチマネジメント
+ツールとして推奨されています(上のリンクを見てください)。
+
+2) パッチに対する説明
+
+パッチの中の変更点に対する技術的な詳細について説明してください。
+
+説明はできる限り具体的に。もっとも悪い説明は「ドライバー X を更新」、
+「ドライバー X に対するバグフィックス」あるいは「このパッチはサブシス
+テム X に対する更新を含んでいます。どうか取り入れてください。」などです。
+
+説明が長くなりだしたのであれば、おそらくそれはパッチを分ける必要がある
+という兆候です。次の #3 を見てください。
+
+3) パッチの分割
+
+意味のあるひとまとまりごとに変更を個々のパッチファイルに分けてください。
+
+例えば、もし1つのドライバーに対するバグフィックスとパフォーマンス強
+化の両方の変更を含んでいるのであれば、その変更を2つ以上のパッチに分
+けてください。もし変更箇所に API の更新と、その新しい API を使う新たな
+ドライバーが含まれているなら、2つのパッチに分けてください。
+
+一方で、もしあなたが多数のファイルに対して意味的に同じ1つの変更を加え
+るのであれば、その変更を1つのパッチにまとめてください。言いかえると、
+意味的に同じ1つの変更は1つのパッチの中に含まれます。
+
+あるパッチが変更を完結させるために他のパッチに依存していたとしても、
+それは問題ありません。パッチの説明の中で「このパッチはパッチ X に依存
+している」と簡単に注意書きをつけてください。
+
+もしパッチをより小さなパッチの集合に凝縮することができないなら、まずは
+15かそこらのパッチを送り、そのレビューと統合を待って下さい。
+
+4) パッチのスタイルチェック
+
+あなたのパッチが基本的な( Linux カーネルの)コーディングスタイルに違反し
+ていないかをチェックして下さい。その詳細を Documentation/CodingStyle で
+見つけることができます。コーディングスタイルの違反はレビューする人の
+時間を無駄にするだけなので、恐らくあなたのパッチは読まれることすらなく
+拒否されるでしょう。
+
+あなたはパッチを投稿する前に最低限パッチスタイルチェッカー
+( scripts/patchcheck.pl )を利用してパッチをチェックすべきです。
+もしパッチに違反がのこっているならば、それらの全てについてあなたは正当な
+理由を示せるようにしておく必要があります。
+
+5) 電子メールの宛先の選び方
+
+MAINTAINERS ファイルとソースコードに目を通してください。そして、その変
+更がメンテナのいる特定のサブシステムに加えられるものであることが分か
+れば、その人に電子メールを送ってください。
+
+もし、メンテナが載っていなかったり、メンテナからの応答がないなら、
+LKML ( linux-kernel@vger.kernel.org )へパッチを送ってください。ほとんど
+のカーネル開発者はこのメーリングリストに目を通しており、変更に対して
+コメントを得ることができます。
+
+15個より多くのパッチを同時に vger.kernel.org のメーリングリストへ送らな
+いでください!!!
+
+Linus Torvalds は Linux カーネルに入る全ての変更に対する最終的な意思決定者
+です。電子メールアドレスは torvalds@linux-foundation.org になります。彼は
+多くの電子メールを受け取っているため、できる限り彼に電子メールを送るのは
+避けるべきです。
+
+バグフィックスであったり、自明な変更であったり、話し合いをほとんど
+必要としないパッチは Linus へ電子メールを送るか CC しなければなりません。
+話し合いを必要としたり、明確なアドバンテージがないパッチは、通常まず
+は LKML へ送られるべきです。パッチが議論された後にだけ、そのパッチを
+Linus へ送るべきです。
+
+6) CC (カーボンコピー)先の選び方
+
+特に理由がないなら、LKML にも CC してください。
+
+Linus 以外のカーネル開発者は変更に気づく必要があり、その結果、彼らはそ
+の変更に対してコメントをくれたり、コードに対してレビューや提案をくれ
+るかもしれません。LKML とは Linux カーネル開発者にとって一番中心的なメー
+リングリストです。USB やフレームバッファデバイスや VFS や SCSI サブシステ
+ムなどの特定のサブシステムに関するメーリングリストもあります。あなた
+の変更に、はっきりと関連のあるメーリングリストについて知りたければ
+MAINTAINERS ファイルを参照してください。
+
+VGER.KERNEL.ORG でホスティングされているメーリングリストの一覧が下記の
+サイトに載っています。
+<http://vger.kernel.org/vger-lists.html>
+
+もし、変更がユーザランドのカーネルインタフェースに影響を与え
+るのであれば、MAN-PAGES のメンテナ( MAINTAINERS ファイルに一覧
+があります)に man ページのパッチを送ってください。少なくとも
+情報がマニュアルページの中に入ってくるように、変更が起きたという
+通知を送ってください。
+
+たとえ、メンテナが #4 で反応がなかったとしても、メンテナのコードに変更を
+加えたときには、いつもメンテナに CC するのを忘れないようにしてください。
+
+小さなパッチであれば、Adrian Bunk が管理している Trivial Patch Monkey
+(ちょっとしたパッチを集めている)<trivial@kernel.org>に CC してもいい
+です。ちょっとしたパッチとは以下のルールのどれか1つを満たしていなけ
+ればなりません。
+ ・ドキュメントのスペルミスの修正
+ ・grep(1) コマンドによる検索を困難にしているスペルの修正
+ ・コンパイル時の警告の修正(無駄な警告が散乱することは好ましくないた
+   めです)
+ ・コンパイル問題の修正(それらの修正が本当に正しい場合に限る)
+ ・実行時の問題の修正(それらの修正が本当に問題を修正している場合に限る)
+ ・廃止予定の関数やマクロを使用しているコードの除去(例 check_region )
+ ・問い合わせ先やドキュメントの修正
+ ・移植性のないコードから移植性のあるコードへの置き換え(小さい範囲で
+   あればアーキテクチャ特有のことでも他の人がコピーできます)
+ ・作者やメンテナによる修正(すなわち patch monkey の再転送モード)
+URL: <http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/>
+
+7) MIME やリンクや圧縮ファイルや添付ファイルではなくプレインテキストのみ
+
+Linus や他のカーネル開発者はあなたが投稿した変更を読んで、コメントでき
+る必要があります。カーネル開発者にとって、あなたが書いたコードの特定の
+部分にコメントをするために、標準的な電子メールクライアントで変更が引用
+できることは重要です。
+
+上記の理由で、すべてのパッチは文中に含める形式の電子メールで投稿さ
+れるべきです。警告:あなたがパッチをコピー&ペーストする際には、パッ
+チを改悪するエディターの折り返し機能に注意してください。
+
+パッチを圧縮の有無に関わらず MIME 形式で添付しないでください。多くのポ
+ピュラーな電子メールクライアントは MIME 形式の添付ファイルをプレーンテ
+キストとして送信するとは限らないでしょう。そうなると、電子メールクラ
+イアントがコードに対するコメントを付けることをできなくします。また、
+MIME 形式の添付ファイルは Linus に手間を取らせることになり、その変更を
+受け入れてもらう可能性が低くなってしまいます。
+
+例外:お使いの電子メールクライアントがパッチをめちゃくちゃにするので
+あれば、誰かが MIME 形式のパッチを再送するよう求めるかもしれません。
+
+警告: Mozilla のような特定の電子メールクライアントは電子メールの
+ヘッダに以下のものを付加して送ります。
+---- message header ----
+Content-Type: text/plain; charset=us-ascii; format=flowed
+---- message header ----
+問題は、「 format=flowed 」が付いた電子メールを特定の受信側の電子メール
+クライアントがタブをスペースに置き換えるというような変更をすることです。
+したがって送られてきたパッチは壊れているように見えるでしょう。
+
+これを修正するには、mozilla の defaults/pref/mailnews.js ファイルを
+以下のように修正します。
+pref("mailnews.send_plaintext_flowed", false); // RFC 2646=======
+pref("mailnews.display.disable_format_flowed_support", true);
+
+8) 電子メールのサイズ
+
+パッチを Linus へ送るときは常に #7 の手順に従ってください。
+
+大きなパッチはメーリングリストやメンテナにとって不親切です。パッチが
+未圧縮で 40KB を超えるようであるなら、インターネット上のアクセス可能な
+サーバに保存し、保存場所を示す URL を伝えるほうが適切です。
+
+9) カーネルバージョンの明記
+
+パッチが対象とするカーネルのバージョンをパッチの概要か電子メールの
+サブジェクトに付けることが重要です。
+
+パッチが最新バージョンのカーネルに正しく適用できなければ、Linus は
+そのパッチを採用しないでしょう。
+
+10) がっかりせず再投稿
+
+パッチを投稿した後は、辛抱強く待っていてください。Linus があなたのパッ
+チを気に入って採用すれば、Linus がリリースする次のバージョンのカーネル
+の中で姿を見せるでしょう。
+
+しかし、パッチが次のバージョンのカーネルに入っていないなら、いくつもの
+理由があるのでしょう。その原因を絞り込み、間違っているものを正し、更新
+したパッチを投稿するのはあなたの仕事です。
+
+Linus があなたのパッチに対して何のコメントもなく不採用にすることは極め
+て普通のことです。それは自然な姿です。もし、Linus があなたのパッチを受
+け取っていないのであれば、以下の理由が考えられます。
+* パッチが最新バージョンの Linux カーネルにきちんと適用できなかった
+* パッチが LKML で十分に議論されていなかった
+* スタイルの問題(セクション2を参照)
+* 電子メールフォーマットの問題(このセクションを参照)
+* パッチに対する技術的な問題
+* Linus はたくさんの電子メールを受け取っているので、どさくさに紛れて見
+  失った
+* 不愉快にさせている
+
+判断できない場合は、LKML にコメントを頼んでください。
+
+11) サブジェクトに「 PATCH 」
+
+Linus や LKML への大量の電子メールのために、サブジェクトのプレフィックスに
+「 [PATCH] 」を付けることが慣習となっています。これによって Linus や他の
+カーネル開発者がパッチであるのか、又は、他の議論に関する電子メールであるの
+かをより簡単に識別できます。
+
+12) パッチへの署名
+
+誰が何をしたのかを追いかけやすくするために (特に、パッチが何人かの
+メンテナを経て最終的に Linux カーネルに取り込まれる場合のために)、電子
+メールでやり取りされるパッチに対して「 sign-off 」という手続きを導入し
+ました。
+
+「 sign-off 」とは、パッチがあなたの書いたものであるか、あるいは、
+あなたがそのパッチをオープンソースとして提供する権利を保持している、
+という証明をパッチの説明の末尾に一行記載するというものです。
+ルールはとても単純です。以下の項目を確認して下さい。
+
+        原作者の証明書( DCO ) 1.1
+
+        このプロジェクトに寄与するものとして、以下のことを証明する。
+
+        (a) 本寄与は私が全体又は一部作成したものであり、私がそのファイ
+            ル中に明示されたオープンソースライセンスの下で公開する権利
+            を持っている。もしくは、
+
+        (b) 本寄与は、私が知る限り、適切なオープンソースライセンスでカバ
+            ーされている既存の作品を元にしている。同時に、私はそのライセ
+            ンスの下で、私が全体又は一部作成した修正物を、ファイル中で示
+            される同一のオープンソースライセンスで(異なるライセンスの下で
+            投稿することが許可されている場合を除いて)投稿する権利を持って
+            いる。もしくは、
+
+        (c) 本寄与は(a)、(b)、(c)を証明する第3者から私へ直接提供された
+            ものであり、私はそれに変更を加えていない。
+
+       (d) 私はこのプロジェクトと本寄与が公のものであることに理解及び同意す
+            る。同時に、関与した記録(投稿の際の全ての個人情報と sign-off を
+            含む)が無期限に保全されることと、当該プロジェクト又は関連する
+            オープンソースライセンスに沿った形で再配布されることに理解及び
+            同意する。
+
+もしこれに同意できるなら、以下のような1行を追加してください。
+
+       Signed-off-by: Random J Developer <random@developer.example.org>
+
+実名を使ってください。(残念ですが、偽名や匿名による寄与はできません。)
+
+人によっては sign-off の近くに追加のタグを付加しています。それらは今のところ
+無視されますが、あなたはそのタグを社内の手続きに利用したり、sign-off に特別
+な情報を示したりすることができます。
+
+13) いつ Acked-by: を使うのか
+
+「 Signed-off-by: 」タグはその署名者がパッチの開発に関わっていたことやパッチ
+の伝播パスにいたことを示しています。
+
+ある人が直接パッチの準備や作成に関わっていないけれど、その人のパッチに対す
+る承認を記録し、示したいとします。その場合、その人を示すのに Acked-by: が使
+えます。Acked-by: はパッチのチェンジログにも追加されます。
+
+パッチの影響を受けるコードのメンテナがパッチに関わっていなかったり、パッチ
+の伝播パスにいなかった時にも、メンテナは Acked-by: をしばしば利用します。
+
+Acked-by: は Signed-off-by: のように公式なタグではありません。それはメンテナが
+少なくともパッチをレビューし、同意を示しているという記録です。そのような
+ことからパッチの統合者がメンテナの「うん、良いと思うよ」という発言を
+Acked-by: へ置き換えることがあります。
+
+Acked-by: が必ずしもパッチ全体の承認を示しているわけではありません。例えば、
+あるパッチが複数のサブシステムへ影響を与えており、その中の1つのサブシステム
+のメンテナからの Acked-by: を持っているとします。その場合、Acked-by: は通常
+そのメンテナのコードに影響を与える一部分だけに対する承認を示しています。
+この点は、ご自分で判断してください。(その Acked-by: が)疑わしい場合は、
+メーリングリストアーカイブの中の大元の議論を参照すべきです。
+
+14) 標準的なパッチのフォーマット
+
+標準的なパッチのサブジェクトは以下のとおりです。
+
+    Subject: [PATCH 001/123] subsystem: summary phrase
+
+標準的なパッチの、電子メールのボディは以下の項目を含んでいます。
+
+  - パッチの作成者を明記する「 from 」行
+
+  - 空行
+
+  - 説明本体。これはこのパッチを説明するために無期限のチェンジログ
+    (変更履歴)にコピーされます。
+
+  - 上述した「 Signed-off-by: 」行。これも説明本体と同じくチェン
+    ジログ内にコピーされます。
+
+  - マーカー行は単純に「 --- 」です。
+
+  - 余計なコメントは、チェンジログには不適切です。
+
+  - 実際のパッチ(差分出力)
+
+サブジェクト行のフォーマットは、アルファベット順で電子メールをとても
+ソートしやすいものになっています。(ほとんどの電子メールクライアント
+はソートをサポートしています)パッチのサブジェクトの連番は0詰めであ
+るため、数字でのソートとアルファベットでのソートは同じ結果になります。
+
+電子メールのサブジェクト内のサブシステム表記は、パッチが適用される
+分野またはサブシステムを識別できるようにすべきです。
+
+電子メールのサブジェクトの「概要の言い回し」はそのパッチの概要を正確
+に表現しなければなりません。「概要の言い回し」をファイル名にしてはい
+けません。一連のパッチ中でそれぞれのパッチは同じ「概要の言い回し」を
+使ってはいけません(「一連のパッチ」とは順序付けられた関連のある複数の
+パッチ群です)。
+
+あなたの電子メールの「概要の言い回し」がそのパッチにとって世界で唯
+一の識別子になるように心がけてください。「概要の言い回し」は git の
+チェンジログの中へずっと伝播していきます。「概要の言い回し」は、開
+発者が後でパッチを参照するために議論の中で利用するかもしれません。
+人々はそのパッチに関連した議論を読むために「概要の言い回し」を使って
+google で検索したがるでしょう。
+
+サブジェクトの例を二つ
+
+    Subject: [patch 2/5] ext2: improve scalability of bitmap searching
+    Subject: [PATCHv2 001/207] x86: fix eflags tracking
+
+「 from 」行は電子メールのボディの一番最初の行でなければなりません。
+その形式は以下のとおりです。
+
+        From: Original Author <author@example.com>
+
+「 from 」行はチェンジログの中で、そのパッチの作成者としてクレジットされ
+ている人を特定するものです。「 from 」行がかけていると、電子メールのヘッ
+ダーの「 From: 」が、チェンジログの中でパッチの作成者を決定するために使わ
+れるでしょう。
+
+説明本体は無期限のソースのチェンジログにコミットされます。なので、説明
+本体はそのパッチに至った議論の詳細を忘れているある程度の技量を持っている人
+がその詳細を思い出すことができるものでなければなりません。
+
+「 --- 」マーカー行はパッチ処理ツールに対して、チェンジログメッセージの終端
+部分を認識させるという重要な役目を果たします。
+
+「 --- 」マーカー行の後の追加コメントの良い使用方法の1つに diffstat コマンド
+があります。diffstat コマンドとは何のファイルが変更され、1ファイル当たり何行
+追加され何行消されたかを示すものです。diffstat コマンドは特に大きなパッチに
+おいて役立ちます。その時点でだけ又はメンテナにとってのみ関係のあるコメント
+は無期限に保存されるチェンジログにとって適切ではありません。そのため、この
+ようなコメントもマーカー行の後に書かれるべきです。ファイル名はカーネルソー
+スツリーのトップディレクトリからの表記でリストされるため、横方向のスペース
+をとり過ぎないように、diffstat コマンドにオプション「  -p 1 -w 70 」を指定し
+てください(インデントを含めてちょうど80列に合うでしょう)。
+
+適切なパッチのフォーマットの詳細についてはセクション3の参考文献を参照して
+ください。
+
+------------------------------------
+セクション2 - ヒントとTIPSと小技
+------------------------------------
+
+このセクションは Linux カーネルに変更を適用することに関係のある一般的な
+「お約束」の多くを載せています。物事には例外というものがあります。しか
+し例外を適用するには、本当に妥当な理由が不可欠です。あなたは恐らくこの
+セクションを Linus のコンピュータ・サイエンス101と呼ぶでしょう。
+
+1) Documentation/CodingStyleを参照
+
+言うまでもなく、あなたのコードがこのコーディングスタイルからあまりに
+も逸脱していると、レビューやコメントなしに受け取ってもらえないかもし
+れません。
+
+唯一の特筆すべき例外は、コードをあるファイルから別のファイルに移動
+するときです。この場合、コードを移動するパッチでは、移動されるコード
+に関して移動以外の変更を一切加えるべきではありません。これにより、
+コードの移動とあなたが行ったコードの修正を明確に区別できるようにな
+ります。これは実際に何が変更されたかをレビューする際の大きな助けに
+なるとともに、ツールにコードの履歴を追跡させることも容易になります。
+
+投稿するより前にパッチのスタイルチェッカー( scripts/checkpatch.pl )で
+あなたのパッチをチェックしてください。このスタイルチェッカーは最終結
+論としてではなく、指標としてみるべきです。もし、あなたのコードが違反
+はしているが修正するより良く見えるのであれば、おそらくそのままにする
+のがベストです。
+
+スタイルチェッカーによる3段階のレポート:
+ - エラー: 間違っている可能性が高い
+ - 警告:注意してレビューする必要がある
+ - チェック:考慮する必要がある
+
+あなたはパッチに残っている全ての違反について、それがなぜ必要なのか正当な
+理由を示せるようにしておく必要があります。
+
+2) #ifdefは見苦しい
+
+ifdef が散乱したコードは、読むのもメンテナンスするのも面倒です。コードの中
+で ifdef を使わないでください。代わりに、ヘッダファイルの中に ifdef を入れて、
+条件付きで、コードの中で使われる関数を「 static inline 」関数かマクロで定義し
+てください。後はコンパイラが、何もしない箇所を最適化して取り去ってくれるで
+しょう。
+
+まずいコードの簡単な例
+
+       dev = alloc_etherdev (sizeof(struct funky_private));
+       if (!dev)
+               return -ENODEV;
+       #ifdef CONFIG_NET_FUNKINESS
+       init_funky_net(dev);
+       #endif
+
+クリーンアップしたコードの例
+
+(in header)
+       #ifndef CONFIG_NET_FUNKINESS
+       static inline void init_funky_net (struct net_device *d) {}
+       #endif
+
+(in the code itself)
+       dev = alloc_etherdev (sizeof(struct funky_private));
+       if (!dev)
+               return -ENODEV;
+       init_funky_net(dev);
+
+3) マクロより「 static inline 」を推奨
+
+「 static inline 」関数はマクロよりもずっと推奨されています。それらは、
+型安全性があり、長さにも制限が無く、フォーマットの制限もありません。
+gcc においては、マクロと同じくらい軽いです。
+
+マクロは「 static inline 」が明らかに不適切であると分かる場所(高速化パスの
+いくつかの特定のケース)や「 static inline 」関数を使うことができないような
+場所(マクロの引数の文字列連結のような)にだけ使われるべきです。
+
+「 static inline 」は「 static __inline__ 」や「 extern inline 」や
+「 extern __inline__ 」よりも適切です。
+
+4) 設計に凝りすぎるな
+
+それが有用になるかどうか分からないような不明瞭な将来を見越した設計
+をしないでください。「できる限り簡単に、そして、それ以上簡単になら
+ないような設計をしてください。」
+
+----------------------
+セクション3 参考文献
+----------------------
+
+Andrew Morton, "The perfect patch" (tpp).
+  <http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt>
+
+Jeff Garzik, "Linux kernel patch submission format".
+  <http://linux.yyz.us/patch-format.html>
+
+Greg Kroah-Hartman, "How to piss off a kernel subsystem maintainer".
+  <http://www.kroah.com/log/2005/03/31/>
+  <http://www.kroah.com/log/2005/07/08/>
+  <http://www.kroah.com/log/2005/10/19/>
+  <http://www.kroah.com/log/2006/01/11/>
+
+NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people!
+  <http://marc.theaimsgroup.com/?l=linux-kernel&m=112112749912944&w=2>
+
+Kernel Documentation/CodingStyle:
+  <http://users.sosdg.org/~qiyong/lxr/source/Documentation/CodingStyle>
+
+Linus Torvalds's mail on the canonical patch format:
+  <http://lkml.org/lkml/2005/4/7/183>
+--
index 8ae5fac08dfa54087880678867698aea3bea96b9..33121d6c827c6e5fcc85d72b1f5ee5f166b743a2 100644 (file)
@@ -586,11 +586,6 @@ and is between 256 and 4096 characters. It is defined in the file
 
        eata=           [HW,SCSI]
 
-       ec_intr=        [HW,ACPI] ACPI Embedded Controller interrupt mode
-                       Format: <int>
-                       0: polling mode
-                       non-0: interrupt mode (default)
-
        edd=            [EDD]
                        Format: {"of[f]" | "sk[ipmbr]"}
                        See comment in arch/i386/boot/edd.S
index 231bda28c428dd11a26168a5f205d81c59fcc791..6c0e44bbf601849ff78d18f2bb63ef423c2fe6b9 100644 (file)
@@ -216,7 +216,7 @@ P:  Len Brown
 M:     len.brown@intel.com
 M:     lenb@kernel.org
 L:     linux-acpi@vger.kernel.org
-W:     http://acpi.sourceforge.net/
+W:     http://www.lesswatts.org/projects/acpi/
 T:     git kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git
 S:     Supported
 
@@ -235,8 +235,8 @@ W:  http://acpi.sourceforge.net/
 S:     Supported
 
 ACPI FAN DRIVER
-P:     Konstantin A. Karasyov
-M:     konstantin.a.karasyov@intel.com
+P:     Len Brown
+M:     len.brown@intel.com
 L:     linux-acpi@vger.kernel.org
 W:     http://acpi.sourceforge.net/
 S:     Supported
@@ -248,15 +248,15 @@ L:        pcihpd-discuss@lists.sourceforge.net
 S:     Supported
 
 ACPI THERMAL DRIVER
-P:     Konstantin A. Karasyov
-M:     konstantin.a.karasyov@intel.com
+P:     Len Brown
+M:     len.brown@intel.com
 L:     linux-acpi@vger.kernel.org
 W:     http://acpi.sourceforge.net/
 S:     Supported
 
 ACPI VIDEO DRIVER
-P:     Luming Yu
-M:     luming.yu@intel.com
+P:     Rui Zhang
+M:     rui.zhang@intel.com
 L:     linux-acpi@vger.kernel.org
 W:     http://acpi.sourceforge.net/
 S:     Supported
@@ -398,6 +398,12 @@ P: Arnaldo Carvalho de Melo
 M:     acme@ghostprotocols.net
 S:     Maintained
 
+APPLETOUCH TOUCHPAD DRIVER
+P:     Johannes Berg
+M:     johannes@sipsolutions.net
+L:     linux-input@vger.kernel.org
+S:     Maintained
+
 ARC FRAMEBUFFER DRIVER
 P:     Jaya Kumar
 M:     jayalk@intworks.biz
@@ -1701,7 +1707,7 @@ S:        Maintained
 HID CORE LAYER
 P:     Jiri Kosina
 M:     jkosina@suse.cz
-L:     linux-input@atrey.karlin.mff.cuni.cz
+L:     linux-input@vger.kernel.org
 T:     git kernel.org:/pub/scm/linux/kernel/git/jikos/hid.git
 S:     Maintained
 
@@ -1927,8 +1933,7 @@ INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN) DRIVERS
 P:     Dmitry Torokhov
 M:     dmitry.torokhov@gmail.com
 M:     dtor@mail.ru
-L:     linux-input@atrey.karlin.mff.cuni.cz
-L:     linux-joystick@atrey.karlin.mff.cuni.cz
+L:     linux-input@vger.kernel.org
 T:     git kernel.org:/pub/scm/linux/kernel/git/dtor/input.git
 S:     Maintained
 
@@ -3472,12 +3477,14 @@ L:      linux-pm@lists.linux-foundation.org
 S:     Supported
 
 SUSPEND TO RAM:
+P:     Len Brown
+M:     len.brown@intel.com
 P:     Pavel Machek
 M:     pavel@suse.cz
 P:     Rafael J. Wysocki
 M:     rjw@sisk.pl
 L:     linux-pm@lists.linux-foundation.org
-S:     Maintained
+S:     Supported
 
 SONIC NETWORK DRIVER
 P:     Thomas Bogendoerfer
index 8816060cdf4046a62221838d899a604f64dc8526..188c3b6b3fa9ac33fbe9fba2417365eae23585d6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -168,7 +168,8 @@ export srctree objtree VPATH TOPDIR
 SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
                                  -e s/arm.*/arm/ -e s/sa110/arm/ \
                                  -e s/s390x/s390/ -e s/parisc64/parisc/ \
-                                 -e s/ppc.*/powerpc/ -e s/mips.*/mips/ )
+                                 -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
+                                 -e s/sh[234].*/sh/ )
 
 # Cross compiling and selecting different set of gcc/bin-utils
 # ---------------------------------------------------------------------------
diff --git a/arch/arm/configs/zylonite_defconfig b/arch/arm/configs/zylonite_defconfig
new file mode 100644 (file)
index 0000000..7949d04
--- /dev/null
@@ -0,0 +1,736 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23
+# Tue Oct 23 13:33:20 2007
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=18
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+# CONFIG_MODULE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+# CONFIG_KMOD is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+
+#
+# Supported PXA3xx Processor Variants
+#
+CONFIG_CPU_PXA300=y
+CONFIG_CPU_PXA310=y
+CONFIG_CPU_PXA320=y
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_EM_X270 is not set
+CONFIG_MACH_ZYLONITE=y
+# CONFIG_MACH_ARMCORE is not set
+CONFIG_PXA3xx=y
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSC3=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_IO_36=y
+
+#
+# Processor Features
+#
+# CONFIG_ARM_THUMB is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="root=/dev/nfs rootfstype=nfs nfsroot=192.168.1.100:/nfs/rootfs/ ip=192.168.1.101:192.168.1.100::255.255.255.0::eth0:on console=ttyS0,38400 mem=64M debug"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+CONFIG_SUSPEND_UP_POSSIBLE=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE 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_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
+# CONFIG_INET_DIAG is not set
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+# CONFIG_MTD is not set
+# CONFIG_PARPORT is not set
+# CONFIG_BLK_DEV is not set
+# CONFIG_MISC_DEVICES is not set
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+CONFIG_SMC91X=y
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG 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_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+CONFIG_FB_DEFERRED_IO=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+CONFIG_FONT_6x11=y
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+# CONFIG_USB_SUPPORT is not set
+# CONFIG_MMC is not set
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+
+#
+# File systems
+#
+# CONFIG_EXT2_FS is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4DEV_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_INOTIFY is not set
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+# CONFIG_TMPFS is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS 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
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_NFS_V3_ACL=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_ACL_SUPPORT=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_NLS is not set
+# CONFIG_DLM is not set
+# CONFIG_INSTRUMENTATION is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_FRAME_POINTER=y
+# CONFIG_SAMPLES is not set
+CONFIG_DEBUG_USER=y
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_ECB is not set
+CONFIG_CRYPTO_CBC=y
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
index 86f53f8ccbf5bbac71554736b4051fc487c1f894..08d2707f6ca8aab66ffdfbb502175a31fd144f9e 100644 (file)
@@ -14,7 +14,7 @@ config ARCH_ENP2611
        help
          Say 'Y' here if you want your kernel to support the Radisys
          ENP2611 PCI network processing card. For more information on
-         this card, see <file:Documentation/arm/ENP2611>.
+         this card, see <file:Documentation/arm/IXP2000>.
 
 config ARCH_IXDP2400
        bool "Support Intel IXDP2400"
index 172a058ddd6611cd2dc51b4a7b224ce7aa4841fb..bd5184fe177c876c921b0153b3108bd2c7141df3 100644 (file)
@@ -190,15 +190,15 @@ struct xc *request_xc(int xcno, struct device *dev)
                goto exit;
 
        if (!request_mem_region
-           (NETX_PA_XPEC(xcno), XPEC_MEM_SIZE, dev->kobj.name))
+           (NETX_PA_XPEC(xcno), XPEC_MEM_SIZE, kobject_name(dev->kobj)))
                goto exit_free;
 
        if (!request_mem_region
-           (NETX_PA_XMAC(xcno), XMAC_MEM_SIZE, dev->kobj.name))
+           (NETX_PA_XMAC(xcno), XMAC_MEM_SIZE, kobject_name(dev->kobj)))
                goto exit_release_1;
 
        if (!request_mem_region
-           (SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE, dev->kobj.name))
+           (SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE, kobject_name(dev->kobj)))
                goto exit_release_2;
 
        x->xpec_base = (void * __iomem)io_p2v(NETX_PA_XPEC(xcno));
index b0921622566f34c1745cd9f28bff45f81f334780..130681201c19266d17d66f2c1a6faa5371809268 100644 (file)
@@ -343,6 +343,7 @@ static struct platform_device *h2_devices[] __initdata = {
        &h2_mcbsp1_device,
 };
 
+#ifdef CONFIG_I2C_BOARDINFO
 static struct i2c_board_info __initdata h2_i2c_board_info[] = {
        {
                I2C_BOARD_INFO("tps65010", 0x48),
@@ -356,6 +357,7 @@ static struct i2c_board_info __initdata h2_i2c_board_info[] = {
         *  - ... etc
         */
 };
+#endif
 
 static void __init h2_init_smc91x(void)
 {
@@ -467,8 +469,10 @@ static void __init h2_init(void)
        if (gpio_request(58, "tps65010") == 0)
                gpio_direction_input(58);
 
+#ifdef CONFIG_I2C_BOARDINFO
        i2c_register_board_info(1, h2_i2c_board_info,
                        ARRAY_SIZE(h2_i2c_board_info));
+#endif
 }
 
 static void __init h2_map_io(void)
index d9af4367f8bb033376c1f2863bc0de95c27d70f4..e6e85b7b097b0e926f977034aea98515da2321fb 100644 (file)
@@ -651,7 +651,7 @@ static u32 omap2_get_clksel(u32 *div_sel, u32 *field_mask,
                break;
        case CM_SYSCLKOUT_SEL1:
                div_addr = (u32)&PRCM_CLKOUT_CTRL;
-               if ((div_off == 3) || (div_off = 11))
+               if ((div_off == 3) || (div_off == 11))
                        mask= 0x3;
                break;
        case CM_CORE_SEL1:
index 5cd3cadbbd10dd00030d52d231854f141ff002fe..436f965749641abd7bb80fb4c957aee91641c5ad 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (C) 2007 Marvell Internation Ltd.
  *
- * 2007-08-21: eric miao <eric.y.miao@gmail.com>
+ * 2007-08-21: eric miao <eric.miao@marvell.com>
  *             initial version
  *
  *  This program is free software; you can redistribute it and/or modify
index 7a34231f31726ba66dcff10b357750d14dd12cbd..0a0d3877f2125e65fa09db0aba2f401c080291fa 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (C) 2007 Marvell Internation Ltd.
  *
- * 2007-08-21: eric miao <eric.y.miao@gmail.com>
+ * 2007-08-21: eric miao <eric.miao@marvell.com>
  *             initial version
  *
  * This program is free software; you can redistribute it and/or modify
index cd9eba5b3df95063c2d955fd7dbf20c061a8c462..1010f77d977a480ea8295aa359277ae9e44f0a4d 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (C) 2007 Marvell Internation Ltd.
  *
- * 2007-08-21: eric miao <eric.y.miao@gmail.com>
+ * 2007-08-21: eric miao <eric.miao@marvell.com>
  *             initial version
  *
  * This program is free software; you can redistribute it and/or modify
index 39f0de8c189e7737ff981da4c217b5deb5f7db07..5da798282a5451295a77074295d579c48db318ad 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (C) 2006 Marvell International Ltd.
  *
- * 2007-09-02: eric miao <eric.y.miao@gmail.com>
+ * 2007-09-02: eric miao <eric.miao@marvell.com>
  *             initial version
  *
  * This program is free software; you can redistribute it and/or modify
index ec4286c7931cfdb821a996565c29ed17699d22cd..a2d45d742ce444872a6761a90500b6651c9e448f 100644 (file)
@@ -151,6 +151,9 @@ pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev)
                OIER &= ~OIER_E0;
                raw_local_irq_restore(irqflags);
                break;
+
+       case CLOCK_EVT_MODE_RESUME:
+               break;
        }
 }
 
index 3f18d760dd1b5296e5881cd9cda61672e47f06fb..743a87b2faa132a7710ddece44ecd84651eb15d3 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (C) 2006 Marvell International Ltd.
  *
- * 2007-09-04: eric miao <eric.y.miao@gmail.com>
+ * 2007-09-04: eric miao <eric.miao@marvell.com>
  *             rewrite to align with latest kernel
  *
  * This program is free software; you can redistribute it and/or modify
index b5fbd2f4c693a07c1f7e86d01b788c69122d623f..1832bc316501a07071dfaf08519fefb74ed3cce5 100644 (file)
@@ -5,7 +5,7 @@
  * PXA3xx Development Platform (aka Zylonite)
  *
  * Copyright (C) 2007 Marvell Internation Ltd.
- * 2007-08-21: eric miao <eric.y.miao@gmail.com>
+ * 2007-08-21: eric miao <eric.miao@marvell.com>
  *             initial version
  *
  * This program is free software; you can redistribute it and/or modify
index 63cb36be086bfda5ebeb0d17903d7b3704e7b35d..94c715808b591b676a70b8ab45a1c4e557d542e7 100644 (file)
@@ -5,7 +5,7 @@
  * PXA3xx Development Platform (aka Zylonite)
  *
  * Copyright (C) 2007 Marvell Internation Ltd.
- * 2007-08-21: eric miao <eric.y.miao@gmail.com>
+ * 2007-08-21: eric miao <eric.miao@marvell.com>
  *             initial version
  *
  * This program is free software; you can redistribute it and/or modify
index 5b80b6bdd0cb3676a65e7d6b7f211c2a2e7f1ce9..194ef48968e600b2cb1818fcf9dc961d3d998c83 100644 (file)
@@ -105,9 +105,13 @@ ENTRY(cpu_arm926_do_idle)
        mrc     p15, 0, r1, c1, c0, 0           @ Read control register
        mcr     p15, 0, r0, c7, c10, 4          @ Drain write buffer
        bic     r2, r1, #1 << 12
+       mrs     r3, cpsr                        @ Disable FIQs while Icache
+       orr     ip, r3, #PSR_F_BIT              @ is disabled
+       msr     cpsr_c, ip
        mcr     p15, 0, r2, c1, c0, 0           @ Disable I cache
        mcr     p15, 0, r0, c7, c0, 4           @ Wait for interrupt
        mcr     p15, 0, r1, c1, c0, 0           @ Restore ICache enable
+       msr     cpsr_c, r3                      @ Restore FIQ state
        mov     pc, lr
 
 /*
index 7888551ed93992163438f5e0b56173b09d282a0e..9f9de3e95826031eaaf08ba79ab5170bc59ce7c7 100644 (file)
@@ -295,6 +295,12 @@ config PNAV10
        help
          PNAV 1.0 board Support.
 
+config H8606_HVSISTEMAS
+        bool "HV Sistemas H8606"
+        depends on (BF532)
+        help
+          HV Sistemas H8606 board support.
+
 config GENERIC_BOARD
        bool "Custom"
        depends on (BF537 || BF536 \
@@ -317,7 +323,8 @@ config MEM_MT48LC64M4A2FB_7E
 config MEM_MT48LC16M16A2TG_75
        bool
        depends on (BFIN533_EZKIT || BFIN561_EZKIT \
-               || BFIN533_BLUETECHNIX_CM || BFIN537_BLUETECHNIX_CM)
+               || BFIN533_BLUETECHNIX_CM || BFIN537_BLUETECHNIX_CM \
+               || H8606_HVSISTEMAS)
        default y
 
 config MEM_MT48LC32M8A2_75
@@ -366,7 +373,7 @@ config CLKIN_HZ
        int "Crystal Frequency in Hz"
        default "11059200" if BFIN533_STAMP
        default "27000000" if BFIN533_EZKIT
-       default "25000000" if (BFIN537_STAMP || BFIN527_EZKIT)
+       default "25000000" if (BFIN537_STAMP || BFIN527_EZKIT || H8606_HVSISTEMAS)
        default "30000000" if BFIN561_EZKIT
        default "24576000" if PNAV10
        help
@@ -404,6 +411,7 @@ config VCO_MULT
        default "20" if BFIN537_BLUETECHNIX_CM
        default "20" if BFIN561_BLUETECHNIX_CM
        default "20" if BFIN561_EZKIT
+       default "16" if H8606_HVSISTEMAS
        help
          This controls the frequency of the on-chip PLL. This can be between 1 and 64.
          PLL Frequency = (Crystal Frequency) * (this setting)
@@ -440,6 +448,7 @@ config SCLK_DIV
        default 4 if BFIN537_BLUETECHNIX_CM
        default 4 if BFIN561_BLUETECHNIX_CM
        default 5 if BFIN561_EZKIT
+       default 3 if H8606_HVSISTEMAS
        help
          This sets the frequency of the system clock (including SDRAM or DDR).
          This can be between 1 and 15
@@ -492,11 +501,13 @@ config MEM_SIZE
        default  64 if BFIN561_EZKIT
        default 128 if BFIN533_STAMP
        default  64 if PNAV10
+       default  32 if H8606_HVSISTEMAS
 
 config MEM_ADD_WIDTH
        int "SDRAM Memory Address Width"
        default  9 if BFIN533_EZKIT
        default  9 if BFIN561_EZKIT
+       default  9 if H8606_HVSISTEMAS
        default 10 if BFIN527_EZKIT
        default 10 if BFIN537_STAMP
        default 11 if BFIN533_STAMP
index df974e785ee24f3eb226ed800a52eb41ed9e90e8..1f6a93df6b32c14e0cfbe7eba7836dd264421311 100644 (file)
@@ -244,7 +244,7 @@ CONFIG_CLKIN_HZ=25000000
 # CONFIG_BFIN_KERNEL_CLOCK is not set
 CONFIG_MAX_VCO_HZ=600000000
 CONFIG_MIN_VCO_HZ=50000000
-CONFIG_MAX_SCLK_HZ=133000000
+CONFIG_MAX_SCLK_HZ=133333333
 CONFIG_MIN_SCLK_HZ=27000000
 
 #
index 57f58d5cd47a14e5a088a541d86e9a680c678956..9e9b420342d1bbe5b8486f1741b35262e28340ec 100644 (file)
@@ -198,7 +198,7 @@ CONFIG_CLKIN_HZ=27000000
 # CONFIG_BFIN_KERNEL_CLOCK is not set
 CONFIG_MAX_VCO_HZ=750000000
 CONFIG_MIN_VCO_HZ=50000000
-CONFIG_MAX_SCLK_HZ=133000000
+CONFIG_MAX_SCLK_HZ=133333333
 CONFIG_MIN_SCLK_HZ=27000000
 
 #
index 306302baff06c4fba06c1e2cd91643482dec6cde..f59ade980109074728882c93585e084478adc06e 100644 (file)
@@ -199,7 +199,7 @@ CONFIG_CLKIN_HZ=11059200
 # CONFIG_BFIN_KERNEL_CLOCK is not set
 CONFIG_MAX_VCO_HZ=750000000
 CONFIG_MIN_VCO_HZ=50000000
-CONFIG_MAX_SCLK_HZ=133000000
+CONFIG_MAX_SCLK_HZ=133333333
 CONFIG_MIN_SCLK_HZ=27000000
 
 #
index 828b604438eb153ebb861c8849823ee0bb698681..07eb63dc25e0d604776bf2f458e520b87edd854a 100644 (file)
@@ -206,7 +206,7 @@ CONFIG_CLKIN_HZ=25000000
 # CONFIG_BFIN_KERNEL_CLOCK is not set
 CONFIG_MAX_VCO_HZ=600000000
 CONFIG_MIN_VCO_HZ=50000000
-CONFIG_MAX_SCLK_HZ=133000000
+CONFIG_MAX_SCLK_HZ=133333333
 CONFIG_MIN_SCLK_HZ=27000000
 
 #
index d8569888a1c84a6abf82c5951eba18f096bc83fa..0dd3d2253dc26519bdac1af0e57e733c47ddfe44 100644 (file)
@@ -1,6 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.22.6
+# Linux kernel version: 2.6.22.10
+# Sat Oct 27 02:34:07 2007
 #
 # CONFIG_MMU is not set
 # CONFIG_FPU is not set
@@ -64,7 +65,6 @@ CONFIG_FUTEX=y
 CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
-CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3
@@ -117,6 +117,9 @@ CONFIG_PREEMPT_VOLUNTARY=y
 #
 # Processor and Board Settings
 #
+# CONFIG_BF522 is not set
+# CONFIG_BF525 is not set
+# CONFIG_BF527 is not set
 # CONFIG_BF531 is not set
 # CONFIG_BF532 is not set
 # CONFIG_BF533 is not set
@@ -129,6 +132,7 @@ CONFIG_PREEMPT_VOLUNTARY=y
 CONFIG_BF549=y
 # CONFIG_BF561 is not set
 CONFIG_BF_REV_0_0=y
+# CONFIG_BF_REV_0_1 is not set
 # CONFIG_BF_REV_0_2 is not set
 # CONFIG_BF_REV_0_3 is not set
 # CONFIG_BF_REV_0_4 is not set
@@ -137,6 +141,7 @@ CONFIG_BF_REV_0_0=y
 # CONFIG_BF_REV_NONE is not set
 CONFIG_BF54x=y
 CONFIG_BFIN_SINGLE_CORE=y
+# CONFIG_BFIN527_EZKIT is not set
 # CONFIG_BFIN533_EZKIT is not set
 # CONFIG_BFIN533_STAMP is not set
 # CONFIG_BFIN537_STAMP is not set
@@ -147,8 +152,23 @@ CONFIG_BFIN548_EZKIT=y
 # CONFIG_BFIN561_EZKIT is not set
 # CONFIG_BFIN561_TEPLA is not set
 # CONFIG_PNAV10 is not set
+# CONFIG_H8606_HVSISTEMAS is not set
 # CONFIG_GENERIC_BOARD is not set
 CONFIG_IRQ_PLL_WAKEUP=7
+CONFIG_IRQ_RTC=8
+CONFIG_IRQ_SPORT0_RX=9
+CONFIG_IRQ_SPORT0_TX=9
+CONFIG_IRQ_SPORT1_RX=9
+CONFIG_IRQ_SPORT1_TX=9
+CONFIG_IRQ_UART0_RX=10
+CONFIG_IRQ_UART0_TX=10
+CONFIG_IRQ_UART1_RX=10
+CONFIG_IRQ_UART1_TX=10
+CONFIG_IRQ_CNT=8
+CONFIG_IRQ_USB_INT0=11
+CONFIG_IRQ_USB_INT1=11
+CONFIG_IRQ_USB_INT2=11
+CONFIG_IRQ_USB_DMA=11
 CONFIG_IRQ_TIMER0=11
 CONFIG_IRQ_TIMER1=11
 CONFIG_IRQ_TIMER2=11
@@ -160,15 +180,6 @@ CONFIG_IRQ_TIMER7=11
 CONFIG_IRQ_TIMER8=11
 CONFIG_IRQ_TIMER9=11
 CONFIG_IRQ_TIMER10=11
-CONFIG_IRQ_RTC=8
-CONFIG_IRQ_SPORT0_RX=9
-CONFIG_IRQ_SPORT0_TX=9
-CONFIG_IRQ_SPORT1_RX=9
-CONFIG_IRQ_SPORT1_TX=9
-CONFIG_IRQ_UART0_RX=10
-CONFIG_IRQ_UART0_TX=10
-CONFIG_IRQ_UART1_RX=10
-CONFIG_IRQ_UART1_TX=10
 
 #
 # BF548 Specific Configuration
@@ -236,16 +247,11 @@ CONFIG_IRQ_PIXC_IN0=8
 CONFIG_IRQ_PIXC_IN1=8
 CONFIG_IRQ_PIXC_OUT=8
 CONFIG_IRQ_SDH=8
-CONFIG_IRQ_CNT=8
 CONFIG_IRQ_KEY=8
 CONFIG_IRQ_CAN1_RX=11
 CONFIG_IRQ_CAN1_TX=11
 CONFIG_IRQ_SDH_MASK0=11
 CONFIG_IRQ_SDH_MASK1=11
-CONFIG_IRQ_USB_INT0=11
-CONFIG_IRQ_USB_INT1=11
-CONFIG_IRQ_USB_INT2=11
-CONFIG_IRQ_USB_DMA=11
 CONFIG_IRQ_OTPSEC=11
 CONFIG_IRQ_PINT2=11
 CONFIG_IRQ_PINT3=11
@@ -273,9 +279,9 @@ CONFIG_PINT3_ASSIGN=0x02020303
 #
 CONFIG_CLKIN_HZ=25000000
 # CONFIG_BFIN_KERNEL_CLOCK is not set
-CONFIG_MAX_VCO_HZ=533000000
+CONFIG_MAX_VCO_HZ=533333333
 CONFIG_MIN_VCO_HZ=50000000
-CONFIG_MAX_SCLK_HZ=133000000
+CONFIG_MAX_SCLK_HZ=133333333
 CONFIG_MIN_SCLK_HZ=27000000
 
 #
@@ -332,9 +338,10 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_LARGE_ALLOCS=y
+# CONFIG_BFIN_GPTIMERS is not set
 CONFIG_BFIN_DMA_5XX=y
-# CONFIG_DMA_UNCACHED_2M is not set
-CONFIG_DMA_UNCACHED_1M=y
+CONFIG_DMA_UNCACHED_2M=y
+# CONFIG_DMA_UNCACHED_1M is not set
 # CONFIG_DMA_UNCACHED_NONE is not set
 
 #
@@ -353,7 +360,7 @@ CONFIG_L1_MAX_PIECE=16
 #
 
 #
-# EBIU_AMBCTL Global Control
+# EBIU_AMGCTL Global Control
 #
 CONFIG_C_AMCKEN=y
 # CONFIG_C_AMBEN is not set
@@ -722,7 +729,7 @@ CONFIG_NETDEV_10000=y
 #
 # Input device support
 #
-CONFIG_INPUT=y
+CONFIG_INPUT=m
 # CONFIG_INPUT_FF_MEMLESS is not set
 # CONFIG_INPUT_POLLDEV is not set
 
@@ -731,18 +738,39 @@ CONFIG_INPUT=y
 #
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-# CONFIG_INPUT_EVDEV is not set
-# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_TSDEV=m
+CONFIG_INPUT_TSDEV_SCREEN_X=240
+CONFIG_INPUT_TSDEV_SCREEN_Y=320
+CONFIG_INPUT_EVDEV=m
+CONFIG_INPUT_EVBUG=m
 
 #
 # Input Device Drivers
 #
-# CONFIG_INPUT_KEYBOARD is not set
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_GPIO is not set
+CONFIG_KEYBOARD_BFIN=m
 # CONFIG_INPUT_MOUSE is not set
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TABLET is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
+CONFIG_TOUCHSCREEN_AD7877=m
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
 CONFIG_INPUT_MISC=y
 # CONFIG_INPUT_ATI_REMOTE is not set
 # CONFIG_INPUT_ATI_REMOTE2 is not set
@@ -764,9 +792,9 @@ CONFIG_INPUT_MISC=y
 #
 # CONFIG_AD9960 is not set
 # CONFIG_SPI_ADC_BF533 is not set
-# CONFIG_BFIN_PFLAGS is not set
+# CONFIG_BF5xx_PFLAGS is not set
 # CONFIG_BF5xx_PPIFCD is not set
-# CONFIG_BF5xx_TIMERS is not set
+# CONFIG_BFIN_SIMPLE_TIMER is not set
 # CONFIG_BF5xx_PPI is not set
 # CONFIG_BFIN_SPORT is not set
 # CONFIG_BFIN_TIMER_LATENCY is not set
@@ -958,17 +986,92 @@ CONFIG_DAB=y
 #
 # CONFIG_DISPLAY_SUPPORT is not set
 # CONFIG_VGASTATE is not set
-# CONFIG_FB is not set
+CONFIG_FB=m
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=m
+CONFIG_FB_CFB_COPYAREA=m
+CONFIG_FB_CFB_IMAGEBLIT=m
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+CONFIG_FB_DEFERRED_IO=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_BFIN_7171 is not set
+# CONFIG_FB_BFIN_7393 is not set
+CONFIG_FB_BF54X_LQ043=m
+# CONFIG_FB_BFIN_T350MCQB is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_LOGO is not set
 
 #
 # Sound
 #
-# CONFIG_SOUND is not set
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA Blackfin devices
+#
+# CONFIG_SND_BLACKFIN_AD1836 is not set
+# CONFIG_SND_BFIN_AD73311 is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC_AC97_BUS=y
+CONFIG_SND_SOC=y
+CONFIG_SND_BF5XX_SOC=y
+CONFIG_SND_BF5XX_SOC_AC97=y
+CONFIG_SND_BF5XX_SOC_BF548_EZKIT=y
+CONFIG_SND_BF5XX_SPORT_NUM=0
+# CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set
+CONFIG_SND_SOC_AD1980=y
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=y
 
 #
 # HID Devices
 #
-CONFIG_HID=y
+CONFIG_HID=m
 # CONFIG_HID_DEBUG is not set
 
 #
@@ -1101,8 +1204,13 @@ CONFIG_EXT2_FS=y
 CONFIG_EXT2_FS_XATTR=y
 # CONFIG_EXT2_FS_POSIX_ACL is not set
 # CONFIG_EXT2_FS_SECURITY is not set
-# CONFIG_EXT3_FS is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
 # CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
@@ -1123,15 +1231,22 @@ CONFIG_DNOTIFY=y
 #
 # CD-ROM/DVD Filesystems
 #
-# CONFIG_ISO9660_FS is not set
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
 # CONFIG_UDF_FS is not set
 
 #
 # DOS/FAT/NT Filesystems
 #
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
-# CONFIG_NTFS_FS is not set
+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=y
 
 #
 # Pseudo filesystems
@@ -1183,10 +1298,33 @@ CONFIG_JFFS2_RTIME=y
 #
 # Network File Systems
 #
-# CONFIG_NFS_FS is not set
-# CONFIG_NFSD is not set
-# CONFIG_SMB_FS is not set
-# CONFIG_CIFS is not set
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="cp437"
+CONFIG_CIFS=y
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
@@ -1195,13 +1333,68 @@ CONFIG_JFFS2_RTIME=y
 #
 # Partition Types
 #
-# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
 CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
 
 #
 # Native Language Support
 #
-# CONFIG_NLS is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+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
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
 
 #
 # Distributed Lock Manager
index 85e647f877590de234fb67f94b46d775620f407a..277d72dac0f9dae54a6c8939c02e5331eb313533 100644 (file)
@@ -243,7 +243,7 @@ CONFIG_CLKIN_HZ=30000000
 # CONFIG_BFIN_KERNEL_CLOCK is not set
 CONFIG_MAX_VCO_HZ=600000000
 CONFIG_MIN_VCO_HZ=50000000
-CONFIG_MAX_SCLK_HZ=133000000
+CONFIG_MAX_SCLK_HZ=133333333
 CONFIG_MIN_SCLK_HZ=27000000
 
 #
index 15e36aaf21865d49e24cbf30aa1dfcd6761a842f..3d403e0b82c21b6487cc99e7e5e88550302b7d81 100644 (file)
@@ -204,7 +204,7 @@ CONFIG_CLKIN_HZ=24576000
 # CONFIG_BFIN_KERNEL_CLOCK is not set
 CONFIG_MAX_VCO_HZ=600000000
 CONFIG_MIN_VCO_HZ=50000000
-CONFIG_MAX_SCLK_HZ=133000000
+CONFIG_MAX_SCLK_HZ=133333333
 CONFIG_MIN_SCLK_HZ=27000000
 
 #
index 65c5ba4260b0042d078aac225960eedf48acef3f..65f4e67a65c4c0c3f0a8d2ad31ca12bee231e6ea 100644 (file)
@@ -54,9 +54,11 @@ ENTRY(_ret_from_fork)
        [sp + PT_IPEND] = r0;
        /* do a 'fake' RTI by jumping to [RETI]
         * to avoid clearing supervisor mode in child
-       */
+        */
+       r0 = [sp + PT_PC];
+       [sp + PT_P0] = r0;
+
        RESTORE_ALL_SYS
-       p0 = reti;
        jump (p0);
 ENDPROC(_ret_from_fork)
 
index d8b1ebc7099684d1dd46fea05cf4d94186fcd7df..90262691b11a299993108608e0ad63d19feb0a63 100644 (file)
@@ -129,4 +129,18 @@ ENTRY(_atomic_xor32)
        rts;
 ENDPROC (_atomic_ior32)
 
+.align 16
+       /*
+        * safe_user_instruction
+        * Four NOPS are enough to allow the pipeline to speculativily load
+        * execute anything it wants. After that, things have gone bad, and
+        * we are stuck - so panic. Since we might be in user space, we can't
+        * call panic, so just cause a unhandled exception, this should cause
+        * a dump of the trace buffer so we can tell were we are, and a reboot
+        */
+ENTRY(_safe_user_instruction)
+       NOP; NOP; NOP; NOP;
+       EXCPT 0x4;
+ENDPROC(_safe_user_instruction)
+
 ENTRY(_fixed_code_end)
index cb7ba9bfc79ca55be3d6127a49d1090d98db647c..5cf4bdb1df3bffdd09bea1bd295033345fddcfc9 100644 (file)
@@ -20,8 +20,7 @@
 #else
 # define tassert(expr) \
        if (!(expr)) \
-               printk(KERN_DEBUG "%s:%s:%i: Assertion failed: " #expr "\n", \
-                       __FILE__, __func__, __LINE__);
+               printk(KERN_DEBUG "%s:%s:%i: Assertion failed: " #expr "\n", __FILE__, __func__, __LINE__);
 #endif
 
 #define BFIN_TIMER_NUM_GROUP  (BFIN_TIMER_OCTET(MAX_BLACKFIN_GPTIMERS - 1) + 1)
@@ -70,7 +69,7 @@ static volatile GPTIMER_group_regs *const group_regs[BFIN_TIMER_NUM_GROUP] =
 #endif
 };
 
-static uint32_t const dis_mask[MAX_BLACKFIN_GPTIMERS] =
+static uint32_t const trun_mask[MAX_BLACKFIN_GPTIMERS] =
 {
        TIMER_STATUS_TRUN0,
        TIMER_STATUS_TRUN1,
@@ -90,7 +89,27 @@ static uint32_t const dis_mask[MAX_BLACKFIN_GPTIMERS] =
 #endif
 };
 
-static uint32_t const irq_mask[MAX_BLACKFIN_GPTIMERS] =
+static uint32_t const tovf_mask[MAX_BLACKFIN_GPTIMERS] =
+{
+       TIMER_STATUS_TOVF0,
+       TIMER_STATUS_TOVF1,
+       TIMER_STATUS_TOVF2,
+#if (MAX_BLACKFIN_GPTIMERS > 3)
+       TIMER_STATUS_TOVF3,
+       TIMER_STATUS_TOVF4,
+       TIMER_STATUS_TOVF5,
+       TIMER_STATUS_TOVF6,
+       TIMER_STATUS_TOVF7,
+#endif
+#if (MAX_BLACKFIN_GPTIMERS > 8)
+       TIMER_STATUS_TOVF8,
+       TIMER_STATUS_TOVF9,
+       TIMER_STATUS_TOVF10,
+       TIMER_STATUS_TOVF11,
+#endif
+};
+
+static uint32_t const timil_mask[MAX_BLACKFIN_GPTIMERS] =
 {
        TIMER_STATUS_TIMIL0,
        TIMER_STATUS_TIMIL1,
@@ -165,17 +184,31 @@ EXPORT_SYMBOL(set_gptimer_status);
 uint16_t get_gptimer_intr(int timer_id)
 {
        tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
-       return (group_regs[BFIN_TIMER_OCTET(timer_id)]->status & irq_mask[timer_id]) ? 1 : 0;
+       return (group_regs[BFIN_TIMER_OCTET(timer_id)]->status & timil_mask[timer_id]) ? 1 : 0;
 }
 EXPORT_SYMBOL(get_gptimer_intr);
 
 void clear_gptimer_intr(int timer_id)
 {
        tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
-       group_regs[BFIN_TIMER_OCTET(timer_id)]->status = irq_mask[timer_id];
+       group_regs[BFIN_TIMER_OCTET(timer_id)]->status = timil_mask[timer_id];
 }
 EXPORT_SYMBOL(clear_gptimer_intr);
 
+uint16_t get_gptimer_over(int timer_id)
+{
+       tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
+       return (group_regs[BFIN_TIMER_OCTET(timer_id)]->status & tovf_mask[timer_id]) ? 1 : 0;
+}
+EXPORT_SYMBOL(get_gptimer_over);
+
+void clear_gptimer_over(int timer_id)
+{
+       tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
+       group_regs[BFIN_TIMER_OCTET(timer_id)]->status = tovf_mask[timer_id];
+}
+EXPORT_SYMBOL(clear_gptimer_over);
+
 void set_gptimer_config(int timer_id, uint16_t config)
 {
        tassert(timer_id < MAX_BLACKFIN_GPTIMERS);
@@ -214,7 +247,7 @@ void disable_gptimers(uint16_t mask)
        }
        for (i = 0; i < MAX_BLACKFIN_GPTIMERS; ++i)
                if (mask & (1 << i))
-                       group_regs[BFIN_TIMER_OCTET(i)]->status |= dis_mask[i];
+                       group_regs[BFIN_TIMER_OCTET(i)]->status |= trun_mask[i];
        SSYNC();
 }
 EXPORT_SYMBOL(disable_gptimers);
index f1b059e5a06cb171516804f441438011b26eaf11..934234f438390d8ddfb11c664528bfe984cc297d 100644 (file)
@@ -316,6 +316,15 @@ void __init setup_arch(char **cmdline_p)
 
        init_leds();
 
+       _bfin_swrst = bfin_read_SWRST();
+
+       if (_bfin_swrst & RESET_DOUBLE)
+               printk(KERN_INFO "Recovering from Double Fault event\n");
+       else if (_bfin_swrst & RESET_WDOG)
+               printk(KERN_INFO "Recovering from Watchdog event\n");
+       else if (_bfin_swrst & RESET_SOFTWARE)
+               printk(KERN_NOTICE "Reset caused by Software reset\n");
+
        printk(KERN_INFO "Blackfin support (C) 2004-2007 Analog Devices, Inc.\n");
        if (bfin_compiled_revid() == 0xffff)
                printk(KERN_INFO "Compiled for ADSP-%s Rev any\n", CPU);
@@ -402,8 +411,6 @@ void __init setup_arch(char **cmdline_p)
        if (l1_length > L1_DATA_A_LENGTH)
                panic("L1 data memory overflow\n");
 
-       _bfin_swrst = bfin_read_SWRST();
-
        /* Copy atomic sequences to their fixed location, and sanity check that
           these locations are the ones that we advertise to userspace.  */
        memcpy((void *)FIXED_CODE_START, &fixed_code_start,
@@ -424,6 +431,8 @@ void __init setup_arch(char **cmdline_p)
               != ATOMIC_AND32 - FIXED_CODE_START);
        BUG_ON((char *)&atomic_xor32 - (char *)&fixed_code_start
               != ATOMIC_XOR32 - FIXED_CODE_START);
+       BUG_ON((char *)&safe_user_instruction - (char *)&fixed_code_start
+               != SAFE_USER_INSTRUCTION - FIXED_CODE_START);
 
        init_exception_vectors();
        bf53x_cache_init();
index afd044e78af677ce483fe919408fd5cb98046bb3..cfa05436c9723e5f221e323b9e38ffd513730f5a 100644 (file)
 #include <asm/blackfin.h>
 #include <asm/irq_handler.h>
 #include <asm/trace.h>
+#include <asm/fixed_code.h>
 
 #ifdef CONFIG_KGDB
 # include <linux/debugger.h>
 # include <linux/kgdb.h>
+
+# define CHK_DEBUGGER_TRAP() \
+       do { \
+               CHK_DEBUGGER(trapnr, sig, info.si_code, fp, ); \
+       } while (0)
+# define CHK_DEBUGGER_TRAP_MAYBE() \
+       do { \
+               if (kgdb_connected) \
+                       CHK_DEBUGGER_TRAP(); \
+       } while (0)
+#else
+# define CHK_DEBUGGER_TRAP() do { } while (0)
+# define CHK_DEBUGGER_TRAP_MAYBE() do { } while (0)
 #endif
 
 /* Initiate the event table handler */
@@ -53,13 +67,13 @@ void __init trap_init(void)
 
 int kstack_depth_to_print = 48;
 
-#ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
-static int printk_address(unsigned long address)
+static void decode_address(char *buf, unsigned long address)
 {
        struct vm_list_struct *vml;
        struct task_struct *p;
        struct mm_struct *mm;
-       unsigned long offset;
+       unsigned long flags, offset;
+       unsigned int in_exception = bfin_read_IPEND() & 0x10;
 
 #ifdef CONFIG_KALLSYMS
        unsigned long symsize;
@@ -75,20 +89,33 @@ static int printk_address(unsigned long address)
                /* yeah! kernel space! */
                if (!modname)
                        modname = delim = "";
-               return printk("<0x%p> { %s%s%s%s + 0x%lx }",
+               sprintf(buf, "<0x%p> { %s%s%s%s + 0x%lx }",
                              (void *)address, delim, modname, delim, symname,
                              (unsigned long)offset);
+               return;
 
        }
 #endif
 
+       /* Problem in fixed code section? */
+       if (address >= FIXED_CODE_START && address < FIXED_CODE_END) {
+               sprintf(buf, "<0x%p> /* Maybe fixed code section */", (void *)address);
+               return;
+       }
+
+       /* Problem somewhere before the kernel start address */
+       if (address < CONFIG_BOOT_LOAD) {
+               sprintf(buf, "<0x%p> /* Maybe null pointer? */", (void *)address);
+               return;
+       }
+
        /* looks like we're off in user-land, so let's walk all the
         * mappings of all our processes and see if we can't be a whee
         * bit more specific
         */
-       write_lock_irq(&tasklist_lock);
+       write_lock_irqsave(&tasklist_lock, flags);
        for_each_process(p) {
-               mm = get_task_mm(p);
+               mm = (in_exception ? p->mm : get_task_mm(p));
                if (!mm)
                        continue;
 
@@ -117,25 +144,30 @@ static int printk_address(unsigned long address)
                                else
                                        offset = (address - vma->vm_start) + (vma->vm_pgoff << PAGE_SHIFT);
 
-                               write_unlock_irq(&tasklist_lock);
-                               mmput(mm);
-                               return printk("<0x%p> [ %s + 0x%lx ]",
-                                             (void *)address, name, offset);
+                               sprintf(buf, "<0x%p> [ %s + 0x%lx ]",
+                                       (void *)address, name, offset);
+                               if (!in_exception)
+                                       mmput(mm);
+                               goto done;
                        }
 
                        vml = vml->next;
                }
-               mmput(mm);
+               if (!in_exception)
+                       mmput(mm);
        }
-       write_unlock_irq(&tasklist_lock);
 
        /* we were unable to find this address anywhere */
-       return printk("[<0x%p>]", (void *)address);
+       sprintf(buf, "[<0x%p>]", (void *)address);
+
+done:
+       write_unlock_irqrestore(&tasklist_lock, flags);
 }
-#endif
 
 asmlinkage void double_fault_c(struct pt_regs *fp)
 {
+       console_verbose();
+       oops_in_progress = 1;
        printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n");
        dump_bfin_regs(fp, (void *)fp->retx);
        panic("Double Fault - unrecoverable event\n");
@@ -151,22 +183,29 @@ asmlinkage void trap_c(struct pt_regs *fp)
        siginfo_t info;
        unsigned long trapnr = fp->seqstat & SEQSTAT_EXCAUSE;
 
+       trace_buffer_save(j);
+
+       /* Important - be very careful dereferncing pointers - will lead to
+        * double faults if the stack has become corrupt
+        */
+
+       /* If the fault was caused by a kernel thread, or interrupt handler
+        * we will kernel panic, so the system reboots.
+        * If KGDB is enabled, don't set this for kernel breakpoints
+       */
+       if ((bfin_read_IPEND() & 0xFFC0)
 #ifdef CONFIG_KGDB
-# define CHK_DEBUGGER_TRAP() \
-       do { \
-               CHK_DEBUGGER(trapnr, sig, info.si_code, fp, ); \
-       } while (0)
-# define CHK_DEBUGGER_TRAP_MAYBE() \
-       do { \
-               if (kgdb_connected) \
-                       CHK_DEBUGGER_TRAP(); \
-       } while (0)
-#else
-# define CHK_DEBUGGER_TRAP() do { } while (0)
-# define CHK_DEBUGGER_TRAP_MAYBE() do { } while (0)
+               && trapnr != VEC_EXCPT02
 #endif
-
-       trace_buffer_save(j);
+       ){
+               console_verbose();
+               oops_in_progress = 1;
+       } else if (current) {
+               if (current->mm == NULL) {
+                       console_verbose();
+                       oops_in_progress = 1;
+               }
+       }
 
        /* trap_c() will be called for exceptions. During exceptions
         * processing, the pc value should be set with retx value.
@@ -211,7 +250,7 @@ asmlinkage void trap_c(struct pt_regs *fp)
        case VEC_EXCPT03:
                info.si_code = SEGV_STACKFLOW;
                sig = SIGSEGV;
-               printk(KERN_EMERG EXC_0x03);
+               printk(KERN_NOTICE EXC_0x03);
                CHK_DEBUGGER_TRAP();
                break;
        /* 0x04 - User Defined, Caught by default */
@@ -240,7 +279,7 @@ asmlinkage void trap_c(struct pt_regs *fp)
        case VEC_OVFLOW:
                info.si_code = TRAP_TRACEFLOW;
                sig = SIGTRAP;
-               printk(KERN_EMERG EXC_0x11);
+               printk(KERN_NOTICE EXC_0x11);
                CHK_DEBUGGER_TRAP();
                break;
        /* 0x12 - Reserved, Caught by default */
@@ -262,14 +301,14 @@ asmlinkage void trap_c(struct pt_regs *fp)
        case VEC_UNDEF_I:
                info.si_code = ILL_ILLOPC;
                sig = SIGILL;
-               printk(KERN_EMERG EXC_0x21);
+               printk(KERN_NOTICE EXC_0x21);
                CHK_DEBUGGER_TRAP();
                break;
        /* 0x22 - Illegal Instruction Combination, handled here */
        case VEC_ILGAL_I:
                info.si_code = ILL_ILLPARAOP;
                sig = SIGILL;
-               printk(KERN_EMERG EXC_0x22);
+               printk(KERN_NOTICE EXC_0x22);
                CHK_DEBUGGER_TRAP();
                break;
        /* 0x23 - Data CPLB Protection Violation,
@@ -277,21 +316,21 @@ asmlinkage void trap_c(struct pt_regs *fp)
        case VEC_CPLB_VL:
                info.si_code = ILL_CPLB_VI;
                sig = SIGILL;
-               printk(KERN_EMERG EXC_0x23);
+               printk(KERN_NOTICE EXC_0x23);
                CHK_DEBUGGER_TRAP();
                break;
        /* 0x24 - Data access misaligned, handled here */
        case VEC_MISALI_D:
                info.si_code = BUS_ADRALN;
                sig = SIGBUS;
-               printk(KERN_EMERG EXC_0x24);
+               printk(KERN_NOTICE EXC_0x24);
                CHK_DEBUGGER_TRAP();
                break;
        /* 0x25 - Unrecoverable Event, handled here */
        case VEC_UNCOV:
                info.si_code = ILL_ILLEXCPT;
                sig = SIGILL;
-               printk(KERN_EMERG EXC_0x25);
+               printk(KERN_NOTICE EXC_0x25);
                CHK_DEBUGGER_TRAP();
                break;
        /* 0x26 - Data CPLB Miss, normal case is handled in _cplb_hdr,
@@ -299,7 +338,7 @@ asmlinkage void trap_c(struct pt_regs *fp)
        case VEC_CPLB_M:
                info.si_code = BUS_ADRALN;
                sig = SIGBUS;
-               printk(KERN_EMERG EXC_0x26);
+               printk(KERN_NOTICE EXC_0x26);
                CHK_DEBUGGER_TRAP();
                break;
        /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero, handled here */
@@ -307,11 +346,10 @@ asmlinkage void trap_c(struct pt_regs *fp)
                info.si_code = ILL_CPLB_MULHIT;
 #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
                sig = SIGSEGV;
-               printk(KERN_EMERG "\n"
-                       KERN_EMERG "NULL pointer access (probably)\n");
+               printk(KERN_NOTICE "NULL pointer access (probably)\n");
 #else
                sig = SIGILL;
-               printk(KERN_EMERG EXC_0x27);
+               printk(KERN_NOTICE EXC_0x27);
 #endif
                CHK_DEBUGGER_TRAP();
                break;
@@ -331,7 +369,7 @@ asmlinkage void trap_c(struct pt_regs *fp)
        case VEC_ISTRU_VL:      /* ADSP-BF535 only (MH) */
                info.si_code = BUS_OPFETCH;
                sig = SIGBUS;
-               printk(KERN_EMERG "BF535: VEC_ISTRU_VL\n");
+               printk(KERN_NOTICE "BF535: VEC_ISTRU_VL\n");
                CHK_DEBUGGER_TRAP();
                break;
 #else
@@ -341,7 +379,7 @@ asmlinkage void trap_c(struct pt_regs *fp)
        case VEC_MISALI_I:
                info.si_code = BUS_ADRALN;
                sig = SIGBUS;
-               printk(KERN_EMERG EXC_0x2A);
+               printk(KERN_NOTICE EXC_0x2A);
                CHK_DEBUGGER_TRAP();
                break;
        /* 0x2B - Instruction CPLB protection Violation,
@@ -349,14 +387,14 @@ asmlinkage void trap_c(struct pt_regs *fp)
        case VEC_CPLB_I_VL:
                info.si_code = ILL_CPLB_VI;
                sig = SIGILL;
-               printk(KERN_EMERG EXC_0x2B);
+               printk(KERN_NOTICE EXC_0x2B);
                CHK_DEBUGGER_TRAP();
                break;
        /* 0x2C - Instruction CPLB miss, handled in _cplb_hdr */
        case VEC_CPLB_I_M:
                info.si_code = ILL_CPLB_MISS;
                sig = SIGBUS;
-               printk(KERN_EMERG EXC_0x2C);
+               printk(KERN_NOTICE EXC_0x2C);
                CHK_DEBUGGER_TRAP();
                break;
        /* 0x2D - Instruction CPLB Multiple Hits, handled here */
@@ -364,10 +402,10 @@ asmlinkage void trap_c(struct pt_regs *fp)
                info.si_code = ILL_CPLB_MULHIT;
 #ifdef CONFIG_DEBUG_HUNT_FOR_ZERO
                sig = SIGSEGV;
-               printk(KERN_EMERG "\n\nJump to address 0 - 0x0fff\n");
+               printk(KERN_NOTICE "Jump to address 0 - 0x0fff\n");
 #else
                sig = SIGILL;
-               printk(KERN_EMERG EXC_0x2D);
+               printk(KERN_NOTICE EXC_0x2D);
 #endif
                CHK_DEBUGGER_TRAP();
                break;
@@ -375,7 +413,7 @@ asmlinkage void trap_c(struct pt_regs *fp)
        case VEC_ILL_RES:
                info.si_code = ILL_PRVOPC;
                sig = SIGILL;
-               printk(KERN_EMERG EXC_0x2E);
+               printk(KERN_NOTICE EXC_0x2E);
                CHK_DEBUGGER_TRAP();
                break;
        /* 0x2F - Reserved, Caught by default */
@@ -404,38 +442,40 @@ asmlinkage void trap_c(struct pt_regs *fp)
                break;
        }
 
-       if (sig != 0 && sig != SIGTRAP) {
+       BUG_ON(sig == 0);
+
+       if (sig != SIGTRAP) {
                unsigned long stack;
                dump_bfin_regs(fp, (void *)fp->retx);
-               dump_bfin_trace_buffer();
+
+               /* Print out the trace buffer if it makes sense */
+#ifndef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE
+               if (trapnr == VEC_CPLB_I_M || trapnr == VEC_CPLB_M)
+                       printk(KERN_NOTICE "No trace since you do not have "
+                               "CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE enabled\n"
+                               KERN_NOTICE "\n");
+               else
+#endif
+                       dump_bfin_trace_buffer();
                show_stack(current, &stack);
-               if (current->mm == NULL)
+               if (oops_in_progress) {
+#ifndef CONFIG_ACCESS_CHECK
+                       printk(KERN_EMERG "Hey - dork - please turn on "
+                               "CONFIG_ACCESS_CHECK\n");
+#endif
                        panic("Kernel exception");
+               }
+
+               /* Ensure that bad return addresses don't end up in an infinite
+                * loop, due to speculative loads/reads
+                */
+               fp->pc = SAFE_USER_INSTRUCTION;
        }
        info.si_signo = sig;
        info.si_errno = 0;
        info.si_addr = (void *)fp->pc;
        force_sig_info(sig, &info, current);
 
-       /* if the address that we are about to return to is not valid, set it
-        * to a valid address, if we have a current application or panic
-        */
-       if (!(fp->pc <= physical_mem_end
-#if L1_CODE_LENGTH != 0
-           || (fp->pc >= L1_CODE_START &&
-               fp->pc <= (L1_CODE_START + L1_CODE_LENGTH))
-#endif
-       )) {
-               if (current->mm) {
-                       fp->pc = current->mm->start_code;
-               } else {
-                       printk(KERN_EMERG
-                               "I can't return to memory that doesn't exist"
-                               " - bad things happen\n");
-                       panic("Help - I've fallen and can't get up\n");
-               }
-       }
-
        trace_buffer_restore(j);
        return;
 }
@@ -448,21 +488,21 @@ void dump_bfin_trace_buffer(void)
 {
 #ifdef CONFIG_DEBUG_BFIN_HWTRACE_ON
        int tflags, i = 0;
+       char buf[150];
 #ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
        int j, index;
 #endif
 
        trace_buffer_save(tflags);
 
-       printk(KERN_EMERG "Hardware Trace:\n");
+       printk(KERN_NOTICE "Hardware Trace:\n");
 
        if (likely(bfin_read_TBUFSTAT() & TBUFCNT)) {
                for (; bfin_read_TBUFSTAT() & TBUFCNT; i++) {
-                       printk(KERN_EMERG "%4i Target : ", i);
-                       printk_address((unsigned long)bfin_read_TBUF());
-                       printk("\n" KERN_EMERG "     Source : ");
-                       printk_address((unsigned long)bfin_read_TBUF());
-                       printk("\n");
+                       decode_address(buf, (unsigned long)bfin_read_TBUF());
+                       printk(KERN_NOTICE "%4i Target : %s\n", i, buf);
+                       decode_address(buf, (unsigned long)bfin_read_TBUF());
+                       printk(KERN_NOTICE "     Source : %s\n", buf);
                }
        }
 
@@ -474,17 +514,16 @@ void dump_bfin_trace_buffer(void)
 
        j = (1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN) * 128;
        while (j) {
-               printk(KERN_EMERG "%4i Target : ", i);
-               printk_address(software_trace_buff[index]);
+               decode_address(buf, software_trace_buff[index]);
+               printk(KERN_NOTICE "%4i Target : %s\n", i, buf);
                index -= 1;
                if (index < 0 )
                        index = EXPAND_LEN;
-               printk("\n" KERN_EMERG "     Source : ");
-               printk_address(software_trace_buff[index]);
+               decode_address(buf, software_trace_buff[index]);
+               printk(KERN_NOTICE "     Source : %s\n", buf);
                index -= 1;
                if (index < 0)
                        index = EXPAND_LEN;
-               printk("\n");
                j--;
                i++;
        }
@@ -499,10 +538,7 @@ static void show_trace(struct task_struct *tsk, unsigned long *sp)
 {
        unsigned long addr;
 
-       printk("\nCall Trace:");
-#ifdef CONFIG_KALLSYMS
-       printk("\n");
-#endif
+       printk(KERN_NOTICE "\n" KERN_NOTICE "Call Trace:\n");
 
        while (!kstack_end(sp)) {
                addr = *sp++;
@@ -518,7 +554,7 @@ static void show_trace(struct task_struct *tsk, unsigned long *sp)
                        print_ip_sym(addr);
        }
 
-       printk("\n");
+       printk(KERN_NOTICE "\n");
 }
 
 void show_stack(struct task_struct *task, unsigned long *stack)
@@ -540,14 +576,15 @@ void show_stack(struct task_struct *task, unsigned long *stack)
        addr = (unsigned long)stack;
        endstack = (unsigned long *)PAGE_ALIGN(addr);
 
-       printk(KERN_EMERG "Stack from %08lx:", (unsigned long)stack);
+       printk(KERN_NOTICE "Stack from %08lx:", (unsigned long)stack);
        for (i = 0; i < kstack_depth_to_print; i++) {
                if (stack + 1 > endstack)
                        break;
                if (i % 8 == 0)
-                       printk("\n" KERN_EMERG "       ");
+                       printk("\n" KERN_NOTICE "       ");
                printk(" %08lx", *stack++);
        }
+       printk("\n");
 
        show_trace(task, stack);
 }
@@ -568,33 +605,34 @@ EXPORT_SYMBOL(dump_stack);
 
 void dump_bfin_regs(struct pt_regs *fp, void *retaddr)
 {
-       if (current->pid) {
-               printk(KERN_EMERG "\n" KERN_EMERG "CURRENT PROCESS:\n"
-                       KERN_EMERG "\n");
-               printk(KERN_EMERG "COMM=%s PID=%d\n",
-                       current->comm, current->pid);
+       char buf [150];
+
+       if (!oops_in_progress) {
+               if (current->pid && current->mm) {
+                       printk(KERN_NOTICE "\n" KERN_NOTICE "CURRENT PROCESS:\n");
+                       printk(KERN_NOTICE "COMM=%s PID=%d\n",
+                               current->comm, current->pid);
+
+                       printk(KERN_NOTICE "TEXT = 0x%p-0x%p  DATA = 0x%p-0x%p\n"
+                               KERN_NOTICE "BSS = 0x%p-0x%p   USER-STACK = 0x%p\n"
+                               KERN_NOTICE "\n",
+                               (void *)current->mm->start_code,
+                               (void *)current->mm->end_code,
+                               (void *)current->mm->start_data,
+                               (void *)current->mm->end_data,
+                               (void *)current->mm->end_data,
+                               (void *)current->mm->brk,
+                               (void *)current->mm->start_stack);
+               } else {
+                       printk (KERN_NOTICE "\n" KERN_NOTICE
+                            "No Valid pid - Either things are really messed up,"
+                            " or you are in the kernel\n");
+               }
        } else {
-               printk
-                   (KERN_EMERG "\n" KERN_EMERG
-                    "No Valid pid - Either things are really messed up,"
-                    " or you are in the kernel\n");
-       }
-
-       if (current->mm) {
-               printk(KERN_EMERG "TEXT = 0x%p-0x%p  DATA = 0x%p-0x%p\n"
-                      KERN_EMERG "BSS = 0x%p-0x%p   USER-STACK = 0x%p\n"
-                      KERN_EMERG "\n",
-                      (void *)current->mm->start_code,
-                      (void *)current->mm->end_code,
-                      (void *)current->mm->start_data,
-                      (void *)current->mm->end_data,
-                      (void *)current->mm->end_data,
-                      (void *)current->mm->brk,
-                      (void *)current->mm->start_stack);
+               printk(KERN_NOTICE "Kernel or interrupt exception\n");
        }
 
-       printk(KERN_EMERG "return address: [0x%p]; contents of:", retaddr);
-       if (retaddr != 0 && retaddr <= (void *)physical_mem_end
+       if (retaddr >= (void *)FIXED_CODE_START  && retaddr < (void *)physical_mem_end
 #if L1_CODE_LENGTH != 0
            /* FIXME: Copy the code out of L1 Instruction SRAM through dma
               memcpy.  */
@@ -604,18 +642,20 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr)
        ) {
                int i = ((unsigned int)retaddr & 0xFFFFFFF0) - 32;
                unsigned short x = 0;
+               printk(KERN_NOTICE "return address: [0x%p]; contents of:", retaddr);
                for (; i < ((unsigned int)retaddr & 0xFFFFFFF0) + 32; i += 2) {
                        if (!(i & 0xF))
-                               printk("\n" KERN_EMERG "0x%08x: ", i);
+                               printk("\n" KERN_NOTICE "0x%08x: ", i);
 
                        if (get_user(x, (unsigned short *)i))
                                break;
 #ifndef CONFIG_DEBUG_HWERR
                        /* If one of the last few instructions was a STI
                         * it is likely that the error occured awhile ago
-                        * and we just noticed
+                        * and we just noticed. This only happens in kernel
+                        * context, which should mean an oops is happening
                         */
-                       if (x >= 0x0040 && x <= 0x0047 && i <= 0)
+                       if (oops_in_progress && x >= 0x0040 && x <= 0x0047 && i <= 0)
                                panic("\n\nWARNING : You should reconfigure"
                                        " the kernel to turn on\n"
                                        " 'Hardware error interrupt"
@@ -628,56 +668,60 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr)
                        else
                                printk(" %04x ", x);
                }
-               printk("\n" KERN_EMERG "\n");
+               printk("\n");
        } else
-               printk(KERN_EMERG
+               printk("\n" KERN_NOTICE
                        "Cannot look at the [PC] for it is"
-                       "in unreadable L1 SRAM - sorry\n");
+                       " in unreadable memory - sorry\n");
+
+       printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\n");
+       printk(KERN_NOTICE " SEQSTAT: %08lx  IPEND: %04lx  SYSCFG: %04lx\n",
+               (long)fp->seqstat, fp->ipend, fp->syscfg);
 
+       decode_address(buf, fp->rete);
+       printk(KERN_NOTICE " RETE: %s\n", buf);
+       decode_address(buf, fp->retn);
+       printk(KERN_NOTICE " RETN: %s\n", buf);
+       decode_address(buf, fp->retx);
+       printk(KERN_NOTICE " RETX: %s\n", buf);
+       decode_address(buf, fp->rets);
+       printk(KERN_NOTICE " RETS: %s\n", buf);
 
-       printk(KERN_EMERG
-               "RETE:  %08lx  RETN: %08lx  RETX: %08lx  RETS: %08lx\n",
-               fp->rete, fp->retn, fp->retx, fp->rets);
-       printk(KERN_EMERG "IPEND: %04lx  SYSCFG: %04lx\n",
-               fp->ipend, fp->syscfg);
-       printk(KERN_EMERG "SEQSTAT: %08lx    SP: %08lx\n",
-               (long)fp->seqstat, (long)fp);
-       printk(KERN_EMERG "R0: %08lx    R1: %08lx    R2: %08lx    R3: %08lx\n",
+       if ((long)fp->seqstat & SEQSTAT_EXCAUSE) {
+               decode_address(buf, bfin_read_DCPLB_FAULT_ADDR());
+               printk(KERN_NOTICE "DCPLB_FAULT_ADDR: %s\n", buf);
+               decode_address(buf, bfin_read_ICPLB_FAULT_ADDR());
+               printk(KERN_NOTICE "ICPLB_FAULT_ADDR: %s\n", buf);
+       }
+
+       printk(KERN_NOTICE "\n" KERN_NOTICE "PROCESSOR STATE:\n");
+       printk(KERN_NOTICE " R0 : %08lx    R1 : %08lx    R2 : %08lx    R3 : %08lx\n",
                fp->r0, fp->r1, fp->r2, fp->r3);
-       printk(KERN_EMERG "R4: %08lx    R5: %08lx    R6: %08lx    R7: %08lx\n",
+       printk(KERN_NOTICE " R4 : %08lx    R5 : %08lx    R6 : %08lx    R7 : %08lx\n",
                fp->r4, fp->r5, fp->r6, fp->r7);
-       printk(KERN_EMERG "P0: %08lx    P1: %08lx    P2: %08lx    P3: %08lx\n",
+       printk(KERN_NOTICE " P0 : %08lx    P1 : %08lx    P2 : %08lx    P3 : %08lx\n",
                fp->p0, fp->p1, fp->p2, fp->p3);
-       printk(KERN_EMERG
-               "P4: %08lx    P5: %08lx    FP: %08lx\n",
-               fp->p4, fp->p5, fp->fp);
-       printk(KERN_EMERG
-               "A0.w: %08lx    A0.x: %08lx    A1.w: %08lx    A1.x: %08lx\n",
-               fp->a0w, fp->a0x, fp->a1w, fp->a1x);
-
-       printk(KERN_EMERG "LB0: %08lx  LT0: %08lx  LC0: %08lx\n",
+       printk(KERN_NOTICE " P4 : %08lx    P5 : %08lx    FP : %08lx    SP : %08lx\n",
+               fp->p4, fp->p5, fp->fp, (long)fp);
+       printk(KERN_NOTICE " LB0: %08lx    LT0: %08lx    LC0: %08lx\n",
                fp->lb0, fp->lt0, fp->lc0);
-       printk(KERN_EMERG "LB1: %08lx  LT1: %08lx  LC1: %08lx\n",
+       printk(KERN_NOTICE " LB1: %08lx    LT1: %08lx    LC1: %08lx\n",
                fp->lb1, fp->lt1, fp->lc1);
-       printk(KERN_EMERG "B0: %08lx  L0: %08lx  M0: %08lx  I0: %08lx\n",
+       printk(KERN_NOTICE " B0 : %08lx    L0 : %08lx    M0 : %08lx    I0 : %08lx\n",
                fp->b0, fp->l0, fp->m0, fp->i0);
-       printk(KERN_EMERG "B1: %08lx  L1: %08lx  M1: %08lx  I1: %08lx\n",
+       printk(KERN_NOTICE " B1 : %08lx    L1 : %08lx    M1 : %08lx    I1 : %08lx\n",
                fp->b1, fp->l1, fp->m1, fp->i1);
-       printk(KERN_EMERG "B2: %08lx  L2: %08lx  M2: %08lx  I2: %08lx\n",
+       printk(KERN_NOTICE " B2 : %08lx    L2 : %08lx    M2 : %08lx    I2 : %08lx\n",
                fp->b2, fp->l2, fp->m2, fp->i2);
-       printk(KERN_EMERG "B3: %08lx  L3: %08lx  M3: %08lx  I3: %08lx\n",
+       printk(KERN_NOTICE " B3 : %08lx    L3 : %08lx    M3 : %08lx    I3 : %08lx\n",
                fp->b3, fp->l3, fp->m3, fp->i3);
+       printk(KERN_NOTICE "A0.w: %08lx   A0.x: %08lx   A1.w: %08lx   A1.x: %08lx\n",
+               fp->a0w, fp->a0x, fp->a1w, fp->a1x);
 
-       printk(KERN_EMERG "\n" KERN_EMERG "USP: %08lx   ASTAT: %08lx\n",
+       printk(KERN_NOTICE "USP : %08lx  ASTAT: %08lx\n",
                rdusp(), fp->astat);
-       if ((long)fp->seqstat & SEQSTAT_EXCAUSE) {
-               printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n",
-                       (void *)bfin_read_DCPLB_FAULT_ADDR());
-               printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n",
-                       (void *)bfin_read_ICPLB_FAULT_ADDR());
-       }
 
-       printk("\n\n");
+       printk(KERN_NOTICE "\n");
 }
 
 #ifdef CONFIG_SYS_BFIN_SPINLOCK_L1
@@ -752,6 +796,8 @@ void panic_cplb_error(int cplb_panic, struct pt_regs *fp)
                break;
        }
 
+       oops_in_progress = 1;
+
        printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", (void *)bfin_read_DCPLB_FAULT_ADDR());
        printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", (void *)bfin_read_ICPLB_FAULT_ADDR());
        dump_bfin_regs(fp, (void *)fp->retx);
index eec43674a46589a05411566d009ccc585e699904..9b75bc83c71fac9847cd8e0f578183dbfb87115c 100644 (file)
@@ -172,9 +172,14 @@ SECTIONS
                __ebss_b_l1 = .;
        }
 
-       ___init_end = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
-
-       .bss LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1) :
+       /* Force trailing alignment of our init section so that when we
+        * free our init memory, we don't leave behind a partial page.
+        */
+       . = LOADADDR(.data_b_l1) + SIZEOF(.data_b_l1);
+       . = ALIGN(PAGE_SIZE);
+       ___init_end = .;
+
+       .bss :
        {
                . = ALIGN(4);
                ___bss_start = .;
index 3e884f3a8182ff1f4e02ef6847627ed7831b9bf1..bf1bedcc886886894162e48ffdf6c083ff9348c5 100644 (file)
 #include <linux/irq.h>
 #include <linux/interrupt.h>
 #include <linux/usb_sl811.h>
+#include <asm/cplb.h>
 #include <asm/dma.h>
 #include <asm/bfin5xx_spi.h>
 #include <asm/reboot.h>
+#include <asm/nand.h>
 #include <linux/spi/ad7877.h>
 
 /*
@@ -102,6 +104,53 @@ void __exit bfin_isp1761_exit(void)
 arch_initcall(bfin_isp1761_init);
 #endif
 
+#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
+static struct mtd_partition partition_info[] = {
+       {
+               .name = "Linux Kernel",
+               .offset = 0,
+               .size = 4 * SIZE_1M,
+       },
+       {
+               .name = "File System",
+               .offset = 4 * SIZE_1M,
+               .size = (256 - 4) * SIZE_1M,
+       },
+};
+
+static struct bf5xx_nand_platform bf5xx_nand_platform = {
+       .page_size = NFC_PG_SIZE_256,
+       .data_width = NFC_NWIDTH_8,
+       .partitions = partition_info,
+       .nr_partitions = ARRAY_SIZE(partition_info),
+       .rd_dly = 3,
+       .wr_dly = 3,
+};
+
+static struct resource bf5xx_nand_resources[] = {
+       {
+               .start = NFC_CTL,
+               .end = NFC_DATA_RD + 2,
+               .flags = IORESOURCE_MEM,
+       },
+       {
+               .start = CH_NFC,
+               .end = CH_NFC,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device bf5xx_nand_device = {
+       .name = "bf5xx-nand",
+       .id = 0,
+       .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
+       .resource = bf5xx_nand_resources,
+       .dev = {
+               .platform_data = &bf5xx_nand_platform,
+       },
+};
+#endif
+
 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
 static struct resource bfin_pcmcia_cf_resources[] = {
        {
@@ -650,6 +699,10 @@ static struct platform_device bfin_pata_device = {
 #endif
 
 static struct platform_device *stamp_devices[] __initdata = {
+#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
+       &bf5xx_nand_device,
+#endif
+
 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
        &bfin_pcmcia_cf_device,
 #endif
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c
new file mode 100644 (file)
index 0000000..b941550
--- /dev/null
@@ -0,0 +1,345 @@
+/*
+ * File:         arch/blackfin/mach-bf533/H8606.c
+ * Based on:     arch/blackfin/mach-bf533/stamp.c
+ * Author:       Javier Herrero <jherrero@hvsistemas.es>
+ *
+ * Created:      2007
+ * Description:  Board Info File for the HV Sistemas H8606 board
+ *
+ * Modified:
+ *               Copyright 2005 National ICT Australia (NICTA)
+ *               Copyright 2004-2006 Analog Devices Inc
+ *              Copyright 2007 HV Sistemas S.L.
+ *
+ * Bugs:         Enter bugs at http://blackfin.uclinux.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 program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see the file COPYING, or write
+ * to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <linux/device.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/flash.h>
+#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
+#include <linux/usb_isp1362.h>
+#endif
+#include <linux/pata_platform.h>
+#include <linux/irq.h>
+#include <asm/dma.h>
+#include <asm/bfin5xx_spi.h>
+#include <asm/reboot.h>
+
+/*
+ * Name the Board for the /proc/cpuinfo
+ */
+const char bfin_board_name[] = "HV Sistemas H8606";
+
+#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_BFIN_MODULE)
+static struct platform_device rtc_device = {
+       .name = "rtc-bfin",
+       .id   = -1,
+};
+#endif
+
+/*
+*  Driver needs to know address, irq and flag pin.
+ */
+ #if   defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
+static struct resource dm9000_resources[] = {
+       [0] = {
+               .start  = 0x20300000,
+               .end    = 0x20300000 + 8,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = IRQ_PF10,
+               .end    = IRQ_PF10,
+               .flags  = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
+       },
+};
+
+static struct platform_device dm9000_device = {
+    .id                        = 0,
+    .name              = "dm9000",
+    .resource          = dm9000_resources,
+    .num_resources     = ARRAY_SIZE(dm9000_resources),
+};
+#endif
+
+#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
+static struct resource smc91x_resources[] = {
+       {
+               .name = "smc91x-regs",
+               .start = 0x20300300,
+               .end = 0x20300300 + 16,
+               .flags = IORESOURCE_MEM,
+       }, {
+               .start = IRQ_PROG_INTB,
+               .end = IRQ_PROG_INTB,
+               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
+       }, {
+               /*
+                *  denotes the flag pin and is used directly if
+                *  CONFIG_IRQCHIP_DEMUX_GPIO is defined.
+                */
+               .start = IRQ_PF7,
+               .end = IRQ_PF7,
+               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
+       },
+};
+
+static struct platform_device smc91x_device = {
+       .name = "smc91x",
+       .id = 0,
+       .num_resources = ARRAY_SIZE(smc91x_resources),
+       .resource = smc91x_resources,
+};
+#endif
+
+#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
+static struct resource net2272_bfin_resources[] = {
+       {
+               .start = 0x20300000,
+               .end = 0x20300000 + 0x100,
+               .flags = IORESOURCE_MEM,
+       }, {
+               .start = IRQ_PF10,
+               .end = IRQ_PF10,
+               .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
+       },
+};
+
+static struct platform_device net2272_bfin_device = {
+       .name = "net2272",
+       .id = -1,
+       .num_resources = ARRAY_SIZE(net2272_bfin_resources),
+       .resource = net2272_bfin_resources,
+};
+#endif
+
+#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
+/* all SPI peripherals info goes here */
+
+#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
+static struct mtd_partition bfin_spi_flash_partitions[] = {
+       {
+               .name = "bootloader",
+               .size = 0x00060000,
+               .offset = 0,
+               .mask_flags = MTD_CAP_ROM
+       }, {
+               .name = "kernel",
+               .size = 0x100000,
+               .offset = 0x60000
+       }, {
+               .name = "file system",
+               .size = 0x6a0000,
+               .offset = 0x00160000,
+       }
+};
+
+static struct flash_platform_data bfin_spi_flash_data = {
+       .name = "m25p80",
+       .parts = bfin_spi_flash_partitions,
+       .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
+       .type = "m25p64",
+};
+
+/* SPI flash chip (m25p64) */
+static struct bfin5xx_spi_chip spi_flash_chip_info = {
+       .enable_dma = 0,         /* use dma transfer with this chip*/
+       .bits_per_word = 8,
+};
+#endif
+
+#if defined(CONFIG_SPI_ADC_BF533) || defined(CONFIG_SPI_ADC_BF533_MODULE)
+/* SPI ADC chip */
+static struct bfin5xx_spi_chip spi_adc_chip_info = {
+       .ctl_reg = 0x1000,
+       .enable_dma = 1,         /* use dma transfer with this chip*/
+       .bits_per_word = 16,
+};
+#endif
+
+#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
+static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
+       .ctl_reg = 0x1000,
+       .enable_dma = 0,
+       .bits_per_word = 16,
+};
+#endif
+
+#if defined(CONFIG_PBX)
+static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
+       .ctl_reg        = 0x1c04,
+       .enable_dma     = 0,
+       .bits_per_word  = 8,
+       .cs_change_per_word = 1,
+};
+#endif
+
+/* Notice: for blackfin, the speed_hz is the value of register
+ * SPI_BAUD, not the real baudrate */
+static struct spi_board_info bfin_spi_board_info[] __initdata = {
+#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
+       {
+               /* the modalias must be the same as spi device driver name */
+               .modalias = "m25p80", /* Name of spi_driver for this device */
+               /* this value is the baudrate divisor */
+               .max_speed_hz = 50000000, /* actual baudrate is SCLK/(2xspeed_hz) */
+               .bus_num = 0, /* Framework bus number */
+               .chip_select = 2, /* Framework chip select. On STAMP537 it is SPISSEL2*/
+               .platform_data = &bfin_spi_flash_data,
+               .controller_data = &spi_flash_chip_info,
+               .mode = SPI_MODE_3,
+       },
+#endif
+
+#if defined(CONFIG_SPI_ADC_BF533) || defined(CONFIG_SPI_ADC_BF533_MODULE)
+       {
+               .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
+               .max_speed_hz = 4,     /* actual baudrate is SCLK/(2xspeed_hz) */
+               .bus_num = 1, /* Framework bus number */
+               .chip_select = 1, /* Framework chip select. */
+               .platform_data = NULL, /* No spi_driver specific config */
+               .controller_data = &spi_adc_chip_info,
+       },
+#endif
+
+#if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
+       {
+               .modalias = "ad1836-spi",
+               .max_speed_hz = 16,
+               .bus_num = 1,
+               .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
+               .controller_data = &ad1836_spi_chip_info,
+       },
+#endif
+
+#if defined(CONFIG_PBX)
+       {
+               .modalias        = "fxs-spi",
+               .max_speed_hz    = 4,
+               .bus_num         = 1,
+               .chip_select     = 3,
+               .controller_data = &spi_si3xxx_chip_info,
+       },
+
+       {
+               .modalias        = "fxo-spi",
+               .max_speed_hz    = 4,
+               .bus_num         = 1,
+               .chip_select     = 2,
+               .controller_data = &spi_si3xxx_chip_info,
+       },
+#endif
+};
+
+/* SPI (0) */
+static struct resource bfin_spi0_resource[] = {
+       [0] = {
+               .start = SPI0_REGBASE,
+               .end   = SPI0_REGBASE + 0xFF,
+               .flags = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start = CH_SPI,
+               .end   = CH_SPI,
+               .flags = IORESOURCE_IRQ,
+       }
+};
+
+
+/* SPI controller data */
+static struct bfin5xx_spi_master bfin_spi0_info = {
+       .num_chipselect = 8,
+       .enable_dma = 1,  /* master has the ability to do dma transfer */
+};
+
+static struct platform_device bfin_spi0_device = {
+       .name = "bfin-spi",
+       .id = 0, /* Bus number */
+       .num_resources = ARRAY_SIZE(bfin_spi0_resource),
+       .resource = bfin_spi0_resource,
+       .dev = {
+               .platform_data = &bfin_spi0_info, /* Passed to driver */
+       },
+};
+#endif  /* spi master and devices */
+
+#if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
+static struct platform_device bfin_fb_device = {
+       .name = "bf537-fb",
+};
+#endif
+
+#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
+static struct resource bfin_uart_resources[] = {
+       {
+               .start = 0xFFC00400,
+               .end = 0xFFC004FF,
+               .flags = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device bfin_uart_device = {
+       .name = "bfin-uart",
+       .id = 1,
+       .num_resources = ARRAY_SIZE(bfin_uart_resources),
+       .resource = bfin_uart_resources,
+};
+#endif
+
+static struct platform_device *stamp_devices[] __initdata = {
+#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
+       &rtc_device,
+#endif
+
+#if    defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
+       &dm9000_device,
+#endif
+
+#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
+       &smc91x_device,
+#endif
+
+#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
+       &net2272_bfin_device,
+#endif
+
+#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
+       &bfin_spi0_device,
+#endif
+
+#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
+       &bfin_uart_device,
+#endif
+};
+
+static int __init H8606_init(void)
+{
+       printk(KERN_INFO "HV Sistemas H8606 board support by http://www.hvsistemas.com\n");
+       printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
+       platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
+#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
+       spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
+#endif
+       return 0;
+}
+
+arch_initcall(H8606_init);
\ No newline at end of file
index 12a631ab389d467fdcad73fa95fc2c83caa4a5b6..2452b456ccbd25479115b5f2002d0dc0616c1648 100644 (file)
@@ -6,3 +6,4 @@ obj-$(CONFIG_GENERIC_BOARD)            += generic_board.o
 obj-$(CONFIG_BFIN533_STAMP)            += stamp.o
 obj-$(CONFIG_BFIN533_EZKIT)            += ezkit.o
 obj-$(CONFIG_BFIN533_BLUETECHNIX_CM)   += cm_bf533.o
+obj-$(CONFIG_H8606_HVSISTEMAS)         += H8606.o
index 1c5a86adfab79158b19ea2dd5dbd78ba475f6f51..a863522a4467129d1d50006671af82280f8b0b9a 100644 (file)
@@ -46,7 +46,7 @@ const char bfin_board_name[] = "Bluetechnix CM BF533";
 
 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
 /* all SPI peripherals info goes here */
-
+#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
 static struct mtd_partition bfin_spi_flash_partitions[] = {
        {
                .name = "bootloader",
@@ -76,12 +76,15 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = {
        .enable_dma = 0,         /* use dma transfer with this chip*/
        .bits_per_word = 8,
 };
+#endif
 
 /* SPI ADC chip */
+#if defined(CONFIG_SPI_ADC_BF533) || defined(CONFIG_SPI_ADC_BF533_MODULE)
 static struct bfin5xx_spi_chip spi_adc_chip_info = {
        .enable_dma = 1,         /* use dma transfer with this chip*/
        .bits_per_word = 16,
 };
+#endif
 
 #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
 static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
@@ -90,7 +93,15 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
 };
 #endif
 
+#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
+static struct bfin5xx_spi_chip spi_mmc_chip_info = {
+       .enable_dma = 1,
+       .bits_per_word = 8,
+};
+#endif
+
 static struct spi_board_info bfin_spi_board_info[] __initdata = {
+#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
        {
                /* the modalias must be the same as spi device driver name */
                .modalias = "m25p80",       /* Name of spi_driver for this device */
@@ -100,7 +111,11 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
                .platform_data = &bfin_spi_flash_data,
                .controller_data = &spi_flash_chip_info,
                .mode = SPI_MODE_3,
-       }, {
+       },
+#endif
+
+#if defined(CONFIG_SPI_ADC_BF533) || defined(CONFIG_SPI_ADC_BF533_MODULE)
+       {
                .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
                .max_speed_hz = 6250000,     /* max spi clock (SCK) speed in HZ */
                .bus_num = 0,               /* Framework bus number */
@@ -108,6 +123,8 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
                .platform_data = NULL,      /* No spi_driver specific config */
                .controller_data = &spi_adc_chip_info,
        },
+#endif
+
 #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
        {
                .modalias = "ad1836-spi",
@@ -117,6 +134,27 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
                .controller_data = &ad1836_spi_chip_info,
        },
 #endif
+
+#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
+       {
+               .modalias = "spi_mmc_dummy",
+               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
+               .bus_num = 0,
+               .chip_select = 0,
+               .platform_data = NULL,
+               .controller_data = &spi_mmc_chip_info,
+               .mode = SPI_MODE_3,
+       },
+       {
+               .modalias = "spi_mmc",
+               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
+               .bus_num = 0,
+               .chip_select = CONFIG_SPI_MMC_CS_CHAN,
+               .platform_data = NULL,
+               .controller_data = &spi_mmc_chip_info,
+               .mode = SPI_MODE_3,
+       },
+#endif
 };
 
 /* SPI (0) */
index f84be4eabfd1985af425717cfeb353c48ecd60a6..62ffa500420fa0aef18ccf0caad1d6d3d050b795 100644 (file)
@@ -218,7 +218,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
        {
                .modalias = "spi_mmc_dummy",
-               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
+               .max_speed_hz = 20000000,     /* max spi clock (SCK) speed in HZ */
                .bus_num = 0,
                .chip_select = 0,
                .platform_data = NULL,
@@ -227,7 +227,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
        },
        {
                .modalias = "spi_mmc",
-               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
+               .max_speed_hz = 20000000,     /* max spi clock (SCK) speed in HZ */
                .bus_num = 0,
                .chip_select = CONFIG_SPI_MMC_CS_CHAN,
                .platform_data = NULL,
index 52e2320307de028e19e75fdafe4e643b3324e03b..2915931045e32978bfd4fffd4dea23b0f1623f6a 100644 (file)
@@ -281,8 +281,8 @@ static struct resource net2272_bfin_resources[] = {
                .end = 0x20200000 + 0x100,
                .flags = IORESOURCE_MEM,
        }, {
-               .start = IRQ_PF7,
-               .end = IRQ_PF7,
+               .start = IRQ_PH14,
+               .end = IRQ_PH14,
                .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
        },
 };
index cc41f6c2ef4f515c65f5e4f99b3e027b41d96045..5f7b91fbafe81527af220f0e1cb7cc2125d5e9af 100644 (file)
@@ -450,7 +450,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
        {
                .modalias = "spi_mmc_dummy",
-               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
+               .max_speed_hz = 20000000,     /* max spi clock (SCK) speed in HZ */
                .bus_num = 0,
                .chip_select = 0,
                .platform_data = NULL,
@@ -459,7 +459,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
        },
        {
                .modalias = "spi_mmc",
-               .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
+               .max_speed_hz = 20000000,     /* max spi clock (SCK) speed in HZ */
                .bus_num = 0,
                .chip_select = CONFIG_SPI_MMC_CS_CHAN,
                .platform_data = NULL,
@@ -612,7 +612,7 @@ static struct platform_device bfin_sport1_uart_device = {
 
 static struct pata_platform_info bfin_pata_platform_data = {
        .ioport_shift = 1,
-       .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
+       .irq_flags = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
 static struct resource bfin_pata_resources[] = {
index e3ad5802868a2489865a761ae32b824b6a87ecc4..1b13fa470977e8d0c13aa3ba722f009f47556445 100644 (file)
@@ -917,7 +917,7 @@ ENTRY(_ex_table)
        .long _ex_soft_bp       /* 0x01 - User Defined - Software breakpoint */
        .long _ex_replaceable   /* 0x02 - User Defined */
        .long _ex_trap_c        /* 0x03 - User Defined - userspace stack overflow */
-       .long _ex_replaceable   /* 0x04 - User Defined */
+       .long _ex_trap_c        /* 0x04 - User Defined - dump trace buffer */
        .long _ex_replaceable   /* 0x05 - User Defined */
        .long _ex_replaceable   /* 0x06 - User Defined */
        .long _ex_replaceable   /* 0x07 - User Defined */
index e2e9f57abe2e33c012961f49734dea1837a69834..ff6a8712bd6d8c3f59f7724050d9793a22db3fcf 100644 (file)
@@ -1,6 +1,6 @@
 #
 # For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
+# see Documentation/kbuild/kconfig-language.txt.
 #
 
 mainmenu "uClinux/h8300 (w/o MMU) Kernel Configuration"
index 75fd90dc76a3e73165a3f75964b7ea1823445392..7f6b2377d13fa815a9a0a3e0c10a6554125723e1 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.23-rc6
-# Tue Sep 18 11:24:01 2007
+# Linux kernel version: 2.6.23
+# Thu Oct 18 16:03:40 2007
 #
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
@@ -28,6 +28,8 @@ CONFIG_TASK_IO_ACCOUNTING=y
 CONFIG_LOG_BUF_SHIFT=20
 CONFIG_CGROUPS=y
 CONFIG_CPUSETS=y
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
 CONFIG_SYSFS_DEPRECATED=y
 CONFIG_RELAY=y
 CONFIG_BLK_DEV_INITRD=y
@@ -48,7 +50,6 @@ CONFIG_FUTEX=y
 CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
-CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
 CONFIG_VM_EVENT_COUNTERS=y
@@ -69,6 +70,7 @@ CONFIG_STOP_MACHINE=y
 CONFIG_BLOCK=y
 # CONFIG_BLK_DEV_IO_TRACE is not set
 CONFIG_BLK_DEV_BSG=y
+CONFIG_BLOCK_COMPAT=y
 
 #
 # IO Schedulers
@@ -93,6 +95,7 @@ CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 # CONFIG_ARCH_HAS_ILOG2_U32 is not set
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_TIME=y
@@ -113,10 +116,10 @@ CONFIG_IA64_SGI_SN2=y
 CONFIG_MCKINLEY=y
 # CONFIG_IA64_PAGE_SIZE_4KB is not set
 # CONFIG_IA64_PAGE_SIZE_8KB is not set
-CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
-# CONFIG_PGTABLE_3 is not set
-CONFIG_PGTABLE_4=y
+# CONFIG_IA64_PAGE_SIZE_16KB is not set
+CONFIG_IA64_PAGE_SIZE_64KB=y
+CONFIG_PGTABLE_3=y
+# CONFIG_PGTABLE_4 is not set
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
 # CONFIG_HZ_300 is not set
@@ -131,6 +134,7 @@ CONFIG_SMP=y
 CONFIG_NR_CPUS=1024
 # CONFIG_HOTPLUG_CPU is not set
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
 CONFIG_SCHED_SMT=y
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
@@ -144,6 +148,7 @@ CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
 # CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_MIGRATION=y
 CONFIG_RESOURCES_64BIT=y
@@ -171,6 +176,7 @@ CONFIG_IA64_PALINFO=y
 CONFIG_IA64_MC_ERR_INJECT=y
 CONFIG_SGI_SN=y
 # CONFIG_IA64_ESI is not set
+# CONFIG_IA64_HP_AML_NFW is not set
 
 #
 # SN Devices
@@ -220,7 +226,6 @@ CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_SYSCALL=y
 CONFIG_PCIEPORTBUS=y
 CONFIG_HOTPLUG_PCI_PCIE=y
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
 CONFIG_PCIEAER=y
 CONFIG_ARCH_SUPPORTS_MSI=y
 # CONFIG_PCI_MSI is not set
@@ -231,10 +236,6 @@ CONFIG_HOTPLUG_PCI=y
 # CONFIG_HOTPLUG_PCI_CPCI is not set
 # CONFIG_HOTPLUG_PCI_SHPC is not set
 CONFIG_HOTPLUG_PCI_SGI=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
 # CONFIG_PCCARD is not set
 
 #
@@ -271,6 +272,7 @@ CONFIG_INET_TUNNEL=m
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_LRO=y
 CONFIG_INET_DIAG=m
 CONFIG_INET_TCP_DIAG=m
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -342,6 +344,7 @@ CONFIG_IPV6_SIT=m
 #
 # Generic Driver Options
 #
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
@@ -402,7 +405,12 @@ CONFIG_IDE_PROC_FS=y
 # IDE chipset support/bugfixes
 #
 CONFIG_IDE_GENERIC=y
+# CONFIG_BLK_DEV_PLATFORM is not set
 # CONFIG_BLK_DEV_IDEPNP is not set
+
+#
+# PCI IDE chipsets support
+#
 CONFIG_BLK_DEV_IDEPCI=y
 CONFIG_IDEPCI_SHARE_IRQ=y
 CONFIG_IDEPCI_PCIBUS_ORDER=y
@@ -410,8 +418,6 @@ CONFIG_IDEPCI_PCIBUS_ORDER=y
 # CONFIG_BLK_DEV_GENERIC is not set
 # CONFIG_BLK_DEV_OPTI621 is not set
 CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-# CONFIG_IDEDMA_ONLYDISK is not set
 # CONFIG_BLK_DEV_AEC62XX is not set
 # CONFIG_BLK_DEV_ALI15X3 is not set
 # CONFIG_BLK_DEV_AMD74XX is not set
@@ -439,7 +445,6 @@ CONFIG_BLK_DEV_SGIIOC4=y
 # CONFIG_BLK_DEV_TC86C001 is not set
 # CONFIG_IDE_ARM is not set
 CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
 # CONFIG_BLK_DEV_HD is not set
 
 #
@@ -482,6 +487,7 @@ CONFIG_SCSI_SAS_ATTRS=y
 CONFIG_SCSI_SAS_LIBSAS=y
 # CONFIG_SCSI_SAS_ATA is not set
 # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
+CONFIG_SCSI_SRP_ATTRS=y
 CONFIG_SCSI_LOWLEVEL=y
 CONFIG_ISCSI_TCP=m
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
@@ -492,6 +498,7 @@ CONFIG_ISCSI_TCP=m
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
 # CONFIG_SCSI_AIC94XX is not set
+# CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
@@ -532,6 +539,7 @@ CONFIG_ATA_ACPI=y
 # CONFIG_SATA_VIA is not set
 CONFIG_SATA_VITESSE=y
 # CONFIG_SATA_INIC162X is not set
+# CONFIG_PATA_ACPI is not set
 # CONFIG_PATA_ALI is not set
 # CONFIG_PATA_AMD is not set
 # CONFIG_PATA_ARTOP is not set
@@ -556,6 +564,7 @@ CONFIG_SATA_VITESSE=y
 # CONFIG_PATA_OLDPIIX is not set
 # CONFIG_PATA_NETCELL is not set
 # CONFIG_PATA_NS87410 is not set
+# CONFIG_PATA_NS87415 is not set
 # CONFIG_PATA_OPTI is not set
 # CONFIG_PATA_OPTIDMA is not set
 # CONFIG_PATA_PDC_OLD is not set
@@ -588,10 +597,6 @@ CONFIG_DM_MULTIPATH=m
 CONFIG_DM_MULTIPATH_EMC=m
 # CONFIG_DM_MULTIPATH_RDAC is not set
 # CONFIG_DM_DELAY is not set
-
-#
-# Fusion MPT device support
-#
 CONFIG_FUSION=y
 CONFIG_FUSION_SPI=y
 CONFIG_FUSION_FC=y
@@ -613,13 +618,16 @@ CONFIG_NETDEVICES=y
 # CONFIG_MACVLAN is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
+# CONFIG_VETH is not set
 # CONFIG_NET_SB1000 is not set
+# CONFIG_IP1000 is not set
 # CONFIG_ARCNET is not set
 # CONFIG_NET_ETHERNET is not set
 CONFIG_NETDEV_1000=y
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
 # CONFIG_E1000 is not set
+# CONFIG_E1000E is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -638,12 +646,15 @@ CONFIG_CHELSIO_T1=m
 CONFIG_CHELSIO_T1_1G=y
 # CONFIG_CHELSIO_T1_NAPI is not set
 CONFIG_CHELSIO_T3=m
+CONFIG_IXGBE=m
 # CONFIG_IXGB is not set
 CONFIG_S2IO=m
 # CONFIG_S2IO_NAPI is not set
 # CONFIG_MYRI10GE is not set
 # CONFIG_NETXEN_NIC is not set
+# CONFIG_NIU is not set
 # CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
 # CONFIG_TR is not set
 
 #
@@ -669,6 +680,7 @@ CONFIG_S2IO=m
 # CONFIG_NET_FC is not set
 # CONFIG_SHAPER is not set
 CONFIG_NETCONSOLE=y
+# CONFIG_NETCONSOLE_DYNAMIC is not set
 CONFIG_NETPOLL=y
 # CONFIG_NETPOLL_TRAP is not set
 CONFIG_NET_POLL_CONTROLLER=y
@@ -690,7 +702,6 @@ CONFIG_INPUT_MOUSEDEV=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
 
@@ -714,6 +725,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Character devices
 #
 CONFIG_VT=y
+# CONFIG_VT_UNICODE is not set
 CONFIG_VT_CONSOLE=y
 CONFIG_HW_CONSOLE=y
 # CONFIG_VT_HW_CONSOLE_BINDING is not set
@@ -760,9 +772,6 @@ CONFIG_LEGACY_PTY_COUNT=256
 CONFIG_EFI_RTC=y
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-CONFIG_AGP=y
-CONFIG_AGP_SGI_TIOCA=y
-# CONFIG_DRM is not set
 CONFIG_RAW_DRIVER=m
 CONFIG_MAX_RAW_DEVS=256
 # CONFIG_HPET is not set
@@ -781,6 +790,12 @@ CONFIG_DEVPORT=y
 # CONFIG_POWER_SUPPLY is not set
 # CONFIG_HWMON is not set
 
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
 #
 # Multifunction device drivers
 #
@@ -796,15 +811,18 @@ CONFIG_DEVPORT=y
 #
 # Graphics support
 #
+CONFIG_AGP=y
+CONFIG_AGP_SGI_TIOCA=y
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+# CONFIG_FB is not set
 # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Display device support
 #
 # CONFIG_DISPLAY_SUPPORT is not set
-# CONFIG_VGASTATE is not set
-CONFIG_VIDEO_OUTPUT_CONTROL=m
-# CONFIG_FB is not set
 
 #
 # Console display driver support
@@ -820,6 +838,7 @@ CONFIG_DUMMY_CONSOLE=y
 CONFIG_HID_SUPPORT=y
 CONFIG_HID=y
 CONFIG_HID_DEBUG=y
+# CONFIG_HIDRAW is not set
 
 #
 # USB Input Devices
@@ -950,19 +969,6 @@ CONFIG_INFINIBAND_SRP=m
 # CONFIG_INFINIBAND_ISER is not set
 # CONFIG_RTC_CLASS is not set
 
-#
-# DMA Engine support
-#
-# CONFIG_DMA_ENGINE is not set
-
-#
-# DMA Clients
-#
-
-#
-# DMA Devices
-#
-
 #
 # Userspace I/O
 #
@@ -1005,6 +1011,8 @@ CONFIG_XFS_RT=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
 CONFIG_QUOTA=y
+CONFIG_QUOTA_NETLINK_INTERFACE=y
+CONFIG_PRINT_QUOTA_WARNING=y
 # CONFIG_QFMT_V1 is not set
 # CONFIG_QFMT_V2 is not set
 CONFIG_QUOTACTL=y
@@ -1043,7 +1051,6 @@ CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
 CONFIG_HUGETLBFS=y
 CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
 # CONFIG_CONFIGFS_FS is not set
 
 #
@@ -1062,10 +1069,7 @@ CONFIG_RAMFS=y
 # CONFIG_QNX4FS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
+CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=m
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
@@ -1082,6 +1086,7 @@ CONFIG_EXPORTFS=m
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=m
 CONFIG_SUNRPC_GSS=m
+CONFIG_SUNRPC_XPRT_RDMA=m
 # CONFIG_SUNRPC_BIND34 is not set
 CONFIG_RPCSEC_GSS_KRB5=m
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
@@ -1118,10 +1123,6 @@ CONFIG_SGI_PARTITION=y
 # CONFIG_KARMA_PARTITION is not set
 CONFIG_EFI_PARTITION=y
 # CONFIG_SYSV68_PARTITION is not set
-
-#
-# Native Language Support
-#
 CONFIG_NLS=y
 CONFIG_NLS_DEFAULT="iso8859-1"
 CONFIG_NLS_CODEPAGE_437=y
@@ -1162,10 +1163,6 @@ CONFIG_NLS_ISO8859_1=y
 # CONFIG_NLS_KOI8_R is not set
 # CONFIG_NLS_KOI8_U is not set
 CONFIG_NLS_UTF8=y
-
-#
-# Distributed Lock Manager
-#
 # CONFIG_DLM is not set
 
 #
@@ -1223,6 +1220,7 @@ CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_VM is not set
 # CONFIG_DEBUG_LIST is not set
 CONFIG_FORCED_INLINING=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_FAULT_INJECTION is not set
 CONFIG_IA64_GRANULE_16MB=y
@@ -1238,6 +1236,7 @@ CONFIG_SYSVIPC_COMPAT=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_XOR_BLOCKS=y
 CONFIG_ASYNC_CORE=y
 CONFIG_ASYNC_MEMCPY=y
@@ -1262,6 +1261,7 @@ CONFIG_CRYPTO_ECB=m
 CONFIG_CRYPTO_CBC=m
 CONFIG_CRYPTO_PCBC=m
 # CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
 # CONFIG_CRYPTO_CRYPTD is not set
 CONFIG_CRYPTO_DES=m
 # CONFIG_CRYPTO_FCRYPT is not set
@@ -1275,9 +1275,11 @@ CONFIG_CRYPTO_DES=m
 # CONFIG_CRYPTO_ARC4 is not set
 # CONFIG_CRYPTO_KHAZAD is not set
 # CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
 CONFIG_CRYPTO_DEFLATE=m
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
 CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_CAMELLIA is not set
 # CONFIG_CRYPTO_TEST is not set
+# CONFIG_CRYPTO_AUTHENC is not set
 # CONFIG_CRYPTO_HW is not set
index 3f7ea13358e952366eeef347a208facb92d5e57f..6216eba2e38f2a5293683e501827fcf9490a5ab9 100644 (file)
@@ -1231,7 +1231,7 @@ kdump_find_rsvd_region (unsigned long size,
 
 #ifdef CONFIG_PROC_VMCORE
 /* locate the size find a the descriptor at a certain address */
-unsigned long
+unsigned long __init
 vmcore_find_descriptor_size (unsigned long address)
 {
        void *efi_map_start, *efi_map_end, *p;
index 44817d97ab43c91b7921ca83064d447da79034ad..454d7a7dfa9d99e7a8d64382b1adce1ee67945f5 100644 (file)
@@ -20,6 +20,8 @@ SECTIONS
        .gnu.version_d          : { *(.gnu.version_d) }
        .gnu.version_r          : { *(.gnu.version_r) }
 
+       .note                   : { *(.note*) }         :readable       :note
+
        .dynamic                : { *(.dynamic) }       :readable       :dynamic
 
        /*
@@ -83,6 +85,7 @@ PHDRS
        epc             PT_LOAD FILEHDR PHDRS   FLAGS(1);       /* PF_X */
 #endif
        dynamic         PT_DYNAMIC              FLAGS(4);       /* PF_R */
+       note            PT_NOTE                 FLAGS(4);       /* PF_R */
        unwind          PT_IA_64_UNWIND;
 }
 
index 2fdbd5c3f21342beb82046bc4ca6c4c3d08b50b5..e86d0295979465a56c257298028d5fc9798fb249 100644 (file)
@@ -109,7 +109,7 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
        write_msi_msg(irq, &msg);
        set_irq_chip_and_handler(irq, &ia64_msi_chip, handle_edge_irq);
 
-       return irq;
+       return 0;
 }
 
 void ia64_teardown_msi_irq(unsigned int irq)
index ae6c3c02e1170e63f1810bf37929cdf523d4d025..2b3751eef5ce716506706134e19b3d520b196119 100644 (file)
@@ -417,34 +417,6 @@ mark_bsp_online (void)
 #endif
 }
 
-#ifdef CONFIG_SMP
-static void __init
-check_for_logical_procs (void)
-{
-       pal_logical_to_physical_t info;
-       s64 status;
-
-       status = ia64_pal_logical_to_phys(0, &info);
-       if (status == -1) {
-               printk(KERN_INFO "No logical to physical processor mapping "
-                      "available\n");
-               return;
-       }
-       if (status) {
-               printk(KERN_ERR "ia64_pal_logical_to_phys failed with %ld\n",
-                      status);
-               return;
-       }
-       /*
-        * Total number of siblings that BSP has.  Though not all of them 
-        * may have booted successfully. The correct number of siblings 
-        * booted is in info.overview_num_log.
-        */
-       smp_num_siblings = info.overview_tpc;
-       smp_num_cpucores = info.overview_cpp;
-}
-#endif
-
 static __initdata int nomca;
 static __init int setup_nomca(char *s)
 {
@@ -540,15 +512,6 @@ setup_arch (char **cmdline_p)
 
 #ifdef CONFIG_SMP
        cpu_physical_id(0) = hard_smp_processor_id();
-       check_for_logical_procs();
-       if (smp_num_cpucores > 1)
-               printk(KERN_INFO
-                      "cpu package is Multi-Core capable: number of cores=%d\n",
-                      smp_num_cpucores);
-       if (smp_num_siblings > 1)
-               printk(KERN_INFO
-                      "cpu package is Multi-Threading capable: number of siblings=%d\n",
-                      smp_num_siblings);
 #endif
 
        cpu_init();     /* initialize the bootstrap CPU */
@@ -661,12 +624,13 @@ show_cpuinfo (struct seq_file *m, void *v)
                   lpj*HZ/500000, (lpj*HZ/5000) % 100);
 #ifdef CONFIG_SMP
        seq_printf(m, "siblings   : %u\n", cpus_weight(cpu_core_map[cpunum]));
+       if (c->socket_id != -1)
+               seq_printf(m, "physical id: %u\n", c->socket_id);
        if (c->threads_per_core > 1 || c->cores_per_socket > 1)
                seq_printf(m,
-                          "physical id: %u\n"
-                          "core id    : %u\n"
-                          "thread id  : %u\n",
-                          c->socket_id, c->core_id, c->thread_id);
+                          "core id    : %u\n"
+                          "thread id  : %u\n",
+                          c->core_id, c->thread_id);
 #endif
        seq_printf(m,"\n");
 
@@ -778,6 +742,9 @@ identify_cpu (struct cpuinfo_ia64 *c)
        c->socket_id = -1;
 
        identify_siblings(c);
+
+       if (c->threads_per_core > smp_num_siblings)
+               smp_num_siblings = c->threads_per_core;
 #endif
        c->ppn = cpuid.field.ppn;
        c->number = cpuid.field.number;
index c57dbce25c12f2b7cbdc05557d2d3c8a7cd4b8bc..f0fc4d8465ad172cc9f4f0ce4215de85b3b3a09a 100644 (file)
@@ -142,7 +142,6 @@ DEFINE_PER_CPU_SHARED_ALIGNED(cpumask_t, cpu_sibling_map);
 EXPORT_PER_CPU_SYMBOL(cpu_sibling_map);
 
 int smp_num_siblings = 1;
-int smp_num_cpucores = 1;
 
 /* which logical CPU number maps to which CPU (physical APIC ID) */
 volatile int ia64_cpu_to_sapicid[NR_CPUS];
@@ -886,13 +885,17 @@ identify_siblings(struct cpuinfo_ia64 *c)
        u16 pltid;
        pal_logical_to_physical_t info;
 
-       if (smp_num_cpucores == 1 && smp_num_siblings == 1)
-               return;
-
        if ((status = ia64_pal_logical_to_phys(-1, &info)) != PAL_STATUS_SUCCESS) {
-               printk(KERN_ERR "ia64_pal_logical_to_phys failed with %ld\n",
-                      status);
-               return;
+               if (status != PAL_STATUS_UNIMPLEMENTED) {
+                       printk(KERN_ERR
+                               "ia64_pal_logical_to_phys failed with %ld\n",
+                               status);
+                       return;
+               }
+
+               info.overview_ppid = 0;
+               info.overview_cpp  = 1;
+               info.overview_tpc  = 1;
        }
        if ((status = ia64_sal_physical_id_info(&pltid)) != PAL_STATUS_SUCCESS) {
                printk(KERN_ERR "ia64_sal_pltid failed with %ld\n", status);
@@ -900,6 +903,10 @@ identify_siblings(struct cpuinfo_ia64 *c)
        }
 
        c->socket_id =  (pltid << 8) | info.overview_ppid;
+
+       if (info.overview_cpp == 1 && info.overview_tpc == 1)
+               return;
+
        c->cores_per_socket = info.overview_cpp;
        c->threads_per_core = info.overview_tpc;
        c->num_log = info.overview_num_log;
index c6c19bf11becd573c38362462bf3c1ad0cce91bd..25aef6211a54be964778e5e42165bb2d0e3738f1 100644 (file)
@@ -472,7 +472,7 @@ struct memmap_init_callback_data {
        unsigned long zone;
 };
 
-static int
+static int __meminit
 virtual_memmap_init (u64 start, u64 end, void *arg)
 {
        struct memmap_init_callback_data *args;
@@ -503,7 +503,7 @@ virtual_memmap_init (u64 start, u64 end, void *arg)
        return 0;
 }
 
-void
+void __meminit
 memmap_init (unsigned long size, int nid, unsigned long zone,
             unsigned long start_pfn)
 {
index 1c2f13e181d0bff8ff2f2cbada0f282f8ab5a8b7..85a0d54fb5abf928fb48af225d7d2b2f119bd202 100644 (file)
@@ -1,6 +1,7 @@
 SECTIONS {
        . = SIZEOF_HEADERS;
        .rodata : { *(.rodata) } :ro
+       .note : { *(.note*) }
        . = 0xa0000;
        .data : { *(.data) } :dat
        /DISCARD/ : { *(*) }
index 3db62f24596ca6e76d9756d3c4e96ee9b630d443..868c9aa64fe2db7af71a78016ab637b9b0a18a12 100644 (file)
@@ -98,6 +98,7 @@ sn_platform_plat_specific_err_print(const u8 * sect_header, u8 ** oemdata,
        while (*sn_oemdata_size > sn_oemdata_bufsize) {
                u8 *newbuf = vmalloc(*sn_oemdata_size);
                if (!newbuf) {
+                       mutex_unlock(&sn_oemdata_mutex);
                        printk(KERN_ERR "%s: unable to extend sn_oemdata\n",
                               __FUNCTION__);
                        return 1;
index 97da953eb5d0ee74699b7be4042b5f5af1747e3e..2c7d6c240b73767118485f3b24c6fad93711aa84 100644 (file)
@@ -546,6 +546,7 @@ config SIBYTE_BIGSUR
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_SB1
        select SYS_SUPPORTS_BIG_ENDIAN
+       select SYS_SUPPORTS_HIGHMEM
        select SYS_SUPPORTS_LITTLE_ENDIAN
 
 config SNI_RM
@@ -733,15 +734,27 @@ config ARCH_MAY_HAVE_PC_FDC
 config BOOT_RAW
        bool
 
+config CEVT_BCM1480
+       bool
+
 config CEVT_GT641XX
        bool
 
 config CEVT_R4K
        bool
 
+config CEVT_SB1250
+       bool
+
 config CEVT_TXX9
        bool
 
+config CSRC_BCM1480
+       bool
+
+config CSRC_SB1250
+       bool
+
 config CFE
        bool
 
index afa7007d67f7e2168a1171c5492731fe67319ff5..85a90941de4ff9c1b900fe52f44e3900e84ec5f2 100644 (file)
@@ -9,3 +9,5 @@
 
 lib-y := init.o board_setup.o irqmap.o
 obj-y := platform.o
+
+EXTRA_CFLAGS += -Werror
index 01ebff6779787e07be962a42ad4b4ff1ff4fe8c9..49c0fb409fea99246e12e1c4de3ca5a0237ce2ef 100644 (file)
@@ -34,15 +34,6 @@ static struct resource mtx1_wdt_res[] = {
        }
 };
 
-static struct resource mtx1_sys_btn[] = {
-       [0] = {
-               .start  = 7,
-               .end    = 7,
-               .name   = "mtx1-sys-btn-gpio",
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
 static struct platform_device mtx1_wdt = {
        .name = "mtx1-wdt",
        .id = 0,
index 22b673cf55afdcb12bfa78bf0588781d2af9f719..970b1b1d5cda63cf06702cbc1ed60ca4f8454ab2 100644 (file)
@@ -3,3 +3,5 @@
 #
 
 lib-y := init.o board_setup.o irqmap.o
+
+EXTRA_CFLAGS += -Werror
index 5dbc9868f598594031354abc4a690b54c8e01e88..b98bebfa87c6acd7c50e835b98c74f48ba8a3548 100644 (file)
@@ -68,9 +68,11 @@ void board_reset(void)
 void __init board_setup(void)
 {
        char *argptr = NULL;
-       u32 pin_func;
 
 #if 0
+       {
+       u32 pin_func;
+
        /* Enable PSC1 SYNC for AC97.  Normaly done in audio driver,
         * but it is board specific code, so put it here.
         */
@@ -81,11 +83,13 @@ void __init board_setup(void)
 
        au_writel(0, (u32)bcsr|0x10); /* turn off pcmcia power */
        au_sync();
+       }
 #endif
 
 #if defined(CONFIG_I2C_AU1550)
        {
        u32 freq0, clksrc;
+       u32 pin_func;
 
        /* Select SMBUS in CPLD */
        bcsr->resets &= ~(BCSR_RESETS_PCS0MUX);
index bdf00e2a35e47db2fd10c59cb4f29a30cefe7588..c096be4ed4e785f8c2a9a625360aec1b715cefcf 100644 (file)
@@ -94,51 +94,41 @@ inline void pb1200_disable_irq(unsigned int irq_nr)
        bcsr->intclr = 1<<(irq_nr - PB1200_INT_BEGIN);
 }
 
-static unsigned int pb1200_startup_irq( unsigned int irq_nr )
+static unsigned int pb1200_setup_cascade(void)
 {
-       if (++pb1200_cascade_en == 1)
-       {
-               request_irq(AU1000_GPIO_7, &pb1200_cascade_handler,
-                       0, "Pb1200 Cascade", (void *)&pb1200_cascade_handler );
-#ifdef CONFIG_MIPS_PB1200
-    /* We have a problem with CPLD rev3. Enable a workaround */
-       if( ((bcsr->whoami & BCSR_WHOAMI_CPLD)>>4) <= 3)
-       {
-               printk("\nWARNING!!!\n");
-               printk("\nWARNING!!!\n");
-               printk("\nWARNING!!!\n");
-               printk("\nWARNING!!!\n");
-               printk("\nWARNING!!!\n");
-               printk("\nWARNING!!!\n");
-               printk("Pb1200 must be at CPLD rev4. Please have Pb1200\n");
-               printk("updated to latest revision. This software will not\n");
-               printk("work on anything less than CPLD rev4\n");
-               printk("\nWARNING!!!\n");
-               printk("\nWARNING!!!\n");
-               printk("\nWARNING!!!\n");
-               printk("\nWARNING!!!\n");
-               printk("\nWARNING!!!\n");
-               printk("\nWARNING!!!\n");
-               while(1);
-       }
-#endif
-       }
-       pb1200_enable_irq(irq_nr);
+       int err;
+
+       err = request_irq(AU1000_GPIO_7, &pb1200_cascade_handler,
+                         0, "Pb1200 Cascade", &pb1200_cascade_handler);
+       if (err)
+               return err;
+
        return 0;
 }
 
-static void pb1200_shutdown_irq( unsigned int irq_nr )
+static unsigned int pb1200_startup_irq(unsigned int irq)
 {
-       pb1200_disable_irq(irq_nr);
-       if (--pb1200_cascade_en == 0)
-       {
-               free_irq(AU1000_GPIO_7, &pb1200_cascade_handler );
+       if (++pb1200_cascade_en == 1) {
+               int res;
+
+               res = pb1200_setup_cascade();
+               if (res)
+                       return res;
        }
-       return;
+
+       pb1200_enable_irq(irq);
+
+       return 0;
 }
 
-static struct irq_chip external_irq_type =
+static void pb1200_shutdown_irq(unsigned int irq)
 {
+       pb1200_disable_irq(irq);
+       if (--pb1200_cascade_en == 0)
+               free_irq(AU1000_GPIO_7, &pb1200_cascade_handler);
+}
+
+static struct irq_chip external_irq_type = {
 #ifdef CONFIG_MIPS_PB1200
        .name = "Pb1200 Ext",
 #endif
@@ -155,16 +145,38 @@ static struct irq_chip external_irq_type =
 
 void _board_init_irq(void)
 {
-       int irq_nr;
+       unsigned int irq;
 
-       for (irq_nr = PB1200_INT_BEGIN; irq_nr <= PB1200_INT_END; irq_nr++)
-       {
-               set_irq_chip_and_handler(irq_nr, &external_irq_type,
+#ifdef CONFIG_MIPS_PB1200
+       /* We have a problem with CPLD rev3. Enable a workaround */
+       if (((bcsr->whoami & BCSR_WHOAMI_CPLD) >> 4) <= 3) {
+               printk("\nWARNING!!!\n");
+               printk("\nWARNING!!!\n");
+               printk("\nWARNING!!!\n");
+               printk("\nWARNING!!!\n");
+               printk("\nWARNING!!!\n");
+               printk("\nWARNING!!!\n");
+               printk("Pb1200 must be at CPLD rev4. Please have Pb1200\n");
+               printk("updated to latest revision. This software will not\n");
+               printk("work on anything less than CPLD rev4\n");
+               printk("\nWARNING!!!\n");
+               printk("\nWARNING!!!\n");
+               printk("\nWARNING!!!\n");
+               printk("\nWARNING!!!\n");
+               printk("\nWARNING!!!\n");
+               printk("\nWARNING!!!\n");
+               panic("Game over.  Your score is 0.");
+       }
+#endif
+
+       for (irq = PB1200_INT_BEGIN; irq <= PB1200_INT_END; irq++) {
+               set_irq_chip_and_handler(irq, &external_irq_type,
                                         handle_level_irq);
-               pb1200_disable_irq(irq_nr);
+               pb1200_disable_irq(irq);
        }
 
-       /* GPIO_7 can not be hooked here, so it is hooked upon first
-       request of any source attached to the cascade */
+       /*
+        * GPIO_7 can not be hooked here, so it is hooked upon first
+        * request of any source attached to the cascade
+        */
 }
-
index 24378b9223f95058882f3602a584d46d86c2ed8c..6dd8f0d46d096f1b8ad57d0510abed786bb09b42 100644 (file)
@@ -77,7 +77,7 @@ int titan_irqflags;
 void __init plat_time_init(void)
 {
        const u32 modebit5 = ocd_readl(0x00e4);
-       unsigned int mult = ((modebit5 >> 11) & 0x1f) + 2,
+       unsigned int mult = ((modebit5 >> 11) & 0x1f) + 2;
        unsigned int div = ((modebit5 >> 16) & 0x1f) + 2;
 
        if (div == 33)
index ae25b480723e8161366a692c0f36061852e8fbb8..d7f8a782aae4d9a3200c307f383be28ed83b2b18 100644 (file)
@@ -97,9 +97,10 @@ asmlinkage void plat_irq_dispatch(void)
        if (pending & IE_IRQ4) {
                r4030_read_reg32(JAZZ_TIMER_REGISTER);
                do_IRQ(JAZZ_TIMER_IRQ);
-       } else if (pending & IE_IRQ2)
-               do_IRQ(r4030_read_reg32(JAZZ_EISA_IRQ_ACK));
-       else if (pending & IE_IRQ1) {
+       } else if (pending & IE_IRQ2) {
+               irq = *(volatile u8 *)JAZZ_EISA_IRQ_ACK;
+               do_IRQ(irq);
+       } else if (pending & IE_IRQ1) {
                irq = *(volatile u8 *)JAZZ_IO_IRQ_SOURCE >> 2;
                if (likely(irq > 0))
                        do_IRQ(irq + JAZZ_IRQ_START - 1);
@@ -117,16 +118,16 @@ static void r4030_set_mode(enum clock_event_mode mode,
 struct clock_event_device r4030_clockevent = {
        .name           = "r4030",
        .features       = CLOCK_EVT_FEAT_PERIODIC,
-       .rating         = 100,
+       .rating         = 300,
        .irq            = JAZZ_TIMER_IRQ,
-       .cpumask        = CPU_MASK_CPU0,
        .set_mode       = r4030_set_mode,
 };
 
 static irqreturn_t r4030_timer_interrupt(int irq, void *dev_id)
 {
-       r4030_clockevent.event_handler(&r4030_clockevent);
+       struct clock_event_device *cd = dev_id;
 
+       cd->event_handler(cd);
        return IRQ_HANDLED;
 }
 
@@ -134,15 +135,22 @@ static struct irqaction r4030_timer_irqaction = {
        .handler        = r4030_timer_interrupt,
        .flags          = IRQF_DISABLED,
        .mask           = CPU_MASK_CPU0,
-       .name           = "timer",
+       .name           = "R4030 timer",
 };
 
 void __init plat_time_init(void)
 {
-       struct irqaction *irq = &r4030_timer_irqaction;
+       struct clock_event_device *cd = &r4030_clockevent;
+       struct irqaction *action = &r4030_timer_irqaction;
+       unsigned int cpu = smp_processor_id();
 
        BUG_ON(HZ != 100);
 
+       cd->cpumask             = cpumask_of_cpu(cpu);
+       clockevents_register_device(cd);
+       action->dev_id = cd;
+       setup_irq(JAZZ_TIMER_IRQ, action);
+
        /*
         * Set clock to 100Hz.
         *
@@ -150,8 +158,5 @@ void __init plat_time_init(void)
         * a programmable 4-bit divider.  This makes it fairly inflexible.
         */
        r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9);
-       setup_irq(JAZZ_TIMER_IRQ, irq);
-
-       clockevents_register_device(&r4030_clockevent);
        setup_pit_timer();
 }
index 3196509a28d563fb3af6469c4e8f06b7abafcb91..b551535b7e48143dfd437b72d26cf442d1c674b3 100644 (file)
@@ -8,9 +8,13 @@ obj-y          += cpu-probe.o branch.o entry.o genex.o irq.o process.o \
                   ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \
                   time.o topology.o traps.o unaligned.o
 
+obj-$(CONFIG_CEVT_BCM1480)     += cevt-bcm1480.o
 obj-$(CONFIG_CEVT_R4K)         += cevt-r4k.o
 obj-$(CONFIG_CEVT_GT641XX)     += cevt-gt641xx.o
+obj-$(CONFIG_CEVT_SB1250)      += cevt-sb1250.o
 obj-$(CONFIG_CEVT_TXX9)                += cevt-txx9.o
+obj-$(CONFIG_CSRC_BCM1480)     += csrc-bcm1480.o
+obj-$(CONFIG_CSRC_SB1250)      += csrc-sb1250.o
 
 binfmt_irix-objs       := irixelf.o irixinv.o irixioctl.o irixsig.o    \
                           irix5sys.o sysirix.o
diff --git a/arch/mips/kernel/cevt-bcm1480.c b/arch/mips/kernel/cevt-bcm1480.c
new file mode 100644 (file)
index 0000000..21e6d63
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ * Copyright (C) 2000,2001,2004 Broadcom Corporation
+ *
+ * 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.
+ */
+#include <linux/clockchips.h>
+#include <linux/interrupt.h>
+#include <linux/percpu.h>
+
+#include <asm/addrspace.h>
+#include <asm/io.h>
+#include <asm/time.h>
+
+#include <asm/sibyte/bcm1480_regs.h>
+#include <asm/sibyte/sb1250_regs.h>
+#include <asm/sibyte/bcm1480_int.h>
+#include <asm/sibyte/bcm1480_scd.h>
+
+#include <asm/sibyte/sb1250.h>
+
+#define IMR_IP2_VAL    K_BCM1480_INT_MAP_I0
+#define IMR_IP3_VAL    K_BCM1480_INT_MAP_I1
+#define IMR_IP4_VAL    K_BCM1480_INT_MAP_I2
+
+/*
+ * The general purpose timer ticks at 1MHz independent if
+ * the rest of the system
+ */
+static void sibyte_set_mode(enum clock_event_mode mode,
+                           struct clock_event_device *evt)
+{
+       unsigned int cpu = smp_processor_id();
+       void __iomem *cfg, *init;
+
+       cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
+       init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
+
+       switch (mode) {
+       case CLOCK_EVT_MODE_PERIODIC:
+               __raw_writeq(0, cfg);
+               __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, init);
+               __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
+                            cfg);
+               break;
+
+       case CLOCK_EVT_MODE_ONESHOT:
+               /* Stop the timer until we actually program a shot */
+       case CLOCK_EVT_MODE_SHUTDOWN:
+               __raw_writeq(0, cfg);
+               break;
+
+       case CLOCK_EVT_MODE_UNUSED:     /* shuddup gcc */
+       case CLOCK_EVT_MODE_RESUME:
+               ;
+       }
+}
+
+static int sibyte_next_event(unsigned long delta, struct clock_event_device *cd)
+{
+       unsigned int cpu = smp_processor_id();
+       void __iomem *cfg, *init;
+
+       cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
+       init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
+
+       __raw_writeq(delta - 1, init);
+       __raw_writeq(M_SCD_TIMER_ENABLE, cfg);
+
+       return 0;
+}
+
+static irqreturn_t sibyte_counter_handler(int irq, void *dev_id)
+{
+       unsigned int cpu = smp_processor_id();
+       struct clock_event_device *cd = dev_id;
+       void __iomem *cfg;
+       unsigned long tmode;
+
+       if (cd->mode == CLOCK_EVT_MODE_PERIODIC)
+               tmode = M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS;
+       else
+               tmode = 0;
+
+       /* ACK interrupt */
+       cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
+       ____raw_writeq(tmode, cfg);
+
+       cd->event_handler(cd);
+
+       return IRQ_HANDLED;
+}
+
+static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent);
+static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction);
+static DEFINE_PER_CPU(char [18], sibyte_hpt_name);
+
+void __cpuinit sb1480_clockevent_init(void)
+{
+       unsigned int cpu = smp_processor_id();
+       unsigned int irq = K_BCM1480_INT_TIMER_0 + cpu;
+       struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu);
+       struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu);
+       unsigned char *name = per_cpu(sibyte_hpt_name, cpu);
+
+       BUG_ON(cpu > 3);        /* Only have 4 general purpose timers */
+
+       sprintf(name, "bcm1480-counter-%d", cpu);
+       cd->name                = name;
+       cd->features            = CLOCK_EVT_FEAT_PERIODIC |
+                                 CLOCK_EVT_FEAT_ONESHOT;
+       clockevent_set_clock(cd, V_SCD_TIMER_FREQ);
+       cd->max_delta_ns        = clockevent_delta2ns(0x7fffff, cd);
+       cd->min_delta_ns        = clockevent_delta2ns(1, cd);
+       cd->rating              = 200;
+       cd->irq                 = irq;
+       cd->cpumask             = cpumask_of_cpu(cpu);
+       cd->set_next_event      = sibyte_next_event;
+       cd->set_mode            = sibyte_set_mode;
+       clockevents_register_device(cd);
+
+       bcm1480_mask_irq(cpu, irq);
+
+       /*
+        * Map the timer interrupt to IP[4] of this cpu
+        */
+       __raw_writeq(IMR_IP4_VAL,
+                    IOADDR(A_BCM1480_IMR_REGISTER(cpu,
+                       R_BCM1480_IMR_INTERRUPT_MAP_BASE_H) + (irq << 3)));
+
+       bcm1480_unmask_irq(cpu, irq);
+
+       action->handler = sibyte_counter_handler;
+       action->flags   = IRQF_DISABLED | IRQF_PERCPU;
+       action->name    = name;
+       action->dev_id  = cd;
+       setup_irq(irq, action);
+}
diff --git a/arch/mips/kernel/cevt-sb1250.c b/arch/mips/kernel/cevt-sb1250.c
new file mode 100644 (file)
index 0000000..e2029d0
--- /dev/null
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2000, 2001 Broadcom Corporation
+ *
+ * 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.
+ */
+#include <linux/clockchips.h>
+#include <linux/interrupt.h>
+#include <linux/percpu.h>
+
+#include <asm/addrspace.h>
+#include <asm/io.h>
+#include <asm/time.h>
+
+#include <asm/sibyte/sb1250.h>
+#include <asm/sibyte/sb1250_regs.h>
+#include <asm/sibyte/sb1250_int.h>
+#include <asm/sibyte/sb1250_scd.h>
+
+#define IMR_IP2_VAL    K_INT_MAP_I0
+#define IMR_IP3_VAL    K_INT_MAP_I1
+#define IMR_IP4_VAL    K_INT_MAP_I2
+
+/*
+ * The general purpose timer ticks at 1MHz independent if
+ * the rest of the system
+ */
+static void sibyte_set_mode(enum clock_event_mode mode,
+                           struct clock_event_device *evt)
+{
+       unsigned int cpu = smp_processor_id();
+       void __iomem *cfg, *init;
+
+       cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
+       init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
+
+       switch (mode) {
+       case CLOCK_EVT_MODE_PERIODIC:
+               __raw_writeq(0, cfg);
+               __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, init);
+               __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
+                            cfg);
+               break;
+
+       case CLOCK_EVT_MODE_ONESHOT:
+               /* Stop the timer until we actually program a shot */
+       case CLOCK_EVT_MODE_SHUTDOWN:
+               __raw_writeq(0, cfg);
+               break;
+
+       case CLOCK_EVT_MODE_UNUSED:     /* shuddup gcc */
+       case CLOCK_EVT_MODE_RESUME:
+               ;
+       }
+}
+
+static int sibyte_next_event(unsigned long delta, struct clock_event_device *cd)
+{
+       unsigned int cpu = smp_processor_id();
+       void __iomem *cfg, *init;
+
+       cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
+       init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
+
+       __raw_writeq(delta - 1, init);
+       __raw_writeq(M_SCD_TIMER_ENABLE, cfg);
+
+       return 0;
+}
+
+static irqreturn_t sibyte_counter_handler(int irq, void *dev_id)
+{
+       unsigned int cpu = smp_processor_id();
+       struct clock_event_device *cd = dev_id;
+       void __iomem *cfg;
+       unsigned long tmode;
+
+       if (cd->mode == CLOCK_EVT_MODE_PERIODIC)
+               tmode = M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS;
+       else
+               tmode = 0;
+
+       /* ACK interrupt */
+       cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
+       ____raw_writeq(tmode, cfg);
+
+       cd->event_handler(cd);
+
+       return IRQ_HANDLED;
+}
+
+static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent);
+static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction);
+static DEFINE_PER_CPU(char [18], sibyte_hpt_name);
+
+void __cpuinit sb1250_clockevent_init(void)
+{
+       unsigned int cpu = smp_processor_id();
+       unsigned int irq = K_INT_TIMER_0 + cpu;
+       struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu);
+       struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu);
+       unsigned char *name = per_cpu(sibyte_hpt_name, cpu);
+
+       /* Only have 4 general purpose timers, and we use last one as hpt */
+       BUG_ON(cpu > 2);
+
+       sprintf(name, "sb1250-counter-%d", cpu);
+       cd->name                = name;
+       cd->features            = CLOCK_EVT_FEAT_PERIODIC |
+                                 CLOCK_EVT_FEAT_ONESHOT;
+       clockevent_set_clock(cd, V_SCD_TIMER_FREQ);
+       cd->max_delta_ns        = clockevent_delta2ns(0x7fffff, cd);
+       cd->min_delta_ns        = clockevent_delta2ns(1, cd);
+       cd->rating              = 200;
+       cd->irq                 = irq;
+       cd->cpumask             = cpumask_of_cpu(cpu);
+       cd->set_next_event      = sibyte_next_event;
+       cd->set_mode            = sibyte_set_mode;
+       clockevents_register_device(cd);
+
+       sb1250_mask_irq(cpu, irq);
+
+       /*
+        * Map the timer interrupt to IP[4] of this cpu
+        */
+       __raw_writeq(IMR_IP4_VAL,
+                    IOADDR(A_IMR_REGISTER(cpu, R_IMR_INTERRUPT_MAP_BASE) +
+                           (irq << 3)));
+
+       sb1250_unmask_irq(cpu, irq);
+
+       action->handler = sibyte_counter_handler;
+       action->flags   = IRQF_DISABLED | IRQF_PERCPU;
+       action->name    = name;
+       action->dev_id  = cd;
+       setup_irq(irq, action);
+}
diff --git a/arch/mips/kernel/csrc-bcm1480.c b/arch/mips/kernel/csrc-bcm1480.c
new file mode 100644 (file)
index 0000000..868745e
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2000,2001,2004 Broadcom Corporation
+ *
+ * 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.
+ */
+#include <linux/clocksource.h>
+
+#include <asm/addrspace.h>
+#include <asm/io.h>
+#include <asm/time.h>
+
+#include <asm/sibyte/bcm1480_regs.h>
+#include <asm/sibyte/sb1250_regs.h>
+#include <asm/sibyte/bcm1480_int.h>
+#include <asm/sibyte/bcm1480_scd.h>
+
+#include <asm/sibyte/sb1250.h>
+
+static cycle_t bcm1480_hpt_read(void)
+{
+       return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT));
+}
+
+struct clocksource bcm1480_clocksource = {
+       .name   = "zbbus-cycles",
+       .rating = 200,
+       .read   = bcm1480_hpt_read,
+       .mask   = CLOCKSOURCE_MASK(64),
+       .flags  = CLOCK_SOURCE_IS_CONTINUOUS,
+};
+
+void __init sb1480_clocksource_init(void)
+{
+       struct clocksource *cs = &bcm1480_clocksource;
+       unsigned int plldiv;
+       unsigned long zbbus;
+
+       plldiv = G_BCM1480_SYS_PLL_DIV(__raw_readq(IOADDR(A_SCD_SYSTEM_CFG)));
+       zbbus = ((plldiv >> 1) * 50000000) + ((plldiv & 1) * 25000000);
+       clocksource_set_clock(cs, zbbus);
+       clocksource_register(cs);
+}
diff --git a/arch/mips/kernel/csrc-sb1250.c b/arch/mips/kernel/csrc-sb1250.c
new file mode 100644 (file)
index 0000000..ebb16e6
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2000, 2001 Broadcom Corporation
+ *
+ * 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.
+ */
+#include <linux/clocksource.h>
+
+#include <asm/addrspace.h>
+#include <asm/io.h>
+#include <asm/time.h>
+
+#include <asm/sibyte/sb1250.h>
+#include <asm/sibyte/sb1250_regs.h>
+#include <asm/sibyte/sb1250_int.h>
+#include <asm/sibyte/sb1250_scd.h>
+
+#define SB1250_HPT_NUM         3
+#define SB1250_HPT_VALUE       M_SCD_TIMER_CNT /* max value */
+
+/*
+ * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over
+ * again.
+ */
+static cycle_t sb1250_hpt_read(void)
+{
+       unsigned int count;
+
+       count = G_SCD_TIMER_CNT(__raw_readq(IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, R_SCD_TIMER_CNT))));
+
+       return SB1250_HPT_VALUE - count;
+}
+
+struct clocksource bcm1250_clocksource = {
+       .name   = "MIPS",
+       .rating = 200,
+       .read   = sb1250_hpt_read,
+       .mask   = CLOCKSOURCE_MASK(23),
+       .flags  = CLOCK_SOURCE_IS_CONTINUOUS,
+};
+
+void __init sb1250_clocksource_init(void)
+{
+       struct clocksource *cs = &bcm1250_clocksource;
+
+       /* Setup hpt using timer #3 but do not enable irq for it */
+       __raw_writeq(0,
+                    IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
+                                                R_SCD_TIMER_CFG)));
+       __raw_writeq(SB1250_HPT_VALUE,
+                    IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
+                                                R_SCD_TIMER_INIT)));
+       __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
+                    IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
+                                                R_SCD_TIMER_CFG)));
+
+       clocksource_set_clock(cs, V_SCD_TIMER_FREQ);
+       clocksource_register(cs);
+}
index 5d9830df3595d6fb9625b9acbb1a3560413969cb..c2d497ceffdd3249c9275157160daddbf705c45a 100644 (file)
@@ -12,8 +12,9 @@
 #include <asm/delay.h>
 #include <asm/i8253.h>
 #include <asm/io.h>
+#include <asm/time.h>
 
-static DEFINE_SPINLOCK(i8253_lock);
+DEFINE_SPINLOCK(i8253_lock);
 
 /*
  * Initialize the PIT timer.
@@ -87,11 +88,10 @@ struct clock_event_device pit_clockevent = {
        .features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
        .set_mode       = init_pit_timer,
        .set_next_event = pit_next_event,
-       .shift          = 32,
        .irq            = 0,
 };
 
-irqreturn_t timer_interrupt(int irq, void *dev_id)
+static irqreturn_t timer_interrupt(int irq, void *dev_id)
 {
        pit_clockevent.event_handler(&pit_clockevent);
 
@@ -111,19 +111,20 @@ static struct irqaction irq0  = {
  */
 void __init setup_pit_timer(void)
 {
+       struct clock_event_device *cd = &pit_clockevent;
+       unsigned int cpu = smp_processor_id();
+
        /*
         * Start pit with the boot cpu mask and make it global after the
         * IO_APIC has been initialized.
         */
-       pit_clockevent.cpumask = cpumask_of_cpu(0);
-       pit_clockevent.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, 32);
-       pit_clockevent.max_delta_ns =
-               clockevent_delta2ns(0x7FFF, &pit_clockevent);
-       pit_clockevent.min_delta_ns =
-               clockevent_delta2ns(0xF, &pit_clockevent);
-       clockevents_register_device(&pit_clockevent);
-
-       irq0.mask = cpumask_of_cpu(0);
+       cd->cpumask = cpumask_of_cpu(cpu);
+       clockevent_set_clock(cd, CLOCK_TICK_RATE);
+       cd->max_delta_ns = clockevent_delta2ns(0x7FFF, cd);
+       cd->min_delta_ns = clockevent_delta2ns(0xF, cd);
+       clockevents_register_device(cd);
+
+       irq0.mask = cpumask_of_cpu(cpu);
        setup_irq(0, &irq0);
 }
 
index 27228f583dae061eab5cff7ca32017ed8b396e13..3284b9b4ecac95d6f31bdae2f829f98d5a7eebcb 100644 (file)
@@ -3,8 +3,7 @@
  * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
  * Copyright (c) 2003, 2004  Maciej W. Rozycki
  *
- * Common time service routines for MIPS machines. See
- * Documentation/mips/time.README.
+ * Common time service routines for MIPS machines.
  *
  * 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
 #include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/param.h>
-#include <linux/profile.h>
 #include <linux/time.h>
 #include <linux/timex.h>
 #include <linux/smp.h>
-#include <linux/kernel_stat.h>
 #include <linux/spinlock.h>
-#include <linux/interrupt.h>
 #include <linux/module.h>
-#include <linux/kallsyms.h>
 
-#include <asm/bootinfo.h>
-#include <asm/cache.h>
-#include <asm/compiler.h>
-#include <asm/cpu.h>
 #include <asm/cpu-features.h>
 #include <asm/div64.h>
-#include <asm/sections.h>
 #include <asm/smtc_ipi.h>
 #include <asm/time.h>
 
-#include <irq.h>
-
 /*
  * forward reference
  */
@@ -62,14 +50,6 @@ int update_persistent_clock(struct timespec now)
        return rtc_mips_set_mmss(now.tv_sec);
 }
 
-/*
- * Null high precision timer functions for systems lacking one.
- */
-static cycle_t null_hpt_read(void)
-{
-       return 0;
-}
-
 /*
  * High precision timer functions for a R4k-compatible timer.
  */
@@ -80,22 +60,6 @@ static cycle_t c0_hpt_read(void)
 
 int (*mips_timer_state)(void);
 
-/*
- * local_timer_interrupt() does profiling and process accounting
- * on a per-CPU basis.
- *
- * In UP mode, it is invoked from the (global) timer_interrupt.
- *
- * In SMP mode, it might invoked by per-CPU timer interrupt, or
- * a broadcasted inter-processor interrupt which itself is triggered
- * by the global timer interrupt.
- */
-void local_timer_interrupt(int irq, void *dev_id)
-{
-       profile_tick(CPU_PROFILING);
-       update_process_times(user_mode(get_irq_regs()));
-}
-
 int null_perf_irq(void)
 {
        return 0;
@@ -120,6 +84,13 @@ EXPORT_SYMBOL(perf_irq);
 
 unsigned int mips_hpt_frequency;
 
+static struct clocksource clocksource_mips = {
+       .name           = "MIPS",
+       .read           = c0_hpt_read,
+       .mask           = CLOCKSOURCE_MASK(32),
+       .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
+};
+
 static unsigned int __init calibrate_hpt(void)
 {
        cycle_t frequency, hpt_start, hpt_end, hpt_count, hz;
@@ -162,12 +133,6 @@ static unsigned int __init calibrate_hpt(void)
        return frequency >> log_2_loops;
 }
 
-struct clocksource clocksource_mips = {
-       .name           = "MIPS",
-       .mask           = CLOCKSOURCE_MASK(32),
-       .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
-};
-
 void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock)
 {
        u64 temp;
@@ -203,9 +168,6 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd,
 
 static void __init init_mips_clocksource(void)
 {
-       if (!mips_hpt_frequency || clocksource_mips.read == null_hpt_read)
-               return;
-
        /* Calclate a somewhat reasonable rating value */
        clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000;
 
@@ -227,7 +189,7 @@ void __init __weak plat_time_init(void)
  * setup_irq calls and each clock_event_device should use its own
  * struct irqrequest.
  */
-void __init plat_timer_setup(struct irqaction *irq)
+void __init plat_timer_setup(void)
 {
        BUG();
 }
@@ -236,21 +198,8 @@ void __init time_init(void)
 {
        plat_time_init();
 
-       /* Choose appropriate high precision timer routines.  */
-       if (!cpu_has_counter && !clocksource_mips.read)
-               /* No high precision timer -- sorry.  */
-               clocksource_mips.read = null_hpt_read;
-       else if (!mips_hpt_frequency && !mips_timer_state) {
-               /* A high precision timer of unknown frequency.  */
-               if (!clocksource_mips.read)
-                       /* No external high precision timer -- use R4k.  */
-                       clocksource_mips.read = c0_hpt_read;
-       } else {
+       if (cpu_has_counter && (mips_hpt_frequency || mips_timer_state)) {
                /* We know counter frequency.  Or we can get it.  */
-               if (!clocksource_mips.read) {
-                       /* No external high precision timer -- use R4k.  */
-                       clocksource_mips.read = c0_hpt_read;
-               }
                if (!mips_hpt_frequency)
                        mips_hpt_frequency = calibrate_hpt();
 
@@ -258,8 +207,8 @@ void __init time_init(void)
                printk("Using %u.%03u MHz high precision timer.\n",
                       ((mips_hpt_frequency + 500) / 1000) / 1000,
                       ((mips_hpt_frequency + 500) / 1000) % 1000);
+               init_mips_clocksource();
        }
 
-       init_mips_clocksource();
        mips_clockevent_init();
 }
index 4681757460a118e50192772b4218cb8407e1bbb0..11f984767880b9e07f1c2b597779aa6ee2da6e79 100644 (file)
@@ -1,4 +1,5 @@
 #include <linux/init.h>
+#include <linux/interrupt.h>
 #include <linux/linkage.h>
 
 #include <asm/i8259.h>
index dc59c3b708edc545d583b2ec3b0b27da3e67274c..08d45369be45c40a4895a00c9c831e109de9fd7f 100644 (file)
@@ -131,7 +131,7 @@ static struct irq_chip rt_irq_type = {
 static int rt_next_event(unsigned long delta, struct clock_event_device *evt)
 {
        unsigned int cpu = smp_processor_id();
-       int slice putoslice(cpu);
+       int slice = cputoslice(cpu);
        unsigned long cnt;
 
        cnt = LOCAL_HUB_L(PI_RT_COUNT);
@@ -169,7 +169,7 @@ static irqreturn_t hub_rt_counter_handler(int irq, void *dev_id)
        /*
         * Ack
         */
-       LOCAL_HUB_S(PI_RT_PEND_A + PI_COUNT_OFFSET * slice, cnt);
+       LOCAL_HUB_S(PI_RT_PEND_A + PI_COUNT_OFFSET * slice, 0);
        cd->event_handler(cd);
 
        return IRQ_HANDLED;
index 7309e48d163d1535facc87aef51ee4608ed3f3fc..77febd68fcd47ec0ea6b5bcd7876b62fe283121e 100644 (file)
@@ -42,7 +42,7 @@ static struct platform_device uart8250_device = {
 static int __init uart8250_init(void)
 {
        uart8250_data[0].membase = (void __iomem *) &mace->isa.serial1;
-       uart8250_data[1].membase = (void __iomem *) &mace->isa.serial1;
+       uart8250_data[1].membase = (void __iomem *) &mace->isa.serial2;
 
        return platform_device_register(&uart8250_device);
 }
index e8fb880272bd143ba42b8cec34a037f016771135..366b19d33f77f7c826f5f935c4bb6a39760d84af 100644 (file)
@@ -1,5 +1,7 @@
 config SIBYTE_SB1250
        bool
+       select CEVT_SB1250
+       select CSRC_SB1250
        select HW_HAS_PCI
        select IRQ_CPU
        select SIBYTE_ENABLE_LDT_IF_PCI
@@ -9,6 +11,8 @@ config SIBYTE_SB1250
 
 config SIBYTE_BCM1120
        bool
+       select CEVT_SB1250
+       select CSRC_SB1250
        select IRQ_CPU
        select SIBYTE_BCM112X
        select SIBYTE_HAS_ZBUS_PROFILING
@@ -16,6 +20,8 @@ config SIBYTE_BCM1120
 
 config SIBYTE_BCM1125
        bool
+       select CEVT_SB1250
+       select CSRC_SB1250
        select HW_HAS_PCI
        select IRQ_CPU
        select SIBYTE_BCM112X
@@ -24,6 +30,8 @@ config SIBYTE_BCM1125
 
 config SIBYTE_BCM1125H
        bool
+       select CEVT_SB1250
+       select CSRC_SB1250
        select HW_HAS_PCI
        select IRQ_CPU
        select SIBYTE_BCM112X
@@ -33,12 +41,16 @@ config SIBYTE_BCM1125H
 
 config SIBYTE_BCM112X
        bool
+       select CEVT_SB1250
+       select CSRC_SB1250
        select IRQ_CPU
        select SIBYTE_SB1xxx_SOC
        select SIBYTE_HAS_ZBUS_PROFILING
 
 config SIBYTE_BCM1x80
        bool
+       select CEVT_BCM1480
+       select CSRC_BCM1480
        select HW_HAS_PCI
        select IRQ_CPU
        select SIBYTE_HAS_ZBUS_PROFILING
@@ -47,6 +59,8 @@ config SIBYTE_BCM1x80
 
 config SIBYTE_BCM1x55
        bool
+       select CEVT_BCM1480
+       select CSRC_BCM1480
        select HW_HAS_PCI
        select IRQ_CPU
        select SIBYTE_SB1xxx_SOC
index 61790c4bfb600bc03fcdc77d6b0fd13ab1f4e195..e28d626255a3bebd0d6a620eb413c1d185835c1d 100644 (file)
@@ -265,21 +265,6 @@ void __init init_bcm1480_irqs(void)
        }
 }
 
-
-static irqreturn_t bcm1480_dummy_handler(int irq, void *dev_id)
-{
-       return IRQ_NONE;
-}
-
-static struct irqaction bcm1480_dummy_action = {
-       .handler = bcm1480_dummy_handler,
-       .flags   = 0,
-       .mask    = CPU_MASK_NONE,
-       .name    = "bcm1480-private",
-       .next    = NULL,
-       .dev_id  = 0
-};
-
 /*
  *  init_IRQ is called early in the boot sequence from init/main.c.  It
  *  is responsible for setting up the interrupt mapper and installing the
@@ -308,7 +293,6 @@ static struct irqaction bcm1480_dummy_action = {
 
 void __init arch_init_irq(void)
 {
-
        unsigned int i, cpu;
        u64 tmp;
        unsigned int imask = STATUSF_IP4 | STATUSF_IP3 | STATUSF_IP2 |
index bbf19bfabccb54d13e416bd4d1da4b298d809720..1680a68952ae1be6e9e738afe4ebaa4cb8ed19f5 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
-#include <linux/clockchips.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/percpu.h>
-#include <linux/spinlock.h>
+#include <linux/init.h>
 
-#include <asm/addrspace.h>
-#include <asm/time.h>
-#include <asm/io.h>
-
-#include <asm/sibyte/bcm1480_regs.h>
-#include <asm/sibyte/sb1250_regs.h>
-#include <asm/sibyte/bcm1480_int.h>
-#include <asm/sibyte/bcm1480_scd.h>
-
-#include <asm/sibyte/sb1250.h>
-
-
-#define IMR_IP2_VAL    K_BCM1480_INT_MAP_I0
-#define IMR_IP3_VAL    K_BCM1480_INT_MAP_I1
-#define IMR_IP4_VAL    K_BCM1480_INT_MAP_I2
-
-/*
- * The general purpose timer ticks at 1MHz independent if
- * the rest of the system
- */
-static void sibyte_set_mode(enum clock_event_mode mode,
-                           struct clock_event_device *evt)
-{
-       unsigned int cpu = smp_processor_id();
-       void __iomem *timer_cfg, *timer_init;
-
-       timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
-       timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
-
-       switch (mode) {
-       case CLOCK_EVT_MODE_PERIODIC:
-               __raw_writeq(0, timer_cfg);
-               __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, timer_init);
-               __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
-                            timer_cfg);
-               break;
-
-       case CLOCK_EVT_MODE_ONESHOT:
-               /* Stop the timer until we actually program a shot */
-       case CLOCK_EVT_MODE_SHUTDOWN:
-               __raw_writeq(0, timer_cfg);
-               break;
-
-       case CLOCK_EVT_MODE_UNUSED:     /* shuddup gcc */
-       case CLOCK_EVT_MODE_RESUME:
-               ;
-       }
-}
-
-static int sibyte_next_event(unsigned long delta, struct clock_event_device *cd)
-{
-       unsigned int cpu = smp_processor_id();
-       void __iomem *timer_init;
-       unsigned int cnt;
-       int res;
-
-       timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
-       cnt = __raw_readq(timer_init);
-       cnt += delta;
-       __raw_writeq(cnt, timer_init);
-       res = ((long)(__raw_readq(timer_init) - cnt ) > 0) ? -ETIME : 0;
-
-       return res;
-}
-
-static irqreturn_t sibyte_counter_handler(int irq, void *dev_id)
-{
-       unsigned int cpu = smp_processor_id();
-       struct clock_event_device *cd = dev_id;
-       void __iomem *timer_cfg;
-
-       timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
-
-       /* Reset the timer */
-       __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
-                    timer_cfg);
-       cd->event_handler(cd);
-
-       return IRQ_HANDLED;
-}
-
-static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent);
-static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction);
-static DEFINE_PER_CPU(char [18], sibyte_hpt_name);
-
-void __cpuinit sb1480_clockevent_init(void)
-{
-       unsigned int cpu = smp_processor_id();
-       unsigned int irq = K_BCM1480_INT_TIMER_0 + cpu;
-       struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu);
-       struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu);
-       unsigned char *name = per_cpu(sibyte_hpt_name, cpu);
-
-       BUG_ON(cpu > 3);        /* Only have 4 general purpose timers */
-
-       sprintf(name, "bcm1480-counter %d", cpu);
-       cd->name                = name;
-       cd->features            = CLOCK_EVT_FEAT_PERIODIC |
-                                 CLOCK_EVT_FEAT_ONESHOT;
-       clockevent_set_clock(cd, V_SCD_TIMER_FREQ);
-       cd->max_delta_ns        = clockevent_delta2ns(0x7fffff, cd);
-       cd->min_delta_ns        = clockevent_delta2ns(1, cd);
-       cd->rating              = 200;
-       cd->irq                 = irq;
-       cd->cpumask             = cpumask_of_cpu(cpu);
-       cd->set_next_event      = sibyte_next_event;
-       cd->set_mode            = sibyte_set_mode;
-       clockevents_register_device(cd);
-
-       bcm1480_mask_irq(cpu, irq);
-
-       /*
-        * Map timer interrupt to IP[4] of this cpu
-        */
-       __raw_writeq(IMR_IP4_VAL,
-                    IOADDR(A_BCM1480_IMR_REGISTER(cpu,
-                       R_BCM1480_IMR_INTERRUPT_MAP_BASE_H) + (irq << 3)));
-
-       bcm1480_unmask_irq(cpu, irq);
-
-       action->handler = sibyte_counter_handler;
-       action->flags   = IRQF_DISABLED | IRQF_PERCPU;
-       action->name    = name;
-       action->dev_id  = cd;
-       setup_irq(irq, action);
-}
-
-static cycle_t bcm1480_hpt_read(void)
-{
-       return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT));
-}
-
-struct clocksource bcm1480_clocksource = {
-       .name   = "zbbus-cycles",
-       .rating = 200,
-       .read   = bcm1480_hpt_read,
-       .mask   = CLOCKSOURCE_MASK(64),
-       .flags  = CLOCK_SOURCE_IS_CONTINUOUS,
-};
-
-void __init sb1480_clocksource_init(void)
-{
-       struct clocksource *cs = &bcm1480_clocksource;
-       unsigned int plldiv;
-       unsigned long zbbus;
-
-       plldiv = G_BCM1480_SYS_PLL_DIV(__raw_readq(IOADDR(A_SCD_SYSTEM_CFG)));
-       zbbus = ((plldiv >> 1) * 50000000) + ((plldiv & 1) * 25000000);
-       clocksource_set_clock(cs, zbbus);
-       clocksource_register(cs);
-}
+extern void sb1480_clockevent_init(void);
+extern void sb1480_clocksource_init(void);
 
 void __init plat_time_init(void)
 {
index 52d18fc91f32c6e87fcb26ed9420c1d8295d10c2..eac9065ffe0ccc4c5f0811f8ee20d45375abd21f 100644 (file)
@@ -236,20 +236,6 @@ void __init init_sb1250_irqs(void)
 }
 
 
-static irqreturn_t  sb1250_dummy_handler(int irq, void *dev_id)
-{
-       return IRQ_NONE;
-}
-
-static struct irqaction sb1250_dummy_action = {
-       .handler = sb1250_dummy_handler,
-       .flags   = 0,
-       .mask    = CPU_MASK_NONE,
-       .name    = "sb1250-private",
-       .next    = NULL,
-       .dev_id  = 0
-};
-
 /*
  *  arch_init_irq is called early in the boot sequence from init/main.c via
  *  init_IRQ.  It is responsible for setting up the interrupt mapper and
index 95ad34e3fbaca017b953301f3d1f1dba5cb3963d..68337bf7a5aa6d0d5c9429032ed365e20ad272b8 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
+#include <linux/init.h>
 
-/*
- * These are routines to set up and handle interrupts from the
- * sb1250 general purpose timer 0.  We're using the timer as a
- * system clock, so we set it up to run at 100 Hz.  On every
- * interrupt, we update our idea of what the time of day is,
- * then call do_timer() in the architecture-independent kernel
- * code to do general bookkeeping (e.g. update jiffies, run
- * bottom halves, etc.)
- */
-#include <linux/clockchips.h>
-#include <linux/interrupt.h>
-#include <linux/sched.h>
-#include <linux/spinlock.h>
-#include <linux/kernel_stat.h>
-
-#include <asm/irq.h>
-#include <asm/addrspace.h>
-#include <asm/time.h>
-#include <asm/io.h>
-
-#include <asm/sibyte/sb1250.h>
-#include <asm/sibyte/sb1250_regs.h>
-#include <asm/sibyte/sb1250_int.h>
-#include <asm/sibyte/sb1250_scd.h>
-
-
-#define IMR_IP2_VAL    K_INT_MAP_I0
-#define IMR_IP3_VAL    K_INT_MAP_I1
-#define IMR_IP4_VAL    K_INT_MAP_I2
-
-#define SB1250_HPT_NUM         3
-#define SB1250_HPT_VALUE       M_SCD_TIMER_CNT /* max value */
-
-
-/*
- * The general purpose timer ticks at 1 Mhz independent if
- * the rest of the system
- */
-static void sibyte_set_mode(enum clock_event_mode mode,
-                           struct clock_event_device *evt)
-{
-       unsigned int cpu = smp_processor_id();
-       void __iomem *timer_cfg, *timer_init;
-
-       timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
-       timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
-
-       switch(mode) {
-       case CLOCK_EVT_MODE_PERIODIC:
-               __raw_writeq(0, timer_cfg);
-               __raw_writeq((V_SCD_TIMER_FREQ / HZ) - 1, timer_init);
-               __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
-                            timer_cfg);
-               break;
-
-       case CLOCK_EVT_MODE_ONESHOT:
-               /* Stop the timer until we actually program a shot */
-       case CLOCK_EVT_MODE_SHUTDOWN:
-               __raw_writeq(0, timer_cfg);
-               break;
-
-       case CLOCK_EVT_MODE_UNUSED:     /* shuddup gcc */
-       case CLOCK_EVT_MODE_RESUME:
-               ;
-       }
-}
-
-static int
-sibyte_next_event(unsigned long delta, struct clock_event_device *evt)
-{
-       unsigned int cpu = smp_processor_id();
-       void __iomem *timer_cfg, *timer_init;
-
-       timer_cfg = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
-       timer_init = IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_INIT));
-
-       __raw_writeq(0, timer_cfg);
-       __raw_writeq(delta, timer_init);
-       __raw_writeq(M_SCD_TIMER_ENABLE, timer_cfg);
-
-       return 0;
-}
-
-static irqreturn_t sibyte_counter_handler(int irq, void *dev_id)
-{
-       unsigned int cpu = smp_processor_id();
-       struct clock_event_device *cd = dev_id;
-
-       /* ACK interrupt */
-       ____raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
-                      IOADDR(A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG)));
-
-       cd->event_handler(cd);
-
-       return IRQ_HANDLED;
-}
-
-static struct irqaction sibyte_irqaction = {
-       .handler        = sibyte_counter_handler,
-       .flags          = IRQF_DISABLED | IRQF_PERCPU,
-       .name           = "timer",
-};
-
-static DEFINE_PER_CPU(struct clock_event_device, sibyte_hpt_clockevent);
-static DEFINE_PER_CPU(struct irqaction, sibyte_hpt_irqaction);
-static DEFINE_PER_CPU(char [18], sibyte_hpt_name);
-
-void __cpuinit sb1250_clockevent_init(void)
-{
-       unsigned int cpu = smp_processor_id();
-       unsigned int irq = K_INT_TIMER_0 + cpu;
-       struct irqaction *action = &per_cpu(sibyte_hpt_irqaction, cpu);
-       struct clock_event_device *cd = &per_cpu(sibyte_hpt_clockevent, cpu);
-       unsigned char *name = per_cpu(sibyte_hpt_name, cpu);
-
-       /* Only have 4 general purpose timers, and we use last one as hpt */
-       BUG_ON(cpu > 2);
-
-       sprintf(name, "bcm1480-counter %d", cpu);
-       cd->name                = name;
-       cd->features            = CLOCK_EVT_FEAT_PERIODIC |
-                                 CLOCK_EVT_FEAT_ONESHOT;
-       clockevent_set_clock(cd, V_SCD_TIMER_FREQ);
-       cd->max_delta_ns        = clockevent_delta2ns(0x7fffff, cd);
-       cd->min_delta_ns        = clockevent_delta2ns(1, cd);
-       cd->rating              = 200;
-       cd->irq                 = irq;
-       cd->cpumask             = cpumask_of_cpu(cpu);
-       cd->set_next_event      = sibyte_next_event;
-       cd->set_mode            = sibyte_set_mode;
-       clockevents_register_device(cd);
-
-       sb1250_mask_irq(cpu, irq);
-
-       /* Map the timer interrupt to ip[4] of this cpu */
-       __raw_writeq(IMR_IP4_VAL,
-                    IOADDR(A_IMR_REGISTER(cpu, R_IMR_INTERRUPT_MAP_BASE) +
-                           (irq << 3)));
-       cd->cpumask = cpumask_of_cpu(0);
-
-       sb1250_unmask_irq(cpu, irq);
-
-       action->handler = sibyte_counter_handler;
-       action->flags   = IRQF_DISABLED | IRQF_PERCPU;
-       action->name    = name;
-       action->dev_id  = cd;
-       setup_irq(irq, &sibyte_irqaction);
-}
-
-/*
- * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over
- * again.
- */
-static cycle_t sb1250_hpt_read(void)
-{
-       unsigned int count;
-
-       count = G_SCD_TIMER_CNT(__raw_readq(IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM, R_SCD_TIMER_CNT))));
-
-       return SB1250_HPT_VALUE - count;
-}
-
-struct clocksource bcm1250_clocksource = {
-       .name   = "MIPS",
-       .rating = 200,
-       .read   = sb1250_hpt_read,
-       .mask   = CLOCKSOURCE_MASK(23),
-       .flags  = CLOCK_SOURCE_IS_CONTINUOUS,
-};
-
-void __init sb1250_clocksource_init(void)
-{
-       struct clocksource *cs = &bcm1250_clocksource;
-
-       /* Setup hpt using timer #3 but do not enable irq for it */
-       __raw_writeq(0,
-                    IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
-                                                R_SCD_TIMER_CFG)));
-       __raw_writeq(SB1250_HPT_VALUE,
-                    IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
-                                                R_SCD_TIMER_INIT)));
-       __raw_writeq(M_SCD_TIMER_ENABLE | M_SCD_TIMER_MODE_CONTINUOUS,
-                    IOADDR(A_SCD_TIMER_REGISTER(SB1250_HPT_NUM,
-                                                R_SCD_TIMER_CFG)));
-
-       clocksource_set_clock(cs, V_SCD_TIMER_FREQ);
-       clocksource_register(cs);
-}
+extern void sb1250_clocksource_init(void);
+extern void sb1250_clockevent_init(void);
 
 void __init plat_time_init(void)
 {
index 60bc62ef09353a2a689ea61117ea905dea9226fa..6f339af08d225a50b0dd6a6712aa30adf0f723e0 100644 (file)
@@ -1,6 +1,7 @@
 #include <linux/types.h>
 #include <linux/interrupt.h>
 #include <linux/time.h>
+#include <linux/clockchips.h>
 
 #include <asm/i8253.h>
 #include <asm/sni.h>
@@ -80,7 +81,7 @@ static void __init sni_a20r_timer_setup(void)
        unsigned int cpu = smp_processor_id();
 
        cd->cpumask             = cpumask_of_cpu(cpu);
-
+       clockevents_register_device(cd);
        action->dev_id = cd;
        setup_irq(SNI_A20R_IRQ_TIMER, &a20r_irqaction);
 }
@@ -169,8 +170,6 @@ void __init plat_time_init(void)
 
        mips_hpt_frequency = r4k_tick * HZ;
 
-       setup_pit_timer();
-
        switch (sni_brd_type) {
        case SNI_BRD_10:
        case SNI_BRD_10NEW:
index 4ec716d8c1a623b4e123b8e2923d4443a3f3b42a..1330061020ab54e718ddaed14d71b05c20ae4bf9 100644 (file)
@@ -513,7 +513,7 @@ config ZFCPDUMP
        default n
        help
          Select this option if you want to build an zfcpdump enabled kernel.
-         Refer to "Documentation/s390/zfcpdump.txt" for more details on this.
+         Refer to <file:Documentation/s390/zfcpdump.txt> for more details on this.
 
 endmenu
 
index 247f8a65e7333c585c06566eb4069051327c2c87..22a3eb38438b14e2cb2d5c5e4108c1ae779f2dfc 100644 (file)
@@ -182,9 +182,7 @@ config CPU_HAS_IPR_IRQ
        bool
 
 config CPU_HAS_SR_RB
-       bool "CPU has SR.RB"
-       depends on CPU_SH3 || CPU_SH4
-       default y
+       bool
        help
          This will enable the use of SR.RB register bank usage. Processors
          that are lacking this bit must have another method in place for
@@ -291,9 +289,7 @@ config SH_DREAMCAST
        depends on CPU_SUBTYPE_SH7091
        help
          Select Dreamcast if configuring for a SEGA Dreamcast.
-         More information at
-         <http://www.m17n.org/linux-sh/dreamcast/>.  There is a
-         Dreamcast project is at <http://linuxdc.sourceforge.net/>.
+         More information at <http://www.linux-sh.org>
 
 config SH_MPC1211
        bool "Interface MPC1211"
index b507b501f0cf2f4b24190945eb2742f8babdb261..ab2f9f3c354c27df9c54081d641c9aa11b67353d 100644 (file)
@@ -86,6 +86,14 @@ config 4KSTACKS
          on the VM subsystem for higher order allocations. This option
          will also use IRQ stacks to compensate for the reduced stackspace.
 
+config IRQSTACKS
+       bool "Use separate kernel stacks when processing interrupts"
+       depends on DEBUG_KERNEL
+       help
+         If you say Y here the kernel will use separate kernel stacks
+         for handling hard and soft interrupts.  This can help avoid
+         overflowing the process kernel stacks.
+
 config SH_KGDB
        bool "Include KGDB kernel debugger"
        select FRAME_POINTER
index 408342b175c8b55820b44380a7f91b955e5448f3..e189fae8b60c15d84eecb3067adfd852532aa4cc 100644 (file)
@@ -66,7 +66,7 @@ cflags-y      += $(isaflags-y) -ffreestanding
 cflags-$(CONFIG_MORE_COMPILE_OPTIONS)  += \
        $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g')
 
-OBJCOPYFLAGS   := -O binary -R .note -R .comment -R .stab -R .stabstr -S
+OBJCOPYFLAGS   := -O binary -R .note -R .note.gnu.build-id -R .comment -R .stab -R .stabstr -S
 
 #
 # arch/sh/defconfig doesn't reflect any real hardware, and as such should
index afe9de73666ad8117f8e63b4abd054c16e012427..0fdc0bc19145d8f2f8a37bfb79b21b2db741903e 100644 (file)
@@ -16,6 +16,8 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/pata_platform.h>
+#include <linux/types.h>
+#include <net/ax88796.h>
 #include <asm/machvec.h>
 #include <asm/r7780rp.h>
 #include <asm/clock.h>
@@ -136,11 +138,50 @@ static struct platform_device heartbeat_device = {
        .resource       = heartbeat_resources,
 };
 
+static struct ax_plat_data ax88796_platdata = {
+       .flags          = AXFLG_HAS_93CX6,
+       .wordlength     = 2,
+       .dcr_val        = 0x1,
+       .rcr_val        = 0x40,
+};
+
+static struct resource ax88796_resources[] = {
+       {
+#ifdef CONFIG_SH_R7780RP
+               .start  = 0xa5800400,
+               .end    = 0xa5800400 + (0x20 * 0x2) - 1,
+#else
+               .start  = 0xa4100400,
+               .end    = 0xa4100400 + (0x20 * 0x2) - 1,
+#endif
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .start  = IRQ_AX88796,
+               .end    = IRQ_AX88796,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device ax88796_device = {
+       .name           = "ax88796",
+       .id             = 0,
+
+       .dev    = {
+               .platform_data = &ax88796_platdata,
+       },
+
+       .num_resources  = ARRAY_SIZE(ax88796_resources),
+       .resource       = ax88796_resources,
+};
+
+
 static struct platform_device *r7780rp_devices[] __initdata = {
        &r8a66597_usb_host_device,
        &m66592_usb_peripheral_device,
        &cf_ide_device,
        &heartbeat_device,
+       &ax88796_device,
 };
 
 static int __init r7780rp_devices_setup(void)
@@ -183,6 +224,34 @@ static void r7780rp_power_off(void)
                ctrl_outw(0x0001, PA_POFF);
 }
 
+static inline unsigned char is_ide_ioaddr(unsigned long addr)
+{
+       return ((cf_ide_resources[0].start <= addr &&
+                addr <= cf_ide_resources[0].end) ||
+               (cf_ide_resources[1].start <= addr &&
+                addr <= cf_ide_resources[1].end));
+}
+
+void highlander_writeb(u8 b, void __iomem *addr)
+{
+       unsigned long tmp = (unsigned long __force)addr;
+
+       if (is_ide_ioaddr(tmp))
+               ctrl_outw((u16)b, tmp);
+       else
+               ctrl_outb(b, tmp);
+}
+
+u8 highlander_readb(void __iomem *addr)
+{
+       unsigned long tmp = (unsigned long __force)addr;
+
+       if (is_ide_ioaddr(tmp))
+               return ctrl_inw(tmp) & 0xff;
+       else
+               return ctrl_inb(tmp);
+}
+
 /*
  * Initialize the board
  */
@@ -267,4 +336,6 @@ static struct sh_machine_vector mv_highlander __initmv = {
        .mv_setup               = highlander_setup,
        .mv_init_irq            = highlander_init_irq,
        .mv_irq_demux           = highlander_irq_demux,
+       .mv_readb               = highlander_readb,
+       .mv_writeb              = highlander_writeb,
 };
index 03b63457e1780c9fb3c77ec5bf185eaa4abfd7f0..20f064083cc29179131a1b181a55249705c14887 100644 (file)
@@ -103,8 +103,8 @@ static void __init se7722_setup(char **cmdline_p)
 
        ctrl_outl(0x00051001, MSTPCR0);
        ctrl_outl(0x00000000, MSTPCR1);
-       /* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC */
-       ctrl_outl(0xffffbfC0, MSTPCR2);
+       /* KEYSC, VOU, BEU, CEU, VEU, VPU, LCDC, USB */
+       ctrl_outl(0xffffb7c0, MSTPCR2);
 
        ctrl_outw(0x0000, PORT_PECR);   /* PORT E 1 = IRQ5 ,E 0 = BS */
        ctrl_outw(0x1000, PORT_PJCR);   /* PORT J 1 = IRQ1,J 0 =IRQ0 */
index 5c29338532da14209164a5c1366058cd8f606601..158e03f0b1ef9b33c69d3c889f2730bcdc2649b4 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.22-rc4
-# Thu Jul 12 12:33:15 2007
+# Linux kernel version: 2.6.24-rc1
+# Fri Nov  2 14:30:49 2007
 #
 CONFIG_SUPERH=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
@@ -13,39 +13,40 @@ CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_SYS_SUPPORTS_NUMA=y
 CONFIG_SYS_SUPPORTS_PCI=y
 CONFIG_STACKTRACE_SUPPORT=y
 CONFIG_LOCKDEP_SUPPORT=y
 # CONFIG_ARCH_HAS_ILOG2_U32 is not set
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_NO_VIRT_TO_BUS=y
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
 
 #
-# Code maturity level options
+# General setup
 #
 CONFIG_EXPERIMENTAL=y
 CONFIG_BROKEN_ON_SMP=y
 CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
 CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
-# CONFIG_IPC_NS is not set
 CONFIG_SYSVIPC_SYSCTL=y
 # CONFIG_POSIX_MQUEUE is not set
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 # CONFIG_TASKSTATS is not set
-# CONFIG_UTS_NS is not set
+# CONFIG_USER_NS is not set
 # CONFIG_AUDIT is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
 # CONFIG_SYSFS_DEPRECATED is not set
 # CONFIG_RELAY is not set
 # CONFIG_BLK_DEV_INITRD is not set
@@ -66,7 +67,6 @@ CONFIG_BASE_FULL=y
 CONFIG_ANON_INODES=y
 # CONFIG_EPOLL is not set
 CONFIG_SIGNALFD=y
-CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
 CONFIG_VM_EVENT_COUNTERS=y
@@ -75,24 +75,17 @@ CONFIG_SLAB=y
 # CONFIG_SLOB is not set
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
-
-#
-# Loadable module support
-#
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_FORCE_UNLOAD is not set
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_KMOD=y
-
-#
-# Block layer
-#
 CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
 
 #
 # IO Schedulers
@@ -115,7 +108,6 @@ CONFIG_CPU_SH4A=y
 CONFIG_CPU_SHX2=y
 # CONFIG_CPU_SUBTYPE_SH7619 is not set
 # CONFIG_CPU_SUBTYPE_SH7206 is not set
-# CONFIG_CPU_SUBTYPE_SH7300 is not set
 # CONFIG_CPU_SUBTYPE_SH7705 is not set
 # CONFIG_CPU_SUBTYPE_SH7706 is not set
 # CONFIG_CPU_SUBTYPE_SH7707 is not set
@@ -123,6 +115,7 @@ CONFIG_CPU_SHX2=y
 # CONFIG_CPU_SUBTYPE_SH7709 is not set
 # CONFIG_CPU_SUBTYPE_SH7710 is not set
 # CONFIG_CPU_SUBTYPE_SH7712 is not set
+# CONFIG_CPU_SUBTYPE_SH7720 is not set
 # CONFIG_CPU_SUBTYPE_SH7750 is not set
 # CONFIG_CPU_SUBTYPE_SH7091 is not set
 # CONFIG_CPU_SUBTYPE_SH7750R is not set
@@ -137,7 +130,6 @@ CONFIG_CPU_SHX2=y
 # CONFIG_CPU_SUBTYPE_SH7780 is not set
 CONFIG_CPU_SUBTYPE_SH7785=y
 # CONFIG_CPU_SUBTYPE_SHX3 is not set
-# CONFIG_CPU_SUBTYPE_SH73180 is not set
 # CONFIG_CPU_SUBTYPE_SH7343 is not set
 # CONFIG_CPU_SUBTYPE_SH7722 is not set
 
@@ -149,15 +141,17 @@ CONFIG_MMU=y
 CONFIG_PAGE_OFFSET=0x80000000
 CONFIG_MEMORY_START=0x08000000
 CONFIG_MEMORY_SIZE=0x08000000
-CONFIG_32BIT=y
+# CONFIG_32BIT is not set
 # CONFIG_X2TLB is not set
 CONFIG_VSYSCALL=y
+# CONFIG_NUMA is not set
 CONFIG_ARCH_FLATMEM_ENABLE=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_SPARSEMEM_DEFAULT=y
-CONFIG_MAX_ACTIVE_REGIONS=1
+CONFIG_MAX_ACTIVE_REGIONS=2
 CONFIG_ARCH_POPULATES_NODE_MAP=y
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_PAGE_SIZE_4KB=y
 # CONFIG_PAGE_SIZE_8KB is not set
 # CONFIG_PAGE_SIZE_64KB is not set
@@ -167,12 +161,14 @@ CONFIG_HUGETLB_PAGE_SIZE_1MB=y
 # CONFIG_HUGETLB_PAGE_SIZE_4MB is not set
 # CONFIG_HUGETLB_PAGE_SIZE_64MB is not set
 CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
+# CONFIG_FLATMEM_MANUAL is not set
 # CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
+CONFIG_SPARSEMEM_MANUAL=y
+CONFIG_SPARSEMEM=y
+CONFIG_HAVE_MEMORY_PRESENT=y
 CONFIG_SPARSEMEM_STATIC=y
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+# CONFIG_MEMORY_HOTPLUG is not set
 CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_RESOURCES_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=0
@@ -182,7 +178,9 @@ CONFIG_NR_QUICK=2
 # Cache configuration
 #
 # CONFIG_SH_DIRECT_MAPPED is not set
-# CONFIG_SH_WRITETHROUGH is not set
+CONFIG_CACHE_WRITEBACK=y
+# CONFIG_CACHE_WRITETHROUGH is not set
+# CONFIG_CACHE_OFF is not set
 
 #
 # Processor features
@@ -190,12 +188,11 @@ CONFIG_NR_QUICK=2
 CONFIG_CPU_LITTLE_ENDIAN=y
 # CONFIG_CPU_BIG_ENDIAN is not set
 CONFIG_SH_FPU=y
-# CONFIG_SH_DSP is not set
 CONFIG_SH_STORE_QUEUES=y
 CONFIG_CPU_HAS_INTEVT=y
-CONFIG_CPU_HAS_INTC2_IRQ=y
 CONFIG_CPU_HAS_SR_RB=y
 CONFIG_CPU_HAS_PTEA=y
+CONFIG_CPU_HAS_FPU=y
 
 #
 # Board support
@@ -214,6 +211,7 @@ CONFIG_SH_PCLK_FREQ=50000000
 # CONFIG_TICK_ONESHOT is not set
 # CONFIG_NO_HZ is not set
 # CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 
 #
 # CPU Frequency scaling
@@ -249,6 +247,7 @@ CONFIG_KEXEC=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 CONFIG_PREEMPT=y
 CONFIG_PREEMPT_BKL=y
+CONFIG_GUSA=y
 
 #
 # Boot options
@@ -268,10 +267,6 @@ CONFIG_PCI_AUTO=y
 CONFIG_PCI_AUTO_UPDATE_RESOURCES=y
 # CONFIG_ARCH_SUPPORTS_MSI is not set
 # CONFIG_PCI_DEBUG is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
 # CONFIG_PCCARD is not set
 # CONFIG_HOTPLUG_PCI is not set
 
@@ -322,6 +317,7 @@ CONFIG_IP_PNP_DHCP=y
 CONFIG_INET_XFRM_MODE_TRANSPORT=y
 CONFIG_INET_XFRM_MODE_TUNNEL=y
 CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
@@ -348,10 +344,6 @@ CONFIG_LLC=m
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
 # CONFIG_NET_SCHED is not set
 
 #
@@ -371,6 +363,7 @@ CONFIG_WIRELESS_EXT=y
 # CONFIG_MAC80211 is not set
 # CONFIG_IEEE80211 is not set
 # CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
 
 #
 # Device Drivers
@@ -379,33 +372,17 @@ CONFIG_WIRELESS_EXT=y
 #
 # Generic Driver Options
 #
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=m
 # CONFIG_DEBUG_DRIVER is not set
 # CONFIG_DEBUG_DEVRES is not set
 # CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
 # CONFIG_CONNECTOR is not set
 # CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
 # CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNPACPI is not set
-
-#
-# Block devices
-#
-# CONFIG_BLK_CPQ_DA is not set
+CONFIG_BLK_DEV=y
 # CONFIG_BLK_CPQ_CISS_DA is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
@@ -419,14 +396,11 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
-
-#
-# Misc devices
-#
+CONFIG_MISC_DEVICES=y
 # CONFIG_PHANTOM is not set
+CONFIG_EEPROM_93CX6=y
 # CONFIG_SGI_IOC4 is not set
 # CONFIG_TIFM_CORE is not set
-# CONFIG_BLINK is not set
 # CONFIG_IDE is not set
 
 #
@@ -434,6 +408,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
 #
 # CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
 # CONFIG_SCSI_TGT is not set
 # CONFIG_SCSI_NETLINK is not set
 CONFIG_SCSI_PROC_FS=y
@@ -463,12 +438,9 @@ CONFIG_SCSI_WAIT_SCAN=m
 # CONFIG_SCSI_SPI_ATTRS is not set
 # CONFIG_SCSI_FC_ATTRS is not set
 # CONFIG_SCSI_ISCSI_ATTRS is not set
-# CONFIG_SCSI_SAS_ATTRS is not set
 # CONFIG_SCSI_SAS_LIBSAS is not set
-
-#
-# SCSI low-level drivers
-#
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
 # CONFIG_ISCSI_TCP is not set
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
 # CONFIG_SCSI_3W_9XXX is not set
@@ -478,7 +450,6 @@ CONFIG_SCSI_WAIT_SCAN=m
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
 # CONFIG_SCSI_AIC94XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
 # CONFIG_SCSI_ARCMSR is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
@@ -543,6 +514,7 @@ CONFIG_SATA_SIL=y
 # CONFIG_PATA_OLDPIIX is not set
 # CONFIG_PATA_NETCELL is not set
 # CONFIG_PATA_NS87410 is not set
+# CONFIG_PATA_NS87415 is not set
 # CONFIG_PATA_OPTI is not set
 # CONFIG_PATA_OPTIDMA is not set
 # CONFIG_PATA_PDC_OLD is not set
@@ -556,45 +528,26 @@ CONFIG_SATA_SIL=y
 # CONFIG_PATA_VIA is not set
 # CONFIG_PATA_WINBOND is not set
 CONFIG_PATA_PLATFORM=y
-
-#
-# Multi-device support (RAID and LVM)
-#
 # CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
 # CONFIG_FUSION is not set
-# CONFIG_FUSION_SPI is not set
-# CONFIG_FUSION_FC is not set
-# CONFIG_FUSION_SAS is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
 # CONFIG_FIREWIRE is not set
 # CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
 # CONFIG_I2O is not set
-
-#
-# Network device support
-#
 CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
 # CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_IP1000 is not set
 # CONFIG_ARCNET is not set
 # CONFIG_PHYLIB is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
 CONFIG_NET_ETHERNET=y
 CONFIG_MII=y
 # CONFIG_STNIC is not set
@@ -603,17 +556,20 @@ CONFIG_MII=y
 # CONFIG_CASSINI is not set
 # CONFIG_NET_VENDOR_3COM is not set
 # CONFIG_SMC91X is not set
-
-#
-# Tulip family network device support
-#
+# CONFIG_SMC911X is not set
 # CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
 # CONFIG_NET_PCI is not set
+# CONFIG_B44 is not set
 CONFIG_NETDEV_1000=y
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
 # CONFIG_E1000 is not set
+# CONFIG_E1000E is not set
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -631,11 +587,14 @@ CONFIG_R8169=y
 CONFIG_NETDEV_10000=y
 # CONFIG_CHELSIO_T1 is not set
 # CONFIG_CHELSIO_T3 is not set
+# CONFIG_IXGBE is not set
 # CONFIG_IXGB is not set
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
 # CONFIG_NETXEN_NIC is not set
+# CONFIG_NIU is not set
 # CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
 # CONFIG_TR is not set
 
 #
@@ -653,15 +612,7 @@ CONFIG_NETDEV_10000=y
 # CONFIG_NETCONSOLE is not set
 # CONFIG_NETPOLL is not set
 # CONFIG_NET_POLL_CONTROLLER is not set
-
-#
-# ISDN subsystem
-#
 # CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
 # CONFIG_PHONE is not set
 
 #
@@ -669,6 +620,7 @@ CONFIG_NETDEV_10000=y
 #
 CONFIG_INPUT=y
 # CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
 
 #
 # Userland interfaces
@@ -678,7 +630,6 @@ CONFIG_INPUT_MOUSEDEV=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
 
@@ -732,21 +683,11 @@ CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
-
-#
-# IPMI
-#
 # CONFIG_IPMI_HANDLER is not set
-# CONFIG_WATCHDOG is not set
 CONFIG_HW_RANDOM=y
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
-# CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
-
-#
-# TPM devices
-#
 # CONFIG_TCG_TPM is not set
 CONFIG_DEVPORT=y
 # CONFIG_I2C is not set
@@ -756,21 +697,31 @@ CONFIG_DEVPORT=y
 #
 # CONFIG_SPI is not set
 # CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
 # CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
 CONFIG_HWMON=y
 # CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_PC87360 is not set
 # CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
 # CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VIA686A is not set
 # CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_VT8231 is not set
 # CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
 # CONFIG_HWMON_DEBUG_CHIP is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
 
 #
 # Multifunction device drivers
@@ -787,19 +738,16 @@ CONFIG_HWMON=y
 #
 # Graphics support
 #
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Display device support
-#
-# CONFIG_DISPLAY_SUPPORT is not set
+# CONFIG_DRM is not set
 # CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
 CONFIG_FB=y
 # CONFIG_FIRMWARE_EDID is not set
 # CONFIG_FB_DDC is not set
 # CONFIG_FB_CFB_FILLRECT is not set
 # CONFIG_FB_CFB_COPYAREA is not set
 # CONFIG_FB_CFB_IMAGEBLIT is not set
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
 # CONFIG_FB_SYS_FILLRECT is not set
 # CONFIG_FB_SYS_COPYAREA is not set
 # CONFIG_FB_SYS_IMAGEBLIT is not set
@@ -819,7 +767,6 @@ CONFIG_FB_DEFERRED_IO=y
 # CONFIG_FB_CYBER2000 is not set
 # CONFIG_FB_ASILIANT is not set
 # CONFIG_FB_IMSTT is not set
-# CONFIG_FB_EPSON1355 is not set
 # CONFIG_FB_S1D13XXX is not set
 # CONFIG_FB_NVIDIA is not set
 # CONFIG_FB_RIVA is not set
@@ -839,6 +786,12 @@ CONFIG_FB_DEFERRED_IO=y
 # CONFIG_FB_ARK is not set
 # CONFIG_FB_PM3 is not set
 # CONFIG_FB_VIRTUAL is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
 # CONFIG_LOGO is not set
 
 #
@@ -855,20 +808,14 @@ CONFIG_SOUND=m
 # Open Sound System
 #
 CONFIG_SOUND_PRIME=m
-# CONFIG_OSS_OBSOLETE is not set
 # CONFIG_SOUND_TRIDENT is not set
 # CONFIG_SOUND_MSNDCLAS is not set
 # CONFIG_SOUND_MSNDPIN is not set
-
-#
-# HID Devices
-#
+CONFIG_HID_SUPPORT=y
 CONFIG_HID=y
 # CONFIG_HID_DEBUG is not set
-
-#
-# USB support
-#
+# CONFIG_HIDRAW is not set
+CONFIG_USB_SUPPORT=y
 CONFIG_USB_ARCH_HAS_HCD=y
 CONFIG_USB_ARCH_HAS_OHCI=y
 CONFIG_USB_ARCH_HAS_EHCI=y
@@ -883,32 +830,8 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # CONFIG_USB_GADGET is not set
 # CONFIG_MMC is not set
-
-#
-# LED devices
-#
 # CONFIG_NEW_LEDS is not set
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-
-#
-# InfiniBand support
-#
 # CONFIG_INFINIBAND is not set
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-
-#
-# Real Time Clock
-#
 CONFIG_RTC_LIB=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_HCTOSYS=y
@@ -924,10 +847,6 @@ CONFIG_RTC_INTF_DEV=y
 # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
 # CONFIG_RTC_DRV_TEST is not set
 
-#
-# I2C RTC drivers
-#
-
 #
 # SPI RTC drivers
 #
@@ -936,8 +855,10 @@ CONFIG_RTC_INTF_DEV=y
 # Platform RTC drivers
 #
 # CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
 # CONFIG_RTC_DRV_DS1742 is not set
 # CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
 # CONFIG_RTC_DRV_V3020 is not set
 
 #
@@ -946,17 +867,9 @@ CONFIG_RTC_INTF_DEV=y
 CONFIG_RTC_DRV_SH=y
 
 #
-# DMA Engine support
-#
-# CONFIG_DMA_ENGINE is not set
-
-#
-# DMA Clients
-#
-
-#
-# DMA Devices
+# Userspace I/O
 #
+# CONFIG_UIO is not set
 
 #
 # File systems
@@ -1017,7 +930,6 @@ CONFIG_TMPFS=y
 # CONFIG_TMPFS_POSIX_ACL is not set
 CONFIG_HUGETLBFS=y
 CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
 CONFIG_CONFIGFS_FS=m
 
 #
@@ -1036,10 +948,7 @@ CONFIG_CONFIGFS_FS=m
 # CONFIG_QNX4FS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
+CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
@@ -1065,17 +974,12 @@ CONFIG_RPCSEC_GSS_KRB5=y
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-
-#
-# Native Language Support
-#
 CONFIG_NLS=y
 CONFIG_NLS_DEFAULT="iso8859-1"
 CONFIG_NLS_CODEPAGE_437=y
@@ -1116,23 +1020,18 @@ CONFIG_NLS_ISO8859_1=y
 # CONFIG_NLS_KOI8_R is not set
 # CONFIG_NLS_KOI8_U is not set
 # CONFIG_NLS_UTF8 is not set
-
-#
-# Distributed Lock Manager
-#
 # CONFIG_DLM is not set
-
-#
-# Profiling support
-#
+CONFIG_INSTRUMENTATION=y
 CONFIG_PROFILING=y
 CONFIG_OPROFILE=m
+# CONFIG_MARKERS is not set
 
 #
 # Kernel hacking
 #
 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 # CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
 CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
@@ -1141,6 +1040,7 @@ CONFIG_DEBUG_FS=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SHIRQ is not set
 # CONFIG_DETECT_SOFTLOCKUP is not set
+CONFIG_SCHED_DEBUG=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_TIMER_STATS is not set
 # CONFIG_DEBUG_SLAB is not set
@@ -1150,6 +1050,7 @@ CONFIG_DEBUG_MUTEXES=y
 CONFIG_DEBUG_LOCK_ALLOC=y
 # CONFIG_PROVE_LOCKING is not set
 CONFIG_LOCKDEP=y
+# CONFIG_LOCK_STAT is not set
 # CONFIG_DEBUG_LOCKDEP is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 CONFIG_DEBUG_LOCKING_API_SELFTESTS=y
@@ -1159,17 +1060,21 @@ CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_VM is not set
 # CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
 CONFIG_FRAME_POINTER=y
 CONFIG_FORCED_INLINING=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
 CONFIG_SH_STANDARD_BIOS=y
 # CONFIG_EARLY_SCIF_CONSOLE is not set
 CONFIG_EARLY_PRINTK=y
 # CONFIG_DEBUG_BOOTMEM is not set
 CONFIG_DEBUG_STACKOVERFLOW=y
 CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_4KSTACKS is not set
+CONFIG_4KSTACKS=y
+# CONFIG_IRQSTACKS is not set
 # CONFIG_SH_KGDB is not set
 
 #
@@ -1177,10 +1082,7 @@ CONFIG_DEBUG_STACK_USAGE=y
 #
 # CONFIG_KEYS is not set
 # CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
 CONFIG_CRYPTO=y
 CONFIG_CRYPTO_ALGAPI=y
 CONFIG_CRYPTO_BLKCIPHER=y
@@ -1201,6 +1103,7 @@ CONFIG_CRYPTO_ECB=m
 CONFIG_CRYPTO_CBC=y
 CONFIG_CRYPTO_PCBC=m
 # CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
 # CONFIG_CRYPTO_CRYPTD is not set
 CONFIG_CRYPTO_DES=y
 # CONFIG_CRYPTO_FCRYPT is not set
@@ -1214,15 +1117,14 @@ CONFIG_CRYPTO_DES=y
 # CONFIG_CRYPTO_ARC4 is not set
 # CONFIG_CRYPTO_KHAZAD is not set
 # CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
 # CONFIG_CRYPTO_DEFLATE is not set
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
 # CONFIG_CRYPTO_CRC32C is not set
 # CONFIG_CRYPTO_CAMELLIA is not set
 # CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
+# CONFIG_CRYPTO_AUTHENC is not set
+CONFIG_CRYPTO_HW=y
 
 #
 # Library routines
@@ -1232,6 +1134,7 @@ CONFIG_BITREVERSE=y
 # CONFIG_CRC16 is not set
 # CONFIG_CRC_ITU_T is not set
 CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
 # CONFIG_LIBCRC32C is not set
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
index 1502a14386b65cbc16d6af22571e09d8a982c84f..0814a5afe9b7e59430fcce8403c3044e6a604981 100644 (file)
@@ -114,7 +114,7 @@ static struct pci_err int_error[]={
   { INT_MWPDI,  "MWPDI: PERR from target at data write"},
   { INT_MRDPEI, "MRDPEI: Master read data parity error"}
 };
-#define NUM_PCI_INT_ERRS (sizeof(int_error)/sizeof(struct pci_err))
+#define NUM_PCI_INT_ERRS ARRAY_SIZE(int_error)
 
 static struct pci_err aint_error[]={
   { AINT_MBI,   "MBI: Master broken"},
@@ -126,7 +126,7 @@ static struct pci_err aint_error[]={
   { AINT_WDPE,  "WDPE: Write data parity"}
 };
 
-#define NUM_PCI_AINT_ERRS (sizeof(aint_error)/sizeof(struct pci_err))
+#define NUM_PCI_AINT_ERRS ARRAY_SIZE(aint_error)
 
 static void print_pci_errors(unsigned reg,struct pci_err *error,int num_errors)
 {
index 5da325414880abb50f68231cb001a80888cf7517..56ea7b269b59c4fdc3d0503bdfc411b39cb45971 100644 (file)
@@ -49,7 +49,6 @@ static void enable_ipr_irq(unsigned int irq)
  * bits/4. This is to make it easier to read the value directly from the
  * datasheets. The IPR address is calculated using the ipr_offset table.
  */
-
 void register_ipr_controller(struct ipr_desc *desc)
 {
        int i;
@@ -71,12 +70,4 @@ void register_ipr_controller(struct ipr_desc *desc)
                disable_ipr_irq(p->irq);
        }
 }
-
 EXPORT_SYMBOL(register_ipr_controller);
-
-#if !defined(CONFIG_CPU_HAS_PINT_IRQ)
-int ipr_irq_demux(int irq)
-{
-       return irq;
-}
-#endif
index 55f66104431db8cbe97b144c224be5c97e4155eb..b9c6547c4a90dcb2b822bdb5c7d8b7e27f0ce9f6 100644 (file)
 #include <asm/mmzone.h>
 #include <asm/sci.h>
 
+static struct resource usbf_resources[] = {
+       [0] = {
+               .name   = "m66592_udc",
+               .start  = 0xA4480000,
+               .end    = 0xA44800FF,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .name   = "m66592_udc",
+               .start  = 65,
+               .end    = 65,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device usbf_device = {
+       .name           = "m66592_udc",
+       .id             = -1,
+       .dev = {
+               .dma_mask               = NULL,
+               .coherent_dma_mask      = 0xffffffff,
+       },
+       .num_resources  = ARRAY_SIZE(usbf_resources),
+       .resource       = usbf_resources,
+};
+
 static struct plat_sci_port sci_platform_data[] = {
        {
                .mapbase        = 0xffe00000,
@@ -47,6 +73,7 @@ static struct platform_device sci_device = {
 };
 
 static struct platform_device *sh7722_devices[] __initdata = {
+       &usbf_device,
        &sci_device,
 };
 
index 4b49d03ffbd2edd6b1598f35c58e5ab7a37d18d5..348da194ec9996617a164133ec49c9cc2a049d0a 100644 (file)
@@ -69,7 +69,7 @@ unlock:
 }
 #endif
 
-#ifdef CONFIG_4KSTACKS
+#ifdef CONFIG_IRQSTACKS
 /*
  * per-CPU IRQ handling contexts (thread information and stack)
  */
@@ -85,7 +85,7 @@ static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly;
 asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
 {
        struct pt_regs *old_regs = set_irq_regs(regs);
-#ifdef CONFIG_4KSTACKS
+#ifdef CONFIG_IRQSTACKS
        union irq_ctx *curctx, *irqctx;
 #endif
 
@@ -109,7 +109,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
 
        irq = irq_demux(evt2irq(irq));
 
-#ifdef CONFIG_4KSTACKS
+#ifdef CONFIG_IRQSTACKS
        curctx = (union irq_ctx *)current_thread_info();
        irqctx = hardirq_ctx[smp_processor_id()];
 
@@ -157,7 +157,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
        return 1;
 }
 
-#ifdef CONFIG_4KSTACKS
+#ifdef CONFIG_IRQSTACKS
 static char softirq_stack[NR_CPUS * THREAD_SIZE]
                __attribute__((__section__(".bss.page_aligned")));
 
index b749403f6b382fe3c4108be924e5caa5e10afe80..0b8c45d53a47ba5c75fa99a3a287d5a6b61d9887 100644 (file)
 #include <asm/clock.h>
 #include <asm/mmu_context.h>
 
-extern void * __rd_start, * __rd_end;
-
-/*
- * Machine setup..
- */
-
 /*
  * Initialize loops_per_jiffy as 10000000 (1000MIPS).
  * This value will be used at the very early stage of serial setup.
@@ -63,33 +57,25 @@ struct screen_info screen_info;
 
 extern int root_mountflags;
 
-/*
- * This is set up by the setup-routine at boot-time
- */
-#define PARAM  ((unsigned char *)empty_zero_page)
-
-#define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000))
-#define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004))
-#define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008))
-#define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c))
-#define INITRD_START (*(unsigned long *) (PARAM+0x010))
-#define INITRD_SIZE (*(unsigned long *) (PARAM+0x014))
-/* ... */
-#define COMMAND_LINE ((char *) (PARAM+0x100))
-
 #define RAMDISK_IMAGE_START_MASK       0x07FF
 #define RAMDISK_PROMPT_FLAG            0x8000
 #define RAMDISK_LOAD_FLAG              0x4000
 
 static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, };
 
-static struct resource code_resource = { .name = "Kernel code", };
-static struct resource data_resource = { .name = "Kernel data", };
+static struct resource code_resource = {
+       .name = "Kernel code",
+       .flags = IORESOURCE_BUSY | IORESOURCE_MEM,
+};
+
+static struct resource data_resource = {
+       .name = "Kernel data",
+       .flags = IORESOURCE_BUSY | IORESOURCE_MEM,
+};
 
 unsigned long memory_start;
 EXPORT_SYMBOL(memory_start);
-
-unsigned long memory_end;
+unsigned long memory_end = 0;
 EXPORT_SYMBOL(memory_end);
 
 static int __init early_parse_mem(char *p)
@@ -195,14 +181,7 @@ void __init setup_bootmem_allocator(unsigned long free_pfn)
        sparse_memory_present_with_active_regions(0);
 
 #ifdef CONFIG_BLK_DEV_INITRD
-       ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0);
-       if (&__rd_start != &__rd_end) {
-               LOADER_TYPE = 1;
-               INITRD_START = PHYSADDR((unsigned long)&__rd_start) -
-                                       __MEMORY_START;
-               INITRD_SIZE = (unsigned long)&__rd_end -
-                             (unsigned long)&__rd_start;
-       }
+       ROOT_DEV = Root_RAM0;
 
        if (LOADER_TYPE && INITRD_START) {
                if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
@@ -265,7 +244,8 @@ void __init setup_arch(char **cmdline_p)
        data_resource.end = virt_to_phys(_edata)-1;
 
        memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
-       memory_end = memory_start + __MEMORY_SIZE;
+       if (!memory_end)
+               memory_end = memory_start + __MEMORY_SIZE;
 
 #ifdef CONFIG_CMDLINE_BOOL
        strlcpy(command_line, CONFIG_CMDLINE, sizeof(command_line));
index 6d5abba2ee271a8147be2f56b2502ccd75600859..0956fb3681a316dfa4cbc538326fff5c35724903 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: vmlinux.lds.S,v 1.8 2003/05/16 17:18:14 lethal Exp $
+/*
  * ld script to make SuperH Linux kernel
  * Written by Niibe Yutaka
  */
@@ -15,121 +15,124 @@ OUTPUT_ARCH(sh)
 ENTRY(_start)
 SECTIONS
 {
-  . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
-  _text = .;                   /* Text and read-only data */
-  text = .;                    /* Text and read-only data */
-  .empty_zero_page : {
-       *(.empty_zero_page)
+       . = CONFIG_PAGE_OFFSET + CONFIG_MEMORY_START + CONFIG_ZERO_PAGE_OFFSET;
+       _text = .;                      /* Text and read-only data */
+
+       .empty_zero_page : {
+               *(.empty_zero_page)
        } = 0
-  .text : {
-       *(.text.head)
-       TEXT_TEXT
-       SCHED_TEXT
-       LOCK_TEXT
-       *(.fixup)
-       *(.gnu.warning)
+
+       .text : {
+               *(.text.head)
+               TEXT_TEXT
+               SCHED_TEXT
+               LOCK_TEXT
+               KPROBES_TEXT
+               *(.fixup)
+               *(.gnu.warning)
        } = 0x0009
 
-  . = ALIGN(16);               /* Exception table */
-  __start___ex_table = .;
-  __ex_table : { *(__ex_table) }
-  __stop___ex_table = .;
+       . = ALIGN(16);          /* Exception table */
+       __start___ex_table = .;
+       __ex_table : { *(__ex_table) }
+       __stop___ex_table = .;
+
+       _etext = .;                     /* End of text section */
 
-  _etext = .;                  /* End of text section */
+       BUG_TABLE
+       NOTES
+       RO_DATA(PAGE_SIZE)
 
-  RODATA
+       . = ALIGN(THREAD_SIZE);
+       .data : {                       /* Data */
+               *(.data.init_task)
 
-  BUG_TABLE
+               . = ALIGN(L1_CACHE_BYTES);
+               *(.data.cacheline_aligned)
 
-  .data : {                    /* Data */
-       DATA_DATA
+               . = ALIGN(L1_CACHE_BYTES);
+               *(.data.read_mostly)
 
-        /* Align the initial ramdisk image (INITRD) on page boundaries. */
-        . = ALIGN(PAGE_SIZE);
-        __rd_start = .;
-        *(.initrd)
-        . = ALIGN(PAGE_SIZE);
-        __rd_end = .;
+               . = ALIGN(PAGE_SIZE);
+               *(.data.page_aligned)
 
-       CONSTRUCTORS
+               __nosave_begin = .;
+               *(.data.nosave)
+               . = ALIGN(PAGE_SIZE);
+               __nosave_end = .;
+
+               DATA_DATA
+               CONSTRUCTORS
        }
 
-  . = ALIGN(PAGE_SIZE);
-  .data.page_aligned : { *(.data.page_aligned) }
-  __nosave_begin = .;
-  .data_nosave : { *(.data.nosave) }
-  . = ALIGN(PAGE_SIZE);
-  __nosave_end = .;
-
-  PERCPU(PAGE_SIZE)
-
-  . = ALIGN(L1_CACHE_BYTES);
-  .data.cacheline_aligned : { *(.data.cacheline_aligned) }
-
-  _edata = .;                  /* End of data section */
-
-  . = ALIGN(THREAD_SIZE);              /* init_task */
-  .data.init_task : { *(.data.init_task) }
-
-  . = ALIGN(PAGE_SIZE);                /* Init code and data */
-  __init_begin = .;
-  _sinittext = .;
-  .init.text : { *(.init.text) }
-  _einittext = .;
-  .init.data : { *(.init.data) }
-  . = ALIGN(16);
-  __setup_start = .;
-  .init.setup : { *(.init.setup) }
-  __setup_end = .;
-  __initcall_start = .;
-  .initcall.init : {
-       INITCALLS
-  }
-  __initcall_end = .;
-  __con_initcall_start = .;
-  .con_initcall.init : { *(.con_initcall.init) }
-  __con_initcall_end = .;
-  SECURITY_INIT
-
-  /* .exit.text is discarded at runtime, not link time, to deal with
-     references from .rodata */
-  .exit.text : { *(.exit.text) }
-  .exit.data : { *(.exit.data) }
+       _edata = .;                     /* End of data section */
 
-#ifdef CONFIG_BLK_DEV_INITRD
-  . = ALIGN(PAGE_SIZE);
+       . = ALIGN(PAGE_SIZE);           /* Init code and data */
+       __init_begin = .;
+       _sinittext = .;
+       .init.text : { *(.init.text) }
+       _einittext = .;
+       .init.data : { *(.init.data) }
+
+       . = ALIGN(16);
+       __setup_start = .;
+       .init.setup : { *(.init.setup) }
+       __setup_end = .;
 
-  __initramfs_start = .;
-  .init.ramfs : { *(.init.ramfs) }
-  __initramfs_end = .;
+       __initcall_start = .;
+       .initcall.init : {
+               INITCALLS
+       }
+       __initcall_end = .;
+       __con_initcall_start = .;
+       .con_initcall.init : { *(.con_initcall.init) }
+       __con_initcall_end = .;
+
+       SECURITY_INIT
+
+#ifdef CONFIG_BLK_DEV_INITRD
+       . = ALIGN(PAGE_SIZE);
+       __initramfs_start = .;
+       .init.ramfs : { *(.init.ramfs) }
+       __initramfs_end = .;
 #endif
 
- . = ALIGN(4);
-  __machvec_start = .;
-  .machvec.init : { *(.machvec.init) }
-  __machvec_end = .;
-
-  . = ALIGN(PAGE_SIZE);
-  .bss : {
-       __init_end = .;
-       __bss_start = .;                /* BSS */
-       *(.bss.page_aligned)
-       *(.bss)
        . = ALIGN(4);
-       _ebss = .;                      /* uClinux MTD sucks */
-       _end = . ;
-  }
-
-  /* When something in the kernel is NOT compiled as a module, the
-   * module cleanup code and data are put into these segments.  Both
-   * can then be thrown away, as cleanup code is never called unless
-   * it's a module.
-   */
-  /DISCARD/ : {
-       *(.exitcall.exit)
+       __machvec_start = .;
+       .machvec.init : { *(.machvec.init) }
+       __machvec_end = .;
+
+       PERCPU(PAGE_SIZE)
+
+       /*
+        * .exit.text is discarded at runtime, not link time, to deal with
+        * references from __bug_table
+        */
+       .exit.text : { *(.exit.text) }
+       .exit.data : { *(.exit.data) }
+
+       . = ALIGN(PAGE_SIZE);
+       .bss : {
+               __init_end = .;
+               __bss_start = .;                /* BSS */
+               *(.bss.page_aligned)
+               *(.bss)
+               *(COMMON)
+               . = ALIGN(4);
+               _ebss = .;                      /* uClinux MTD sucks */
+               _end = . ;
        }
 
-  STABS_DEBUG
+       /*
+        * When something in the kernel is NOT compiled as a module, the
+        * module cleanup code and data are put into these segments. Both
+        * can then be thrown away, as cleanup code is never called unless
+        * it's a module.
+        */
+       /DISCARD/ : {
+               *(.exitcall.exit)
+       }
 
-  DWARF_DEBUG
+       STABS_DEBUG
+       DWARF_DEBUG
 }
index c9bf2af35d359550238ea83cf1de05246875eb80..6d59ee7c23dd52ed27e199d8e2597f1e1fc3f26b 100644 (file)
@@ -38,7 +38,10 @@ SECTIONS
        .text           : { *(.text) }                  :text   =0x90909090
        .note           : { *(.note.*) }                :text   :note
        .eh_frame_hdr   : { *(.eh_frame_hdr ) }         :text   :eh_frame_hdr
-       .eh_frame       : { KEEP (*(.eh_frame)) }       :text
+       .eh_frame       : {
+               KEEP (*(.eh_frame))
+               LONG (0)
+       }                                               :text
        .dynamic        : { *(.dynamic) }               :text   :dynamic
        .useless        : {
              *(.got.plt) *(.got)
index a81dbdb05596993a580e9fb69d876133c1990d9c..3d8409daa4beafc06d762248a85230fc5e3d6524 100644 (file)
@@ -255,7 +255,11 @@ EX(        mov.l   @r5+,r8         )
 EX(    mov.l   @r5+,r9         )
 EX(    mov.l   @r5+,r10        )
 EX(    mov.l   @r5+,r11        )
+#ifdef CONFIG_CPU_SH4
 EX(    movca.l r0,@r4          )
+#else
+EX(    mov.l   r0,@r4          )
+#endif
        add     #-32, r6
 EX(    mov.l   r1,@(4,r4)      )
        mov     #32, r0
index ebee7e24ede9e253cf87f7d78ca5fc35114f848b..6b9a98e07004a09f30e34d4335e26aa62e788328 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/errno.h>
 #include <linux/interrupt.h>
 #include <linux/fs.h>
-#include <linux/notifier.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
 
@@ -44,8 +43,6 @@
  */
 #define NR_CNTRS       2
 
-extern const char *get_cpu_subtype(void);
-
 struct op_counter_config {
        unsigned long enabled;
        unsigned long event;
@@ -111,17 +108,12 @@ static struct op_counter_config ctr[NR_CNTRS];
  * behavior.
  */
 
-static int sh7750_timer_notify(struct notifier_block *self,
-                              unsigned long val, void *regs)
+static int sh7750_timer_notify(struct pt_regs *regs)
 {
-       oprofile_add_sample((struct pt_regs *)regs, 0);
+       oprofile_add_sample(regs, 0);
        return 0;
 }
 
-static struct notifier_block sh7750_timer_notifier = {
-       .notifier_call          = sh7750_timer_notify,
-};
-
 static u64 sh7750_read_counter(int counter)
 {
        u32 hi, lo;
@@ -240,7 +232,7 @@ static int sh7750_perf_counter_start(void)
                ctrl_outw(pmcr | PMCR_ENABLE, PMCR2);
        }
 
-       return register_profile_notifier(&sh7750_timer_notifier);
+       return register_timer_hook(sh7750_timer_notify);
 }
 
 static void sh7750_perf_counter_stop(void)
@@ -248,7 +240,7 @@ static void sh7750_perf_counter_stop(void)
        ctrl_outw(ctrl_inw(PMCR1) & ~PMCR_PMEN, PMCR1);
        ctrl_outw(ctrl_inw(PMCR2) & ~PMCR_PMEN, PMCR2);
 
-       unregister_profile_notifier(&sh7750_timer_notifier);
+       unregister_timer_hook(sh7750_timer_notify);
 }
 
 static struct oprofile_operations sh7750_perf_counter_ops = {
@@ -257,13 +249,13 @@ static struct oprofile_operations sh7750_perf_counter_ops = {
        .stop           = sh7750_perf_counter_stop,
 };
 
-int __init oprofile_arch_init(struct oprofile_operations **ops)
+int __init oprofile_arch_init(struct oprofile_operations *ops)
 {
        if (!(current_cpu_data.flags & CPU_HAS_PERF_COUNTER))
                return -ENODEV;
 
-       sh7750_perf_counter_ops.cpu_type = (char *)get_cpu_subtype();
-       *ops = &sh7750_perf_counter_ops;
+       ops = &sh7750_perf_counter_ops;
+       ops->cpu_type = (char *)get_cpu_subtype(&current_cpu_data);
 
        printk(KERN_INFO "oprofile: using SH-4 (%s) performance monitoring.\n",
               sh7750_perf_counter_ops.cpu_type);
index 439bfe3d29af6a5362e4172c3826035b0d74fb22..ff071693325c48ff679cecc5da788afe6e9887ac 100644 (file)
@@ -1,26 +1,35 @@
 #
-# List of boards.
+# MACH_<xxx>           CONFIG_<xxx>
 #
 
 #
-# MACH_<xxx>           CONFIG_<xxx>
+# List of board groups.
 #
 SE                     SH_SOLUTION_ENGINE
-7751SE                 SH_7751_SOLUTION_ENGINE         
-7722SE                 SH_7722_SOLUTION_ENGINE         
-7343SE                 SH_7343_SOLUTION_ENGINE
+HIGHLANDER             SH_HIGHLANDER
+RTS7751R2D             SH_RTS7751R2D
+
+#
+# List of companion chips / MFDs.
+#
+HD64461                        HD64461
+HD64465                        HD64465
+
+#
+# List of boards.
+#
 7206SE                 SH_7206_SOLUTION_ENGINE
+7343SE                 SH_7343_SOLUTION_ENGINE
 7619SE                 SH_7619_SOLUTION_ENGINE
+7722SE                 SH_7722_SOLUTION_ENGINE         
+7751SE                 SH_7751_SOLUTION_ENGINE         
 7780SE                 SH_7780_SOLUTION_ENGINE
 7751SYSTEMH            SH_7751_SYSTEMH
 HP6XX                  SH_HP6XX
-HD64461                        HD64461
-HD64465                        HD64465
 DREAMCAST              SH_DREAMCAST
 MPC1211                        SH_MPC1211
 SNAPGEAR               SH_SECUREEDGE5410
 HS7751RVOIP            SH_HS7751RVOIP
-RTS7751R2D             SH_RTS7751R2D
 EDOSK7705              SH_EDOSK7705
 SH4202_MICRODEV                SH_SH4202_MICRODEV
 SH03                   SH_SH03
@@ -32,3 +41,7 @@ TITAN                 SH_TITAN
 SHMIN                  SH_SHMIN
 7710VOIPGW             SH_7710VOIPGW
 LBOXRE2                        SH_LBOX_RE2
+X3PROTO                        SH_X3PROTO
+MAGICPANELR2           SH_MAGIC_PANEL_R2
+R2D_PLUS               RTS7751R2D_PLUS
+R2D_1                  RTS7751R2D_1
index ba204bac49dfa32536ff8561821f2cc3a5ffc2cb..6884d5a518ad78315ec8fcf107da8661c82d933d 100644 (file)
@@ -1,6 +1,6 @@
 #
 # For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
+# see Documentation/kbuild/kconfig-language.txt.
 #
 
 mainmenu "Linux/SH64 Kernel Configuration"
index bd59ab0760b3fe5c75ea7ade8ffe1f1af1d6155b..10b212a1f9f5aa046dbe1e2b5702dbcba9a3b7c0 100644 (file)
@@ -408,7 +408,7 @@ config SUNOS_EMUL
 
 config SOLARIS_EMUL
        tristate "Solaris binary emulation (EXPERIMENTAL)"
-       depends on SPARC32_COMPAT && EXPERIMENTAL
+       depends on SPARC32_COMPAT && NET && EXPERIMENTAL
        help
          This is experimental code which will enable you to run (many)
          Solaris binaries on your SPARC Linux machine.
index e023d4b2fef4c11fa49476c7f07f6d18e49c627d..22734ac08c8a678a8ffa3f28553c8c6c40c21fdd 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.23
-# Sun Oct 21 19:57:44 2007
+# Linux kernel version: 2.6.24-rc1
+# Wed Oct 31 15:36:47 2007
 #
 CONFIG_SPARC=y
 CONFIG_SPARC64=y
@@ -19,6 +19,7 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_AUDIT_ARCH=y
 CONFIG_ARCH_NO_VIRT_TO_BUS=y
 CONFIG_OF=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
 CONFIG_SPARC64_PAGE_SIZE_8KB=y
 # CONFIG_SPARC64_PAGE_SIZE_64KB is not set
 # CONFIG_SPARC64_PAGE_SIZE_512KB is not set
@@ -55,7 +56,8 @@ CONFIG_FAIR_USER_SCHED=y
 # CONFIG_FAIR_CGROUP_SCHED is not set
 CONFIG_SYSFS_DEPRECATED=y
 CONFIG_RELAY=y
-# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
 # CONFIG_EMBEDDED is not set
@@ -117,22 +119,7 @@ CONFIG_NO_HZ=y
 CONFIG_HIGH_RES_TIMERS=y
 CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 # CONFIG_SMP is not set
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=m
-# CONFIG_CPU_FREQ_DEBUG is not set
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=m
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-CONFIG_US3_FREQ=m
-CONFIG_US2E_FREQ=m
+# CONFIG_CPU_FREQ is not set
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
@@ -161,7 +148,7 @@ CONFIG_SBUS=y
 CONFIG_SBUSCHAR=y
 CONFIG_SUN_AUXIO=y
 CONFIG_SUN_IO=y
-# CONFIG_SUN_LDOMS is not set
+CONFIG_SUN_LDOMS=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_SYSCALL=y
@@ -338,6 +325,7 @@ CONFIG_CDROM_PKTCDVD=m
 CONFIG_CDROM_PKTCDVD_BUFFERS=8
 CONFIG_CDROM_PKTCDVD_WCACHE=y
 CONFIG_ATA_OVER_ETH=m
+CONFIG_SUNVDC=m
 CONFIG_MISC_DEVICES=y
 # CONFIG_PHANTOM is not set
 # CONFIG_EEPROM_93CX6 is not set
@@ -440,12 +428,12 @@ CONFIG_SCSI_WAIT_SCAN=m
 #
 CONFIG_SCSI_SPI_ATTRS=y
 CONFIG_SCSI_FC_ATTRS=y
-CONFIG_SCSI_ISCSI_ATTRS=m
+# CONFIG_SCSI_ISCSI_ATTRS is not set
 # CONFIG_SCSI_SAS_ATTRS is not set
 # CONFIG_SCSI_SAS_LIBSAS is not set
 # CONFIG_SCSI_SRP_ATTRS is not set
 CONFIG_SCSI_LOWLEVEL=y
-CONFIG_ISCSI_TCP=m
+# CONFIG_ISCSI_TCP is not set
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
 # CONFIG_SCSI_3W_9XXX is not set
 # CONFIG_SCSI_ACARD is not set
@@ -506,7 +494,7 @@ CONFIG_DM_ZERO=m
 # CONFIG_I2O is not set
 CONFIG_NETDEVICES=y
 # CONFIG_NETDEVICES_MULTIQUEUE is not set
-CONFIG_DUMMY=m
+# CONFIG_DUMMY is not set
 # CONFIG_BONDING is not set
 # CONFIG_MACVLAN is not set
 # CONFIG_EQUALIZER is not set
@@ -523,6 +511,7 @@ CONFIG_MII=m
 # CONFIG_SUNQE is not set
 # CONFIG_SUNGEM is not set
 CONFIG_CASSINI=m
+CONFIG_SUNVNET=m
 # CONFIG_NET_VENDOR_3COM is not set
 # CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
@@ -577,7 +566,7 @@ CONFIG_NETDEV_10000=y
 # CONFIG_S2IO is not set
 # CONFIG_MYRI10GE is not set
 # CONFIG_NETXEN_NIC is not set
-# CONFIG_NIU is not set
+CONFIG_NIU=m
 # CONFIG_MLX4_CORE is not set
 # CONFIG_TEHUTI is not set
 # CONFIG_TR is not set
@@ -702,7 +691,8 @@ CONFIG_SERIAL_SUNCORE=y
 # CONFIG_SERIAL_SUNZILOG is not set
 CONFIG_SERIAL_SUNSU=y
 CONFIG_SERIAL_SUNSU_CONSOLE=y
-CONFIG_SERIAL_SUNSAB=m
+CONFIG_SERIAL_SUNSAB=y
+CONFIG_SERIAL_SUNSAB_CONSOLE=y
 CONFIG_SERIAL_SUNHV=y
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
@@ -880,9 +870,17 @@ CONFIG_FB_TILEBLITTING=y
 # CONFIG_FB_ASILIANT is not set
 # CONFIG_FB_IMSTT is not set
 # CONFIG_FB_UVESA is not set
-# CONFIG_FB_SBUS is not set
-# CONFIG_FB_XVR500 is not set
-# CONFIG_FB_XVR2500 is not set
+CONFIG_FB_SBUS=y
+# CONFIG_FB_BW2 is not set
+# CONFIG_FB_CG3 is not set
+CONFIG_FB_CG6=y
+CONFIG_FB_FFB=y
+# CONFIG_FB_TCX is not set
+# CONFIG_FB_CG14 is not set
+# CONFIG_FB_P9100 is not set
+# CONFIG_FB_LEO is not set
+CONFIG_FB_XVR500=y
+CONFIG_FB_XVR2500=y
 # CONFIG_FB_S1D13XXX is not set
 # CONFIG_FB_NVIDIA is not set
 # CONFIG_FB_RIVA is not set
@@ -892,7 +890,11 @@ CONFIG_FB_RADEON_I2C=y
 # CONFIG_FB_RADEON_BACKLIGHT is not set
 # CONFIG_FB_RADEON_DEBUG is not set
 # CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
+CONFIG_FB_ATY=y
+CONFIG_FB_ATY_CT=y
+# CONFIG_FB_ATY_GENERIC_LCD is not set
+CONFIG_FB_ATY_GX=y
+# CONFIG_FB_ATY_BACKLIGHT is not set
 # CONFIG_FB_S3 is not set
 # CONFIG_FB_SAVAGE is not set
 # CONFIG_FB_SIS is not set
@@ -1191,18 +1193,13 @@ CONFIG_USB_STORAGE=m
 #
 # Misc Linux/SPARC drivers
 #
-CONFIG_SUN_OPENPROMIO=m
+CONFIG_SUN_OPENPROMIO=y
 # CONFIG_OBP_FLASH is not set
 # CONFIG_SUN_BPP is not set
 # CONFIG_BBC_I2C is not set
 # CONFIG_ENVCTRL is not set
 # CONFIG_DISPLAY7SEG is not set
 
-#
-# Fibre Channel support
-#
-# CONFIG_FC4 is not set
-
 #
 # File systems
 #
@@ -1345,6 +1342,7 @@ CONFIG_KPROBES=y
 #
 CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_PRINTK_TIME=y
+# CONFIG_ENABLE_WARN_DEPRECATED is not set
 CONFIG_ENABLE_MUST_CHECK=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_UNUSED_SYMBOLS is not set
@@ -1371,6 +1369,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
 # CONFIG_DEBUG_VM is not set
 # CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
 CONFIG_FORCED_INLINING=y
 # CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
index 23fad7ebdd0dc7c1a79d60b7f55d993c866bf581..60765e314bd8624dfb1dd94329fd2fb0f59ad7f9 100644 (file)
@@ -221,7 +221,7 @@ EXPORT_SYMBOL(pci_dma_supported);
 /* I/O device mmaping on Sparc64. */
 EXPORT_SYMBOL(io_remap_pfn_range);
 
-#ifdef CONFIG_COMPAT
+#if defined(CONFIG_COMPAT) && defined(CONFIG_NET)
 /* Solaris/SunOS binary compatibility */
 EXPORT_SYMBOL(verify_compat_iovec);
 #endif
index cd8c740cba1da72fccf69c78736b662383e8539b..a2cf955294c1ae89f23a4a31c93a629e735622cb 100644 (file)
@@ -1070,7 +1070,7 @@ static int set_rtc_mmss(unsigned long nowtime)
         * Not having a register set can lead to trouble.
         * Also starfire doesn't have a tod clock.
         */
-       if (!mregs && !dregs & !bregs)
+       if (!mregs && !dregs && !bregs)
                return -1;
 
        if (mregs) {
index 7ff0a02f58132e524a092f50b164605554e725ce..a3e6e4b635b3cc174aa91a33cb0a352b5261578a 100644 (file)
@@ -182,7 +182,9 @@ static void setup_tsb_params(struct mm_struct *mm, unsigned long tsb_idx, unsign
                break;
 
        default:
-               BUG();
+               printk(KERN_ERR "TSB[%s:%d]: Impossible TSB size %lu, killing process.\n",
+                      current->comm, current->pid, tsb_bytes);
+               do_exit(SIGSEGV);
        };
        tte |= pte_sz_bits(page_sz);
 
index 737c26923c0963470a6059f3ed80056b9ac04367..2865c105b6a43927d84e00080ca61e8f571f1c3e 100644 (file)
@@ -120,13 +120,6 @@ __spitfire_flush_tlb_mm_slow:
 /*
  * The following code flushes one page_size worth.
  */
-#if (PAGE_SHIFT == 13)
-#define ITAG_MASK 0xfe
-#elif (PAGE_SHIFT == 16)
-#define ITAG_MASK 0x7fe
-#else
-#error unsupported PAGE_SIZE
-#endif
        .section .kprobes.text, "ax"
        .align          32
        .globl          __flush_icache_page
index 970b2defe7df3206a7706a39a98c79279866ae04..761ca7b5f120e6cb0d52d2352dc4bb26d23b74e3 100644 (file)
@@ -6,9 +6,8 @@ config TRACE_IRQFLAGS_SUPPORT
 source "lib/Kconfig.debug"
 
 config EARLY_PRINTK
-       bool "Early printk" if EMBEDDED && DEBUG_KERNEL
+       bool "Early printk" if EMBEDDED && DEBUG_KERNEL && X86_32
        default y
-       depends on X86_32
        help
          Write kernel log output directly into the VGA buffer or to a serial
          port.
@@ -91,7 +90,7 @@ config DOUBLEFAULT
 
 config IOMMU_DEBUG
        bool "Enable IOMMU debugging"
-       depends on IOMMU && DEBUG_KERNEL
+       depends on GART_IOMMU && DEBUG_KERNEL
        depends on X86_64
        help
          Force the IOMMU to on even when you have less than 4GB of
@@ -113,7 +112,4 @@ config IOMMU_LEAK
          Add a simple leak tracer to the IOMMU code. This is useful when you
          are debugging a buggy device driver that leaks IOMMU mappings.
 
-#config X86_REMOTE_DEBUG
-#      bool "kgdb debugging stub"
-
 endmenu
index e2542e5b536c2113ea5fd4750534c590656a03d2..cc468ea612405abccc4fe3c98eb82c0426ecdf86 100644 (file)
@@ -97,10 +97,6 @@ config X86_CMPXCHG
        bool
        default y
 
-config EARLY_PRINTK
-       bool
-       default y
-
 config GENERIC_ISA_DMA
        bool
        default y
@@ -479,8 +475,8 @@ config HPET_EMULATE_RTC
 
 # Mark as embedded because too many people got it wrong.
 # The code disables itself when not needed.
-config IOMMU
-       bool "IOMMU support" if EMBEDDED
+config GART_IOMMU
+       bool "GART IOMMU support" if EMBEDDED
        default y
        select SWIOTLB
        select AGP
@@ -687,7 +683,7 @@ source kernel/Kconfig.hz
 
 config K8_NB
        def_bool y
-       depends on AGP_AMD64 || IOMMU || (PCI && NUMA)
+       depends on AGP_AMD64 || GART_IOMMU || (PCI && NUMA)
 
 endmenu
 
@@ -753,7 +749,6 @@ config PCI_DOMAINS
 config DMAR
        bool "Support for DMA Remapping Devices (EXPERIMENTAL)"
        depends on PCI_MSI && ACPI && EXPERIMENTAL
-       default y
        help
          DMA remapping (DMAR) devices support enables independent address
          translations for Direct Memory Access (DMA) from devices.
index b091c5e35558c1daedf34688e296c08166f85f60..38a83f9c966ff252be2218a53fae5d65c8b41d24 100644 (file)
@@ -170,7 +170,7 @@ CONFIG_HOTPLUG_CPU=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_HPET_TIMER=y
 CONFIG_HPET_EMULATE_RTC=y
-CONFIG_IOMMU=y
+CONFIG_GART_IOMMU=y
 # CONFIG_CALGARY_IOMMU is not set
 CONFIG_SWIOTLB=y
 CONFIG_X86_MCE=y
index 466337ae9a1e675e313cf9cc3d9b2e6bd8d37b3f..24671c3838b3bb3e8a4b301be277fcb0ef62d9ee 100644 (file)
@@ -25,7 +25,7 @@ obj-$(CONFIG_CRASH_DUMP)      += crash_dump_64.o
 obj-$(CONFIG_PM)               += suspend_64.o
 obj-$(CONFIG_HIBERNATION)      += suspend_asm_64.o
 obj-$(CONFIG_EARLY_PRINTK)     += early_printk.o
-obj-$(CONFIG_IOMMU)            += pci-gart_64.o aperture_64.o
+obj-$(CONFIG_GART_IOMMU)       += pci-gart_64.o aperture_64.o
 obj-$(CONFIG_CALGARY_IOMMU)    += pci-calgary_64.o tce_64.o
 obj-$(CONFIG_SWIOTLB)          += pci-swiotlb_64.o
 obj-$(CONFIG_KPROBES)          += kprobes_64.o
index 8f681cae7bf7df3c8a6749799d1d5b2f14682170..5b6992799c9d20882bab7fd1efa0f0772ad77243 100644 (file)
 #include <linux/ioport.h>
 #include <asm/e820.h>
 #include <asm/io.h>
-#include <asm/iommu.h>
+#include <asm/gart.h>
 #include <asm/pci-direct.h>
 #include <asm/dma.h>
 #include <asm/k8.h>
 
-int iommu_aperture;
-int iommu_aperture_disabled __initdata = 0;
-int iommu_aperture_allowed __initdata = 0;
+int gart_iommu_aperture;
+int gart_iommu_aperture_disabled __initdata = 0;
+int gart_iommu_aperture_allowed __initdata = 0;
 
 int fallback_aper_order __initdata = 1; /* 64MB */
 int fallback_aper_force __initdata = 0; 
@@ -204,14 +204,15 @@ static __u32 __init search_agp_bridge(u32 *order, int *valid_agp)
        return 0;
 }
 
-void __init iommu_hole_init(void) 
+void __init gart_iommu_hole_init(void)
 { 
        int fix, num; 
        u32 aper_size, aper_alloc = 0, aper_order = 0, last_aper_order = 0;
        u64 aper_base, last_aper_base = 0;
        int valid_agp = 0;
 
-       if (iommu_aperture_disabled || !fix_aperture || !early_pci_allowed())
+       if (gart_iommu_aperture_disabled || !fix_aperture ||
+           !early_pci_allowed())
                return;
 
        printk(KERN_INFO  "Checking aperture...\n");
@@ -222,7 +223,7 @@ void __init iommu_hole_init(void)
                        continue;
 
                iommu_detected = 1;
-               iommu_aperture = 1; 
+               gart_iommu_aperture = 1;
 
                aper_order = (read_pci_config(0, num, 3, 0x90) >> 1) & 7; 
                aper_size = (32 * 1024 * 1024) << aper_order; 
index 2d42b414b7779b37604d9c564f044642c8cb0832..066f8c6af4dfa0e92370aed065f41ca3d84d83d4 100644 (file)
@@ -49,7 +49,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                /* Intel-defined (#2) */
                "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", "smx", "est",
                "tm2", "ssse3", "cid", NULL, NULL, "cx16", "xtpr", NULL,
-               NULL, NULL, "dca", NULL, NULL, NULL, NULL, "popcnt",
+               NULL, NULL, "dca", "sse4_1", "sse4_2", NULL, NULL, "popcnt",
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
                /* VIA/Cyrix/Centaur-defined */
@@ -59,10 +59,10 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
                /* AMD-defined (#2) */
-               "lahf_lm", "cmp_legacy", "svm", "extapic", "cr8_legacy",
-               "altmovcr8", "abm", "sse4a",
-               "misalignsse", "3dnowprefetch",
-               "osvw", "ibs", NULL, NULL, NULL, NULL,
+               "lahf_lm", "cmp_legacy", "svm", "extapic",
+               "cr8_legacy", "abm", "sse4a", "misalignsse",
+               "3dnowprefetch", "osvw", "ibs", "sse5",
+               "skinit", "wdt", NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
index 639e6320518ef4b1cd098fca8bdf5f928ed7e1ce..88bb83ec895f0d2899f15f4f98f75c5aedac479b 100644 (file)
 #include <asm/io_apic.h>
 #include <asm/apic.h>
 
-#ifdef CONFIG_IOMMU
-#include <asm/iommu.h>
+#ifdef CONFIG_GART_IOMMU
+#include <asm/gart.h>
 #endif
 
 static void __init via_bugs(void)
 {
-#ifdef CONFIG_IOMMU
+#ifdef CONFIG_GART_IOMMU
        if ((end_pfn > MAX_DMA32_PFN ||  force_iommu) &&
-           !iommu_aperture_allowed) {
+           !gart_iommu_aperture_allowed) {
                printk(KERN_INFO
                       "Looks like a VIA chipset. Disabling IOMMU."
                       " Override with iommu=allowed\n");
-               iommu_aperture_disabled = 1;
+               gart_iommu_aperture_disabled = 1;
        }
 #endif
 }
index 1a20fe31338b18ea302d5ac035fd521d458bd6e7..6bf1f716909da5fddf6674adc4b0974f3fbd1ab6 100644 (file)
@@ -36,7 +36,7 @@
 #include <linux/pci.h>
 #include <linux/delay.h>
 #include <linux/scatterlist.h>
-#include <asm/iommu.h>
+#include <asm/gart.h>
 #include <asm/calgary.h>
 #include <asm/tce.h>
 #include <asm/pci-direct.h>
index 393e2725a6e31a386a9b28817317990ef5d79871..aa805b11b24fe627d0677cdce90c11ba7afbb4d6 100644 (file)
@@ -9,7 +9,7 @@
 #include <linux/module.h>
 #include <linux/dmar.h>
 #include <asm/io.h>
-#include <asm/iommu.h>
+#include <asm/gart.h>
 #include <asm/calgary.h>
 
 int iommu_merge __read_mostly = 1;
@@ -275,7 +275,7 @@ __init int iommu_setup(char *p)
                        swiotlb = 1;
 #endif
 
-#ifdef CONFIG_IOMMU
+#ifdef CONFIG_GART_IOMMU
                gart_parse_options(p);
 #endif
 
@@ -298,8 +298,8 @@ void __init pci_iommu_alloc(void)
         * The order of these functions is important for
         * fall-back/fail-over reasons
         */
-#ifdef CONFIG_IOMMU
-       iommu_hole_init();
+#ifdef CONFIG_GART_IOMMU
+       gart_iommu_hole_init();
 #endif
 
 #ifdef CONFIG_CALGARY_IOMMU
@@ -321,7 +321,7 @@ static int __init pci_iommu_init(void)
 
        intel_iommu_init();
 
-#ifdef CONFIG_IOMMU
+#ifdef CONFIG_GART_IOMMU
        gart_iommu_init();
 #endif
 
index 79b514b381b1476acd8559f18e6c0019b0c19910..06bcba536045ae5ca038ffa9ac3f6c16b6b26a2e 100644 (file)
 #include <asm/mtrr.h>
 #include <asm/pgtable.h>
 #include <asm/proto.h>
-#include <asm/iommu.h>
+#include <asm/gart.h>
 #include <asm/cacheflush.h>
 #include <asm/swiotlb.h>
 #include <asm/dma.h>
 #include <asm/k8.h>
 
-unsigned long iommu_bus_base;  /* GART remapping area (physical) */
+static unsigned long iommu_bus_base;   /* GART remapping area (physical) */
 static unsigned long iommu_size;       /* size of remapping area bytes */
 static unsigned long iommu_pages;      /* .. and in pages */
 
-u32 *iommu_gatt_base;          /* Remapping table */
+static u32 *iommu_gatt_base;           /* Remapping table */
 
 /* If this is disabled the IOMMU will use an optimized flushing strategy
    of only flushing when an mapping is reused. With it true the GART is flushed 
@@ -135,8 +135,8 @@ static void flush_gart(void)
 /* Debugging aid for drivers that don't free their IOMMU tables */
 static void **iommu_leak_tab; 
 static int leak_trace;
-int iommu_leak_pages = 20; 
-void dump_leak(void)
+static int iommu_leak_pages = 20;
+static void dump_leak(void)
 {
        int i;
        static int dump; 
@@ -627,12 +627,12 @@ void __init gart_iommu_init(void)
                return;
 
        /* Did we detect a different HW IOMMU? */
-       if (iommu_detected && !iommu_aperture)
+       if (iommu_detected && !gart_iommu_aperture)
                return;
 
        if (no_iommu ||
            (!force_iommu && end_pfn <= MAX_DMA32_PFN) ||
-           !iommu_aperture ||
+           !gart_iommu_aperture ||
            (no_agp && init_k8_gatt(&info) < 0)) {
                if (end_pfn > MAX_DMA32_PFN) {
                        printk(KERN_ERR "WARNING more than 4GB of memory "
@@ -733,9 +733,9 @@ void __init gart_parse_options(char *p)
                fix_aperture = 0;
        /* duplicated from pci-dma.c */
        if (!strncmp(p,"force",5))
-               iommu_aperture_allowed = 1;
+               gart_iommu_aperture_allowed = 1;
        if (!strncmp(p,"allowed",7))
-               iommu_aperture_allowed = 1;
+               gart_iommu_aperture_allowed = 1;
        if (!strncmp(p, "memaper", 7)) {
                fallback_aper_force = 1;
                p += 7;
index faf70bdca335c5c21dfb6e03941923234bc4deb1..ab08e1832228a74869bc6e7aeb517b0e29e8b044 100644 (file)
@@ -7,7 +7,7 @@
 #include <linux/dma-mapping.h>
 #include <linux/scatterlist.h>
 
-#include <asm/iommu.h>
+#include <asm/gart.h>
 #include <asm/processor.h>
 #include <asm/dma.h>
 
index b2f405ea7c85002b779b3c928a26ce424c9a0a0e..102866d729a5a244f368b258150ec2718087467c 100644 (file)
@@ -5,7 +5,7 @@
 #include <linux/module.h>
 #include <linux/dma-mapping.h>
 
-#include <asm/iommu.h>
+#include <asm/gart.h>
 #include <asm/swiotlb.h>
 #include <asm/dma.h>
 
index 776eb06b6512dcf61e0a0d85daa23992870ac7e2..71b13c5f5817dd0d1ffbe2285fe003c11e6ea088 100644 (file)
@@ -17,7 +17,7 @@
 #include <asm/pgtable.h>
 #include <asm/tlbflush.h>
 #include <asm/apic.h>
-#include <asm/iommu.h>
+#include <asm/gart.h>
 
 /*
  * Power off function, if any
index cc0e91447b76252411352ba3bb18c6ad4b3ea043..e1e18c34c8219e5760db76bb06097fba5c2dec5a 100644 (file)
@@ -86,9 +86,6 @@ unsigned long mmu_cr4_features;
 
 /* for MCA, but anyone else can use it if they want */
 unsigned int machine_id;
-#ifdef CONFIG_MCA
-EXPORT_SYMBOL(machine_id);
-#endif
 unsigned int machine_submodel_id;
 unsigned int BIOS_revision;
 unsigned int mca_pentium_flag;
index e7a9e36bd52d5159ab214e457d12f3a898691be7..238633d3d09a7ac1d8a6427d2e26c3ce773291e8 100644 (file)
@@ -1040,7 +1040,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                /* Intel-defined (#2) */
                "pni", NULL, NULL, "monitor", "ds_cpl", "vmx", "smx", "est",
                "tm2", "ssse3", "cid", NULL, NULL, "cx16", "xtpr", NULL,
-               NULL, NULL, "dca", NULL, NULL, NULL, NULL, "popcnt",
+               NULL, NULL, "dca", "sse4_1", "sse4_2", NULL, NULL, "popcnt",
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
                /* VIA/Cyrix/Centaur-defined */
@@ -1050,10 +1050,10 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
                /* AMD-defined (#2) */
-               "lahf_lm", "cmp_legacy", "svm", "extapic", "cr8_legacy",
-               "altmovcr8", "abm", "sse4a",
-               "misalignsse", "3dnowprefetch",
-               "osvw", "ibs", NULL, NULL, NULL, NULL,
+               "lahf_lm", "cmp_legacy", "svm", "extapic",
+               "cr8_legacy", "abm", "sse4a", "misalignsse",
+               "3dnowprefetch", "osvw", "ibs", "sse5",
+               "skinit", "wdt", NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 
index fe608a45ffb66956e67b31b60d80b1c83bfa408f..13a474d3c6e9732d742fb389c7202477c2fa9fda 100644 (file)
@@ -40,7 +40,7 @@
 
 struct pglist_data *node_data[MAX_NUMNODES] __read_mostly;
 EXPORT_SYMBOL(node_data);
-bootmem_data_t node0_bdata;
+static bootmem_data_t node0_bdata;
 
 /*
  * numa interface - we expect the numa architecture specific code to have
@@ -404,7 +404,7 @@ void __init set_highmem_pages_init(int bad_ppro)
 }
 
 #ifdef CONFIG_MEMORY_HOTPLUG
-int paddr_to_nid(u64 addr)
+static int paddr_to_nid(u64 addr)
 {
        int nid;
        unsigned long pfn = PFN_DOWN(addr);
index 85ffbb491490b47f78b4347c4af35d375ca6c988..d3cb3d6af4c8da3249b4e4cda5602724831dd549 100644 (file)
@@ -1,5 +1,5 @@
 # For a description of the syntax of this configuration file,
-# see Documentation/kbuild/config-language.txt.
+# see Documentation/kbuild/kconfig-language.txt.
 
 mainmenu "Linux/Xtensa Kernel Configuration"
 
index 5d0e26a5c34cd55455ee776891acac0e861b93f6..da3a08fa9e4ff4f58a8337c502a776ed0c8fd1c0 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 menuconfig ACPI
-       bool "ACPI Support (Advanced Configuration and Power Interface) Support"
+       bool "ACPI (Advanced Configuration and Power Interface) Support"
        depends on !X86_NUMAQ
        depends on !X86_VISWS
        depends on !IA64_HP_SIM
@@ -88,7 +88,8 @@ config ACPI_PROC_EVENT
 
 config ACPI_AC
        tristate "AC Adapter"
-       depends on X86 && POWER_SUPPLY
+       depends on X86
+       select POWER_SUPPLY
        default y
        help
          This driver adds support for the AC Adapter object, which indicates
@@ -97,7 +98,8 @@ config ACPI_AC
 
 config ACPI_BATTERY
        tristate "Battery"
-       depends on X86 && POWER_SUPPLY
+       depends on X86
+       select POWER_SUPPLY
        default y
        help
          This driver adds support for battery information through
@@ -352,7 +354,7 @@ config ACPI_HOTPLUG_MEMORY
 config ACPI_SBS
        tristate "Smart Battery System"
        depends on X86
-       depends on POWER_SUPPLY
+       select POWER_SUPPLY
        help
          This driver adds support for the Smart Battery System, another
          type of access to battery information, found on some laptops.
index 681e26b56b11c2b37a3e242db63ee9ef1dc6444a..c2ce0ad21693c0279adcc2b9529c00b77c4fc0ff 100644 (file)
@@ -125,11 +125,15 @@ static int acpi_battery_technology(struct acpi_battery *battery)
                return POWER_SUPPLY_TECHNOLOGY_NiMH;
        if (!strcasecmp("LION", battery->type))
                return POWER_SUPPLY_TECHNOLOGY_LION;
+       if (!strcasecmp("LI-ION", battery->type))
+               return POWER_SUPPLY_TECHNOLOGY_LION;
        if (!strcasecmp("LiP", battery->type))
                return POWER_SUPPLY_TECHNOLOGY_LIPO;
        return POWER_SUPPLY_TECHNOLOGY_UNKNOWN;
 }
 
+static int acpi_battery_update(struct acpi_battery *battery);
+
 static int acpi_battery_get_property(struct power_supply *psy,
                                     enum power_supply_property psp,
                                     union power_supply_propval *val)
@@ -139,6 +143,7 @@ static int acpi_battery_get_property(struct power_supply *psy,
        if ((!acpi_battery_present(battery)) &&
             psp != POWER_SUPPLY_PROP_PRESENT)
                return -ENODEV;
+       acpi_battery_update(battery);
        switch (psp) {
        case POWER_SUPPLY_PROP_STATUS:
                if (battery->state & 0x01)
@@ -257,7 +262,7 @@ static int extract_package(struct acpi_battery *battery,
                           union acpi_object *package,
                           struct acpi_offsets *offsets, int num)
 {
-       int i, *x;
+       int i;
        union acpi_object *element;
        if (package->type != ACPI_TYPE_PACKAGE)
                return -EFAULT;
@@ -266,16 +271,21 @@ static int extract_package(struct acpi_battery *battery,
                        return -EFAULT;
                element = &package->package.elements[i];
                if (offsets[i].mode) {
-                       if (element->type != ACPI_TYPE_STRING &&
-                           element->type != ACPI_TYPE_BUFFER)
-                               return -EFAULT;
-                       strncpy((u8 *)battery + offsets[i].offset,
-                               element->string.pointer, 32);
+                       u8 *ptr = (u8 *)battery + offsets[i].offset;
+                       if (element->type == ACPI_TYPE_STRING ||
+                           element->type == ACPI_TYPE_BUFFER)
+                               strncpy(ptr, element->string.pointer, 32);
+                       else if (element->type == ACPI_TYPE_INTEGER) {
+                               strncpy(ptr, (u8 *)&element->integer.value,
+                                       sizeof(acpi_integer));
+                               ptr[sizeof(acpi_integer)] = 0;
+                       } else return -EFAULT;
                } else {
-                       if (element->type != ACPI_TYPE_INTEGER)
-                               return -EFAULT;
-                       x = (int *)((u8 *)battery + offsets[i].offset);
-                       *x = element->integer.value;
+                       if (element->type == ACPI_TYPE_INTEGER) {
+                               int *x = (int *)((u8 *)battery +
+                                               offsets[i].offset);
+                               *x = element->integer.value;
+                       } else return -EFAULT;
                }
        }
        return 0;
@@ -385,29 +395,81 @@ static int acpi_battery_init_alarm(struct acpi_battery *battery)
        return acpi_battery_set_alarm(battery);
 }
 
+static ssize_t acpi_battery_alarm_show(struct device *dev,
+                                       struct device_attribute *attr,
+                                       char *buf)
+{
+       struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev));
+       return sprintf(buf, "%d\n", battery->alarm * 1000);
+}
+
+static ssize_t acpi_battery_alarm_store(struct device *dev,
+                                       struct device_attribute *attr,
+                                       const char *buf, size_t count)
+{
+       unsigned long x;
+       struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev));
+       if (sscanf(buf, "%ld\n", &x) == 1)
+               battery->alarm = x/1000;
+       if (acpi_battery_present(battery))
+               acpi_battery_set_alarm(battery);
+       return count;
+}
+
+static struct device_attribute alarm_attr = {
+       .attr = {.name = "alarm", .mode = 0644, .owner = THIS_MODULE},
+       .show = acpi_battery_alarm_show,
+       .store = acpi_battery_alarm_store,
+};
+
+static int sysfs_add_battery(struct acpi_battery *battery)
+{
+       int result;
+
+       battery->update_time = 0;
+       result = acpi_battery_get_info(battery);
+       acpi_battery_init_alarm(battery);
+       if (result)
+               return result;
+       if (battery->power_unit) {
+               battery->bat.properties = charge_battery_props;
+               battery->bat.num_properties =
+                       ARRAY_SIZE(charge_battery_props);
+       } else {
+               battery->bat.properties = energy_battery_props;
+               battery->bat.num_properties =
+                       ARRAY_SIZE(energy_battery_props);
+       }
+
+       battery->bat.name = acpi_device_bid(battery->device);
+       battery->bat.type = POWER_SUPPLY_TYPE_BATTERY;
+       battery->bat.get_property = acpi_battery_get_property;
+
+       result = power_supply_register(&battery->device->dev, &battery->bat);
+       if (result)
+               return result;
+       return device_create_file(battery->bat.dev, &alarm_attr);
+}
+
+static void sysfs_remove_battery(struct acpi_battery *battery)
+{
+       if (!battery->bat.dev)
+               return;
+       device_remove_file(battery->bat.dev, &alarm_attr);
+       power_supply_unregister(&battery->bat);
+}
+
 static int acpi_battery_update(struct acpi_battery *battery)
 {
-       int saved_present = acpi_battery_present(battery);
        int result = acpi_battery_get_status(battery);
-       if (result || !acpi_battery_present(battery))
+       if (result)
                return result;
-       if (saved_present != acpi_battery_present(battery) ||
-           !battery->update_time) {
-               battery->update_time = 0;
-               result = acpi_battery_get_info(battery);
-               if (result)
-                       return result;
-               if (battery->power_unit) {
-                       battery->bat.properties = charge_battery_props;
-                       battery->bat.num_properties =
-                               ARRAY_SIZE(charge_battery_props);
-               } else {
-                       battery->bat.properties = energy_battery_props;
-                       battery->bat.num_properties =
-                               ARRAY_SIZE(energy_battery_props);
-               }
-               acpi_battery_init_alarm(battery);
+       if (!acpi_battery_present(battery)) {
+               sysfs_remove_battery(battery);
+               return 0;
        }
+       if (!battery->bat.dev)
+               sysfs_add_battery(battery);
        return acpi_battery_get_state(battery);
 }
 
@@ -554,10 +616,6 @@ static ssize_t acpi_battery_write_alarm(struct file *file,
 
        if (!battery || (count > sizeof(alarm_string) - 1))
                return -EINVAL;
-       if (result) {
-               result = -ENODEV;
-               goto end;
-       }
        if (!acpi_battery_present(battery)) {
                result = -ENODEV;
                goto end;
@@ -688,33 +746,6 @@ static void acpi_battery_remove_fs(struct acpi_device *device)
 
 #endif
 
-static ssize_t acpi_battery_alarm_show(struct device *dev,
-                                       struct device_attribute *attr,
-                                       char *buf)
-{
-       struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev));
-       return sprintf(buf, "%d\n", battery->alarm * 1000);
-}
-
-static ssize_t acpi_battery_alarm_store(struct device *dev,
-                                       struct device_attribute *attr,
-                                       const char *buf, size_t count)
-{
-       unsigned long x;
-       struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev));
-       if (sscanf(buf, "%ld\n", &x) == 1)
-               battery->alarm = x/1000;
-       if (acpi_battery_present(battery))
-               acpi_battery_set_alarm(battery);
-       return count;
-}
-
-static struct device_attribute alarm_attr = {
-       .attr = {.name = "alarm", .mode = 0644, .owner = THIS_MODULE},
-       .show = acpi_battery_alarm_show,
-       .store = acpi_battery_alarm_store,
-};
-
 /* --------------------------------------------------------------------------
                                  Driver Interface
    -------------------------------------------------------------------------- */
@@ -732,7 +763,9 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
        acpi_bus_generate_netlink_event(device->pnp.device_class,
                                        device->dev.bus_id, event,
                                        acpi_battery_present(battery));
-       kobject_uevent(&battery->bat.dev->kobj, KOBJ_CHANGE);
+       /* acpi_batter_update could remove power_supply object */
+       if (battery->bat.dev)
+               kobject_uevent(&battery->bat.dev->kobj, KOBJ_CHANGE);
 }
 
 static int acpi_battery_add(struct acpi_device *device)
@@ -756,11 +789,6 @@ static int acpi_battery_add(struct acpi_device *device)
        if (result)
                goto end;
 #endif
-       battery->bat.name = acpi_device_bid(device);
-       battery->bat.type = POWER_SUPPLY_TYPE_BATTERY;
-       battery->bat.get_property = acpi_battery_get_property;
-       result = power_supply_register(&battery->device->dev, &battery->bat);
-       result = device_create_file(battery->bat.dev, &alarm_attr);
        status = acpi_install_notify_handler(device->handle,
                                             ACPI_ALL_NOTIFY,
                                             acpi_battery_notify, battery);
@@ -796,10 +824,7 @@ static int acpi_battery_remove(struct acpi_device *device, int type)
 #ifdef CONFIG_ACPI_PROCFS
        acpi_battery_remove_fs(device);
 #endif
-       if (battery->bat.dev) {
-               device_remove_file(battery->bat.dev, &alarm_attr);
-               power_supply_unregister(&battery->bat);
-       }
+       sysfs_remove_battery(battery);
        mutex_destroy(&battery->lock);
        kfree(battery);
        return 0;
@@ -813,6 +838,7 @@ static int acpi_battery_resume(struct acpi_device *device)
                return -EINVAL;
        battery = acpi_driver_data(device);
        battery->update_time = 0;
+       acpi_battery_update(battery);
        return 0;
 }
 
index fb2cff9a2d24679cf99e9c82b9f04a4e32ea4bb0..49d432d0a12c6d7682b5325015f6612124058d19 100644 (file)
@@ -198,12 +198,10 @@ int acpi_bus_set_power(acpi_handle handle, int state)
                return -ENODEV;
        }
        /*
-        * Get device's current power state if it's unknown
-        * This means device power state isn't initialized or previous setting failed
+        * Get device's current power state
         */
-       if ((device->power.state == ACPI_STATE_UNKNOWN) || device->flags.force_power_state)
-               acpi_bus_get_power(device->handle, &device->power.state);
-       if ((state == device->power.state) && !device->flags.force_power_state) {
+       acpi_bus_get_power(device->handle, &device->power.state);
+       if (state == device->power.state) {
                ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n",
                                  state));
                return 0;
index 301e832e6961290912396f92fd54244f30b5ba7f..24a7865a57cb2515c740fbee5d9b038ca3927630 100644 (file)
@@ -78,6 +78,7 @@ MODULE_DEVICE_TABLE(acpi, button_device_ids);
 
 static int acpi_button_add(struct acpi_device *device);
 static int acpi_button_remove(struct acpi_device *device, int type);
+static int acpi_button_resume(struct acpi_device *device);
 static int acpi_button_info_open_fs(struct inode *inode, struct file *file);
 static int acpi_button_state_open_fs(struct inode *inode, struct file *file);
 
@@ -87,6 +88,7 @@ static struct acpi_driver acpi_button_driver = {
        .ids = button_device_ids,
        .ops = {
                .add = acpi_button_add,
+               .resume = acpi_button_resume,
                .remove = acpi_button_remove,
        },
 };
@@ -253,6 +255,19 @@ static int acpi_button_remove_fs(struct acpi_device *device)
 /* --------------------------------------------------------------------------
                                 Driver Interface
    -------------------------------------------------------------------------- */
+static int acpi_lid_send_state(struct acpi_button *button)
+{
+       unsigned long state;
+       acpi_status status;
+
+       status = acpi_evaluate_integer(button->device->handle, "_LID", NULL,
+                                       &state);
+       if (ACPI_FAILURE(status))
+               return -ENODEV;
+       /* input layer checks if event is redundant */
+       input_report_switch(button->input, SW_LID, !state);
+       return 0;
+}
 
 static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
 {
@@ -265,15 +280,8 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
        switch (event) {
        case ACPI_BUTTON_NOTIFY_STATUS:
                input = button->input;
-
                if (button->type == ACPI_BUTTON_TYPE_LID) {
-                       struct acpi_handle *handle = button->device->handle;
-                       unsigned long state;
-
-                       if (!ACPI_FAILURE(acpi_evaluate_integer(handle, "_LID",
-                                                               NULL, &state)))
-                               input_report_switch(input, SW_LID, !state);
-
+                       acpi_lid_send_state(button);
                } else {
                        int keycode = test_bit(KEY_SLEEP, input->keybit) ?
                                                KEY_SLEEP : KEY_POWER;
@@ -336,6 +344,17 @@ static int acpi_button_install_notify_handlers(struct acpi_button *button)
        return ACPI_FAILURE(status) ? -ENODEV : 0;
 }
 
+static int acpi_button_resume(struct acpi_device *device)
+{
+       struct acpi_button *button;
+       if (!device)
+               return -EINVAL;
+       button = acpi_driver_data(device);
+       if (button && button->type == ACPI_BUTTON_TYPE_LID)
+               return acpi_lid_send_state(button);
+       return 0;
+}
+
 static void acpi_button_remove_notify_handlers(struct acpi_button *button)
 {
        switch (button->type) {
@@ -453,6 +472,8 @@ static int acpi_button_add(struct acpi_device *device)
        error = input_register_device(input);
        if (error)
                goto err_remove_handlers;
+       if (button->type == ACPI_BUTTON_TYPE_LID)
+               acpi_lid_send_state(button);
 
        if (device->wakeup.flags.valid) {
                /* Button's GPE is run-wake GPE */
index 7b4178393e34856e8b6525a0c476a99a37b6962e..06b78e5e33a11b8a13a0b0874311f2bb7faf075a 100644 (file)
@@ -65,16 +65,18 @@ enum ec_command {
 /* EC events */
 enum ec_event {
        ACPI_EC_EVENT_OBF_1 = 1,        /* Output buffer full */
-       ACPI_EC_EVENT_IBF_0,    /* Input buffer empty */
+       ACPI_EC_EVENT_IBF_0,            /* Input buffer empty */
 };
 
 #define ACPI_EC_DELAY          500     /* Wait 500ms max. during EC ops */
 #define ACPI_EC_UDELAY_GLK     1000    /* Wait 1ms max. to get global lock */
 
-static enum ec_mode {
-       EC_INTR = 1,            /* Output buffer full */
-       EC_POLL,                /* Input buffer empty */
-} acpi_ec_mode = EC_INTR;
+enum {
+       EC_FLAGS_WAIT_GPE = 0,          /* Don't check status until GPE arrives */
+       EC_FLAGS_QUERY_PENDING,         /* Query is pending */
+       EC_FLAGS_GPE_MODE,              /* Expect GPE to be sent for status change */
+       EC_FLAGS_ONLY_IBF_GPE,          /* Expect GPE only for IBF = 0 event */
+};
 
 static int acpi_ec_remove(struct acpi_device *device, int type);
 static int acpi_ec_start(struct acpi_device *device);
@@ -116,9 +118,8 @@ static struct acpi_ec {
        unsigned long command_addr;
        unsigned long data_addr;
        unsigned long global_lock;
+       unsigned long flags;
        struct mutex lock;
-       atomic_t query_pending;
-       atomic_t event_count;
        wait_queue_head_t wait;
        struct list_head list;
        u8 handlers_installed;
@@ -148,45 +149,54 @@ static inline void acpi_ec_write_data(struct acpi_ec *ec, u8 data)
        outb(data, ec->data_addr);
 }
 
-static inline int acpi_ec_check_status(struct acpi_ec *ec, enum ec_event event,
-                                      unsigned old_count)
+static inline int acpi_ec_check_status(struct acpi_ec *ec, enum ec_event event)
 {
-       u8 status = acpi_ec_read_status(ec);
-       if (old_count == atomic_read(&ec->event_count))
+       if (test_bit(EC_FLAGS_WAIT_GPE, &ec->flags))
                return 0;
        if (event == ACPI_EC_EVENT_OBF_1) {
-               if (status & ACPI_EC_FLAG_OBF)
+               if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_OBF)
                        return 1;
        } else if (event == ACPI_EC_EVENT_IBF_0) {
-               if (!(status & ACPI_EC_FLAG_IBF))
+               if (!(acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF))
                        return 1;
        }
 
        return 0;
 }
 
-static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event,
-                        unsigned count, int force_poll)
+static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll)
 {
-       if (unlikely(force_poll) || acpi_ec_mode == EC_POLL) {
+       if (likely(test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) &&
+           likely(!force_poll)) {
+               if (wait_event_timeout(ec->wait, acpi_ec_check_status(ec, event),
+                                      msecs_to_jiffies(ACPI_EC_DELAY)))
+                       return 0;
+               clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
+               if (acpi_ec_check_status(ec, event)) {
+                       if (event == ACPI_EC_EVENT_OBF_1) {
+                               /* miss OBF = 1 GPE, don't expect it anymore */
+                               printk(KERN_INFO PREFIX "missing OBF_1 confirmation,"
+                                       "switching to degraded mode.\n");
+                               set_bit(EC_FLAGS_ONLY_IBF_GPE, &ec->flags);
+                       } else {
+                               /* missing GPEs, switch back to poll mode */
+                               printk(KERN_INFO PREFIX "missing IBF_1 confirmations,"
+                                       "switch off interrupt mode.\n");
+                               clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
+                       }
+                       return 0;
+               }
+       } else {
                unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY);
+               clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
                while (time_before(jiffies, delay)) {
-                       if (acpi_ec_check_status(ec, event, 0))
+                       if (acpi_ec_check_status(ec, event))
                                return 0;
                }
-       } else {
-               if (wait_event_timeout(ec->wait,
-                                      acpi_ec_check_status(ec, event, count),
-                                      msecs_to_jiffies(ACPI_EC_DELAY)) ||
-                   acpi_ec_check_status(ec, event, 0)) {
-                       return 0;
-               } else {
-                       printk(KERN_ERR PREFIX "acpi_ec_wait timeout,"
+       }
+       printk(KERN_ERR PREFIX "acpi_ec_wait timeout,"
                               " status = %d, expect_event = %d\n",
                               acpi_ec_read_status(ec), event);
-               }
-       }
-
        return -ETIME;
 }
 
@@ -196,39 +206,42 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command,
                                        int force_poll)
 {
        int result = 0;
-       unsigned count = atomic_read(&ec->event_count);
+       set_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
        acpi_ec_write_cmd(ec, command);
 
        for (; wdata_len > 0; --wdata_len) {
-               result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, count, force_poll);
+               result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, force_poll);
                if (result) {
                        printk(KERN_ERR PREFIX
                               "write_cmd timeout, command = %d\n", command);
                        goto end;
                }
-               count = atomic_read(&ec->event_count);
+               set_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
                acpi_ec_write_data(ec, *(wdata++));
        }
 
        if (!rdata_len) {
-               result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, count, force_poll);
+               result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, force_poll);
                if (result) {
                        printk(KERN_ERR PREFIX
                               "finish-write timeout, command = %d\n", command);
                        goto end;
                }
-       } else if (command == ACPI_EC_COMMAND_QUERY) {
-               atomic_set(&ec->query_pending, 0);
-       }
+       } else if (command == ACPI_EC_COMMAND_QUERY)
+               clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
 
        for (; rdata_len > 0; --rdata_len) {
-               result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF_1, count, force_poll);
+               if (test_bit(EC_FLAGS_ONLY_IBF_GPE, &ec->flags))
+                       force_poll = 1;
+               result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF_1, force_poll);
                if (result) {
                        printk(KERN_ERR PREFIX "read timeout, command = %d\n",
                               command);
                        goto end;
                }
-               count = atomic_read(&ec->event_count);
+               /* Don't expect GPE after last read */
+               if (rdata_len > 1)
+                       set_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
                *(rdata++) = acpi_ec_read_data(ec);
        }
       end:
@@ -258,10 +271,7 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command,
                }
        }
 
-       /* Make sure GPE is enabled before doing transaction */
-       acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
-
-       status = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, 0, 0);
+       status = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, 0);
        if (status) {
                printk(KERN_ERR PREFIX
                       "input buffer is not empty, aborting transaction\n");
@@ -435,9 +445,9 @@ EXPORT_SYMBOL_GPL(acpi_ec_add_query_handler);
 
 void acpi_ec_remove_query_handler(struct acpi_ec *ec, u8 query_bit)
 {
-       struct acpi_ec_query_handler *handler;
+       struct acpi_ec_query_handler *handler, *tmp;
        mutex_lock(&ec->lock);
-       list_for_each_entry(handler, &ec->list, node) {
+       list_for_each_entry_safe(handler, tmp, &ec->list, node) {
                if (query_bit == handler->query_bit) {
                        list_del(&handler->node);
                        kfree(handler);
@@ -476,23 +486,24 @@ static void acpi_ec_gpe_query(void *ec_cxt)
 static u32 acpi_ec_gpe_handler(void *data)
 {
        acpi_status status = AE_OK;
-       u8 value;
        struct acpi_ec *ec = data;
 
-       atomic_inc(&ec->event_count);
-
-       if (acpi_ec_mode == EC_INTR) {
+       clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
+       if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags))
                wake_up(&ec->wait);
-       }
 
-       value = acpi_ec_read_status(ec);
-       if ((value & ACPI_EC_FLAG_SCI) && !atomic_read(&ec->query_pending)) {
-               atomic_set(&ec->query_pending, 1);
-               status =
-                   acpi_os_execute(OSL_EC_BURST_HANDLER, acpi_ec_gpe_query, ec);
+       if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_SCI) {
+               if (!test_and_set_bit(EC_FLAGS_QUERY_PENDING, &ec->flags))
+                       status = acpi_os_execute(OSL_EC_BURST_HANDLER,
+                               acpi_ec_gpe_query, ec);
+       } else if (unlikely(!test_bit(EC_FLAGS_GPE_MODE, &ec->flags))) {
+               /* this is non-query, must be confirmation */
+               printk(KERN_INFO PREFIX "non-query interrupt received,"
+                       " switching to interrupt mode\n");
+               set_bit(EC_FLAGS_GPE_MODE, &ec->flags);
        }
 
-       return status == AE_OK ?
+       return ACPI_SUCCESS(status) ?
            ACPI_INTERRUPT_HANDLED : ACPI_INTERRUPT_NOT_HANDLED;
 }
 
@@ -641,13 +652,10 @@ static struct acpi_ec *make_acpi_ec(void)
        struct acpi_ec *ec = kzalloc(sizeof(struct acpi_ec), GFP_KERNEL);
        if (!ec)
                return NULL;
-
-       atomic_set(&ec->query_pending, 1);
-       atomic_set(&ec->event_count, 1);
+       ec->flags = 1 << EC_FLAGS_QUERY_PENDING;
        mutex_init(&ec->lock);
        init_waitqueue_head(&ec->wait);
        INIT_LIST_HEAD(&ec->list);
-
        return ec;
 }
 
@@ -741,6 +749,8 @@ static int acpi_ec_add(struct acpi_device *device)
        acpi_ec_add_fs(device);
        printk(KERN_INFO PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n",
                          ec->gpe, ec->command_addr, ec->data_addr);
+       printk(KERN_INFO PREFIX "driver started in %s mode\n",
+               (test_bit(EC_FLAGS_GPE_MODE, &ec->flags))?"interrupt":"poll");
        return 0;
 }
 
@@ -833,7 +843,7 @@ static int acpi_ec_start(struct acpi_device *device)
        ret = ec_install_handlers(ec);
 
        /* EC is fully operational, allow queries */
-       atomic_set(&ec->query_pending, 0);
+       clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags);
        return ret;
 }
 
@@ -924,20 +934,4 @@ static void __exit acpi_ec_exit(void)
 
        return;
 }
-#endif                         /* 0 */
-
-static int __init acpi_ec_set_intr_mode(char *str)
-{
-       int intr;
-
-       if (!get_option(&str, &intr))
-               return 0;
-
-       acpi_ec_mode = (intr) ? EC_INTR : EC_POLL;
-
-       printk(KERN_NOTICE PREFIX "%s mode.\n", intr ? "interrupt" : "polling");
-
-       return 1;
-}
-
-__setup("ec_intr=", acpi_ec_set_intr_mode);
+#endif /* 0 */
index c81f6bdb68b8a8271e5a3d525effe39ea8b3ae18..a5a5532db268084307ae31d655a04af6b9913925 100644 (file)
@@ -47,8 +47,6 @@ MODULE_LICENSE("GPL");
 
 static int acpi_fan_add(struct acpi_device *device);
 static int acpi_fan_remove(struct acpi_device *device, int type);
-static int acpi_fan_suspend(struct acpi_device *device, pm_message_t state);
-static int acpi_fan_resume(struct acpi_device *device);
 
 static const struct acpi_device_id fan_device_ids[] = {
        {"PNP0C0B", 0},
@@ -63,15 +61,9 @@ static struct acpi_driver acpi_fan_driver = {
        .ops = {
                .add = acpi_fan_add,
                .remove = acpi_fan_remove,
-               .suspend = acpi_fan_suspend,
-               .resume = acpi_fan_resume,
                },
 };
 
-struct acpi_fan {
-       struct acpi_device * device;
-};
-
 /* --------------------------------------------------------------------------
                               FS Interface (/proc)
    -------------------------------------------------------------------------- */
@@ -80,12 +72,12 @@ static struct proc_dir_entry *acpi_fan_dir;
 
 static int acpi_fan_read_state(struct seq_file *seq, void *offset)
 {
-       struct acpi_fan *fan = seq->private;
+       struct acpi_device *device = seq->private;
        int state = 0;
 
 
-       if (fan) {
-               if (acpi_bus_get_power(fan->device->handle, &state))
+       if (device) {
+               if (acpi_bus_get_power(device->handle, &state))
                        seq_printf(seq, "status:                  ERROR\n");
                else
                        seq_printf(seq, "status:                  %s\n",
@@ -105,11 +97,10 @@ acpi_fan_write_state(struct file *file, const char __user * buffer,
 {
        int result = 0;
        struct seq_file *m = file->private_data;
-       struct acpi_fan *fan = m->private;
+       struct acpi_device *device = m->private;
        char state_string[12] = { '\0' };
 
-
-       if (!fan || (count > sizeof(state_string) - 1))
+       if (count > sizeof(state_string) - 1)
                return -EINVAL;
 
        if (copy_from_user(state_string, buffer, count))
@@ -117,7 +108,7 @@ acpi_fan_write_state(struct file *file, const char __user * buffer,
 
        state_string[count] = '\0';
 
-       result = acpi_bus_set_power(fan->device->handle,
+       result = acpi_bus_set_power(device->handle,
                                    simple_strtoul(state_string, NULL, 0));
        if (result)
                return result;
@@ -158,7 +149,7 @@ static int acpi_fan_add_fs(struct acpi_device *device)
                return -ENODEV;
        else {
                entry->proc_fops = &acpi_fan_state_ops;
-               entry->data = acpi_driver_data(device);
+               entry->data = device;
                entry->owner = THIS_MODULE;
        }
 
@@ -191,14 +182,8 @@ static int acpi_fan_add(struct acpi_device *device)
        if (!device)
                return -EINVAL;
 
-       fan = kzalloc(sizeof(struct acpi_fan), GFP_KERNEL);
-       if (!fan)
-               return -ENOMEM;
-
-       fan->device = device;
        strcpy(acpi_device_name(device), "Fan");
        strcpy(acpi_device_class(device), ACPI_FAN_CLASS);
-       acpi_driver_data(device) = fan;
 
        result = acpi_bus_get_power(device->handle, &state);
        if (result) {
@@ -206,10 +191,6 @@ static int acpi_fan_add(struct acpi_device *device)
                goto end;
        }
 
-       device->flags.force_power_state = 1;
-       acpi_bus_set_power(device->handle, state);
-       device->flags.force_power_state = 0;
-
        result = acpi_fan_add_fs(device);
        if (result)
                goto end;
@@ -227,53 +208,14 @@ static int acpi_fan_add(struct acpi_device *device)
 
 static int acpi_fan_remove(struct acpi_device *device, int type)
 {
-       struct acpi_fan *fan = NULL;
-
-
        if (!device || !acpi_driver_data(device))
                return -EINVAL;
 
-       fan = acpi_driver_data(device);
-
        acpi_fan_remove_fs(device);
 
-       kfree(fan);
-
        return 0;
 }
 
-static int acpi_fan_suspend(struct acpi_device *device, pm_message_t state)
-{
-       if (!device)
-               return -EINVAL;
-
-       acpi_bus_set_power(device->handle, ACPI_STATE_D0);
-
-       return AE_OK;
-}
-
-static int acpi_fan_resume(struct acpi_device *device)
-{
-       int result = 0;
-       int power_state = 0;
-
-       if (!device)
-               return -EINVAL;
-
-       result = acpi_bus_get_power(device->handle, &power_state);
-       if (result) {
-               ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
-                                 "Error reading fan power state\n"));
-               return result;
-       }
-
-       device->flags.force_power_state = 1;
-       acpi_bus_set_power(device->handle, power_state);
-       device->flags.force_power_state = 0;
-
-       return result;
-}
-
 static int __init acpi_fan_init(void)
 {
        int result = 0;
index 57b9a2998fd0ce54e76f5ee22f0bb62a60dbdcbe..af1769a20c7a6ba3f0ee665b204a79c0a1f0c74c 100644 (file)
@@ -86,7 +86,6 @@ struct acpi_power_resource {
        acpi_bus_id name;
        u32 system_level;
        u32 order;
-       int state;
        struct mutex resource_lock;
        struct list_head reference;
 };
@@ -128,33 +127,31 @@ acpi_power_get_context(acpi_handle handle,
        return 0;
 }
 
-static int acpi_power_get_state(struct acpi_power_resource *resource)
+static int acpi_power_get_state(struct acpi_power_resource *resource, int *state)
 {
        acpi_status status = AE_OK;
        unsigned long sta = 0;
 
 
-       if (!resource)
+       if (!resource || !state)
                return -EINVAL;
 
        status = acpi_evaluate_integer(resource->device->handle, "_STA", NULL, &sta);
        if (ACPI_FAILURE(status))
                return -ENODEV;
 
-       if (sta & 0x01)
-               resource->state = ACPI_POWER_RESOURCE_STATE_ON;
-       else
-               resource->state = ACPI_POWER_RESOURCE_STATE_OFF;
+       *state = (sta & 0x01)?ACPI_POWER_RESOURCE_STATE_ON:
+                             ACPI_POWER_RESOURCE_STATE_OFF;
 
        ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] is %s\n",
-                         resource->name, resource->state ? "on" : "off"));
+                         resource->name, state ? "on" : "off"));
 
        return 0;
 }
 
 static int acpi_power_get_list_state(struct acpi_handle_list *list, int *state)
 {
-       int result = 0;
+       int result = 0, state1;
        struct acpi_power_resource *resource = NULL;
        u32 i = 0;
 
@@ -168,11 +165,11 @@ static int acpi_power_get_list_state(struct acpi_handle_list *list, int *state)
                result = acpi_power_get_context(list->handles[i], &resource);
                if (result)
                        return result;
-               result = acpi_power_get_state(resource);
+               result = acpi_power_get_state(resource, &state1);
                if (result)
                        return result;
 
-               *state = resource->state;
+               *state = state1;
 
                if (*state != ACPI_POWER_RESOURCE_STATE_ON)
                        break;
@@ -186,7 +183,7 @@ static int acpi_power_get_list_state(struct acpi_handle_list *list, int *state)
 
 static int acpi_power_on(acpi_handle handle, struct acpi_device *dev)
 {
-       int result = 0;
+       int result = 0, state;
        int found = 0;
        acpi_status status = AE_OK;
        struct acpi_power_resource *resource = NULL;
@@ -224,20 +221,14 @@ static int acpi_power_on(acpi_handle handle, struct acpi_device *dev)
        }
        mutex_unlock(&resource->resource_lock);
 
-       if (resource->state == ACPI_POWER_RESOURCE_STATE_ON) {
-               ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] already on\n",
-                                 resource->name));
-               return 0;
-       }
-
        status = acpi_evaluate_object(resource->device->handle, "_ON", NULL, NULL);
        if (ACPI_FAILURE(status))
                return -ENODEV;
 
-       result = acpi_power_get_state(resource);
+       result = acpi_power_get_state(resource, &state);
        if (result)
                return result;
-       if (resource->state != ACPI_POWER_RESOURCE_STATE_ON)
+       if (state != ACPI_POWER_RESOURCE_STATE_ON)
                return -ENOEXEC;
 
        /* Update the power resource's _device_ power state */
@@ -250,7 +241,7 @@ static int acpi_power_on(acpi_handle handle, struct acpi_device *dev)
 
 static int acpi_power_off_device(acpi_handle handle, struct acpi_device *dev)
 {
-       int result = 0;
+       int result = 0, state;
        acpi_status status = AE_OK;
        struct acpi_power_resource *resource = NULL;
        struct list_head *node, *next;
@@ -281,20 +272,14 @@ static int acpi_power_off_device(acpi_handle handle, struct acpi_device *dev)
        }
        mutex_unlock(&resource->resource_lock);
 
-       if (resource->state == ACPI_POWER_RESOURCE_STATE_OFF) {
-               ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] already off\n",
-                                 resource->name));
-               return 0;
-       }
-
        status = acpi_evaluate_object(resource->device->handle, "_OFF", NULL, NULL);
        if (ACPI_FAILURE(status))
                return -ENODEV;
 
-       result = acpi_power_get_state(resource);
+       result = acpi_power_get_state(resource, &state);
        if (result)
                return result;
-       if (resource->state != ACPI_POWER_RESOURCE_STATE_OFF)
+       if (state != ACPI_POWER_RESOURCE_STATE_OFF)
                return -ENOEXEC;
 
        /* Update the power resource's _device_ power state */
@@ -494,7 +479,7 @@ static struct proc_dir_entry *acpi_power_dir;
 static int acpi_power_seq_show(struct seq_file *seq, void *offset)
 {
        int count = 0;
-       int result = 0;
+       int result = 0, state;
        struct acpi_power_resource *resource = NULL;
        struct list_head *node, *next;
        struct acpi_power_reference *ref;
@@ -505,12 +490,12 @@ static int acpi_power_seq_show(struct seq_file *seq, void *offset)
        if (!resource)
                goto end;
 
-       result = acpi_power_get_state(resource);
+       result = acpi_power_get_state(resource, &state);
        if (result)
                goto end;
 
        seq_puts(seq, "state:                   ");
-       switch (resource->state) {
+       switch (state) {
        case ACPI_POWER_RESOURCE_STATE_ON:
                seq_puts(seq, "on\n");
                break;
@@ -591,7 +576,7 @@ static int acpi_power_remove_fs(struct acpi_device *device)
 
 static int acpi_power_add(struct acpi_device *device)
 {
-       int result = 0;
+       int result = 0, state;
        acpi_status status = AE_OK;
        struct acpi_power_resource *resource = NULL;
        union acpi_object acpi_object;
@@ -622,11 +607,11 @@ static int acpi_power_add(struct acpi_device *device)
        resource->system_level = acpi_object.power_resource.system_level;
        resource->order = acpi_object.power_resource.resource_order;
 
-       result = acpi_power_get_state(resource);
+       result = acpi_power_get_state(resource, &state);
        if (result)
                goto end;
 
-       switch (resource->state) {
+       switch (state) {
        case ACPI_POWER_RESOURCE_STATE_ON:
                device->power.state = ACPI_STATE_D0;
                break;
@@ -643,7 +628,7 @@ static int acpi_power_add(struct acpi_device *device)
                goto end;
 
        printk(KERN_INFO PREFIX "%s [%s] (%s)\n", acpi_device_name(device),
-              acpi_device_bid(device), resource->state ? "on" : "off");
+              acpi_device_bid(device), state ? "on" : "off");
 
       end:
        if (result)
@@ -680,7 +665,7 @@ static int acpi_power_remove(struct acpi_device *device, int type)
 
 static int acpi_power_resume(struct acpi_device *device)
 {
-       int result = 0;
+       int result = 0, state;
        struct acpi_power_resource *resource = NULL;
        struct acpi_power_reference *ref;
 
@@ -689,12 +674,12 @@ static int acpi_power_resume(struct acpi_device *device)
 
        resource = (struct acpi_power_resource *)acpi_driver_data(device);
 
-       result = acpi_power_get_state(resource);
+       result = acpi_power_get_state(resource, &state);
        if (result)
                return result;
 
        mutex_lock(&resource->resource_lock);
-       if ((resource->state == ACPI_POWER_RESOURCE_STATE_OFF) &&
+       if (state == ACPI_POWER_RESOURCE_STATE_OFF &&
            !list_empty(&resource->reference)) {
                ref = container_of(resource->reference.next, struct acpi_power_reference, node);
                mutex_unlock(&resource->resource_lock);
index f3d3867303ec61602958f135494cc1ccbe86309b..2c0b6630f8ba54603530fce4574f8697faaabe9e 100644 (file)
@@ -167,8 +167,8 @@ static void acpi_pm_finish(void)
 {
        u32 acpi_state = acpi_target_sleep_state;
 
-       acpi_leave_sleep_state(acpi_state);
        acpi_disable_wakeup_device(acpi_state);
+       acpi_leave_sleep_state(acpi_state);
 
        /* reset firmware waking vector */
        acpi_set_firmware_waking_vector((acpi_physical_address) 0);
@@ -272,8 +272,8 @@ static void acpi_hibernation_finish(void)
         * enable it here.
         */
        acpi_enable();
-       acpi_leave_sleep_state(ACPI_STATE_S4);
        acpi_disable_wakeup_device(ACPI_STATE_S4);
+       acpi_leave_sleep_state(ACPI_STATE_S4);
 
        /* reset firmware waking vector */
        acpi_set_firmware_waking_vector((acpi_physical_address) 0);
@@ -410,6 +410,7 @@ static void acpi_power_off(void)
        /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */
        printk("%s called\n", __FUNCTION__);
        local_irq_disable();
+       acpi_enable_wakeup_device(ACPI_STATE_S5);
        acpi_enter_sleep_state(ACPI_STATE_S5);
 }
 
index 63035d71a61a5c995a775f331d0551e939a775da..164c7d9514f9f0ce32088d1681a090c4c630875c 100644 (file)
@@ -704,8 +704,8 @@ static int ata_dev_set_dipm(struct ata_device *dev, enum link_pm policy)
 
 /**
  *     ata_dev_enable_pm - enable SATA interface power management
- *     @device - device to enable ipm for
- *     @policy - the link power management policy
+ *     @dev:  device to enable power management
+ *     @policy: the link power management policy
  *
  *     Enable SATA Interface power management.  This will enable
  *     Device Interface Power Management (DIPM) for min_power
@@ -735,9 +735,10 @@ enable_pm_out:
        return /* rc */;        /* hopefully we can use 'rc' eventually */
 }
 
+#ifdef CONFIG_PM
 /**
  *     ata_dev_disable_pm - disable SATA interface power management
- *     @device - device to enable ipm for
+ *     @dev: device to disable power management
  *
  *     Disable SATA Interface power management.  This will disable
  *     Device Interface Power Management (DIPM) without changing
@@ -755,6 +756,7 @@ static void ata_dev_disable_pm(struct ata_device *dev)
        if (ap->ops->disable_pm)
                ap->ops->disable_pm(ap);
 }
+#endif /* CONFIG_PM */
 
 void ata_lpm_schedule(struct ata_port *ap, enum link_pm policy)
 {
@@ -764,6 +766,7 @@ void ata_lpm_schedule(struct ata_port *ap, enum link_pm policy)
        ata_port_schedule_eh(ap);
 }
 
+#ifdef CONFIG_PM
 static void ata_lpm_enable(struct ata_host *host)
 {
        struct ata_link *link;
@@ -789,6 +792,7 @@ static void ata_lpm_disable(struct ata_host *host)
                ata_lpm_schedule(ap, ap->pm_policy);
        }
 }
+#endif /* CONFIG_PM */
 
 
 /**
@@ -2300,6 +2304,10 @@ int ata_dev_configure(struct ata_device *dev)
                dev->max_sectors = ATA_MAX_SECTORS;
        }
 
+       if ((dev->class == ATA_DEV_ATAPI) &&
+           (atapi_command_packet_set(id) == TYPE_TAPE))
+               dev->max_sectors = ATA_MAX_SECTORS_TAPE;
+
        if (dev->horkage & ATA_HORKAGE_MAX_SEC_128)
                dev->max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_128,
                                         dev->max_sectors);
@@ -2743,17 +2751,27 @@ int sata_down_spd_limit(struct ata_link *link)
 
 static int __sata_set_spd_needed(struct ata_link *link, u32 *scontrol)
 {
-       u32 spd, limit;
+       struct ata_link *host_link = &link->ap->link;
+       u32 limit, target, spd;
+
+       limit = link->sata_spd_limit;
 
-       if (link->sata_spd_limit == UINT_MAX)
-               limit = 0;
+       /* Don't configure downstream link faster than upstream link.
+        * It doesn't speed up anything and some PMPs choke on such
+        * configuration.
+        */
+       if (!ata_is_host_link(link) && host_link->sata_spd)
+               limit &= (1 << host_link->sata_spd) - 1;
+
+       if (limit == UINT_MAX)
+               target = 0;
        else
-               limit = fls(link->sata_spd_limit);
+               target = fls(limit);
 
        spd = (*scontrol >> 4) & 0xf;
-       *scontrol = (*scontrol & ~0xf0) | ((limit & 0xf) << 4);
+       *scontrol = (*scontrol & ~0xf0) | ((target & 0xf) << 4);
 
-       return spd != limit;
+       return spd != target;
 }
 
 /**
@@ -2776,7 +2794,7 @@ int sata_set_spd_needed(struct ata_link *link)
        u32 scontrol;
 
        if (sata_scr_read(link, SCR_CONTROL, &scontrol))
-               return 0;
+               return 1;
 
        return __sata_set_spd_needed(link, &scontrol);
 }
index fefea7470e5118a9230db91bd1608a87568225f3..ed8813b222a0219e98536bb6fc49495e95cc37e7 100644 (file)
@@ -1747,6 +1747,7 @@ static void ata_eh_link_autopsy(struct ata_link *link)
 {
        struct ata_port *ap = link->ap;
        struct ata_eh_context *ehc = &link->eh_context;
+       struct ata_device *dev;
        unsigned int all_err_mask = 0;
        int tag, is_io = 0;
        u32 serror;
@@ -1800,10 +1801,8 @@ static void ata_eh_link_autopsy(struct ata_link *link)
                        qc->err_mask &= ~AC_ERR_OTHER;
 
                /* SENSE_VALID trumps dev/unknown error and revalidation */
-               if (qc->flags & ATA_QCFLAG_SENSE_VALID) {
+               if (qc->flags & ATA_QCFLAG_SENSE_VALID)
                        qc->err_mask &= ~(AC_ERR_DEV | AC_ERR_OTHER);
-                       ehc->i.action &= ~ATA_EH_REVALIDATE;
-               }
 
                /* accumulate error info */
                ehc->i.dev = qc->dev;
@@ -1816,21 +1815,28 @@ static void ata_eh_link_autopsy(struct ata_link *link)
        if (ap->pflags & ATA_PFLAG_FROZEN ||
            all_err_mask & (AC_ERR_HSM | AC_ERR_TIMEOUT))
                ehc->i.action |= ATA_EH_SOFTRESET;
-       else if (all_err_mask)
+       else if ((is_io && all_err_mask) ||
+                (!is_io && (all_err_mask & ~AC_ERR_DEV)))
                ehc->i.action |= ATA_EH_REVALIDATE;
 
-       /* if we have offending qcs and the associated failed device */
+       /* If we have offending qcs and the associated failed device,
+        * perform per-dev EH action only on the offending device.
+        */
        if (ehc->i.dev) {
-               /* speed down */
-               ehc->i.action |= ata_eh_speed_down(ehc->i.dev, is_io,
-                                                  all_err_mask);
-
-               /* perform per-dev EH action only on the offending device */
                ehc->i.dev_action[ehc->i.dev->devno] |=
                        ehc->i.action & ATA_EH_PERDEV_MASK;
                ehc->i.action &= ~ATA_EH_PERDEV_MASK;
        }
 
+       /* consider speeding down */
+       dev = ehc->i.dev;
+       if (!dev && ata_link_max_devices(link) == 1 &&
+           ata_dev_enabled(link->device))
+               dev = link->device;
+
+       if (dev)
+               ehc->i.action |= ata_eh_speed_down(dev, is_io, all_err_mask);
+
        DPRINTK("EXIT\n");
 }
 
@@ -1879,7 +1885,9 @@ static void ata_eh_link_report(struct ata_link *link)
        for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
                struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag);
 
-               if (!(qc->flags & ATA_QCFLAG_FAILED) || qc->dev->link != link)
+               if (!(qc->flags & ATA_QCFLAG_FAILED) || qc->dev->link != link ||
+                   ((qc->flags & ATA_QCFLAG_QUIET) &&
+                    qc->err_mask == AC_ERR_DEV))
                        continue;
                if (qc->flags & ATA_QCFLAG_SENSE_VALID && !qc->err_mask)
                        continue;
@@ -2064,16 +2072,19 @@ int ata_eh_reset(struct ata_link *link, int classify,
                 ata_prereset_fn_t prereset, ata_reset_fn_t softreset,
                 ata_reset_fn_t hardreset, ata_postreset_fn_t postreset)
 {
+       const int max_tries = ARRAY_SIZE(ata_eh_reset_timeouts);
        struct ata_port *ap = link->ap;
        struct ata_eh_context *ehc = &link->eh_context;
        unsigned int *classes = ehc->classes;
+       unsigned int lflags = link->flags;
        int verbose = !(ehc->i.flags & ATA_EHI_QUIET);
        int try = 0;
        struct ata_device *dev;
-       unsigned long deadline;
+       unsigned long deadline, now;
        unsigned int tmp_action;
        ata_reset_fn_t reset;
        unsigned long flags;
+       u32 sstatus;
        int rc;
 
        /* about to reset */
@@ -2105,7 +2116,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
        /* Determine which reset to use and record in ehc->i.action.
         * prereset() may examine and modify it.
         */
-       if (softreset && (!hardreset || (!(link->flags & ATA_LFLAG_NO_SRST) &&
+       if (softreset && (!hardreset || (!(lflags & ATA_LFLAG_NO_SRST) &&
                                         !sata_set_spd_needed(link) &&
                                         !(ehc->i.action & ATA_EH_HARDRESET))))
                tmp_action = ATA_EH_SOFTRESET;
@@ -2180,82 +2191,64 @@ int ata_eh_reset(struct ata_link *link, int classify,
                                        "follow-up softreset required "
                                        "but no softreset avaliable\n");
                        rc = -EINVAL;
-                       goto out;
+                       goto fail;
                }
 
                ata_eh_about_to_do(link, NULL, ATA_EH_RESET_MASK);
                rc = ata_do_reset(link, reset, classes, deadline);
-
-               if (rc == 0 && classify && classes[0] == ATA_DEV_UNKNOWN &&
-                   !(link->flags & ATA_LFLAG_ASSUME_CLASS)) {
-                       ata_link_printk(link, KERN_ERR,
-                                       "classification failed\n");
-                       rc = -EINVAL;
-                       goto out;
-               }
        }
 
-       /* if we skipped follow-up srst, clear rc */
-       if (rc == -EAGAIN)
-               rc = 0;
-
-       if (rc && rc != -ERESTART && try < ARRAY_SIZE(ata_eh_reset_timeouts)) {
-               unsigned long now = jiffies;
-
-               if (time_before(now, deadline)) {
-                       unsigned long delta = deadline - jiffies;
-
-                       ata_link_printk(link, KERN_WARNING, "reset failed "
-                               "(errno=%d), retrying in %u secs\n",
-                               rc, (jiffies_to_msecs(delta) + 999) / 1000);
+       /* -EAGAIN can happen if we skipped followup SRST */
+       if (rc && rc != -EAGAIN)
+               goto fail;
 
-                       while (delta)
-                               delta = schedule_timeout_uninterruptible(delta);
+       /* was classification successful? */
+       if (classify && classes[0] == ATA_DEV_UNKNOWN &&
+           !(lflags & ATA_LFLAG_ASSUME_CLASS)) {
+               if (try < max_tries) {
+                       ata_link_printk(link, KERN_WARNING,
+                                       "classification failed\n");
+                       rc = -EINVAL;
+                       goto fail;
                }
 
-               if (rc == -EPIPE ||
-                   try == ARRAY_SIZE(ata_eh_reset_timeouts) - 1)
-                       sata_down_spd_limit(link);
-               if (hardreset)
-                       reset = hardreset;
-               goto retry;
+               ata_link_printk(link, KERN_WARNING,
+                               "classfication failed, assuming ATA\n");
+               lflags |= ATA_LFLAG_ASSUME_ATA;
        }
 
-       if (rc == 0) {
-               u32 sstatus;
+       ata_link_for_each_dev(dev, link) {
+               /* After the reset, the device state is PIO 0 and the
+                * controller state is undefined.  Reset also wakes up
+                * drives from sleeping mode.
+                */
+               dev->pio_mode = XFER_PIO_0;
+               dev->flags &= ~ATA_DFLAG_SLEEPING;
 
-               ata_link_for_each_dev(dev, link) {
-                       /* After the reset, the device state is PIO 0
-                        * and the controller state is undefined.
-                        * Reset also wakes up drives from sleeping
-                        * mode.
-                        */
-                       dev->pio_mode = XFER_PIO_0;
-                       dev->flags &= ~ATA_DFLAG_SLEEPING;
+               if (ata_link_offline(link))
+                       continue;
 
-                       if (ata_link_offline(link))
-                               continue;
+               /* apply class override and convert UNKNOWN to NONE */
+               if (lflags & ATA_LFLAG_ASSUME_ATA)
+                       classes[dev->devno] = ATA_DEV_ATA;
+               else if (lflags & ATA_LFLAG_ASSUME_SEMB)
+                       classes[dev->devno] = ATA_DEV_SEMB_UNSUP; /* not yet */
+               else if (classes[dev->devno] == ATA_DEV_UNKNOWN)
+                       classes[dev->devno] = ATA_DEV_NONE;
+       }
 
-                       /* apply class override and convert UNKNOWN to NONE */
-                       if (link->flags & ATA_LFLAG_ASSUME_ATA)
-                               classes[dev->devno] = ATA_DEV_ATA;
-                       else if (link->flags & ATA_LFLAG_ASSUME_SEMB)
-                               classes[dev->devno] = ATA_DEV_SEMB_UNSUP; /* not yet */
-                       else if (classes[dev->devno] == ATA_DEV_UNKNOWN)
-                               classes[dev->devno] = ATA_DEV_NONE;
-               }
+       /* record current link speed */
+       if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0)
+               link->sata_spd = (sstatus >> 4) & 0xf;
 
-               /* record current link speed */
-               if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0)
-                       link->sata_spd = (sstatus >> 4) & 0xf;
+       if (postreset)
+               postreset(link, classes);
 
-               if (postreset)
-                       postreset(link, classes);
+       /* reset successful, schedule revalidation */
+       ata_eh_done(link, NULL, ehc->i.action & ATA_EH_RESET_MASK);
+       ehc->i.action |= ATA_EH_REVALIDATE;
 
-               /* reset successful, schedule revalidation */
-               ata_eh_done(link, NULL, ehc->i.action & ATA_EH_RESET_MASK);
-               ehc->i.action |= ATA_EH_REVALIDATE;
-       }
+       rc = 0;
  out:
        /* clear hotplug flag */
        ehc->i.flags &= ~ATA_EHI_HOTPLUGGED;
@@ -2265,6 +2258,28 @@ int ata_eh_reset(struct ata_link *link, int classify,
        spin_unlock_irqrestore(ap->lock, flags);
 
        return rc;
+
+ fail:
+       if (rc == -ERESTART || try >= max_tries)
+               goto out;
+
+       now = jiffies;
+       if (time_before(now, deadline)) {
+               unsigned long delta = deadline - now;
+
+               ata_link_printk(link, KERN_WARNING, "reset failed "
+                               "(errno=%d), retrying in %u secs\n",
+                               rc, (jiffies_to_msecs(delta) + 999) / 1000);
+
+               while (delta)
+                       delta = schedule_timeout_uninterruptible(delta);
+       }
+
+       if (rc == -EPIPE || try == max_tries - 1)
+               sata_down_spd_limit(link);
+       if (hardreset)
+               reset = hardreset;
+       goto retry;
 }
 
 static int ata_eh_revalidate_and_attach(struct ata_link *link,
@@ -2697,8 +2712,15 @@ void ata_eh_finish(struct ata_port *ap)
                        /* FIXME: Once EH migration is complete,
                         * generate sense data in this function,
                         * considering both err_mask and tf.
+                        *
+                        * There's no point in retrying invalid
+                        * (detected by libata) and non-IO device
+                        * errors (rejected by device).  Finish them
+                        * immediately.
                         */
-                       if (qc->err_mask & AC_ERR_INVALID)
+                       if ((qc->err_mask & AC_ERR_INVALID) ||
+                           (!(qc->flags & ATA_QCFLAG_IO) &&
+                            qc->err_mask == AC_ERR_DEV))
                                ata_eh_qc_complete(qc);
                        else
                                ata_eh_qc_retry(qc);
index 93bd36c19690bd4013381131b84fa8d13671cfcc..245057df69d67950ed4b50e507023f3545248670 100644 (file)
@@ -120,7 +120,7 @@ static const struct {
        { MEDIUM_POWER, "medium_power" },
 };
 
-const char *ata_scsi_lpm_get(enum link_pm policy)
+static const char *ata_scsi_lpm_get(enum link_pm policy)
 {
        int i;
 
@@ -1108,6 +1108,9 @@ static unsigned int ata_scsi_flush_xlat(struct ata_queued_cmd *qc)
        else
                tf->command = ATA_CMD_FLUSH;
 
+       /* flush is critical for IO integrity, consider it an IO command */
+       qc->flags |= ATA_QCFLAG_IO;
+
        return 0;
 }
 
@@ -2764,8 +2767,8 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
         */
        qc->nbytes = scsi_bufflen(scmd);
 
-       /* request result TF */
-       qc->flags |= ATA_QCFLAG_RESULT_TF;
+       /* request result TF and be quiet about device error */
+       qc->flags |= ATA_QCFLAG_RESULT_TF | ATA_QCFLAG_QUIET;
 
        return 0;
 
index b4c37b9e413c1268cd95bd9da40ac5fa9e0493f0..d015b4adcfe098402fd9e8b307a829f580e36636 100644 (file)
@@ -34,7 +34,8 @@ enum {
 
        SATA_FSL_HOST_FLAGS     = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
                                ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
-                               ATA_FLAG_NCQ  | ATA_FLAG_SKIP_D2H_BSY),
+                               ATA_FLAG_NCQ),
+       SATA_FSL_HOST_LFLAGS    = ATA_LFLAG_SKIP_D2H_BSY,
 
        SATA_FSL_MAX_CMDS       = SATA_FSL_QUEUE_DEPTH,
        SATA_FSL_CMD_HDR_SIZE   = 16,   /* 4 DWORDS */
@@ -264,10 +265,11 @@ struct sata_fsl_host_priv {
        void __iomem *hcr_base;
        void __iomem *ssr_base;
        void __iomem *csr_base;
+       int irq;
 };
 
 static inline unsigned int sata_fsl_tag(unsigned int tag,
-                                       void __iomem * hcr_base)
+                                       void __iomem *hcr_base)
 {
        /* We let libATA core do actual (queue) tag allocation */
 
@@ -306,7 +308,7 @@ static void sata_fsl_setup_cmd_hdr_entry(struct sata_fsl_port_priv *pp,
        pp->cmdslot[tag].prde_fis_len =
            cpu_to_le32((num_prde << 16) | (fis_len << 2));
        pp->cmdslot[tag].ttl = cpu_to_le32(data_xfer_len & ~0x03);
-       pp->cmdslot[tag].desc_info = cpu_to_le32((desc_info | (tag & 0x1F)));
+       pp->cmdslot[tag].desc_info = cpu_to_le32(desc_info | (tag & 0x1F));
 
        VPRINTK("cda=0x%x, prde_fis_len=0x%x, ttl=0x%x, di=0x%x\n",
                pp->cmdslot[tag].cda,
@@ -316,7 +318,7 @@ static void sata_fsl_setup_cmd_hdr_entry(struct sata_fsl_port_priv *pp,
 }
 
 static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc,
-                                    u32 * ttl, dma_addr_t cmd_desc_paddr)
+                                    u32 *ttl, dma_addr_t cmd_desc_paddr)
 {
        struct scatterlist *sg;
        unsigned int num_prde = 0;
@@ -353,7 +355,7 @@ static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc,
                                        "s/g len unaligned : 0x%x\n", sg_len);
 
                if ((num_prde == (SATA_FSL_MAX_PRD_DIRECT - 1)) &&
-                   !ata_sg_is_last(sg, qc)) {
+                   (qc->n_iter + 1 != qc->n_elem)) {
                        VPRINTK("setting indirect prde\n");
                        prd_ptr_to_indirect_ext = prd;
                        prd->dba = cpu_to_le32(indirect_ext_segment_paddr);
@@ -404,7 +406,7 @@ static void sata_fsl_qc_prep(struct ata_queued_cmd *qc)
        cd = (struct command_desc *)pp->cmdentry + tag;
        cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE;
 
-       ata_tf_to_fis(&qc->tf, 0, 1, (u8 *) & cd->cfis);
+       ata_tf_to_fis(&qc->tf, 0, 1, (u8 *) &cd->cfis);
 
        VPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x\n",
                cd->cfis[0], cd->cfis[1], cd->cfis[2]);
@@ -470,16 +472,10 @@ static int sata_fsl_scr_write(struct ata_port *ap, unsigned int sc_reg_in,
 
        switch (sc_reg_in) {
        case SCR_STATUS:
-               sc_reg = 0;
-               break;
        case SCR_ERROR:
-               sc_reg = 1;
-               break;
        case SCR_CONTROL:
-               sc_reg = 2;
-               break;
        case SCR_ACTIVE:
-               sc_reg = 3;
+               sc_reg = sc_reg_in;
                break;
        default:
                return -EINVAL;
@@ -487,7 +483,7 @@ static int sata_fsl_scr_write(struct ata_port *ap, unsigned int sc_reg_in,
 
        VPRINTK("xx_scr_write, reg_in = %d\n", sc_reg);
 
-       iowrite32(val, (void __iomem *)ssr_base + (sc_reg * 4));
+       iowrite32(val, ssr_base + (sc_reg * 4));
        return 0;
 }
 
@@ -500,16 +496,10 @@ static int sata_fsl_scr_read(struct ata_port *ap, unsigned int sc_reg_in,
 
        switch (sc_reg_in) {
        case SCR_STATUS:
-               sc_reg = 0;
-               break;
        case SCR_ERROR:
-               sc_reg = 1;
-               break;
        case SCR_CONTROL:
-               sc_reg = 2;
-               break;
        case SCR_ACTIVE:
-               sc_reg = 3;
+               sc_reg = sc_reg_in;
                break;
        default:
                return -EINVAL;
@@ -517,7 +507,7 @@ static int sata_fsl_scr_read(struct ata_port *ap, unsigned int sc_reg_in,
 
        VPRINTK("xx_scr_read, reg_in = %d\n", sc_reg);
 
-       *val = ioread32((void __iomem *)ssr_base + (sc_reg * 4));
+       *val = ioread32(ssr_base + (sc_reg * 4));
        return 0;
 }
 
@@ -571,7 +561,6 @@ static inline void sata_fsl_cache_taskfile_from_d2h_fis(struct ata_queued_cmd
                                                        struct ata_port *ap)
 {
        struct sata_fsl_port_priv *pp = ap->private_data;
-       u8 fis[6 * 4];
        struct sata_fsl_host_priv *host_priv = ap->host->private_data;
        void __iomem *hcr_base = host_priv->hcr_base;
        unsigned int tag = sata_fsl_tag(qc->tag, hcr_base);
@@ -579,8 +568,7 @@ static inline void sata_fsl_cache_taskfile_from_d2h_fis(struct ata_queued_cmd
 
        cd = pp->cmdentry + tag;
 
-       memcpy(fis, &cd->sfis, 6 * 4);  /* should we use memcpy_from_io() */
-       ata_tf_from_fis(fis, &pp->tf);
+       ata_tf_from_fis(cd->sfis, &pp->tf);
 }
 
 static u8 sata_fsl_check_status(struct ata_port *ap)
@@ -664,6 +652,7 @@ static int sata_fsl_port_start(struct ata_port *ap)
        VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL));
        VPRINTK("CHBA  = 0x%x\n", ioread32(hcr_base + CHBA));
 
+#ifdef CONFIG_MPC8315_DS
        /*
         * Workaround for 8315DS board 3gbps link-up issue,
         * currently limit SATA port to GEN1 speed
@@ -676,6 +665,7 @@ static int sata_fsl_port_start(struct ata_port *ap)
        sata_fsl_scr_read(ap, SCR_CONTROL, &temp);
        dev_printk(KERN_WARNING, dev, "scr_control, speed limited to %x\n",
                        temp);
+#endif
 
        return 0;
 }
@@ -728,9 +718,10 @@ static unsigned int sata_fsl_dev_classify(struct ata_port *ap)
        return ata_dev_classify(&tf);
 }
 
-static int sata_fsl_softreset(struct ata_port *ap, unsigned int *class,
+static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
                              unsigned long deadline)
 {
+       struct ata_port *ap = link->ap;
        struct sata_fsl_port_priv *pp = ap->private_data;
        struct sata_fsl_host_priv *host_priv = ap->host->private_data;
        void __iomem *hcr_base = host_priv->hcr_base;
@@ -739,10 +730,6 @@ static int sata_fsl_softreset(struct ata_port *ap, unsigned int *class,
        u8 *cfis;
        u32 Serror;
        int i = 0;
-       struct ata_queued_cmd qc;
-       u8 *buf;
-       dma_addr_t dma_address;
-       struct scatterlist *sg;
        unsigned long start_jiffies;
 
        DPRINTK("in xx_softreset\n");
@@ -811,7 +798,7 @@ try_offline_again:
         */
 
        temp = ata_wait_register(hcr_base + HSTATUS, 0xFF, 0, 1, 500);
-       if ((!(temp & 0x10)) || ata_port_offline(ap)) {
+       if ((!(temp & 0x10)) || ata_link_offline(link)) {
                ata_port_printk(ap, KERN_WARNING,
                                "No Device OR PHYRDY change,Hstatus = 0x%x\n",
                                ioread32(hcr_base + HSTATUS));
@@ -842,13 +829,10 @@ try_offline_again:
         * reached here, we can send a command to the target device
         */
 
-       if (ap->sactive)
-               goto skip_srst_do_ncq_error_handling;
-
        DPRINTK("Sending SRST/device reset\n");
 
-       ata_tf_init(ap->device, &tf);
-       cfis = (u8 *) & pp->cmdentry->cfis;
+       ata_tf_init(link->device, &tf);
+       cfis = (u8 *) &pp->cmdentry->cfis;
 
        /* device reset/SRST is a control register update FIS, uses tag0 */
        sata_fsl_setup_cmd_hdr_entry(pp, 0,
@@ -912,76 +896,13 @@ try_offline_again:
         * command bit of the CCreg
         */
        iowrite32(0x01, CC + hcr_base); /* We know it will be cmd#0 always */
-       goto check_device_signature;
-
-skip_srst_do_ncq_error_handling:
-
-       VPRINTK("Sending read log ext(10h) command\n");
-
-       memset(&qc, 0, sizeof(struct ata_queued_cmd));
-       ata_tf_init(ap->device, &tf);
-
-       tf.command = ATA_CMD_READ_LOG_EXT;
-       tf.lbal = ATA_LOG_SATA_NCQ;
-       tf.nsect = 1;
-       tf.hob_nsect = 0;
-       tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_LBA48 | ATA_TFLAG_DEVICE;
-       tf.protocol = ATA_PROT_PIO;
-
-       qc.tag = ATA_TAG_INTERNAL;
-       qc.scsicmd = NULL;
-       qc.ap = ap;
-       qc.dev = ap->device;
-
-       qc.tf = tf;
-       qc.flags |= ATA_QCFLAG_RESULT_TF;
-       qc.dma_dir = DMA_FROM_DEVICE;
-
-       buf = ap->sector_buf;
-       ata_sg_init_one(&qc, buf, 1 * ATA_SECT_SIZE);
-
-       /*
-        * Need to DMA-map the memory buffer associated with the command
-        */
-
-       sg = qc.__sg;
-       dma_address = dma_map_single(ap->dev, qc.buf_virt,
-                                    sg->length, DMA_FROM_DEVICE);
-
-       sg_dma_address(sg) = dma_address;
-       sg_dma_len(sg) = sg->length;
-
-       VPRINTK("EH, addr = 0x%x, len = 0x%x\n", dma_address, sg->length);
-
-       sata_fsl_qc_prep(&qc);
-       sata_fsl_qc_issue(&qc);
-
-       temp = ata_wait_register(CQ + hcr_base, 0x1, 0x1, 1, 5000);
-       if (temp & 0x1) {
-               VPRINTK("READ_LOG_EXT_10H issue failed\n");
-
-               VPRINTK("READ_LOG@5000,CQ=0x%x,CA=0x%x,CC=0x%x\n",
-                       ioread32(CQ + hcr_base),
-                       ioread32(CA + hcr_base), ioread32(CC + hcr_base));
-
-               sata_fsl_scr_read(ap, SCR_ERROR, &Serror);
-
-               VPRINTK("HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS));
-               VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL));
-               VPRINTK("Serror = 0x%x\n", Serror);
-               goto err;
-       }
-
-       iowrite32(0x01, CC + hcr_base); /* We know it will be cmd#0 always */
-
-      check_device_signature:
 
        DPRINTK("SATA FSL : Now checking device signature\n");
 
        *class = ATA_DEV_NONE;
 
        /* Verify if SStatus indicates device presence */
-       if (ata_port_online(ap)) {
+       if (ata_link_online(link)) {
                /*
                 * if we are here, device presence has been detected,
                 * 1st D2H FIS would have been received, but sfis in
@@ -1002,25 +923,13 @@ err:
        return -EIO;
 }
 
-static int sata_fsl_hardreset(struct ata_port *ap, unsigned int *class,
-                             unsigned long deadline)
-{
-       int retval;
-
-       retval = sata_std_hardreset(ap, class, deadline);
-
-       DPRINTK("SATA FSL : in xx_hardreset, retval = 0x%d\n", retval);
-
-       return retval;
-}
-
 static void sata_fsl_error_handler(struct ata_port *ap)
 {
 
        DPRINTK("in xx_error_handler\n");
 
        /* perform recovery */
-       ata_do_eh(ap, ata_std_prereset, sata_fsl_softreset, sata_fsl_hardreset,
+       ata_do_eh(ap, ata_std_prereset, sata_fsl_softreset, sata_std_hardreset,
                  ata_std_postreset);
 }
 
@@ -1042,7 +951,8 @@ static void sata_fsl_irq_clear(struct ata_port *ap)
 
 static void sata_fsl_error_intr(struct ata_port *ap)
 {
-       struct ata_eh_info *ehi = &ap->eh_info;
+       struct ata_link *link = &ap->link;
+       struct ata_eh_info *ehi = &link->eh_info;
        struct sata_fsl_host_priv *host_priv = ap->host->private_data;
        void __iomem *hcr_base = host_priv->hcr_base;
        u32 hstatus, dereg, cereg = 0, SError = 0;
@@ -1111,7 +1021,7 @@ static void sata_fsl_error_intr(struct ata_port *ap)
        }
 
        /* record error info */
-       qc = ata_qc_from_tag(ap, ap->active_tag);
+       qc = ata_qc_from_tag(ap, link->active_tag);
 
        if (qc) {
                sata_fsl_cache_taskfile_from_d2h_fis(qc, qc->ap);
@@ -1139,6 +1049,7 @@ static void sata_fsl_qc_complete(struct ata_queued_cmd *qc)
 
 static void sata_fsl_host_intr(struct ata_port *ap)
 {
+       struct ata_link *link = &ap->link;
        struct sata_fsl_host_priv *host_priv = ap->host->private_data;
        void __iomem *hcr_base = host_priv->hcr_base;
        u32 hstatus, qc_active = 0;
@@ -1161,7 +1072,7 @@ static void sata_fsl_host_intr(struct ata_port *ap)
                return;
        }
 
-       if (ap->sactive) {      /* only true for NCQ commands */
+       if (link->sactive) {    /* only true for NCQ commands */
                int i;
                /* Read command completed register */
                qc_active = ioread32(hcr_base + CC);
@@ -1190,10 +1101,10 @@ static void sata_fsl_host_intr(struct ata_port *ap)
 
        } else if (ap->qc_active) {
                iowrite32(1, hcr_base + CC);
-               qc = ata_qc_from_tag(ap, ap->active_tag);
+               qc = ata_qc_from_tag(ap, link->active_tag);
 
                DPRINTK("completing non-ncq cmd, tag=%d,CC=0x%x\n",
-                       ap->active_tag, ioread32(hcr_base + CC));
+                       link->active_tag, ioread32(hcr_base + CC));
 
                if (qc) {
                        sata_fsl_qc_complete(qc);
@@ -1312,15 +1223,9 @@ static struct scsi_host_template sata_fsl_sht = {
        .slave_configure = ata_scsi_slave_config,
        .slave_destroy = ata_scsi_slave_destroy,
        .bios_param = ata_std_bios_param,
-#ifdef CONFIG_PM
-       .suspend = ata_scsi_device_suspend,
-       .resume = ata_scsi_device_resume,
-#endif
 };
 
 static const struct ata_port_operations sata_fsl_ops = {
-       .port_disable = ata_port_disable,
-
        .check_status = sata_fsl_check_status,
        .check_altstatus = sata_fsl_check_status,
        .dev_select = ata_noop_dev_select,
@@ -1330,8 +1235,6 @@ static const struct ata_port_operations sata_fsl_ops = {
        .qc_prep = sata_fsl_qc_prep,
        .qc_issue = sata_fsl_qc_issue,
        .irq_clear = sata_fsl_irq_clear,
-       .irq_on = ata_dummy_irq_on,
-       .irq_ack = ata_dummy_irq_ack,
 
        .scr_read = sata_fsl_scr_read,
        .scr_write = sata_fsl_scr_write,
@@ -1348,6 +1251,7 @@ static const struct ata_port_operations sata_fsl_ops = {
 static const struct ata_port_info sata_fsl_port_info[] = {
        {
         .flags = SATA_FSL_HOST_FLAGS,
+        .link_flags = SATA_FSL_HOST_LFLAGS,
         .pio_mask = 0x1f,      /* pio 0-4 */
         .udma_mask = 0x7f,     /* udma 0-6 */
         .port_ops = &sata_fsl_ops,
@@ -1398,6 +1302,7 @@ static int sata_fsl_probe(struct of_device *ofdev,
                dev_printk(KERN_ERR, &ofdev->dev, "invalid irq from platform\n");
                goto error_exit_with_cleanup;
        }
+       host_priv->irq = irq;
 
        /* allocate host structure */
        host = ata_host_alloc_pinfo(&ofdev->dev, ppi, SATA_FSL_MAX_PORTS);
@@ -1444,7 +1349,7 @@ static int sata_fsl_remove(struct of_device *ofdev)
 
        dev_set_drvdata(&ofdev->dev, NULL);
 
-       irq_dispose_mapping(host->irq);
+       irq_dispose_mapping(host_priv->irq);
        iounmap(host_priv->hcr_base);
        kfree(host_priv);
 
index deb26f04f2d7613092ee970687bcdc35913ef05e..7914def54fa3552fcbd2134d97f469eaccd859b6 100644 (file)
@@ -2,6 +2,7 @@
  *  sata_promise.c - Promise SATA
  *
  *  Maintained by:  Jeff Garzik <jgarzik@pobox.com>
+ *                 Mikael Pettersson <mikpe@it.uu.se>
  *                 Please ALWAYS copy linux-ide@vger.kernel.org
  *                 on emails.
  *
 #include "sata_promise.h"
 
 #define DRV_NAME       "sata_promise"
-#define DRV_VERSION    "2.10"
+#define DRV_VERSION    "2.11"
 
 enum {
        PDC_MAX_PORTS           = 4,
        PDC_MMIO_BAR            = 3,
+       PDC_MAX_PRD             = LIBATA_MAX_PRD - 1, /* -1 for ASIC PRD bug workaround */
 
        /* register offsets */
        PDC_FEATURE             = 0x04, /* Feature/Error reg (per port) */
@@ -157,7 +159,7 @@ static struct scsi_host_template pdc_ata_sht = {
        .queuecommand           = ata_scsi_queuecmd,
        .can_queue              = ATA_DEF_QUEUE,
        .this_id                = ATA_SHT_THIS_ID,
-       .sg_tablesize           = LIBATA_MAX_PRD,
+       .sg_tablesize           = PDC_MAX_PRD,
        .cmd_per_lun            = ATA_SHT_CMD_PER_LUN,
        .emulated               = ATA_SHT_EMULATED,
        .use_clustering         = ATA_SHT_USE_CLUSTERING,
@@ -240,7 +242,7 @@ static const struct ata_port_operations pdc_pata_ops = {
 };
 
 static const struct ata_port_info pdc_port_info[] = {
-       /* board_2037x */
+       [board_2037x] =
        {
                .flags          = PDC_COMMON_FLAGS | ATA_FLAG_SATA |
                                  PDC_FLAG_SATA_PATA,
@@ -250,7 +252,7 @@ static const struct ata_port_info pdc_port_info[] = {
                .port_ops       = &pdc_old_sata_ops,
        },
 
-       /* board_2037x_pata */
+       [board_2037x_pata] =
        {
                .flags          = PDC_COMMON_FLAGS | ATA_FLAG_SLAVE_POSS,
                .pio_mask       = 0x1f, /* pio0-4 */
@@ -259,7 +261,7 @@ static const struct ata_port_info pdc_port_info[] = {
                .port_ops       = &pdc_pata_ops,
        },
 
-       /* board_20319 */
+       [board_20319] =
        {
                .flags          = PDC_COMMON_FLAGS | ATA_FLAG_SATA |
                                  PDC_FLAG_4_PORTS,
@@ -269,7 +271,7 @@ static const struct ata_port_info pdc_port_info[] = {
                .port_ops       = &pdc_old_sata_ops,
        },
 
-       /* board_20619 */
+       [board_20619] =
        {
                .flags          = PDC_COMMON_FLAGS | ATA_FLAG_SLAVE_POSS |
                                  PDC_FLAG_4_PORTS,
@@ -279,7 +281,7 @@ static const struct ata_port_info pdc_port_info[] = {
                .port_ops       = &pdc_pata_ops,
        },
 
-       /* board_2057x */
+       [board_2057x] =
        {
                .flags          = PDC_COMMON_FLAGS | ATA_FLAG_SATA |
                                  PDC_FLAG_GEN_II | PDC_FLAG_SATA_PATA,
@@ -289,7 +291,7 @@ static const struct ata_port_info pdc_port_info[] = {
                .port_ops       = &pdc_sata_ops,
        },
 
-       /* board_2057x_pata */
+       [board_2057x_pata] =
        {
                .flags          = PDC_COMMON_FLAGS | ATA_FLAG_SLAVE_POSS |
                                  PDC_FLAG_GEN_II,
@@ -299,7 +301,7 @@ static const struct ata_port_info pdc_port_info[] = {
                .port_ops       = &pdc_pata_ops,
        },
 
-       /* board_40518 */
+       [board_40518] =
        {
                .flags          = PDC_COMMON_FLAGS | ATA_FLAG_SATA |
                                  PDC_FLAG_GEN_II | PDC_FLAG_4_PORTS,
@@ -523,6 +525,84 @@ static void pdc_atapi_pkt(struct ata_queued_cmd *qc)
        memcpy(buf+31, cdb, cdb_len);
 }
 
+/**
+ *     pdc_fill_sg - Fill PCI IDE PRD table
+ *     @qc: Metadata associated with taskfile to be transferred
+ *
+ *     Fill PCI IDE PRD (scatter-gather) table with segments
+ *     associated with the current disk command.
+ *     Make sure hardware does not choke on it.
+ *
+ *     LOCKING:
+ *     spin_lock_irqsave(host lock)
+ *
+ */
+static void pdc_fill_sg(struct ata_queued_cmd *qc)
+{
+       struct ata_port *ap = qc->ap;
+       struct scatterlist *sg;
+       unsigned int idx;
+       const u32 SG_COUNT_ASIC_BUG = 41*4;
+
+       if (!(qc->flags & ATA_QCFLAG_DMAMAP))
+               return;
+
+       WARN_ON(qc->__sg == NULL);
+       WARN_ON(qc->n_elem == 0 && qc->pad_len == 0);
+
+       idx = 0;
+       ata_for_each_sg(sg, qc) {
+               u32 addr, offset;
+               u32 sg_len, len;
+
+               /* determine if physical DMA addr spans 64K boundary.
+                * Note h/w doesn't support 64-bit, so we unconditionally
+                * truncate dma_addr_t to u32.
+                */
+               addr = (u32) sg_dma_address(sg);
+               sg_len = sg_dma_len(sg);
+
+               while (sg_len) {
+                       offset = addr & 0xffff;
+                       len = sg_len;
+                       if ((offset + sg_len) > 0x10000)
+                               len = 0x10000 - offset;
+
+                       ap->prd[idx].addr = cpu_to_le32(addr);
+                       ap->prd[idx].flags_len = cpu_to_le32(len & 0xffff);
+                       VPRINTK("PRD[%u] = (0x%X, 0x%X)\n", idx, addr, len);
+
+                       idx++;
+                       sg_len -= len;
+                       addr += len;
+               }
+       }
+
+       if (idx) {
+               u32 len = le32_to_cpu(ap->prd[idx - 1].flags_len);
+
+               if (len > SG_COUNT_ASIC_BUG) {
+                       u32 addr;
+
+                       VPRINTK("Splitting last PRD.\n");
+
+                       addr = le32_to_cpu(ap->prd[idx - 1].addr);
+                       ap->prd[idx - 1].flags_len = cpu_to_le32(len - SG_COUNT_ASIC_BUG);
+                       VPRINTK("PRD[%u] = (0x%X, 0x%X)\n", idx - 1, addr, SG_COUNT_ASIC_BUG);
+
+                       addr = addr + len - SG_COUNT_ASIC_BUG;
+                       len = SG_COUNT_ASIC_BUG;
+                       ap->prd[idx].addr = cpu_to_le32(addr);
+                       ap->prd[idx].flags_len = cpu_to_le32(len);
+                       VPRINTK("PRD[%u] = (0x%X, 0x%X)\n", idx, addr, len);
+
+                       idx++;
+               }
+
+               ap->prd[idx - 1].flags_len |= cpu_to_le32(ATA_PRD_EOT);
+       }
+}
+
 static void pdc_qc_prep(struct ata_queued_cmd *qc)
 {
        struct pdc_port_priv *pp = qc->ap->private_data;
@@ -532,7 +612,7 @@ static void pdc_qc_prep(struct ata_queued_cmd *qc)
 
        switch (qc->tf.protocol) {
        case ATA_PROT_DMA:
-               ata_qc_prep(qc);
+               pdc_fill_sg(qc);
                /* fall through */
 
        case ATA_PROT_NODATA:
@@ -548,11 +628,11 @@ static void pdc_qc_prep(struct ata_queued_cmd *qc)
                break;
 
        case ATA_PROT_ATAPI:
-               ata_qc_prep(qc);
+               pdc_fill_sg(qc);
                break;
 
        case ATA_PROT_ATAPI_DMA:
-               ata_qc_prep(qc);
+               pdc_fill_sg(qc);
                /*FALLTHROUGH*/
        case ATA_PROT_ATAPI_NODATA:
                pdc_atapi_pkt(qc);
index 3c481e0e0c03c891d15c270bcf9a81e3fb067c00..187dcb02c681907d859672eafab0e0c6e8d376c6 100644 (file)
@@ -265,11 +265,11 @@ static struct sil24_cerr_info {
        unsigned int err_mask, action;
        const char *desc;
 } sil24_cerr_db[] = {
-       [0]                     = { AC_ERR_DEV, ATA_EH_REVALIDATE,
+       [0]                     = { AC_ERR_DEV, 0,
                                    "device error" },
-       [PORT_CERR_DEV]         = { AC_ERR_DEV, ATA_EH_REVALIDATE,
+       [PORT_CERR_DEV]         = { AC_ERR_DEV, 0,
                                    "device error via D2H FIS" },
-       [PORT_CERR_SDB]         = { AC_ERR_DEV, ATA_EH_REVALIDATE,
+       [PORT_CERR_SDB]         = { AC_ERR_DEV, 0,
                                    "device error via SDB FIS" },
        [PORT_CERR_DATA]        = { AC_ERR_ATA_BUS, ATA_EH_SOFTRESET,
                                    "error in data FIS" },
index c1343414d285e29f57fe17e089e635be20af3aed..3f4d6aa139909e49ac77541bdd8b94f46979dae2 100644 (file)
@@ -1228,18 +1228,18 @@ int device_rename(struct device *dev, char *new_name)
                        sysfs_remove_link(&dev->parent->kobj, old_class_name);
                }
        }
-#endif
-
+#else
        if (dev->class) {
                sysfs_remove_link(&dev->class->subsys.kobj, old_device_name);
                error = sysfs_create_link(&dev->class->subsys.kobj, &dev->kobj,
                                          dev->bus_id);
                if (error) {
-                       /* Uh... how to unravel this if restoring can fail? */
                        dev_err(dev, "%s: sysfs_create_symlink failed (%d)\n",
                                __FUNCTION__, error);
                }
        }
+#endif
+
 out:
        put_device(dev);
 
index f22c253bc09fbb4bcb84b6d5642848a82a3920c0..ccb1fa89de2976e99bcb5d7bb94094f989e3b974 100644 (file)
@@ -56,9 +56,9 @@ config AGP_AMD
          X on AMD Irongate, 761, and 762 chipsets.
 
 config AGP_AMD64
-       tristate "AMD Opteron/Athlon64 on-CPU GART support" if !IOMMU
+       tristate "AMD Opteron/Athlon64 on-CPU GART support" if !GART_IOMMU
        depends on AGP && X86
-       default y if IOMMU
+       default y if GART_IOMMU
        help
          This option gives you AGP support for the GLX component of
          X using the on-CPU northbridge of the AMD Athlon64/Opteron CPUs.
index d95662e96326dfe152029b2042890f24ccfa5148..d8200ac8f8cbb8643355719aa78bd144eccee9ef 100644 (file)
@@ -787,7 +787,7 @@ static void __exit agp_amd64_cleanup(void)
 
 /* On AMD64 the PCI driver needs to initialize this driver early
    for the IOMMU, so it has to be called via a backdoor. */
-#ifndef CONFIG_IOMMU
+#ifndef CONFIG_GART_IOMMU
 module_init(agp_amd64_init);
 module_exit(agp_amd64_cleanup);
 #endif
index 0e328d387af4cbecdb326238b12d904dfe4988b1..6883fcb79ad35d27cd3eb5d65d2f6eaab82ded4c 100644 (file)
@@ -218,7 +218,7 @@ static void cn_rx_skb(struct sk_buff *__skb)
                    skb->len < nlh->nlmsg_len ||
                    nlh->nlmsg_len > CONNECTOR_MAX_MSG_SIZE) {
                        kfree_skb(skb);
-                       goto out;
+                       return;
                }
 
                len = NLMSG_ALIGN(nlh->nlmsg_len);
@@ -229,9 +229,6 @@ static void cn_rx_skb(struct sk_buff *__skb)
                if (err < 0)
                        kfree_skb(skb);
        }
-
-out:
-       kfree_skb(__skb);
 }
 
 /*
index fdf4106b817bfc0501c6b1a0d88751f4f6ee2a08..d2fabe7863a96345e096f5a644c111436a492819 100644 (file)
@@ -19,7 +19,6 @@
 #include "cpuidle.h"
 
 DEFINE_PER_CPU(struct cpuidle_device *, cpuidle_devices);
-EXPORT_PER_CPU_SYMBOL_GPL(cpuidle_devices);
 
 DEFINE_MUTEX(cpuidle_lock);
 LIST_HEAD(cpuidle_detected_devices);
index bb699cb2dc5ae1915a4ae0d70f2f45393a816202..70b59642a7087a7593fffdfd9158ddfe4ba619b5 100644 (file)
@@ -94,8 +94,6 @@ int cpuidle_register_governor(struct cpuidle_governor *gov)
        return ret;
 }
 
-EXPORT_SYMBOL_GPL(cpuidle_register_governor);
-
 /**
  * cpuidle_replace_governor - find a replacement governor
  * @exclude_rating: the rating that will be skipped while looking for
@@ -138,4 +136,3 @@ void cpuidle_unregister_governor(struct cpuidle_governor *gov)
        mutex_unlock(&cpuidle_lock);
 }
 
-EXPORT_SYMBOL_GPL(cpuidle_unregister_governor);
index 9c91b0fd134f231c83a89a4d250f6922575b49a0..6a7d25fc247068f079fb095bfb65b59e0fbd38e4 100644 (file)
@@ -43,7 +43,6 @@ comment "DMA Clients"
 config NET_DMA
        bool "Network: TCP receive copy offload"
        depends on DMA_ENGINE && NET
-       default y
        help
          This enables the use of DMA engines in the network stack to
          offload receive copy-to-user operations, freeing CPU cycles.
index 67588326ae56e2a9810207415e15c09141fc0622..c9b9081831daed59b0201a2bc6b68671e51fdf8f 100644 (file)
@@ -984,8 +984,10 @@ static void bus_reset_tasklet(unsigned long data)
         */
 
        if (ohci->next_config_rom != NULL) {
-               free_rom     = ohci->config_rom;
-               free_rom_bus = ohci->config_rom_bus;
+               if (ohci->next_config_rom != ohci->config_rom) {
+                       free_rom      = ohci->config_rom;
+                       free_rom_bus  = ohci->config_rom_bus;
+               }
                ohci->config_rom      = ohci->next_config_rom;
                ohci->config_rom_bus  = ohci->next_config_rom_bus;
                ohci->next_config_rom = NULL;
@@ -1161,19 +1163,30 @@ static int ohci_enable(struct fw_card *card, u32 *config_rom, size_t length)
         * the right values in the bus reset tasklet.
         */
 
-       ohci->next_config_rom =
-               dma_alloc_coherent(ohci->card.device, CONFIG_ROM_SIZE,
-                                  &ohci->next_config_rom_bus, GFP_KERNEL);
-       if (ohci->next_config_rom == NULL)
-               return -ENOMEM;
+       if (config_rom) {
+               ohci->next_config_rom =
+                       dma_alloc_coherent(ohci->card.device, CONFIG_ROM_SIZE,
+                                          &ohci->next_config_rom_bus,
+                                          GFP_KERNEL);
+               if (ohci->next_config_rom == NULL)
+                       return -ENOMEM;
 
-       memset(ohci->next_config_rom, 0, CONFIG_ROM_SIZE);
-       fw_memcpy_to_be32(ohci->next_config_rom, config_rom, length * 4);
+               memset(ohci->next_config_rom, 0, CONFIG_ROM_SIZE);
+               fw_memcpy_to_be32(ohci->next_config_rom, config_rom, length * 4);
+       } else {
+               /*
+                * In the suspend case, config_rom is NULL, which
+                * means that we just reuse the old config rom.
+                */
+               ohci->next_config_rom = ohci->config_rom;
+               ohci->next_config_rom_bus = ohci->config_rom_bus;
+       }
 
-       ohci->next_header = config_rom[0];
+       ohci->next_header = be32_to_cpu(ohci->next_config_rom[0]);
        ohci->next_config_rom[0] = 0;
        reg_write(ohci, OHCI1394_ConfigROMhdr, 0);
-       reg_write(ohci, OHCI1394_BusOptions, config_rom[2]);
+       reg_write(ohci, OHCI1394_BusOptions,
+                 be32_to_cpu(ohci->next_config_rom[2]));
        reg_write(ohci, OHCI1394_ConfigROMmap, ohci->next_config_rom_bus);
 
        reg_write(ohci, OHCI1394_AsReqFilterHiSet, 0x80000000);
@@ -1984,7 +1997,7 @@ static int pci_resume(struct pci_dev *pdev)
                return err;
        }
 
-       return ohci_enable(&ohci->card, ohci->config_rom, CONFIG_ROM_SIZE);
+       return ohci_enable(&ohci->card, NULL, 0);
 }
 #endif
 
index dd332f28e08cb31106c6aa1598f6824fca69298d..0b27da7d749700b4d0e2481b7c121ce9fa033aaa 100644 (file)
@@ -297,7 +297,7 @@ static struct hid_usage *hidinput_find_key(struct hid_device *hid,
 static int hidinput_getkeycode(struct input_dev *dev, int scancode,
                                int *keycode)
 {
-       struct hid_device *hid = dev->private;
+       struct hid_device *hid = input_get_drvdata(dev);
        struct hid_usage *usage;
 
        usage = hidinput_find_key(hid, scancode, 0);
@@ -311,7 +311,7 @@ static int hidinput_getkeycode(struct input_dev *dev, int scancode,
 static int hidinput_setkeycode(struct input_dev *dev, int scancode,
                                int keycode)
 {
-       struct hid_device *hid = dev->private;
+       struct hid_device *hid = input_get_drvdata(dev);
        struct hid_usage *usage;
        int old_keycode;
 
@@ -1152,7 +1152,7 @@ int hidinput_connect(struct hid_device *hid)
                                        kfree(hidinput);
                                        input_free_device(input_dev);
                                        err_hid("Out of memory during hid input probe");
-                                       return -1;
+                                       goto out_unwind;
                                }
 
                                input_set_drvdata(input_dev, hid);
@@ -1186,15 +1186,25 @@ int hidinput_connect(struct hid_device *hid)
                                 * UGCI) cram a lot of unrelated inputs into the
                                 * same interface. */
                                hidinput->report = report;
-                               input_register_device(hidinput->input);
+                               if (input_register_device(hidinput->input))
+                                       goto out_cleanup;
                                hidinput = NULL;
                        }
                }
 
-       if (hidinput)
-               input_register_device(hidinput->input);
+       if (hidinput && input_register_device(hidinput->input))
+               goto out_cleanup;
 
        return 0;
+
+out_cleanup:
+       input_free_device(hidinput->input);
+       kfree(hidinput);
+out_unwind:
+       /* unwind the ones we already registered */
+       hidinput_disconnect(hid);
+
+       return -1;
 }
 EXPORT_SYMBOL_GPL(hidinput_connect);
 
index 41a59a80e7edff34299d0a0d3f93225eedc9381a..a2552856476b2940633f4831e48c85bcfe91d9d7 100644 (file)
 #define USB_DEVICE_ID_0_8_8_IF_KIT     0x0053
 #define USB_DEVICE_ID_PHIDGET_MOTORCONTROL     0x0058
 
+#define USB_VENDOR_ID_GOTOP            0x08f2
+#define USB_DEVICE_ID_SUPER_Q2         0x007f
+#define USB_DEVICE_ID_GOGOPEN          0x00ce
+#define USB_DEVICE_ID_PENPOWER         0x00f4
+
 #define USB_VENDOR_ID_GRIFFIN          0x077d
 #define USB_DEVICE_ID_POWERMATE                0x0410
 #define USB_DEVICE_ID_SOUNDKNOB                0x04AA
@@ -415,6 +420,9 @@ static const struct hid_blacklist {
        { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_7_IF_KIT, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_8_IF_KIT, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_PHIDGET_MOTORCONTROL, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_SUPER_Q2, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_GOGOPEN, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GOTOP, USB_DEVICE_ID_PENPOWER, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_90, HID_QUIRK_IGNORE },
index 9837adcb17e940478568fa33e89e194508c1cad1..5fc4019956ba2ffe17b2d5dda04206aa7b5d9a4d 100644 (file)
@@ -743,7 +743,7 @@ inval:
 static long hiddev_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
        struct inode *inode = file->f_path.dentry->d_inode;
-       return hiddev_ioctl(inode, file, cmd, compat_ptr(arg));
+       return hiddev_ioctl(inode, file, cmd, (unsigned long)compat_ptr(arg));
 }
 #endif
 
index c39c70a8aa9fce1e8eae54cdd0df6ab3a0c4a1e5..677989320951fc394229b74a69b65ef2317eb7c4 100644 (file)
@@ -235,7 +235,6 @@ int hpsb_packet_success(struct hpsb_packet *packet)
                                 packet->node_id);
                        return -EAGAIN;
                }
-               BUG();
 
        case ACK_BUSY_X:
        case ACK_BUSY_A:
@@ -282,7 +281,6 @@ int hpsb_packet_success(struct hpsb_packet *packet)
                         packet->ack_code, packet->node_id, packet->tcode);
                return -EAGAIN;
        }
-       BUG();
 }
 
 struct hpsb_packet *hpsb_make_readpacket(struct hpsb_host *host, nodeid_t node,
index d7f64525469b5769d23621c22f4842a7b49387a9..e8d5f6b6499823893a38c263dd8428a214813d59 100644 (file)
@@ -291,10 +291,10 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd             *pd,
        atomic_set(&pool->flush_ser, 0);
        init_waitqueue_head(&pool->force_wait);
 
-       pool->thread = kthread_create(ib_fmr_cleanup_thread,
-                                     pool,
-                                     "ib_fmr(%s)",
-                                     device->name);
+       pool->thread = kthread_run(ib_fmr_cleanup_thread,
+                                  pool,
+                                  "ib_fmr(%s)",
+                                  device->name);
        if (IS_ERR(pool->thread)) {
                printk(KERN_WARNING PFX "couldn't start cleanup thread\n");
                ret = PTR_ERR(pool->thread);
index bcfa3ccb555f988cfba9e719602f130767356001..e7c25dbbcdc9ba77f5018ce06fe52b3cb6b84b73 100644 (file)
@@ -538,7 +538,15 @@ static u8 flash_csum(struct ipath_flash *ifp, int adjust)
        u8 *ip = (u8 *) ifp;
        u8 csum = 0, len;
 
-       for (len = 0; len < ifp->if_length; len++)
+       /*
+        * Limit length checksummed to max length of actual data.
+        * Checksum of erased eeprom will still be bad, but we avoid
+        * reading past the end of the buffer we were passed.
+        */
+       len = ifp->if_length;
+       if (len > sizeof(struct ipath_flash))
+               len = sizeof(struct ipath_flash);
+       while (len--)
                csum += *ip++;
        csum -= ifp->if_csum;
        csum = ~csum;
index 6a5dd5cd773d13cead689c6ffc16a702af4045e4..c61f9da2964ab25a51bb686808ffaa3c4ceb1e33 100644 (file)
@@ -453,7 +453,7 @@ skip_ibchange:
 }
 
 static void handle_supp_msgs(struct ipath_devdata *dd,
-                            unsigned supp_msgs, char msg[512])
+                            unsigned supp_msgs, char *msg, int msgsz)
 {
        /*
         * Print the message unless it's ibc status change only, which
@@ -461,9 +461,9 @@ static void handle_supp_msgs(struct ipath_devdata *dd,
         */
        if (dd->ipath_lasterror & ~INFINIPATH_E_IBSTATUSCHANGED) {
                int iserr;
-               iserr = ipath_decode_err(msg, sizeof msg,
-                               dd->ipath_lasterror &
-                               ~INFINIPATH_E_IBSTATUSCHANGED);
+               iserr = ipath_decode_err(msg, msgsz,
+                                        dd->ipath_lasterror &
+                                        ~INFINIPATH_E_IBSTATUSCHANGED);
                if (dd->ipath_lasterror &
                        ~(INFINIPATH_E_RRCVEGRFULL |
                        INFINIPATH_E_RRCVHDRFULL | INFINIPATH_E_PKTERRS))
@@ -492,8 +492,8 @@ static void handle_supp_msgs(struct ipath_devdata *dd,
 }
 
 static unsigned handle_frequent_errors(struct ipath_devdata *dd,
-                                      ipath_err_t errs, char msg[512],
-                                      int *noprint)
+                                      ipath_err_t errs, char *msg,
+                                      int msgsz, int *noprint)
 {
        unsigned long nc;
        static unsigned long nextmsg_time;
@@ -512,7 +512,7 @@ static unsigned handle_frequent_errors(struct ipath_devdata *dd,
                                nextmsg_time = nc + HZ * 3;
                }
                else if (supp_msgs) {
-                       handle_supp_msgs(dd, supp_msgs, msg);
+                       handle_supp_msgs(dd, supp_msgs, msg, msgsz);
                        supp_msgs = 0;
                        nmsgs = 0;
                }
@@ -525,14 +525,14 @@ static unsigned handle_frequent_errors(struct ipath_devdata *dd,
 
 static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
 {
-       char msg[512];
+       char msg[128];
        u64 ignore_this_time = 0;
        int i, iserr = 0;
        int chkerrpkts = 0, noprint = 0;
        unsigned supp_msgs;
        int log_idx;
 
-       supp_msgs = handle_frequent_errors(dd, errs, msg, &noprint);
+       supp_msgs = handle_frequent_errors(dd, errs, msg, sizeof msg, &noprint);
 
        /* don't report errors that are masked */
        errs &= ~dd->ipath_maskederrs;
index 4b6b7ee8e5c14f4dda64e3ae0fb05e784b07136e..54c61a972de24153ad7940ba93f080d190765646 100644 (file)
@@ -630,11 +630,8 @@ bail:;
 void ipath_send_complete(struct ipath_qp *qp, struct ipath_swqe *wqe,
                         enum ib_wc_status status)
 {
-       u32 last = qp->s_last;
-
-       if (++last == qp->s_size)
-               last = 0;
-       qp->s_last = last;
+       unsigned long flags;
+       u32 last;
 
        /* See ch. 11.2.4.1 and 10.7.3.1 */
        if (!(qp->s_flags & IPATH_S_SIGNAL_REQ_WR) ||
@@ -658,4 +655,11 @@ void ipath_send_complete(struct ipath_qp *qp, struct ipath_swqe *wqe,
                wc.port_num = 0;
                ipath_cq_enter(to_icq(qp->ibqp.send_cq), &wc, 0);
        }
+
+       spin_lock_irqsave(&qp->s_lock, flags);
+       last = qp->s_last;
+       if (++last >= qp->s_size)
+               last = 0;
+       qp->s_last = last;
+       spin_unlock_irqrestore(&qp->s_lock, flags);
 }
index 6b3322486b5e2e66a0e2de0db16914f185f6f298..8cba9c532e6425b38a8554384d144bb06c32c8fa 100644 (file)
@@ -1282,7 +1282,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
        int size;
        int i;
 
-       spin_lock_irqsave(&qp->rq.lock, flags);
+       spin_lock_irqsave(&qp->sq.lock, flags);
 
        ind = qp->sq.head;
 
@@ -1448,7 +1448,7 @@ out:
                               (qp->sq.wqe_cnt - 1));
        }
 
-       spin_unlock_irqrestore(&qp->rq.lock, flags);
+       spin_unlock_irqrestore(&qp->sq.lock, flags);
 
        return err;
 }
index 87610772a97944448ee2965e0ae5b9a5f787abb7..059cf92b60a5a540b9754edfafad93134a8958bc 100644 (file)
@@ -60,7 +60,7 @@ static struct ib_qp_attr ipoib_cm_err_attr = {
        .qp_state = IB_QPS_ERR
 };
 
-#define IPOIB_CM_RX_DRAIN_WRID 0x7fffffff
+#define IPOIB_CM_RX_DRAIN_WRID 0xffffffff
 
 static struct ib_send_wr ipoib_cm_rx_drain_wr = {
        .wr_id = IPOIB_CM_RX_DRAIN_WRID,
index 6dd375825a1403226c9c727da6d3fc460ed17b6f..6e9d75bd2b1557f1341362d3412dad8edeaf5635 100644 (file)
@@ -120,6 +120,7 @@ static const struct xpad_device {
        { 0x0738, 0x4536, "Mad Catz MicroCON", MAP_DPAD_TO_AXES, XTYPE_XBOX },
        { 0x0738, 0x4540, "Mad Catz Beat Pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
        { 0x0738, 0x4556, "Mad Catz Lynx Wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
+       { 0x0738, 0x4716, "Mad Catz Wired Xbox 360 Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX360 },
        { 0x0738, 0x6040, "Mad Catz Beat Pad Pro", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
        { 0x0c12, 0x8802, "Zeroplus Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
        { 0x0c12, 0x8810, "Zeroplus Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
@@ -129,6 +130,7 @@ static const struct xpad_device {
        { 0x0e6f, 0x0003, "Logic3 Freebird wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
        { 0x0e6f, 0x0005, "Eclipse wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
        { 0x0e6f, 0x0006, "Edge wireless Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
+       { 0x0e6f, 0x0006, "Pelican 'TSZ' Wired Xbox 360 Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX360 },
        { 0x0e8f, 0x0201, "SmartJoy Frag Xpad/PS2 adaptor", MAP_DPAD_TO_AXES, XTYPE_XBOX },
        { 0x0f30, 0x0202, "Joytech Advanced Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
        { 0x0f30, 0x8888, "BigBen XBMiniPad Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
index 4941a9e61e902967a410404f0b67171bdbdb51d5..43aaa5cebd1224f8a39dcac296546c49f73597f2 100644 (file)
@@ -24,7 +24,7 @@ MODULE_DESCRIPTION("PC Speaker beeper driver");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:pcspkr");
 
-#ifdef CONFIG_X86
+#if defined(CONFIG_MIPS) || defined(CONFIG_X86)
 /* Use the global PIT lock ! */
 #include <asm/i8253.h>
 #else
index f132702d137d1c3810ef01b3080dd33301ef1b87..b4423a471f027e03d8e94499b81b72ed935fcd12 100644 (file)
@@ -129,12 +129,12 @@ MODULE_DEVICE_TABLE (usb, atp_table);
  */
 #define ATP_THRESHOLD   5
 
-/* MacBook Pro (Geyser 3 & 4) initialization constants */
-#define ATP_GEYSER3_MODE_READ_REQUEST_ID 1
-#define ATP_GEYSER3_MODE_WRITE_REQUEST_ID 9
-#define ATP_GEYSER3_MODE_REQUEST_VALUE 0x300
-#define ATP_GEYSER3_MODE_REQUEST_INDEX 0
-#define ATP_GEYSER3_MODE_VENDOR_VALUE 0x04
+/* Geyser initialization constants */
+#define ATP_GEYSER_MODE_READ_REQUEST_ID                1
+#define ATP_GEYSER_MODE_WRITE_REQUEST_ID       9
+#define ATP_GEYSER_MODE_REQUEST_VALUE          0x300
+#define ATP_GEYSER_MODE_REQUEST_INDEX          0
+#define ATP_GEYSER_MODE_VENDOR_VALUE           0x04
 
 /* Structure to hold all of our device specific stuff */
 struct atp {
@@ -142,9 +142,11 @@ struct atp {
        struct usb_device *     udev;           /* usb device */
        struct urb *            urb;            /* usb request block */
        signed char *           data;           /* transferred data */
-       int                     open;           /* non-zero if opened */
-       struct input_dev        *input;         /* input dev */
-       int                     valid;          /* are the sensors valid ? */
+       struct input_dev *      input;          /* input dev */
+       unsigned char           open;           /* non-zero if opened */
+       unsigned char           valid;          /* are the sensors valid ? */
+       unsigned char           size_detect_done;
+       unsigned char           overflowwarn;   /* overflow warning printed? */
        int                     x_old;          /* last reported x/y, */
        int                     y_old;          /* used for smoothing */
                                                /* current value of the sensors */
@@ -153,7 +155,6 @@ struct atp {
        signed char             xy_old[ATP_XSENSORS + ATP_YSENSORS];
                                                /* accumulated sensors */
        int                     xy_acc[ATP_XSENSORS + ATP_YSENSORS];
-       int                     overflowwarn;   /* overflow warning printed? */
        int                     datalen;        /* size of an USB urb transfer */
        int                     idlecount;      /* number of empty packets */
        struct work_struct      work;
@@ -170,7 +171,7 @@ struct atp {
 
 #define dprintk(format, a...)                                          \
        do {                                                            \
-               if (debug) printk(format, ##a);                         \
+               if (debug) printk(KERN_DEBUG format, ##a);              \
        } while (0)
 
 MODULE_AUTHOR("Johannes Berg, Stelian Pop, Frank Arnold, Michael Hanselmann");
@@ -188,6 +189,15 @@ static int debug = 1;
 module_param(debug, int, 0644);
 MODULE_PARM_DESC(debug, "Activate debugging output");
 
+static inline int atp_is_fountain(struct atp *dev)
+{
+       u16 productId = le16_to_cpu(dev->udev->descriptor.idProduct);
+
+       return productId == FOUNTAIN_ANSI_PRODUCT_ID ||
+              productId == FOUNTAIN_ISO_PRODUCT_ID ||
+              productId == FOUNTAIN_TP_ONLY_PRODUCT_ID;
+}
+
 /* Checks if the device a Geyser 2 (ANSI, ISO, JIS) */
 static inline int atp_is_geyser_2(struct atp *dev)
 {
@@ -211,52 +221,63 @@ static inline int atp_is_geyser_3(struct atp *dev)
 }
 
 /*
- * By default Geyser 3 device sends standard USB HID mouse
+ * By default newer Geyser devices send standard USB HID mouse
  * packets (Report ID 2). This code changes device mode, so it
  * sends raw sensor reports (Report ID 5).
  */
-static int atp_geyser3_init(struct usb_device *udev)
+static int atp_geyser_init(struct usb_device *udev)
 {
        char data[8];
        int size;
 
        size = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
-                       ATP_GEYSER3_MODE_READ_REQUEST_ID,
+                       ATP_GEYSER_MODE_READ_REQUEST_ID,
                        USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
-                       ATP_GEYSER3_MODE_REQUEST_VALUE,
-                       ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000);
+                       ATP_GEYSER_MODE_REQUEST_VALUE,
+                       ATP_GEYSER_MODE_REQUEST_INDEX, &data, 8, 5000);
 
        if (size != 8) {
                err("Could not do mode read request from device"
-                   " (Geyser 3 mode)");
+                   " (Geyser Raw mode)");
                return -EIO;
        }
 
        /* Apply the mode switch */
-       data[0] = ATP_GEYSER3_MODE_VENDOR_VALUE;
+       data[0] = ATP_GEYSER_MODE_VENDOR_VALUE;
 
        size = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
-                       ATP_GEYSER3_MODE_WRITE_REQUEST_ID,
+                       ATP_GEYSER_MODE_WRITE_REQUEST_ID,
                        USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
-                       ATP_GEYSER3_MODE_REQUEST_VALUE,
-                       ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000);
+                       ATP_GEYSER_MODE_REQUEST_VALUE,
+                       ATP_GEYSER_MODE_REQUEST_INDEX, &data, 8, 5000);
 
        if (size != 8) {
                err("Could not do mode write request to device"
-                   " (Geyser 3 mode)");
+                   " (Geyser Raw mode)");
                return -EIO;
        }
        return 0;
 }
 
-/* Reinitialise the device if it's a geyser 3 */
+/*
+ * Reinitialise the device. This usually stops stream of empty packets
+ * coming from it.
+ */
 static void atp_reinit(struct work_struct *work)
 {
        struct atp *dev = container_of(work, struct atp, work);
        struct usb_device *udev = dev->udev;
+       int retval;
 
        dev->idlecount = 0;
-       atp_geyser3_init(udev);
+
+       atp_geyser_init(udev);
+
+       retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
+       if (retval) {
+               err("%s - usb_submit_urb failed with result %d",
+                   __FUNCTION__, retval);
+       }
 }
 
 static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact,
@@ -337,7 +358,7 @@ static void atp_complete(struct urb* urb)
                break;
        case -EOVERFLOW:
                if(!dev->overflowwarn) {
-                       printk("appletouch: OVERFLOW with data "
+                       printk(KERN_WARNING "appletouch: OVERFLOW with data "
                                "length %d, actual length is %d\n",
                                dev->datalen, dev->urb->actual_length);
                        dev->overflowwarn = 1;
@@ -426,15 +447,17 @@ static void atp_complete(struct urb* urb)
                dev->x_old = dev->y_old = -1;
                memcpy(dev->xy_old, dev->xy_cur, sizeof(dev->xy_old));
 
-               if (atp_is_geyser_3(dev)) /* No 17" Macbooks (yet) */
+               if (dev->size_detect_done ||
+                   atp_is_geyser_3(dev)) /* No 17" Macbooks (yet) */
                        goto exit;
 
                /* 17" Powerbooks have extra X sensors */
-               for (i = (atp_is_geyser_2(dev)?15:16); i < ATP_XSENSORS; i++) {
-                       if (!dev->xy_cur[i]) continue;
+               for (i = (atp_is_geyser_2(dev) ? 15 : 16); i < ATP_XSENSORS; i++) {
+                       if (!dev->xy_cur[i])
+                               continue;
 
-                       printk("appletouch: 17\" model detected.\n");
-                       if(atp_is_geyser_2(dev))
+                       printk(KERN_INFO "appletouch: 17\" model detected.\n");
+                       if (atp_is_geyser_2(dev))
                                input_set_abs_params(dev->input, ABS_X, 0,
                                                     (20 - 1) *
                                                     ATP_XFACT - 1,
@@ -444,10 +467,10 @@ static void atp_complete(struct urb* urb)
                                                     (ATP_XSENSORS - 1) *
                                                     ATP_XFACT - 1,
                                                     ATP_FUZZ, 0);
-
                        break;
                }
 
+               dev->size_detect_done = 1;
                goto exit;
        }
 
@@ -479,7 +502,7 @@ static void atp_complete(struct urb* urb)
                        dev->y_old = y;
 
                        if (debug > 1)
-                               printk("appletouch: X: %3d Y: %3d "
+                               printk(KERN_DEBUG "appletouch: X: %3d Y: %3d "
                                       "Xz: %3d Yz: %3d\n",
                                       x, y, x_z, y_z);
 
@@ -507,19 +530,25 @@ static void atp_complete(struct urb* urb)
        input_report_key(dev->input, BTN_LEFT, key);
        input_sync(dev->input);
 
-       /* Many Geysers will continue to send packets continually after
-          the first touch unless reinitialised. Do so if it's been
-          idle for a while in order to avoid waking the kernel up
-          several hundred times a second */
-
-       if (!x && !y && !key) {
-               dev->idlecount++;
-               if (dev->idlecount == 10) {
-                       dev->valid = 0;
-                       schedule_work(&dev->work);
-               }
-       } else
-               dev->idlecount = 0;
+       /*
+        * Many Geysers will continue to send packets continually after
+        * the first touch unless reinitialised. Do so if it's been
+        * idle for a while in order to avoid waking the kernel up
+        * several hundred times a second. Re-initialization does not
+        * work on Fountain touchpads.
+        */
+       if (!atp_is_fountain(dev)) {
+               if (!x && !y && !key) {
+                       dev->idlecount++;
+                       if (dev->idlecount == 10) {
+                               dev->valid = 0;
+                               schedule_work(&dev->work);
+                               /* Don't resubmit urb here, wait for reinit */
+                               return;
+                       }
+               } else
+                       dev->idlecount = 0;
+       }
 
 exit:
        retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
@@ -593,12 +622,12 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id
        else
                dev->datalen = 81;
 
-       if (atp_is_geyser_3(dev)) {
+       if (!atp_is_fountain(dev)) {
                /* switch to raw sensor mode */
-               if (atp_geyser3_init(udev))
+               if (atp_geyser_init(udev))
                        goto err_free_devs;
 
-               printk("appletouch Geyser 3 inited.\n");
+               printk(KERN_INFO "appletouch: Geyser mode initialized.\n");
        }
 
        dev->urb = usb_alloc_urb(0, GFP_KERNEL);
index 655a392174322605a37cf6d2fda29f3cf02c1d32..26ec09529b515fce59a3324f8310b2c64c6a9b62 100644 (file)
@@ -144,7 +144,7 @@ static int __init inport_init(void)
        b = inb(INPORT_SIGNATURE_PORT);
        c = inb(INPORT_SIGNATURE_PORT);
        if (a == b || a != c) {
-               printk(KERN_ERR "inport.c: Didn't find InPort mouse at %#x\n", INPORT_BASE);
+               printk(KERN_INFO "inport.c: Didn't find InPort mouse at %#x\n", INPORT_BASE);
                err = -ENODEV;
                goto err_release_region;
        }
index b23a4f3ea5cdcf48d5e09cf789ba610940a3f68f..37e7c75b43bd969a13f6c2bf4d47e2df12827fc6 100644 (file)
@@ -134,7 +134,7 @@ static int __init logibm_init(void)
        udelay(100);
 
        if (inb(LOGIBM_SIGNATURE_PORT) != LOGIBM_SIGNATURE_BYTE) {
-               printk(KERN_ERR "logibm.c: Didn't find Logitech busmouse at %#x\n", LOGIBM_BASE);
+               printk(KERN_INFO "logibm.c: Didn't find Logitech busmouse at %#x\n", LOGIBM_BASE);
                err = -ENODEV;
                goto err_release_region;
        }
index 6af199805ffc420ecfa3cce67e18ba054ed3e648..02b3ad8c082673efaf5e0ee39dd1365c08bae75f 100644 (file)
@@ -944,11 +944,7 @@ static int __init hp_sdc_init_hppa(struct parisc_device *d)
 
 #endif /* __hppa__ */
 
-#if !defined(__mc68000__) /* Link error on m68k! */
-static void __exit hp_sdc_exit(void)
-#else
 static void hp_sdc_exit(void)
-#endif
 {
        write_lock_irq(&hp_sdc.lock);
 
index 285fca676a69a7cd77c68da68ca78bea868dbd97..623eea2652ca1fda2844d29b4c5cb0fb7c792163 100644 (file)
@@ -741,7 +741,7 @@ int __devinit init_ivtv_i2c(struct ivtv *itv)
                return i2c_bit_add_bus(&itv->i2c_adap);
 }
 
-void __devexit exit_ivtv_i2c(struct ivtv *itv)
+void exit_ivtv_i2c(struct ivtv *itv)
 {
        IVTV_DEBUG_I2C("i2c exit\n");
 
index 677c3292855e7da8edc6a056fe9e005d8397d15f..de6a07442298d44d6735cde7266a201a48cba39c 100644 (file)
@@ -36,6 +36,6 @@ void ivtv_call_i2c_clients(struct ivtv *itv, unsigned int cmd, void *arg);
 
 /* init + register i2c algo-bit adapter */
 int __devinit init_ivtv_i2c(struct ivtv *itv);
-void __devexit exit_ivtv_i2c(struct ivtv *itv);
+void exit_ivtv_i2c(struct ivtv *itv);
 
 #endif
index d366a6cc1fd94807db5f6a50311324423d5fdf81..c8d62c268b11729dd2916105d26a8105fd01c905 100644 (file)
@@ -122,9 +122,6 @@ static int get_lcd_level(void)
        else
                fujitsu->brightness_changed = 0;
 
-       if (status < 0)
-               return status;
-
        return fujitsu->brightness_level;
 }
 
@@ -198,7 +195,7 @@ static struct platform_driver fujitsupf_driver = {
 
 /* ACPI device */
 
-int acpi_fujitsu_add(struct acpi_device *device)
+static int acpi_fujitsu_add(struct acpi_device *device)
 {
        int result = 0;
        int state = 0;
@@ -229,7 +226,7 @@ int acpi_fujitsu_add(struct acpi_device *device)
        return result;
 }
 
-int acpi_fujitsu_remove(struct acpi_device *device, int type)
+static int acpi_fujitsu_remove(struct acpi_device *device, int type)
 {
        ACPI_FUNCTION_TRACE("acpi_fujitsu_remove");
 
index a25ee71998a9090393b4e20653d90cbed53ab71b..1654a3330340a2bfdfb1fd740d15ed4af0e76f95 100644 (file)
@@ -39,6 +39,7 @@
 #define DRIVER_NAME    "pxa2xx-mci"
 
 #define NR_SG  1
+#define CLKRT_OFF      (~0)
 
 struct pxamci_host {
        struct mmc_host         *mmc;
@@ -371,6 +372,9 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
                unsigned long rate = host->clkrate;
                unsigned int clk = rate / ios->clock;
 
+               if (host->clkrt == CLKRT_OFF)
+                       clk_enable(host->clk);
+
                /*
                 * clk might result in a lower divisor than we
                 * desire.  check for that condition and adjust
@@ -379,14 +383,16 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
                if (rate / clk > ios->clock)
                        clk <<= 1;
                host->clkrt = fls(clk) - 1;
-               clk_enable(host->clk);
 
                /*
                 * we write clkrt on the next command
                 */
        } else {
                pxamci_stop_clock(host);
-               clk_disable(host->clk);
+               if (host->clkrt != CLKRT_OFF) {
+                       host->clkrt = CLKRT_OFF;
+                       clk_disable(host->clk);
+               }
        }
 
        if (host->power_mode != ios->power_mode) {
@@ -498,6 +504,7 @@ static int pxamci_probe(struct platform_device *pdev)
        host->mmc = mmc;
        host->dma = -1;
        host->pdata = pdev->dev.platform_data;
+       host->clkrt = CLKRT_OFF;
 
        host->clk = clk_get(&pdev->dev, "MMCCLK");
        if (IS_ERR(host->clk)) {
index 867cb7345b5faec024468ae734f40084958d304b..5f800a6dd978083583fd8592329f43eb4f19f19d 100644 (file)
@@ -1883,9 +1883,7 @@ config FEC2
 
 config FEC_MPC52xx
        tristate "MPC52xx FEC driver"
-       depends on PPC_MPC52xx
-       select PPC_BESTCOMM
-       select PPC_BESTCOMM_FEC
+       depends on PPC_MERGE && PPC_MPC52xx && PPC_BESTCOMM_FEC
        select CRC32
        select PHYLIB
        ---help---
index 53fe7ded5d509275b0827891f4551d376e6b749d..084acfd6fc5fdaeba614a7e20302c89f3842546f 100644 (file)
@@ -371,7 +371,6 @@ static void bf537_adjust_link(struct net_device *dev)
                if (phydev->speed != lp->old_speed) {
 #if defined(CONFIG_BFIN_MAC_RMII)
                        u32 opmode = bfin_read_EMAC_OPMODE();
-                       bf537mac_disable();
                        switch (phydev->speed) {
                        case 10:
                                opmode |= RMII_10;
@@ -386,7 +385,6 @@ static void bf537_adjust_link(struct net_device *dev)
                                break;
                        }
                        bfin_write_EMAC_OPMODE(opmode);
-                       bf537mac_enable();
 #endif
 
                        new_state = 1;
index 781ed99684894b2ba72cfdfb301c21a79b01f62a..3b840283a9c31c41c98e6564577d6fce3d204082 100644 (file)
@@ -351,4 +351,12 @@ enum e1000_state_t {
        __E1000_DOWN
 };
 
+extern char e1000_driver_name[];
+extern const char e1000_driver_version[];
+
+extern void e1000_power_up_phy(struct e1000_adapter *);
+extern void e1000_set_ethtool_ops(struct net_device *netdev);
+extern void e1000_check_options(struct e1000_adapter *adapter);
+
+
 #endif /* _E1000_H_ */
index 6c9a643426f59eba5019393b5c6cf69705a69ab7..667f18bcc1725b41b43529033c38a059606cfbec 100644 (file)
@@ -32,9 +32,6 @@
 
 #include <asm/uaccess.h>
 
-extern char e1000_driver_name[];
-extern char e1000_driver_version[];
-
 extern int e1000_up(struct e1000_adapter *adapter);
 extern void e1000_down(struct e1000_adapter *adapter);
 extern void e1000_reinit_locked(struct e1000_adapter *adapter);
@@ -733,16 +730,16 @@ err_setup:
 
 #define REG_PATTERN_TEST(R, M, W)                                              \
 {                                                                              \
-       uint32_t pat, value;                                                   \
-       uint32_t test[] =                                                      \
+       uint32_t pat, val;                                                     \
+       const uint32_t test[] =                                                \
                {0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF};              \
-       for (pat = 0; pat < ARRAY_SIZE(test); pat++) {              \
+       for (pat = 0; pat < ARRAY_SIZE(test); pat++) {                         \
                E1000_WRITE_REG(&adapter->hw, R, (test[pat] & W));             \
-               value = E1000_READ_REG(&adapter->hw, R);                       \
-               if (value != (test[pat] & W & M)) {                             \
+               val = E1000_READ_REG(&adapter->hw, R);                         \
+               if (val != (test[pat] & W & M)) {                              \
                        DPRINTK(DRV, ERR, "pattern test reg %04X failed: got " \
                                "0x%08X expected 0x%08X\n",                    \
-                               E1000_##R, value, (test[pat] & W & M));        \
+                               E1000_##R, val, (test[pat] & W & M));          \
                        *data = (adapter->hw.mac_type < e1000_82543) ?         \
                                E1000_82542_##R : E1000_##R;                   \
                        return 1;                                              \
@@ -752,12 +749,12 @@ err_setup:
 
 #define REG_SET_AND_CHECK(R, M, W)                                             \
 {                                                                              \
-       uint32_t value;                                                        \
+       uint32_t val;                                                          \
        E1000_WRITE_REG(&adapter->hw, R, W & M);                               \
-       value = E1000_READ_REG(&adapter->hw, R);                               \
-       if ((W & M) != (value & M)) {                                          \
+       val = E1000_READ_REG(&adapter->hw, R);                                 \
+       if ((W & M) != (val & M)) {                                            \
                DPRINTK(DRV, ERR, "set/check reg %04X test failed: got 0x%08X "\
-                       "expected 0x%08X\n", E1000_##R, (value & M), (W & M)); \
+                       "expected 0x%08X\n", E1000_##R, (val & M), (W & M));   \
                *data = (adapter->hw.mac_type < e1000_82543) ?                 \
                        E1000_82542_##R : E1000_##R;                           \
                return 1;                                                      \
@@ -1621,8 +1618,6 @@ e1000_get_sset_count(struct net_device *netdev, int sset)
        }
 }
 
-extern void e1000_power_up_phy(struct e1000_adapter *);
-
 static void
 e1000_diag_test(struct net_device *netdev,
                   struct ethtool_test *eth_test, uint64_t *data)
@@ -1859,8 +1854,8 @@ e1000_phys_id(struct net_device *netdev, uint32_t data)
 {
        struct e1000_adapter *adapter = netdev_priv(netdev);
 
-       if (!data || data > (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ))
-               data = (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ);
+       if (!data)
+               data = INT_MAX;
 
        if (adapter->hw.mac_type < e1000_82571) {
                if (!adapter->blink_timer.function) {
index 8fa0fe4009d56872fa1e30425251275f9be2d77b..7c6888c58c21d2e6e6033a9b6219caf3a6a8f6b6 100644 (file)
@@ -8607,7 +8607,7 @@ e1000_read_ich8_data(struct e1000_hw *hw, uint32_t index,
 
     DEBUGFUNC("e1000_read_ich8_data");
 
-    if (size < 1  || size > 2 || data == 0x0 ||
+    if (size < 1  || size > 2 || data == NULL ||
         index > ICH_FLASH_LINEAR_ADDR_MASK)
         return error;
 
@@ -8841,7 +8841,7 @@ e1000_read_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t *data)
  * amount of NVM used in each bank is a *minimum* of 4 KBytes, but in fact the
  * bank size may be 4, 8 or 64 KBytes
  *****************************************************************************/
-int32_t
+static int32_t
 e1000_erase_ich8_4k_segment(struct e1000_hw *hw, uint32_t bank)
 {
     union ich8_hws_flash_status hsfsts;
index f1ce348470cc14afa6e8ea68eeb0875d4b927094..72deff0d4d90b769afc12278442bee0a445e3c6e 100644 (file)
@@ -37,8 +37,8 @@ static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
 #define DRIVERNAPI "-NAPI"
 #endif
 #define DRV_VERSION "7.3.20-k2"DRIVERNAPI
-char e1000_driver_version[] = DRV_VERSION;
-static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
+const char e1000_driver_version[] = DRV_VERSION;
+static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
 
 /* e1000_pci_tbl - PCI Device ID Table
  *
@@ -188,7 +188,6 @@ static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter,
 static int e1000_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd);
 static int e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr,
                           int cmd);
-void e1000_set_ethtool_ops(struct net_device *netdev);
 static void e1000_enter_82542_rst(struct e1000_adapter *adapter);
 static void e1000_leave_82542_rst(struct e1000_adapter *adapter);
 static void e1000_tx_timeout(struct net_device *dev);
@@ -213,8 +212,6 @@ static void e1000_shutdown(struct pci_dev *pdev);
 static void e1000_netpoll (struct net_device *netdev);
 #endif
 
-extern void e1000_check_options(struct e1000_adapter *adapter);
-
 #define COPYBREAK_DEFAULT 256
 static unsigned int copybreak __read_mostly = COPYBREAK_DEFAULT;
 module_param(copybreak, uint, 0644);
index f485874a63f56f6d5b0eaee18e3813cf3aa75c7a..e6565ce686bcefd91499e6304ebac33f0aa97445 100644 (file)
@@ -46,7 +46,7 @@
 #define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET }
 #define E1000_PARAM(X, desc) \
        static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \
-       static int num_##X = 0; \
+       static unsigned int num_##X; \
        module_param_array_named(X, X, int, &num_##X, 0); \
        MODULE_PARM_DESC(X, desc);
 
@@ -198,9 +198,9 @@ E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround");
 
 struct e1000_option {
        enum { enable_option, range_option, list_option } type;
-       char *name;
-       char *err;
-       int  def;
+       const char *name;
+       const char *err;
+       int def;
        union {
                struct { /* range_option info */
                        int min;
@@ -214,8 +214,9 @@ struct e1000_option {
 };
 
 static int __devinit
-e1000_validate_option(int *value, struct e1000_option *opt,
-               struct e1000_adapter *adapter)
+e1000_validate_option(unsigned int *value,
+                     const struct e1000_option *opt,
+                     struct e1000_adapter *adapter)
 {
        if (*value == OPTION_UNSET) {
                *value = opt->def;
@@ -348,7 +349,7 @@ e1000_check_options(struct e1000_adapter *adapter)
                };
 
                if (num_XsumRX > bd) {
-                       int rx_csum = XsumRX[bd];
+                       unsigned int rx_csum = XsumRX[bd];
                        e1000_validate_option(&rx_csum, &opt, adapter);
                        adapter->rx_csum = rx_csum;
                } else {
@@ -374,7 +375,7 @@ e1000_check_options(struct e1000_adapter *adapter)
                };
 
                if (num_FlowControl > bd) {
-                       int fc = FlowControl[bd];
+                       unsigned int fc = FlowControl[bd];
                        e1000_validate_option(&fc, &opt, adapter);
                        adapter->hw.fc = adapter->hw.original_fc = fc;
                } else {
@@ -506,7 +507,7 @@ e1000_check_options(struct e1000_adapter *adapter)
                };
 
                if (num_SmartPowerDownEnable > bd) {
-                       int spd = SmartPowerDownEnable[bd];
+                       unsigned int spd = SmartPowerDownEnable[bd];
                        e1000_validate_option(&spd, &opt, adapter);
                        adapter->smart_power_down = spd;
                } else {
@@ -522,7 +523,7 @@ e1000_check_options(struct e1000_adapter *adapter)
                };
 
                if (num_KumeranLockLoss > bd) {
-                       int kmrn_lock_loss = KumeranLockLoss[bd];
+                       unsigned int kmrn_lock_loss = KumeranLockLoss[bd];
                        e1000_validate_option(&kmrn_lock_loss, &opt, adapter);
                        adapter->hw.kmrn_lock_loss_workaround_disabled = !kmrn_lock_loss;
                } else {
@@ -581,7 +582,7 @@ e1000_check_fiber_options(struct e1000_adapter *adapter)
 static void __devinit
 e1000_check_copper_options(struct e1000_adapter *adapter)
 {
-       int speed, dplx, an;
+       unsigned int speed, dplx, an;
        int bd = adapter->bd_number;
 
        { /* Speed */
index cf70522fc85160d9900dc5558c732511b3b453eb..14141a55eaa6f1f14754a09ada3377321fba8c76 100644 (file)
@@ -283,7 +283,7 @@ static s32 e1000_get_invariants_82571(struct e1000_adapter *adapter)
                        adapter->flags &= ~FLAG_HAS_WOL;
                /* quad ports only support WoL on port A */
                if (adapter->flags & FLAG_IS_QUAD_PORT &&
-                   (!adapter->flags & FLAG_IS_QUAD_PORT_A))
+                   (!(adapter->flags & FLAG_IS_QUAD_PORT_A)))
                        adapter->flags &= ~FLAG_HAS_WOL;
                break;
 
index 0666e62e9ad29fb0fcbcd34043ac0178ed3325b3..6a39784e7ee2a02de8ff32c4b6eece49465d3cad 100644 (file)
@@ -1680,8 +1680,8 @@ static int e1000_phys_id(struct net_device *netdev, u32 data)
 {
        struct e1000_adapter *adapter = netdev_priv(netdev);
 
-       if (!data || data > (u32)(MAX_SCHEDULE_TIMEOUT / HZ))
-               data = (u32)(MAX_SCHEDULE_TIMEOUT / HZ);
+       if (!data)
+               data = INT_MAX;
 
        if (adapter->hw.phy.type == e1000_phy_ife) {
                if (!adapter->blink_timer.function) {
index e4e655efb23cbd8b9cfe0e06896ced7db796b2ab..332789238b9c9309a63210877700b021b3c9acfd 100644 (file)
@@ -52,10 +52,11 @@ MODULE_PARM_DESC(copybreak,
  */
 
 #define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET }
-#define E1000_PARAM(X, desc) \
-       static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \
-       static int num_##X; \
-       module_param_array_named(X, X, int, &num_##X, 0); \
+#define E1000_PARAM(X, desc)                                   \
+       static int __devinitdata X[E1000_MAX_NIC+1]             \
+               = E1000_PARAM_INIT;                             \
+       static unsigned int num_##X;                            \
+       module_param_array_named(X, X, int, &num_##X, 0);       \
        MODULE_PARM_DESC(X, desc);
 
 
@@ -124,9 +125,9 @@ E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround");
 
 struct e1000_option {
        enum { enable_option, range_option, list_option } type;
-       char *name;
-       char *err;
-       int  def;
+       const char *name;
+       const char *err;
+       int def;
        union {
                struct { /* range_option info */
                        int min;
@@ -139,8 +140,8 @@ struct e1000_option {
        } arg;
 };
 
-static int __devinit e1000_validate_option(int *value,
-                                          struct e1000_option *opt,
+static int __devinit e1000_validate_option(unsigned int *value,
+                                          const struct e1000_option *opt,
                                           struct e1000_adapter *adapter)
 {
        if (*value == OPTION_UNSET) {
@@ -213,7 +214,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
        }
 
        { /* Transmit Interrupt Delay */
-               struct e1000_option opt = {
+               const struct e1000_option opt = {
                        .type = range_option,
                        .name = "Transmit Interrupt Delay",
                        .err  = "using default of "
@@ -232,7 +233,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
                }
        }
        { /* Transmit Absolute Interrupt Delay */
-               struct e1000_option opt = {
+               const struct e1000_option opt = {
                        .type = range_option,
                        .name = "Transmit Absolute Interrupt Delay",
                        .err  = "using default of "
@@ -277,7 +278,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
                }
        }
        { /* Receive Absolute Interrupt Delay */
-               struct e1000_option opt = {
+               const struct e1000_option opt = {
                        .type = range_option,
                        .name = "Receive Absolute Interrupt Delay",
                        .err  = "using default of "
@@ -296,7 +297,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
                }
        }
        { /* Interrupt Throttling Rate */
-               struct e1000_option opt = {
+               const struct e1000_option opt = {
                        .type = range_option,
                        .name = "Interrupt Throttling Rate (ints/sec)",
                        .err  = "using default of "
@@ -344,7 +345,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
                }
        }
        { /* Smart Power Down */
-               struct e1000_option opt = {
+               const struct e1000_option opt = {
                        .type = enable_option,
                        .name = "PHY Smart Power Down",
                        .err  = "defaulting to Disabled",
@@ -352,7 +353,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
                };
 
                if (num_SmartPowerDownEnable > bd) {
-                       int spd = SmartPowerDownEnable[bd];
+                       unsigned int spd = SmartPowerDownEnable[bd];
                        e1000_validate_option(&spd, &opt, adapter);
                        if ((adapter->flags & FLAG_HAS_SMART_POWER_DOWN)
                            && spd)
@@ -360,7 +361,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
                }
        }
        { /* Kumeran Lock Loss Workaround */
-               struct e1000_option opt = {
+               const struct e1000_option opt = {
                        .type = enable_option,
                        .name = "Kumeran Lock Loss Workaround",
                        .err  = "defaulting to Enabled",
@@ -368,7 +369,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
                };
 
                if (num_KumeranLockLoss > bd) {
-                       int kmrn_lock_loss = KumeranLockLoss[bd];
+                       unsigned int kmrn_lock_loss = KumeranLockLoss[bd];
                        e1000_validate_option(&kmrn_lock_loss, &opt, adapter);
                        if (hw->mac.type == e1000_ich8lan)
                                e1000e_set_kmrn_lock_loss_workaround_ich8lan(hw,
index fc1cf0b742b0d001c8f26af6354534686766233a..a8a0ee220da671c5124ad6af4314454cce6685f2 100644 (file)
@@ -879,9 +879,9 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
                                "Error while parsing device node resource\n" );
                return rv;
        }
-       if ((mem.end - mem.start + 1) != sizeof(struct mpc52xx_fec)) {
+       if ((mem.end - mem.start + 1) < sizeof(struct mpc52xx_fec)) {
                printk(KERN_ERR DRIVER_NAME
-                       " - invalid resource size (%lx != %x), check mpc52xx_devices.c\n",
+                       " - invalid resource size (%lx < %x), check mpc52xx_devices.c\n",
                        (unsigned long)(mem.end - mem.start + 1), sizeof(struct mpc52xx_fec));
                return -EINVAL;
        }
index 1eee8894c732e0aac48be5fcab68c44c8cd62fa6..3d2e7217e9af04a9afd5beac494d67b0761255a8 100644 (file)
@@ -196,4 +196,11 @@ struct ixgb_adapter {
        uint32_t alloc_rx_buff_failed;
        boolean_t have_msi;
 };
+
+/* Exported from other modules */
+extern void ixgb_check_options(struct ixgb_adapter *adapter);
+extern void ixgb_set_ethtool_ops(struct net_device *netdev);
+extern char ixgb_driver_name[];
+extern const char ixgb_driver_version[];
+
 #endif /* _IXGB_H_ */
index fddd5844168d69202d4c39748ae24ed282999f6e..a267dd86252072927755fec2d120af904804e0fc 100644 (file)
@@ -32,9 +32,6 @@
 
 #include <asm/uaccess.h>
 
-extern char ixgb_driver_name[];
-extern char ixgb_driver_version[];
-
 extern int ixgb_up(struct ixgb_adapter *adapter);
 extern void ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog);
 extern void ixgb_reset(struct ixgb_adapter *adapter);
@@ -639,8 +636,8 @@ ixgb_phys_id(struct net_device *netdev, uint32_t data)
 {
        struct ixgb_adapter *adapter = netdev_priv(netdev);
 
-       if(!data || data > (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ))
-               data = (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ);
+       if (!data)
+               data = INT_MAX;
 
        if(!adapter->blink_timer.function) {
                init_timer(&adapter->blink_timer);
index ecbf45861c6825c34c91adad1322c72d6137107d..2c6367ace3cd9a5a4f3b17c70d2c0e69845150f1 100644 (file)
@@ -1174,7 +1174,7 @@ mac_addr_valid(uint8_t *mac_addr)
  *
  * hw - Struct containing variables accessed by shared code
  *****************************************************************************/
-boolean_t
+static boolean_t
 ixgb_link_reset(struct ixgb_hw *hw)
 {
        boolean_t link_status = FALSE;
@@ -1205,7 +1205,7 @@ ixgb_link_reset(struct ixgb_hw *hw)
  *
  * hw - Struct containing variables accessed by shared code
  *****************************************************************************/
-void
+static void
 ixgb_optics_reset(struct ixgb_hw *hw)
 {
        if (hw->phy_type == ixgb_phy_type_txn17401) {
index d444de58ba341455b40cf823e31736f270c01836..3021234b1e173f5653603bcde3998db26ea3abba 100644 (file)
@@ -37,8 +37,8 @@ static char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver";
 #define DRIVERNAPI "-NAPI"
 #endif
 #define DRV_VERSION            "1.0.126-k2"DRIVERNAPI
-char ixgb_driver_version[] = DRV_VERSION;
-static char ixgb_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
+const char ixgb_driver_version[] = DRV_VERSION;
+static const char ixgb_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
 
 /* ixgb_pci_tbl - PCI Device ID Table
  *
@@ -104,7 +104,6 @@ static boolean_t ixgb_clean_rx_irq(struct ixgb_adapter *adapter,
 static boolean_t ixgb_clean_rx_irq(struct ixgb_adapter *adapter);
 #endif
 static void ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter);
-void ixgb_set_ethtool_ops(struct net_device *netdev);
 static void ixgb_tx_timeout(struct net_device *dev);
 static void ixgb_tx_timeout_task(struct work_struct *work);
 static void ixgb_vlan_rx_register(struct net_device *netdev,
@@ -123,9 +122,6 @@ static pci_ers_result_t ixgb_io_error_detected (struct pci_dev *pdev,
 static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev);
 static void ixgb_io_resume (struct pci_dev *pdev);
 
-/* Exported from other modules */
-extern void ixgb_check_options(struct ixgb_adapter *adapter);
-
 static struct pci_error_handlers ixgb_err_handler = {
        .error_detected = ixgb_io_error_detected,
        .slot_reset = ixgb_io_slot_reset,
@@ -1085,7 +1081,8 @@ ixgb_set_multi(struct net_device *netdev)
                rctl |= IXGB_RCTL_MPE;
                IXGB_WRITE_REG(hw, RCTL, rctl);
        } else {
-               uint8_t mta[netdev->mc_count * IXGB_ETH_LENGTH_OF_ADDRESS];
+               uint8_t mta[IXGB_MAX_NUM_MULTICAST_ADDRESSES *
+                           IXGB_ETH_LENGTH_OF_ADDRESS];
 
                IXGB_WRITE_REG(hw, RCTL, rctl);
 
@@ -1324,8 +1321,8 @@ ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb,
 
                        /* Workaround for premature desc write-backs
                         * in TSO mode.  Append 4-byte sentinel desc */
-                       if (unlikely(mss && !nr_frags && size == len
-                                    && size > 8))
+                       if (unlikely(mss && (f == (nr_frags - 1))
+                                    && size == len && size > 8))
                                size -= 4;
 
                        buffer_info->length = size;
index 5d5ddabf4360ccfdf6f15fb9c4600aa7c395933e..865d14d6e5a734513836a032cce28f3916ca46f7 100644 (file)
  */
 
 #define IXGB_PARAM_INIT { [0 ... IXGB_MAX_NIC] = OPTION_UNSET }
-#define IXGB_PARAM(X, desc) \
-       static int __devinitdata X[IXGB_MAX_NIC+1] = IXGB_PARAM_INIT; \
-       static int num_##X = 0; \
-       module_param_array_named(X, X, int, &num_##X, 0); \
+#define IXGB_PARAM(X, desc)                                    \
+       static int __devinitdata X[IXGB_MAX_NIC+1]              \
+               = IXGB_PARAM_INIT;                              \
+       static unsigned int num_##X = 0;                        \
+       module_param_array_named(X, X, int, &num_##X, 0);       \
        MODULE_PARM_DESC(X, desc);
 
 /* Transmit Descriptor Count
@@ -178,8 +179,8 @@ IXGB_PARAM(IntDelayEnable, "Transmit Interrupt Delay Enable");
 
 struct ixgb_option {
        enum { enable_option, range_option, list_option } type;
-       char *name;
-       char *err;
+       const char *name;
+       const char *err;
        int def;
        union {
                struct {        /* range_option info */
@@ -197,7 +198,7 @@ struct ixgb_option {
 };
 
 static int __devinit
-ixgb_validate_option(int *value, struct ixgb_option *opt)
+ixgb_validate_option(unsigned int *value, const struct ixgb_option *opt)
 {
        if(*value == OPTION_UNSET) {
                *value = opt->def;
@@ -266,7 +267,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
        }
 
        { /* Transmit Descriptor Count */
-               struct ixgb_option opt = {
+               const struct ixgb_option opt = {
                        .type = range_option,
                        .name = "Transmit Descriptors",
                        .err  = "using default of " __MODULE_STRING(DEFAULT_TXD),
@@ -285,7 +286,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
                tx_ring->count = ALIGN(tx_ring->count, IXGB_REQ_TX_DESCRIPTOR_MULTIPLE);
        }
        { /* Receive Descriptor Count */
-               struct ixgb_option opt = {
+               const struct ixgb_option opt = {
                        .type = range_option,
                        .name = "Receive Descriptors",
                        .err  = "using default of " __MODULE_STRING(DEFAULT_RXD),
@@ -304,7 +305,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
                rx_ring->count = ALIGN(rx_ring->count, IXGB_REQ_RX_DESCRIPTOR_MULTIPLE);
        }
        { /* Receive Checksum Offload Enable */
-               struct ixgb_option opt = {
+               const struct ixgb_option opt = {
                        .type = enable_option,
                        .name = "Receive Checksum Offload",
                        .err  = "defaulting to Enabled",
@@ -312,7 +313,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
                };
 
                if(num_XsumRX > bd) {
-                       int rx_csum = XsumRX[bd];
+                       unsigned int rx_csum = XsumRX[bd];
                        ixgb_validate_option(&rx_csum, &opt);
                        adapter->rx_csum = rx_csum;
                } else {
@@ -328,7 +329,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
                         { ixgb_fc_full,        "Flow Control Enabled" },
                         { ixgb_fc_default, "Flow Control Hardware Default" }};
 
-               struct ixgb_option opt = {
+               const struct ixgb_option opt = {
                        .type = list_option,
                        .name = "Flow Control",
                        .err  = "reading default settings from EEPROM",
@@ -338,7 +339,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
                };
 
                if(num_FlowControl > bd) {
-                       int fc = FlowControl[bd];
+                       unsigned int fc = FlowControl[bd];
                        ixgb_validate_option(&fc, &opt);
                        adapter->hw.fc.type = fc;
                } else {
@@ -346,7 +347,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
                }
        }
        { /* Receive Flow Control High Threshold */
-               struct ixgb_option opt = {
+               const struct ixgb_option opt = {
                        .type = range_option,
                        .name = "Rx Flow Control High Threshold",
                        .err  = "using default of " __MODULE_STRING(DEFAULT_FCRTH),
@@ -366,7 +367,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
                                "Ignoring RxFCHighThresh when no RxFC\n");
        }
        { /* Receive Flow Control Low Threshold */
-               struct ixgb_option opt = {
+               const struct ixgb_option opt = {
                        .type = range_option,
                        .name = "Rx Flow Control Low Threshold",
                        .err  = "using default of " __MODULE_STRING(DEFAULT_FCRTL),
@@ -386,7 +387,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
                                "Ignoring RxFCLowThresh when no RxFC\n");
        }
        { /* Flow Control Pause Time Request*/
-               struct ixgb_option opt = {
+               const struct ixgb_option opt = {
                        .type = range_option,
                        .name = "Flow Control Pause Time Request",
                        .err  = "using default of "__MODULE_STRING(DEFAULT_FCPAUSE),
@@ -396,7 +397,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
                };
 
                if(num_FCReqTimeout > bd) {
-                       int pause_time = FCReqTimeout[bd];
+                       unsigned int pause_time = FCReqTimeout[bd];
                        ixgb_validate_option(&pause_time, &opt);
                        adapter->hw.fc.pause_time = pause_time;
                } else {
@@ -419,7 +420,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
                }
        }
        { /* Receive Interrupt Delay */
-               struct ixgb_option opt = {
+               const struct ixgb_option opt = {
                        .type = range_option,
                        .name = "Receive Interrupt Delay",
                        .err  = "using default of " __MODULE_STRING(DEFAULT_RDTR),
@@ -436,7 +437,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
                }
        }
        { /* Transmit Interrupt Delay */
-               struct ixgb_option opt = {
+               const struct ixgb_option opt = {
                        .type = range_option,
                        .name = "Transmit Interrupt Delay",
                        .err  = "using default of " __MODULE_STRING(DEFAULT_TIDV),
@@ -454,7 +455,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
        }
 
        { /* Transmit Interrupt Delay Enable */
-               struct ixgb_option opt = {
+               const struct ixgb_option opt = {
                        .type = enable_option,
                        .name = "Tx Interrupt Delay Enable",
                        .err  = "defaulting to Enabled",
@@ -462,7 +463,7 @@ ixgb_check_options(struct ixgb_adapter *adapter)
                };
 
                if(num_IntDelayEnable > bd) {
-                       int ide = IntDelayEnable[bd];
+                       unsigned int ide = IntDelayEnable[bd];
                        ixgb_validate_option(&ide, &opt);
                        adapter->tx_int_delay_enable = ide;
                } else {
index c160a7d91e21a2c3b24e289665c93387cd72095f..bc51432b8d266cd20bd4e18bba1524433d349dcb 100644 (file)
@@ -244,7 +244,7 @@ extern struct ixgbe_info ixgbe_82598EB_info;
 extern struct ixgbe_info ixgbe_82598AT_info;
 
 extern char ixgbe_driver_name[];
-extern char ixgbe_driver_version[];
+extern const char ixgbe_driver_version[];
 
 extern int ixgbe_up(struct ixgbe_adapter *adapter);
 extern void ixgbe_down(struct ixgbe_adapter *adapter);
index 00ee20125ca9c94e92e0ab77659ef9a76a0d79c4..4d64673164ca5e580cfd4cf74d4556d8b4cf73e7 100644 (file)
@@ -30,8 +30,7 @@
 #include <linux/delay.h>
 #include <linux/sched.h>
 
-#include "ixgbe_type.h"
-#include "ixgbe_common.h"
+#include "ixgbe.h"
 #include "ixgbe_phy.h"
 
 #define IXGBE_82598_MAX_TX_QUEUES 32
index b75f1c6efc42b589516a1e4efa5fbd7ae504723d..00bc525c656071aebb25b8c4151eba246ce72686 100644 (file)
 #include "ixgbe_common.h"
 
 char ixgbe_driver_name[] = "ixgbe";
-static char ixgbe_driver_string[] =
-                       "Intel(R) 10 Gigabit PCI Express Network Driver";
+static const char ixgbe_driver_string[] =
+       "Intel(R) 10 Gigabit PCI Express Network Driver";
 
 #define DRV_VERSION "1.1.18"
-char ixgbe_driver_version[] = DRV_VERSION;
-static char ixgbe_copyright[] = "Copyright (c) 1999-2007 Intel Corporation.";
+const char ixgbe_driver_version[] = DRV_VERSION;
+static const char ixgbe_copyright[] =
+        "Copyright (c) 1999-2007 Intel Corporation.";
 
 static const struct ixgbe_info *ixgbe_info_tbl[] = {
        [board_82598AF]                 = &ixgbe_82598AF_info,
index 366e62a2b1e5dacea1e1afd7fa0e89870afbf07d..0f306ddb5630eb05257d21d44bc533b88c184d23 100644 (file)
@@ -1151,7 +1151,7 @@ static inline int myri10ge_clean_rx_done(struct myri10ge_priv *mgp, int budget)
        u16 length;
        __wsum checksum;
 
-       while (rx_done->entry[idx].length != 0 && work_done++ < budget) {
+       while (rx_done->entry[idx].length != 0 && work_done < budget) {
                length = ntohs(rx_done->entry[idx].length);
                rx_done->entry[idx].length = 0;
                checksum = csum_unfold(rx_done->entry[idx].checksum);
@@ -1167,6 +1167,7 @@ static inline int myri10ge_clean_rx_done(struct myri10ge_priv *mgp, int budget)
                rx_bytes += rx_ok * (unsigned long)length;
                cnt++;
                idx = cnt & (myri10ge_max_intr_slots - 1);
+               work_done++;
        }
        rx_done->idx = idx;
        rx_done->cnt = cnt;
@@ -1233,13 +1234,12 @@ static int myri10ge_poll(struct napi_struct *napi, int budget)
        struct myri10ge_priv *mgp =
            container_of(napi, struct myri10ge_priv, napi);
        struct net_device *netdev = mgp->dev;
-       struct myri10ge_rx_done *rx_done = &mgp->rx_done;
        int work_done;
 
        /* process as many rx events as NAPI will allow */
        work_done = myri10ge_clean_rx_done(mgp, budget);
 
-       if (rx_done->entry[rx_done->idx].length == 0 || !netif_running(netdev)) {
+       if (work_done < budget || !netif_running(netdev)) {
                netif_rx_complete(netdev, napi);
                put_be32(htonl(3), mgp->irq_claim);
        }
index 8936ed3469cf0744a68ace9e205ea6a804ce3b85..a005d8f4c38e545e80237abbcb83cdba34e161e3 100644 (file)
@@ -491,7 +491,7 @@ static int pppoe_create(struct net *net, struct socket *sock)
        int error = -ENOMEM;
        struct sock *sk;
 
-       sk = sk_alloc(net, PF_PPPOX, GFP_KERNEL, &pppoe_sk_proto, 1);
+       sk = sk_alloc(net, PF_PPPOX, GFP_KERNEL, &pppoe_sk_proto);
        if (!sk)
                goto out;
 
index 921d4ef6d14b66d1b66c0c4b606a571cbec82020..f8904fd92369be8ee2ded044f8c55856f31960ac 100644 (file)
@@ -1416,7 +1416,7 @@ static int pppol2tp_create(struct net *net, struct socket *sock)
        int error = -ENOMEM;
        struct sock *sk;
 
-       sk = sk_alloc(net, PF_PPPOX, GFP_KERNEL, &pppol2tp_sk_proto, 1);
+       sk = sk_alloc(net, PF_PPPOX, GFP_KERNEL, &pppol2tp_sk_proto);
        if (!sk)
                goto out;
 
index a2de32fabc170a9a688750ce7f427f67f4e7a5e6..2c685734b7a4e36a988ad3f53553bdafda10c5ff 100644 (file)
@@ -586,6 +586,10 @@ static const struct usb_device_id products[] = {
         USB_DEVICE(0x0a46, 0x0268),    /* ShanTou ST268 USB NIC */
         .driver_info = (unsigned long)&dm9601_info,
         },
+       {
+        USB_DEVICE(0x0a46, 0x8515),    /* ADMtek ADM8515 USB NIC */
+        .driver_info = (unsigned long)&dm9601_info,
+        },
        {},                     // END
 };
 
index 5ea877221f463c9dbb8c45b386a548a07464b435..37c52e1317504a5e1a7a0e87ca53a47c7daf697b 100644 (file)
@@ -142,9 +142,10 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
          * To date internally, just copy this out to the user.
          */
     case LMCIOCGINFO: /*fold01*/
-        if (copy_to_user(ifr->ifr_data, &sc->ictl, sizeof (lmc_ctl_t)))
-            return -EFAULT;
-        ret = 0;
+       if (copy_to_user(ifr->ifr_data, &sc->ictl, sizeof(lmc_ctl_t)))
+               ret = -EFAULT;
+       else
+               ret = 0;
         break;
 
     case LMCIOCSINFO: /*fold01*/
@@ -159,8 +160,10 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
             break;
         }
 
-        if (copy_from_user(&ctl, ifr->ifr_data, sizeof (lmc_ctl_t)))
-            return -EFAULT;
+       if (copy_from_user(&ctl, ifr->ifr_data, sizeof(lmc_ctl_t))) {
+               ret = -EFAULT;
+               break;
+       }
 
         sc->lmc_media->set_status (sc, &ctl);
 
@@ -190,8 +193,10 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
                break;
            }
 
-           if (copy_from_user(&new_type, ifr->ifr_data, sizeof(u_int16_t)))
-                return -EFAULT;
+           if (copy_from_user(&new_type, ifr->ifr_data, sizeof(u_int16_t))) {
+               ret = -EFAULT;
+               break;
+           }
 
             
            if (new_type == old_type)
@@ -229,9 +234,10 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
         sc->lmc_xinfo.Magic1 = 0xDEADBEEF;
 
         if (copy_to_user(ifr->ifr_data, &sc->lmc_xinfo,
-                         sizeof (struct lmc_xinfo)))
-            return -EFAULT;
-        ret = 0;
+                        sizeof(struct lmc_xinfo)))
+               ret = -EFAULT;
+       else
+               ret = 0;
 
         break;
 
@@ -262,9 +268,9 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
 
         if (copy_to_user(ifr->ifr_data, &sc->stats,
                          sizeof (struct lmc_statistics)))
-            return -EFAULT;
-
-        ret = 0;
+               ret = -EFAULT;
+       else
+               ret = 0;
         break;
 
     case LMCIOCCLEARLMCSTATS: /*fold01*/
@@ -292,8 +298,10 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
             break;
         }
 
-        if (copy_from_user(&ctl, ifr->ifr_data, sizeof (lmc_ctl_t)))
-            return -EFAULT;
+       if (copy_from_user(&ctl, ifr->ifr_data, sizeof(lmc_ctl_t))) {
+               ret = -EFAULT;
+               break;
+       }
         sc->lmc_media->set_circuit_type(sc, ctl.circuit_type);
         sc->ictl.circuit_type = ctl.circuit_type;
         ret = 0;
@@ -318,12 +326,15 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
 
 #ifdef DEBUG
     case LMCIOCDUMPEVENTLOG:
-        if (copy_to_user(ifr->ifr_data, &lmcEventLogIndex, sizeof (u32)))
-            return -EFAULT;
+       if (copy_to_user(ifr->ifr_data, &lmcEventLogIndex, sizeof(u32))) {
+               ret = -EFAULT;
+               break;
+       }
         if (copy_to_user(ifr->ifr_data + sizeof (u32), lmcEventLogBuf, sizeof (lmcEventLogBuf)))
-            return -EFAULT;
+               ret = -EFAULT;
+       else
+               ret = 0;
 
-        ret = 0;
         break;
 #endif /* end ifdef _DBG_EVENTLOG */
     case LMCIOCT1CONTROL: /*fold01*/
@@ -346,8 +357,10 @@ int lmc_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) /*fold00*/
              */
             netif_stop_queue(dev);
 
-            if (copy_from_user(&xc, ifr->ifr_data, sizeof (struct lmc_xilinx_control)))
-                return -EFAULT;
+       if (copy_from_user(&xc, ifr->ifr_data, sizeof(struct lmc_xilinx_control))) {
+               ret = -EFAULT;
+               break;
+       }
             switch(xc.command){
             case lmc_xilinx_reset: /*fold02*/
                 {
index 25cfc6c32509f8e71544516c00d715938b3efbd2..8d52a26c248ae72ffe1a10249da91bb00338b442 100644 (file)
@@ -96,8 +96,8 @@ config IWL4965
 
          If you want to compile the driver as a module ( = code which can be
          inserted in and remvoed from the running kernel whenever you want),
-         say M here and read <file:Documentation/modules.txt>.  The module
-         will be called iwl4965.ko.
+         say M here and read <file:Documentation/kbuild/modules.txt>.  The
+         module will be called iwl4965.ko.
 
 config IWL3945
        tristate "Intel PRO/Wireless 3945ABG/BG Network Connection"
@@ -124,5 +124,5 @@ config IWL3945
 
          If you want to compile the driver as a module ( = code which can be
          inserted in and remvoed from the running kernel whenever you want),
-         say M here and read <file:Documentation/modules.txt>.  The module
-         will be called iwl3945.ko.
+         say M here and read <file:Documentation/kbuild/modules.txt>.  The
+         module will be called iwl3945.ko.
index 9b35259eecfaed4dd2b00fa1f37cd0d4615b0175..e079a5237c9424e7064e1c0892377f2d9b78536b 100644 (file)
@@ -34,7 +34,7 @@
 #include "intel-iommu.h"
 #include <asm/proto.h> /* force_iommu in this header in x86-64*/
 #include <asm/cacheflush.h>
-#include <asm/iommu.h>
+#include <asm/gart.h>
 #include "pci.h"
 
 #define IS_GFX_DEVICE(pdev) ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY)
@@ -749,8 +749,8 @@ static char *fault_reason_strings[] =
 
 char *dmar_get_fault_reason(u8 fault_reason)
 {
-       if (fault_reason > MAX_FAULT_REASON_IDX)
-               return fault_reason_strings[MAX_FAULT_REASON_IDX];
+       if (fault_reason >= MAX_FAULT_REASON_IDX)
+               return fault_reason_strings[MAX_FAULT_REASON_IDX - 1];
        else
                return fault_reason_strings[fault_reason];
 }
index 8c1012b432bb1e71b9378f25d87eac404583fb77..e2041b4d0c8569ba93791a166520145e8cdaa9cd 100644 (file)
@@ -542,8 +542,6 @@ static int s3c_rtc_probe(struct platform_device *pdev)
 
 /* RTC Power management control */
 
-static struct timespec s3c_rtc_delta;
-
 static int ticnt_save;
 
 static int s3c_rtc_suspend(struct platform_device *pdev, pm_message_t state)
index a5763c6e936232e8445be6de3e2bb048d2040c67..86cf10efb0c1048ec7efc1d0ae1210537398c8d7 100644 (file)
@@ -172,12 +172,12 @@ config CHR_DEV_SCH
          don't need this for those tiny 6-slot cdrom changers.  Media
          changers are listed as "Type: Medium Changer" in /proc/scsi/scsi.
          If you have such hardware and want to use it with linux, say Y
-         here.  Check <file:Documentation/scsi-changer.txt> for details.
+         here.  Check <file:Documentation/scsi/scsi-changer.txt> for details.
        
          If you want to compile this as a module ( = code which can be
          inserted in and removed from the running kernel whenever you want),
          say M here and read <file:Documentation/kbuild/modules.txt> and
-         <file:Documentation/scsi.txt>. The module will be called ch.o.
+         <file:Documentation/scsi/scsi.txt>. The module will be called ch.o.
          If unsure, say N.
        
 
index 21ba57155beacd1617440b4e9b0506c708f72d01..bb6550e31926d4a2752a1f7984d3d2978950fd42 100644 (file)
@@ -38,9 +38,7 @@ static inline int next_SCp(struct scsi_pointer *SCp)
        if (ret) {
                SCp->buffer++;
                SCp->buffers_residual--;
-               SCp->ptr = (char *)
-                        (page_address(SCp->buffer->page) +
-                         SCp->buffer->offset);
+               SCp->ptr = sg_virt(SCp->buffer);
                SCp->this_residual = SCp->buffer->length;
        } else {
                SCp->ptr = NULL;
@@ -76,9 +74,7 @@ static inline void init_SCp(struct scsi_cmnd *SCpnt)
 
                SCpnt->SCp.buffer = (struct scatterlist *) SCpnt->request_buffer;
                SCpnt->SCp.buffers_residual = SCpnt->use_sg - 1;
-               SCpnt->SCp.ptr = (char *)
-                        (page_address(SCpnt->SCp.buffer->page) +
-                         SCpnt->SCp.buffer->offset);
+               SCpnt->SCp.ptr = sg_virt(SCpnt->SCp.buffer);
                SCpnt->SCp.this_residual = SCpnt->SCp.buffer->length;
                SCpnt->SCp.phase = SCpnt->request_bufflen;
 
index 6846a6c38b6d5535784bafd4884a51bbbc2e5be4..7ad21925869a0550465b56bac0e5a7c771f2fb31 100644 (file)
@@ -657,7 +657,15 @@ static void
 serial_txx9_pm(struct uart_port *port, unsigned int state,
              unsigned int oldstate)
 {
-       if (state == 0)
+       /*
+        * If oldstate was -1 this is called from
+        * uart_configure_port().  In this case do not initialize the
+        * port now, because the port was already initialized (for
+        * non-console port) or should not be initialized here (for
+        * console port).  If we initialized the port here we lose
+        * serial console settings.
+        */
+       if (state == 0 && oldstate != -1)
                serial_txx9_initialize(port);
 }
 
index 161d1021b7ebf405676540e7516b6561f3c98ce8..e52a6296ca46eedd20b2cd99469b65704135f842 100644 (file)
@@ -601,8 +601,7 @@ static int match_maple_bus_driver(struct device *devptr,
        return 0;
 }
 
-static int maple_bus_uevent(struct device *dev, char **envp,
-                           int num_envp, char *buffer, int buffer_size)
+static int maple_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
 {
        return 0;
 }
index eb4ac47612a59022878b19e4da34053fdd4cbb6f..316a746e0080ef8a0eface2341fbd8f3e612c60d 100644 (file)
@@ -434,7 +434,7 @@ int usb_sg_init (
                if (dma) {
                        io->urbs [i]->transfer_dma = sg_dma_address (sg + i);
                        len = sg_dma_len (sg + i);
-#if defined(CONFIG_HIGHMEM) || defined(CONFIG_IOMMU)
+#if defined(CONFIG_HIGHMEM) || defined(CONFIG_GART_IOMMU)
                        io->urbs[i]->transfer_buffer = NULL;
 #else
                        io->urbs[i]->transfer_buffer = sg_virt(&sg[i]);
index fb9d8d0b2c0452250b85c63b9aa23b0024f8e60f..cc4b60f899ca7209eff8e352a5e3f4dbeda62f2e 100644 (file)
@@ -1509,7 +1509,7 @@ config FB_VOODOO1
 
          WARNING: Do not use any application that uses the 3D engine
          (namely glide) while using this driver.
-         Please read the <file:Documentation/fb/README-sstfb.txt> for supported
+         Please read the <file:Documentation/fb/sstfb.txt> for supported
          options and other important info  support.
 
 config FB_VT8623
@@ -1807,7 +1807,7 @@ config FB_SM501
          This driver is also available as a module ( = code which can be
          inserted and removed from the running kernel whenever you want). The
          module will be called sm501fb. If you want to compile it as a module,
-         say M here and read <file:Documentation/modules.txt>.
+         say M here and read <file:Documentation/kbuild/modules.txt>.
 
          If unsure, say N.
 
@@ -1892,9 +1892,7 @@ config FB_VIRTUAL
 
          If unsure, say N.
 
-if ARCH_OMAP
-       source "drivers/video/omap/Kconfig"
-endif
+source "drivers/video/omap/Kconfig"
 
 source "drivers/video/backlight/Kconfig"
 source "drivers/video/display/Kconfig"
index be1d57bf9dc8f82c7c9f6b4ea62b35bdf6d43be7..83ee3e75386cf7a4d1676a60d30b3f621d580989 100644 (file)
@@ -27,8 +27,6 @@
 
 #include "ati_ids.h"
 
-static void radeon_reinitialize_M10(struct radeonfb_info *rinfo);
-
 /*
  * Workarounds for bugs in PC laptops:
  * - enable D2 sleep in some IBM Thinkpads
@@ -39,6 +37,8 @@ static void radeon_reinitialize_M10(struct radeonfb_info *rinfo);
  */
 
 #if defined(CONFIG_PM) && defined(CONFIG_X86)
+static void radeon_reinitialize_M10(struct radeonfb_info *rinfo);
+
 struct radeon_device_id {
         const char *ident;                     /* (arbitrary) Name */
         const unsigned short subsystem_vendor; /* Subsystem Vendor ID */
index f4fcf11b290d0ddaf3a4f8653a8c95482fb269a8..44408850e2ebc2d0047e1bae7d7a82a5d735e135 100644 (file)
@@ -1,6 +1,6 @@
 config FB_OMAP
        tristate "OMAP frame buffer support (EXPERIMENTAL)"
-       depends on FB
+       depends on FB && ARCH_OMAP
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT
index 6854fd6b9714a2a03752f70becce39d4780f6147..9adbb4f904799c0d0c73a2fe80e7bc2c6da3b643 100644 (file)
@@ -17,7 +17,8 @@ config W1_CON
        bool "Userspace communication over connector"
        default y
        --- help ---
-         This allows to communicate with userspace using connector [Documentation/connector].
+         This allows to communicate with userspace using connector. For more
+         information see <file:Documentation/connector/connector.txt>.
          There are three types of messages between w1 core and userspace:
          1. Events. They are generated each time new master or slave device found
                either due to automatic or requested search.
index 81db48f07ca14923a380c284066d076d7cf3bcc2..2792bc1a726991b7b3dbf0046ad1e2d2dd6b313b 100644 (file)
@@ -15,8 +15,8 @@ menuconfig WATCHDOG
          implementation entirely in software (which can sometimes fail to
          reboot the machine) and a driver for hardware watchdog boards, which
          are more robust and can also keep track of the temperature inside
-         your computer. For details, read <file:Documentation/watchdog/watchdog.txt>
-         in the kernel source.
+         your computer. For details, read
+         <file:Documentation/watchdog/watchdog-api.txt> in the kernel source.
 
          The watchdog is usually used together with the watchdog daemon
          which is available from
index c404fc69e7e6134fadb1241114ba1a65e72f8e98..b481cc0e32e40e225bc95931b981e7370a150e64 100644 (file)
@@ -31,7 +31,7 @@ static unsigned long ali_is_open;
 static char ali_expect_release;
 static struct pci_dev *ali_pci;
 static u32 ali_timeout_bits;   /* stores the computed timeout */
-static spinlock_t ali_lock;    /* Guards the hardware */
+static DEFINE_SPINLOCK(ali_lock);      /* Guards the hardware */
 
 /* module parameters */
 static int timeout = WATCHDOG_TIMEOUT;
@@ -398,8 +398,6 @@ static int __init watchdog_init(void)
 {
        int ret;
 
-       spin_lock_init(&ali_lock);
-
        /* Check whether or not the hardware watchdog is there */
        if (ali_find_watchdog() != 0) {
                return -ENODEV;
index 19db5302ba6efffa7fde8b3077361d514fc9ecdd..a61cbd48dc07d4a7ba23358cafd61b078cb62fc0 100644 (file)
@@ -61,7 +61,7 @@
 
 static int heartbeat = DEFAULT_HEARTBEAT;
 
-static spinlock_t io_lock;
+static DEFINE_SPINLOCK(io_lock);
 static unsigned long wdt_status;
 #define WDT_IN_USE        0
 #define WDT_OK_TO_CLOSE   1
@@ -200,8 +200,6 @@ static int davinci_wdt_probe(struct platform_device *pdev)
        int ret = 0, size;
        struct resource *res;
 
-       spin_lock_init(&io_lock);
-
        if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT)
                heartbeat = DEFAULT_HEARTBEAT;
 
@@ -262,7 +260,7 @@ static int __init davinci_wdt_init(void)
 
 static void __exit davinci_wdt_exit(void)
 {
-       return platform_driver_unregister(&platform_wdt_driver);
+       platform_driver_unregister(&platform_wdt_driver);
 }
 
 module_init(davinci_wdt_init);
index f236954d2536c0222efa600c7524527625c7e2dd..ca44fd9b19bb80860dfef6008d4734c669a39f72 100644 (file)
@@ -77,7 +77,7 @@
 
 /* internal variables */
 static void __iomem *BASEADDR;
-static spinlock_t esb_lock; /* Guards the hardware */
+static DEFINE_SPINLOCK(esb_lock); /* Guards the hardware */
 static unsigned long timer_alive;
 static struct pci_dev *esb_pci;
 static unsigned short triggered; /* The status of the watchdog upon boot */
@@ -456,8 +456,6 @@ static int __init watchdog_init (void)
 {
         int ret;
 
-        spin_lock_init(&esb_lock);
-
         /* Check whether or not the hardware watchdog is there */
         if (!esb_getdevice () || esb_pci == NULL)
                 return -ENODEV;
index cd5a565bc3a0abd3beb585e1dce0b97b98a5a18e..a0e6809e369ff997f3cdb03b92c98394c3d81d8a 100644 (file)
  *     82801GDH (ICH7DH)    : document number 307013-002, 307014-009,
  *     82801GBM (ICH7-M)    : document number 307013-002, 307014-009,
  *     82801GHM (ICH7-M DH) : document number 307013-002, 307014-009,
- *     82801HB  (ICH8)      : document number 313056-002, 313057-004,
- *     82801HR  (ICH8R)     : document number 313056-002, 313057-004,
- *     82801HH  (ICH8DH)    : document number 313056-002, 313057-004,
- *     82801HO  (ICH8DO)    : document number 313056-002, 313057-004,
+ *     82801HB  (ICH8)      : document number 313056-003, 313057-009,
+ *     82801HR  (ICH8R)     : document number 313056-003, 313057-009,
+ *     82801HBM (ICH8M)     : document number 313056-003, 313057-009,
+ *     82801HH  (ICH8DH)    : document number 313056-003, 313057-009,
+ *     82801HO  (ICH8DO)    : document number 313056-003, 313057-009,
+ *     82801HEM (ICH8M-E)   : document number 313056-003, 313057-009,
  *     82801IB  (ICH9)      : document number 316972-001, 316973-001,
  *     82801IR  (ICH9R)     : document number 316972-001, 316973-001,
  *     82801IH  (ICH9DH)    : document number 316972-001, 316973-001,
@@ -95,8 +97,10 @@ enum iTCO_chipsets {
        TCO_ICH7M,      /* ICH7-M */
        TCO_ICH7MDH,    /* ICH7-M DH */
        TCO_ICH8,       /* ICH8 & ICH8R */
+       TCO_ICH8ME,     /* ICH8M-E */
        TCO_ICH8DH,     /* ICH8DH */
        TCO_ICH8DO,     /* ICH8DO */
+       TCO_ICH8M,      /* ICH8M */
        TCO_ICH9,       /* ICH9 */
        TCO_ICH9R,      /* ICH9R */
        TCO_ICH9DH,     /* ICH9DH */
@@ -125,8 +129,10 @@ static struct {
        {"ICH7-M", 2},
        {"ICH7-M DH", 2},
        {"ICH8 or ICH8R", 2},
+       {"ICH8M-E", 2},
        {"ICH8DH", 2},
        {"ICH8DO", 2},
+       {"ICH8M", 2},
        {"ICH9", 2},
        {"ICH9R", 2},
        {"ICH9DH", 2},
@@ -134,6 +140,15 @@ static struct {
        {NULL,0}
 };
 
+#define ITCO_PCI_DEVICE(dev, data)     \
+       .vendor = PCI_VENDOR_ID_INTEL,  \
+       .device = dev,                  \
+       .subvendor = PCI_ANY_ID,        \
+       .subdevice = PCI_ANY_ID,        \
+       .class = 0,                     \
+       .class_mask = 0,                \
+       .driver_data = data
+
 /*
  * This data only exists for exporting the supported PCI ids
  * via MODULE_DEVICE_TABLE.  We do not actually register a
@@ -141,45 +156,47 @@ static struct {
  * functions that probably will be registered by other drivers.
  */
 static struct pci_device_id iTCO_wdt_pci_tbl[] = {
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0,   PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH     },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_0,   PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH0    },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0,   PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH2    },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_10,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH2M   },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0,   PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH3    },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH3M   },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0,   PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH4    },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH4M   },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801E_0,    PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_CICH    },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0,   PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH5    },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_1,       PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_6300ESB },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0,      PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH6    },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1,      PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH6M   },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_2,      PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH6W   },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0,      PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH7    },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_1,      PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH7M   },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_31,     PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH7MDH },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_0,      PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH8    },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_2,      PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH8DH  },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_3,      PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH8DO  },
-       { PCI_VENDOR_ID_INTEL, 0x2918,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH9    },
-       { PCI_VENDOR_ID_INTEL, 0x2916,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH9R    },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_2,      PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_ICH9DH    },
-       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_0,      PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB },
-       { PCI_VENDOR_ID_INTEL, 0x2671,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB },
-       { PCI_VENDOR_ID_INTEL, 0x2672,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB },
-       { PCI_VENDOR_ID_INTEL, 0x2673,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB },
-       { PCI_VENDOR_ID_INTEL, 0x2674,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB },
-       { PCI_VENDOR_ID_INTEL, 0x2675,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB },
-       { PCI_VENDOR_ID_INTEL, 0x2676,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB },
-       { PCI_VENDOR_ID_INTEL, 0x2677,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB },
-       { PCI_VENDOR_ID_INTEL, 0x2678,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB },
-       { PCI_VENDOR_ID_INTEL, 0x2679,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB },
-       { PCI_VENDOR_ID_INTEL, 0x267a,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB },
-       { PCI_VENDOR_ID_INTEL, 0x267b,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB },
-       { PCI_VENDOR_ID_INTEL, 0x267c,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB },
-       { PCI_VENDOR_ID_INTEL, 0x267d,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB },
-       { PCI_VENDOR_ID_INTEL, 0x267e,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB },
-       { PCI_VENDOR_ID_INTEL, 0x267f,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, TCO_631XESB },
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801AA_0,        TCO_ICH    )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801AB_0,        TCO_ICH0   )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801BA_0,        TCO_ICH2   )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801BA_10,       TCO_ICH2M  )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801CA_0,        TCO_ICH3   )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801CA_12,       TCO_ICH3M  )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801DB_0,        TCO_ICH4   )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801DB_12,       TCO_ICH4M  )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801E_0,         TCO_CICH   )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_82801EB_0,        TCO_ICH5   )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ESB_1,            TCO_6300ESB)},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH6_0,           TCO_ICH6   )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH6_1,           TCO_ICH6M  )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH6_2,           TCO_ICH6W  )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_0,           TCO_ICH7   )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_1,           TCO_ICH7M  )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH7_31,          TCO_ICH7MDH)},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_0,           TCO_ICH8   )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_1,           TCO_ICH8ME )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_2,           TCO_ICH8DH )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_3,           TCO_ICH8DO )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH8_4,           TCO_ICH8M  )},
+       { ITCO_PCI_DEVICE(0x2918,                               TCO_ICH9   )},
+       { ITCO_PCI_DEVICE(0x2916,                               TCO_ICH9R  )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ICH9_2,           TCO_ICH9DH )},
+       { ITCO_PCI_DEVICE(PCI_DEVICE_ID_INTEL_ESB2_0,           TCO_631XESB)},
+       { ITCO_PCI_DEVICE(0x2671,                               TCO_631XESB)},
+       { ITCO_PCI_DEVICE(0x2672,                               TCO_631XESB)},
+       { ITCO_PCI_DEVICE(0x2673,                               TCO_631XESB)},
+       { ITCO_PCI_DEVICE(0x2674,                               TCO_631XESB)},
+       { ITCO_PCI_DEVICE(0x2675,                               TCO_631XESB)},
+       { ITCO_PCI_DEVICE(0x2676,                               TCO_631XESB)},
+       { ITCO_PCI_DEVICE(0x2677,                               TCO_631XESB)},
+       { ITCO_PCI_DEVICE(0x2678,                               TCO_631XESB)},
+       { ITCO_PCI_DEVICE(0x2679,                               TCO_631XESB)},
+       { ITCO_PCI_DEVICE(0x267a,                               TCO_631XESB)},
+       { ITCO_PCI_DEVICE(0x267b,                               TCO_631XESB)},
+       { ITCO_PCI_DEVICE(0x267c,                               TCO_631XESB)},
+       { ITCO_PCI_DEVICE(0x267d,                               TCO_631XESB)},
+       { ITCO_PCI_DEVICE(0x267e,                               TCO_631XESB)},
+       { ITCO_PCI_DEVICE(0x267f,                               TCO_631XESB)},
        { 0, },                 /* End of list */
 };
 MODULE_DEVICE_TABLE (pci, iTCO_wdt_pci_tbl);
@@ -300,6 +317,7 @@ static int iTCO_wdt_start(void)
 
        /* disable chipset's NO_REBOOT bit */
        if (iTCO_wdt_unset_NO_REBOOT_bit()) {
+               spin_unlock(&iTCO_wdt_private.io_lock);
                printk(KERN_ERR PFX "failed to reset NO_REBOOT flag, reboot disabled by hardware\n");
                return -EIO;
        }
@@ -590,7 +608,7 @@ static struct miscdevice iTCO_wdt_miscdev = {
  *     Init & exit routines
  */
 
-static int iTCO_wdt_init(struct pci_dev *pdev, const struct pci_device_id *ent, struct platform_device *dev)
+static int __devinit iTCO_wdt_init(struct pci_dev *pdev, const struct pci_device_id *ent, struct platform_device *dev)
 {
        int ret;
        u32 base_address;
@@ -694,7 +712,7 @@ out:
        return ret;
 }
 
-static void iTCO_wdt_cleanup(void)
+static void __devexit iTCO_wdt_cleanup(void)
 {
        /* Stop the timer before we leave */
        if (!nowayout)
@@ -709,7 +727,7 @@ static void iTCO_wdt_cleanup(void)
        iTCO_wdt_private.ACPIBASE = 0;
 }
 
-static int iTCO_wdt_probe(struct platform_device *dev)
+static int __devinit iTCO_wdt_probe(struct platform_device *dev)
 {
        int found = 0;
        struct pci_dev *pdev = NULL;
@@ -735,7 +753,7 @@ static int iTCO_wdt_probe(struct platform_device *dev)
        return 0;
 }
 
-static int iTCO_wdt_remove(struct platform_device *dev)
+static int __devexit iTCO_wdt_remove(struct platform_device *dev)
 {
        if (iTCO_wdt_private.ACPIBASE)
                iTCO_wdt_cleanup();
@@ -753,7 +771,7 @@ static void iTCO_wdt_shutdown(struct platform_device *dev)
 
 static struct platform_driver iTCO_wdt_driver = {
        .probe          = iTCO_wdt_probe,
-       .remove         = iTCO_wdt_remove,
+       .remove         = __devexit_p(iTCO_wdt_remove),
        .shutdown       = iTCO_wdt_shutdown,
        .suspend        = iTCO_wdt_suspend,
        .resume         = iTCO_wdt_resume,
index c3a60f52ccb97d26931e66ea29384ef43a80c464..4b89f401691a6358e599c38954e9389a5c5a93c8 100644 (file)
@@ -48,7 +48,7 @@
 
 static struct platform_device *ibwdt_platform_device;
 static unsigned long ibwdt_is_open;
-static spinlock_t ibwdt_lock;
+static DEFINE_SPINLOCK(ibwdt_lock);
 static char expect_close;
 
 /* Module information */
@@ -308,8 +308,6 @@ static int __devinit ibwdt_probe(struct platform_device *dev)
 {
        int res;
 
-       spin_lock_init(&ibwdt_lock);
-
 #if WDT_START != WDT_STOP
        if (!request_region(WDT_STOP, 1, "IB700 WDT")) {
                printk (KERN_ERR PFX "STOP method I/O %X is not available.\n", WDT_STOP);
index 6d35bb112a5fc6a2507680f10153dd992fe6688e..e6e07b4575ebee7e031e64e4bc82def7a95157f6 100644 (file)
@@ -123,8 +123,8 @@ static void zf_ping(unsigned long data);
 static int zf_action = GEN_RESET;
 static unsigned long zf_is_open;
 static char zf_expect_close;
-static spinlock_t zf_lock;
-static spinlock_t zf_port_lock;
+static DEFINE_SPINLOCK(zf_lock);
+static DEFINE_SPINLOCK(zf_port_lock);
 static DEFINE_TIMER(zf_timer, zf_ping, 0, 0);
 static unsigned long next_heartbeat = 0;
 
@@ -438,9 +438,6 @@ static int __init zf_init(void)
 
        zf_show_action(action);
 
-       spin_lock_init(&zf_lock);
-       spin_lock_init(&zf_port_lock);
-
        if(!request_region(ZF_IOBASE, 3, "MachZ ZFL WDT")){
                printk(KERN_ERR "cannot reserve I/O ports at %d\n",
                                                        ZF_IOBASE);
index a0bf95fb976374099a7b1e27c0d3979f73841f74..6369f569517f1fd72fb7efdb0bd067224de60b2a 100644 (file)
@@ -56,7 +56,7 @@ static int prescale = 1;
 static unsigned int timeout_sec;
 
 static unsigned long wdt_is_open;
-static spinlock_t wdt_spinlock;
+static DEFINE_SPINLOCK(wdt_spinlock);
 
 static void mpc83xx_wdt_keepalive(void)
 {
@@ -185,9 +185,6 @@ static int __devinit mpc83xx_wdt_probe(struct platform_device *dev)
        printk(KERN_INFO "WDT driver for MPC83xx initialized. "
                "mode:%s timeout=%d (%d seconds)\n",
                reset ? "reset":"interrupt", timeout, timeout_sec);
-
-       spin_lock_init(&wdt_spinlock);
-
        return 0;
 
 err_unmap:
index 3d3deae0d64ba0668f28fb275a082531a7e62e1c..15e4f8887a9ee36b8c75afd37e0bb680f07f897e 100644 (file)
@@ -61,7 +61,7 @@ static unsigned long timer_enabled = 0;  /* is the timer enabled? */
 
 static char expect_close;                /* is the close expected? */
 
-static spinlock_t io_lock;               /* to guard the watchdog from io races */
+static DEFINE_SPINLOCK(io_lock);/* to guard the watchdog from io races */
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 
@@ -561,8 +561,6 @@ static int __init pc87413_init(void)
 {
        int ret;
 
-       spin_lock_init(&io_lock);
-
        printk(KERN_INFO PFX "Version " VERSION " at io 0x%X\n", WDT_INDEX_IO_PORT);
 
        /* request_region(io, 2, "pc87413"); */
index 22f8873dd092e72f5e25140eea95146ed817f4f1..b04aa096a10a491a739d12eab9bda3e7a763c31a 100644 (file)
@@ -80,7 +80,7 @@
 static int nowayout = WATCHDOG_NOWAYOUT;
 static int heartbeat = DEFAULT_HEARTBEAT;
 
-static spinlock_t io_lock;
+static DEFINE_SPINLOCK(io_lock);
 static unsigned long wdt_status;
 #define WDT_IN_USE        0
 #define WDT_OK_TO_CLOSE   1
@@ -254,8 +254,6 @@ static int pnx4008_wdt_probe(struct platform_device *pdev)
        int ret = 0, size;
        struct resource *res;
 
-       spin_lock_init(&io_lock);
-
        if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT)
                heartbeat = DEFAULT_HEARTBEAT;
 
@@ -335,7 +333,7 @@ static int __init pnx4008_wdt_init(void)
 
 static void __exit pnx4008_wdt_exit(void)
 {
-       return platform_driver_unregister(&platform_wdt_driver);
+       platform_driver_unregister(&platform_wdt_driver);
 }
 
 module_init(pnx4008_wdt_init);
index 285d85289532da3aadab9c7b0f1e73373fee1d84..2ee2677f3648168daef037c94777de02375ba4b3 100644 (file)
@@ -54,7 +54,7 @@
 #include <asm/system.h>
 
 static unsigned long sbc8360_is_open;
-static spinlock_t sbc8360_lock;
+static DEFINE_SPINLOCK(sbc8360_lock);
 static char expect_close;
 
 #define PFX "sbc8360: "
@@ -359,7 +359,6 @@ static int __init sbc8360_init(void)
                goto out_noreboot;
        }
 
-       spin_lock_init(&sbc8360_lock);
        res = misc_register(&sbc8360_miscdev);
        if (res) {
                printk(KERN_ERR PFX "failed to register misc device\n");
index 9670d47190d0875a41a23b81d0dc568ab3e0cb4e..32ccd7c89c7dae5a38e94d3533d0e3fbcce8de46 100644 (file)
@@ -74,7 +74,7 @@ static int io = -1;
 static int io_len = 2;         /* for non plug and play */
 static struct semaphore open_sem;
 static char expect_close;
-static spinlock_t sc1200wdt_lock;      /* io port access serialisation */
+static DEFINE_SPINLOCK(sc1200wdt_lock);        /* io port access serialisation */
 
 #if defined CONFIG_PNP
 static int isapnp = 1;
@@ -375,7 +375,6 @@ static int __init sc1200wdt_init(void)
 
        printk("%s\n", banner);
 
-       spin_lock_init(&sc1200wdt_lock);
        sema_init(&open_sem, 1);
 
 #if defined CONFIG_PNP
index e8594c64d1e64fd9a07606ba75878007ab523578..2847324a2be2ec22f5fab63dec124d185266d671 100644 (file)
@@ -125,7 +125,7 @@ static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0);
 static unsigned long next_heartbeat;
 static unsigned long wdt_is_open;
 static char wdt_expect_close;
-static spinlock_t wdt_spinlock;
+static DEFINE_SPINLOCK(wdt_spinlock);
 
 /*
  *     Whack the dog
@@ -383,8 +383,6 @@ static int __init sc520_wdt_init(void)
 {
        int rc = -EBUSY;
 
-       spin_lock_init(&wdt_spinlock);
-
        /* Check that the timeout value is within it's range ; if not reset to the default */
        if (wdt_set_heartbeat(timeout)) {
                wdt_set_heartbeat(WATCHDOG_TIMEOUT);
index d3cb0a76602036a679e5f242ecaffb026bc93f51..5d2b5ba61414664c452729361d159f6a7d639400 100644 (file)
@@ -83,7 +83,7 @@ static unsigned long timer_enabled = 0;   /* is the timer enabled? */
 
 static char expect_close;       /* is the close expected? */
 
-static spinlock_t io_lock;     /* to guard the watchdog from io races */
+static DEFINE_SPINLOCK(io_lock);/* to guard the watchdog from io races */
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 
@@ -540,8 +540,6 @@ static int __init wb_smsc_wdt_init(void)
 {
        int ret;
 
-       spin_lock_init(&io_lock);
-
        printk("SMsC 37B787 watchdog component driver " VERSION " initialising...\n");
 
        if (!request_region(IOPORT, IOPORT_SIZE, "SMsC 37B787 watchdog")) {
index df33b3b5a53c34540509c50b3734fef54795aa3d..386492821fc20e91667bebfb98a9a81001938a1d 100644 (file)
@@ -48,7 +48,7 @@
 
 static unsigned long wdt_is_open;
 static char expect_close;
-static spinlock_t io_lock;
+static DEFINE_SPINLOCK(io_lock);
 
 /* You must set this - there is no sane way to probe for this board. */
 static int wdt_io = 0x2E;
@@ -328,8 +328,6 @@ wdt_init(void)
 {
        int ret;
 
-       spin_lock_init(&io_lock);
-
        printk(KERN_INFO "WDT driver for the Winbond(TM) W83627HF/THF/HG Super I/O chip initialising.\n");
 
        if (wdt_set_heartbeat(timeout)) {
index 51826c216d6d0c22451db409841e00864e00fd3d..c622a0e6c9aed57137b59ab0d1af4aabffefe1dc 100644 (file)
@@ -47,7 +47,7 @@
 
 static unsigned long wdt_is_open;
 static char expect_close;
-static spinlock_t io_lock;
+static DEFINE_SPINLOCK(io_lock);
 
 /* You must set this - there is no sane way to probe for this board. */
 static int wdt_io = 0x2e;
@@ -376,8 +376,6 @@ wdt_init(void)
 {
        int ret, i, found = 0;
 
-       spin_lock_init(&io_lock);
-
        printk (KERN_INFO PFX "WDT driver for W83697HF/HG initializing\n");
 
        if (wdt_io == 0) {
index 3c88fe18f4f437e01e88264e340ddea12fe0d207..bcc9d48955def46f1ad2a38a07ab53fbc99f9268 100644 (file)
@@ -94,7 +94,7 @@ static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0);
 static unsigned long next_heartbeat;
 static unsigned long wdt_is_open;
 static char wdt_expect_close;
-static spinlock_t wdt_spinlock;
+static DEFINE_SPINLOCK(wdt_spinlock);
 
 /*
  *     Whack the dog
@@ -350,8 +350,6 @@ static int __init w83877f_wdt_init(void)
 {
        int rc = -EBUSY;
 
-       spin_lock_init(&wdt_spinlock);
-
        if(timeout < 1 || timeout > 3600) /* arbitrary upper limit */
        {
                timeout = WATCHDOG_TIMEOUT;
index 15796844289121d9ed3bc2833a6cd6eecb2c9b81..b475529d2475954bee8cd8b79b1a4a8033277d0e 100644 (file)
@@ -50,7 +50,7 @@ static        int timeoutW;                   /* timeout in watchdog counter units */
 static unsigned long timer_alive;
 static int testmode;
 static char expect_close;
-static spinlock_t spinlock;
+static DEFINE_SPINLOCK(spinlock);
 
 module_param(timeout, int, 0);
 MODULE_PARM_DESC(timeout,"Watchdog timeout in seconds (15..7635), default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")");
@@ -476,8 +476,6 @@ static int __init w83977f_wdt_init(void)
 
         printk(KERN_INFO PFX DRIVER_VERSION);
 
-       spin_lock_init(&spinlock);
-
        /*
         * Check that the timeout value is within it's range ; 
         * if not reset to the default
index 950905d3c39f298ae00b1094b17ddec60231d331..9e368091f7998254899bc5fb5505d597a3e96821 100644 (file)
@@ -45,7 +45,7 @@
 
 static unsigned long wafwdt_is_open;
 static char expect_close;
-static spinlock_t wafwdt_lock;
+static DEFINE_SPINLOCK(wafwdt_lock);
 
 /*
  *     You must set these - there is no sane way to probe for this board.
@@ -252,8 +252,6 @@ static int __init wafwdt_init(void)
 
        printk(KERN_INFO "WDT driver for Wafer 5823 single board computer initialising.\n");
 
-       spin_lock_init(&wafwdt_lock);
-
        if (timeout < 1 || timeout > 255) {
                timeout = WD_TIMO;
                printk (KERN_INFO PFX "timeout value must be 1<=x<=255, using %d\n",
index 0a3de6a024420b52369b00f19a55ba3844a8b12e..53d0bb410df8c6811db704e91340ddc134b775d1 100644 (file)
@@ -253,7 +253,7 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id)
                        printk(KERN_CRIT "Possible fan fault.\n");
        }
 #endif /* CONFIG_WDT_501 */
-       if (!(status & WDC_SR_WCCR))
+       if (!(status & WDC_SR_WCCR)) {
 #ifdef SOFTWARE_REBOOT
 #ifdef ONLY_TESTING
                printk(KERN_CRIT "Would Reboot.\n");
@@ -264,6 +264,7 @@ static irqreturn_t wdt_interrupt(int irq, void *dev_id)
 #else
                printk(KERN_CRIT "Reset in 5ms.\n");
 #endif
+       }
        return IRQ_HANDLED;
 }
 
index 7d300ff7ab07ed65df9ce6e8006a449c01dd4600..9b7f6b6edef6df0f75212960dac4696d9cfa68ae 100644 (file)
@@ -59,7 +59,7 @@ static        int timeoutM;                           /* timeout in minutes */
 static unsigned long timer_alive;
 static int testmode;
 static char expect_close;
-static spinlock_t spinlock;
+static DEFINE_SPINLOCK(spinlock);
 
 module_param(timeout, int, 0);
 MODULE_PARM_DESC(timeout,"Watchdog timeout in seconds (60..15300), default=" __MODULE_STRING(DEFAULT_TIMEOUT) ")");
@@ -448,8 +448,6 @@ static int __init wd977_init(void)
 
        printk(KERN_INFO PFX DRIVER_VERSION);
 
-       spin_lock_init(&spinlock);
-
        /* Check that the timeout value is within it's range ; if not reset to the default */
        if (wdt977_set_timeout(timeout))
        {
index 6baf4ae42c9d0e831cfa87e4470c72a7b2b15a4d..1355608683e40e8c124c140981d66727a0fb4300 100644 (file)
@@ -74,7 +74,7 @@
 static int dev_count;
 
 static struct semaphore open_sem;
-static spinlock_t wdtpci_lock;
+static DEFINE_SPINLOCK(wdtpci_lock);
 static char expect_close;
 
 static int io;
@@ -298,7 +298,7 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id)
                        printk(KERN_CRIT PFX "Possible fan fault.\n");
        }
 #endif /* CONFIG_WDT_501_PCI */
-       if (!(status&WDC_SR_WCCR))
+       if (!(status&WDC_SR_WCCR)) {
 #ifdef SOFTWARE_REBOOT
 #ifdef ONLY_TESTING
                printk(KERN_CRIT PFX "Would Reboot.\n");
@@ -309,6 +309,7 @@ static irqreturn_t wdtpci_interrupt(int irq, void *dev_id)
 #else
                printk(KERN_CRIT PFX "Reset in 5ms.\n");
 #endif
+       }
        return IRQ_HANDLED;
 }
 
@@ -606,7 +607,6 @@ static int __devinit wdtpci_init_one (struct pci_dev *dev,
        }
 
        sema_init(&open_sem, 1);
-       spin_lock_init(&wdtpci_lock);
 
        irq = dev->irq;
        io = pci_resource_start (dev, 2);
index cc28a69246a7dc8536de2e9c85bb256ad8bbb8e7..c75c95406497f5173e449f3571fda8db8daef360 100644 (file)
@@ -504,7 +504,7 @@ config INOTIFY
          including multiple file events, one-shot support, and unmount
          notification.
 
-         For more information, see Documentation/filesystems/inotify.txt
+         For more information, see <file:Documentation/filesystems/inotify.txt>
 
          If unsure, say Y.
 
@@ -518,7 +518,7 @@ config INOTIFY_USER
          directories via a single open fd.  Events are read from the file
          descriptor, which is also select()- and poll()-able.
 
-         For more information, see Documentation/filesystems/inotify.txt
+         For more information, see <file:Documentation/filesystems/inotify.txt>
 
          If unsure, say Y.
 
@@ -1089,7 +1089,7 @@ config ECRYPT_FS
        depends on EXPERIMENTAL && KEYS && CRYPTO && NET
        help
          Encrypted filesystem that operates on the VFS layer.  See
-         <file:Documentation/ecryptfs.txt> to learn more about
+         <file:Documentation/filesystems/ecryptfs.txt> to learn more about
          eCryptfs.  Userspace components are required and can be
          obtained from <http://ecryptfs.sf.net>.
 
index a4284ccac1f98a41becf824a638819222e1b5ae0..bd26e4cbb994f810b0ce8dc8ce3780356e0f66fa 100644 (file)
@@ -322,7 +322,7 @@ static int dev_ifname32(unsigned int fd, unsigned int cmd, unsigned long arg)
        int err;
 
        uifr = compat_alloc_user_space(sizeof(struct ifreq));
-       if (copy_in_user(uifr, compat_ptr(arg), sizeof(struct ifreq32)));
+       if (copy_in_user(uifr, compat_ptr(arg), sizeof(struct ifreq32)))
                return -EFAULT;
 
        err = sys_ioctl(fd, SIOCGIFNAME, (unsigned long)uifr);
index 0127a2846819148df5b9a8722118e11ed60e253b..8b8388eca05e88bde827d97bc71193247c190e86 100644 (file)
@@ -696,17 +696,28 @@ EXPORT_SYMBOL(posix_test_lock);
  * Note: the above assumption may not be true when handling lock requests
  * from a broken NFS client. But broken NFS clients have a lot more to
  * worry about than proper deadlock detection anyway... --okir
+ *
+ * However, the failure of this assumption (also possible in the case of
+ * multiple tasks sharing the same open file table) also means there's no
+ * guarantee that the loop below will terminate.  As a hack, we give up
+ * after a few iterations.
  */
+
+#define MAX_DEADLK_ITERATIONS 10
+
 static int posix_locks_deadlock(struct file_lock *caller_fl,
                                struct file_lock *block_fl)
 {
        struct file_lock *fl;
+       int i = 0;
 
 next_task:
        if (posix_same_owner(caller_fl, block_fl))
                return 1;
        list_for_each_entry(fl, &blocked_list, fl_link) {
                if (posix_same_owner(fl, block_fl)) {
+                       if (i++ > MAX_DEADLK_ITERATIONS)
+                               return 0;
                        fl = fl->fl_next;
                        block_fl = fl;
                        goto next_task;
index cfdc7900d2710f70bee9aa7d591d8b8fb4c85c31..ad87cb01299b6d8febb7ae670fddb36ce33cc666 100644 (file)
@@ -405,6 +405,15 @@ static int ntfs_readpage(struct file *file, struct page *page)
 
 retry_readpage:
        BUG_ON(!PageLocked(page));
+       vi = page->mapping->host;
+       i_size = i_size_read(vi);
+       /* Is the page fully outside i_size? (truncate in progress) */
+       if (unlikely(page->index >= (i_size + PAGE_CACHE_SIZE - 1) >>
+                       PAGE_CACHE_SHIFT)) {
+               zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
+               ntfs_debug("Read outside i_size - truncated?");
+               goto done;
+       }
        /*
         * This can potentially happen because we clear PageUptodate() during
         * ntfs_writepage() of MstProtected() attributes.
@@ -413,7 +422,6 @@ retry_readpage:
                unlock_page(page);
                return 0;
        }
-       vi = page->mapping->host;
        ni = NTFS_I(vi);
        /*
         * Only $DATA attributes can be encrypted and only unnamed $DATA
index 92dabdcf2b80b2c0d8f1f5832e9eb0043be391d3..50d3b0c258e37cd0413568aef6d4216086a6bb02 100644 (file)
@@ -179,10 +179,7 @@ int ntfs_map_runlist_nolock(ntfs_inode *ni, VCN vcn, ntfs_attr_search_ctx *ctx)
         * ntfs_mapping_pairs_decompress() fails.
         */
        end_vcn = sle64_to_cpu(a->data.non_resident.highest_vcn) + 1;
-       if (!a->data.non_resident.lowest_vcn && end_vcn == 1)
-               end_vcn = sle64_to_cpu(a->data.non_resident.allocated_size) >>
-                               ni->vol->cluster_size_bits;
-       if (unlikely(vcn >= end_vcn)) {
+       if (unlikely(vcn && vcn >= end_vcn)) {
                err = -ENOENT;
                goto err_out;
        }
index d98daf59e0b64ac91bf3c950594ba6685e6ca737..d1619d05eb23bce83bea2d9f005e663625fa1f2e 100644 (file)
@@ -561,6 +561,16 @@ int ntfs_read_compressed_block(struct page *page)
        read_unlock_irqrestore(&ni->size_lock, flags);
        max_page = ((i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT) -
                        offset;
+       /* Is the page fully outside i_size? (truncate in progress) */
+       if (xpage >= max_page) {
+               kfree(bhs);
+               kfree(pages);
+               zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
+               ntfs_debug("Compressed read outside i_size - truncated?");
+               SetPageUptodate(page);
+               unlock_page(page);
+               return 0;
+       }
        if (nr_pages < max_page)
                max_page = nr_pages;
        for (i = 0; i < max_page; i++, offset++) {
index d80baaabf835e1c98911004035518bf5df7dc51d..eba339ecba27b58e3a39d58d54062d1bdbe3a48f 100644 (file)
@@ -374,7 +374,8 @@ static cputime_t task_stime(struct task_struct *p)
        stime = nsec_to_clock_t(p->se.sum_exec_runtime) -
                        cputime_to_clock_t(task_utime(p));
 
-       return clock_t_to_cputime(stime);
+       p->prev_stime = max(p->prev_stime, clock_t_to_cputime(stime));
+       return p->prev_stime;
 }
 #endif
 
index 7a8ce9e98b32d9aeb2128f177173c64c5181a941..337162935d2173964538a190b7ed6e8433823f35 100644 (file)
@@ -132,7 +132,7 @@ struct dentry *sysfs_get_dentry(struct sysfs_dirent *sd)
  *     RETURNS:
  *     Pointer to @sd on success, NULL on failure.
  */
-struct sysfs_dirent *sysfs_get_active(struct sysfs_dirent *sd)
+static struct sysfs_dirent *sysfs_get_active(struct sysfs_dirent *sd)
 {
        if (unlikely(!sd))
                return NULL;
@@ -161,7 +161,7 @@ struct sysfs_dirent *sysfs_get_active(struct sysfs_dirent *sd)
  *     Put an active reference to @sd.  This function is noop if @sd
  *     is NULL.
  */
-void sysfs_put_active(struct sysfs_dirent *sd)
+static void sysfs_put_active(struct sysfs_dirent *sd)
 {
        struct completion *cmpl;
        int v;
index f8417988f6b0d99262a3b1515104a549ee392a0c..ff17f8da9b43f5d47ec69a80021e51aa04ffed8b 100644 (file)
@@ -103,8 +103,6 @@ extern const struct file_operations sysfs_dir_operations;
 extern const struct inode_operations sysfs_dir_inode_operations;
 
 struct dentry *sysfs_get_dentry(struct sysfs_dirent *sd);
-struct sysfs_dirent *sysfs_get_active(struct sysfs_dirent *sd);
-void sysfs_put_active(struct sysfs_dirent *sd);
 struct sysfs_dirent *sysfs_get_active_two(struct sysfs_dirent *sd);
 void sysfs_put_active_two(struct sysfs_dirent *sd);
 void sysfs_addrm_start(struct sysfs_addrm_cxt *acxt,
index 584cf12cc40fb9874c2815e1585e79944cb84c83..c78c04fd993fe5fe1b95186d8f4d33ecdcf7e8ad 100644 (file)
@@ -933,20 +933,19 @@ magic_found:
                goto again;
        }
 
-       /* Set sbi->s_flags here, used by ufs_get_fs_state() below */
-       sbi->s_flags = flags;
+       sbi->s_flags = flags;/*after that line some functions use s_flags*/
        ufs_print_super_stuff(sb, usb1, usb2, usb3);
 
        /*
         * Check, if file system was correctly unmounted.
         * If not, make it read only.
         */
-       if ((((flags & UFS_ST_MASK) == UFS_ST_44BSD)    ||
-            ((flags & UFS_ST_MASK) == UFS_ST_OLD)      ||
-            ((flags & UFS_ST_MASK) == UFS_ST_SUN)      ||
-            ((flags & UFS_ST_MASK) == UFS_ST_SUNOS)    ||
-            ((flags & UFS_ST_MASK) == UFS_ST_SUNx86))  &&
-           (ufs_get_fs_state(sb, usb1, usb3) == (UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time)))) {
+       if (((flags & UFS_ST_MASK) == UFS_ST_44BSD) ||
+         ((flags & UFS_ST_MASK) == UFS_ST_OLD) ||
+         (((flags & UFS_ST_MASK) == UFS_ST_SUN ||
+           (flags & UFS_ST_MASK) == UFS_ST_SUNOS ||
+         (flags & UFS_ST_MASK) == UFS_ST_SUNx86) &&
+         (ufs_get_fs_state(sb, usb1, usb3) == (UFS_FSOK - fs32_to_cpu(sb, usb1->fs_time))))) {
                switch(usb1->fs_clean) {
                case UFS_FSCLEAN:
                        UFSD("fs is clean\n");
index 7b74b60a68a47b26d3addf541b3440f23bd947ad..19c3ead2a90bb768f98e077ff91c050ae290e737 100644 (file)
@@ -168,8 +168,7 @@ struct acpi_device_flags {
        u32 power_manageable:1;
        u32 performance_manageable:1;
        u32 wake_capable:1;     /* Wakeup(_PRW) supported? */
-       u32 force_power_state:1;
-       u32 reserved:19;
+       u32 reserved:20;
 };
 
 /* File System */
index d96b10fd449ffb791e46f1f30fadfaf4e48f277a..c0d7075982c16d9dee7884c8b0c29080de97b559 100644 (file)
@@ -130,4 +130,7 @@ extern u8 at91_leds_cpu;
 extern u8 at91_leds_timer;
 extern void __init at91_init_leds(u8 cpu_led, u8 timer_led);
 
+/* FIXME: this needs a better location, but gets stuff building again */
+extern int at91_suspend_entering_slow_clock(void);
+
 #endif
index ea24a0e0bfd672137d686b57c4277d51566f7c36..ff8de30b2fb36e65405779532177ae57990f920a 100644 (file)
@@ -13,6 +13,9 @@
 #ifndef        __DAVINCI_GPIO_H
 #define        __DAVINCI_GPIO_H
 
+#include <linux/io.h>
+#include <asm/hardware.h>
+
 /*
  * basic gpio routines
  *
index 7513c7a3402dfc32aa3b7f120b9c2ac2d8189562..822a27cd7864e3e6e7b8978424ed4ce1406aa80e 100644 (file)
@@ -4,7 +4,7 @@
  * PXA300/PXA310 specific MFP configuration definitions
  *
  * Copyright (C) 2007 Marvell International Ltd.
- * 2007-08-21: eric miao <eric.y.miao@gmail.com>
+ * 2007-08-21: eric miao <eric.miao@marvell.com>
  *             initial version
  *
  *  This program is free software; you can redistribute it and/or modify
index ae8ba34194cf6f81a74541cd70f93857712440c6..488a5bbc49e994ac1d65a7db3445baa9f2696459 100644 (file)
@@ -4,7 +4,7 @@
  * PXA320 specific MFP configuration definitions
  *
  * Copyright (C) 2007 Marvell International Ltd.
- * 2007-08-21: eric miao <eric.y.miao@gmail.com>
+ * 2007-08-21: eric miao <eric.miao@marvell.com>
  *             initial version
  *
  *  This program is free software; you can redistribute it and/or modify
index 60291742ffddce7fbd2558bec9126c7404b3b840..ac4157af5a8e5878a2883358fb9c5bb5e499b21b 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (C) 2007 Marvell International Ltd.
  *
- * 2007-8-21: eric miao <eric.y.miao@gmail.com>
+ * 2007-8-21: eric miao <eric.miao@marvell.com>
  *            initial version
  *
  *  This program is free software; you can redistribute it and/or modify
index 16f5375e57b89256738b094f1d07c6a45733087a..9918aa46d9e53c03983604b6b70237516d11d183 100644 (file)
@@ -11,8 +11,9 @@
 #define        flat_argvp_envp_on_stack()              1
 #define        flat_old_ram_flag(flags)                (flags)
 #define        flat_reloc_valid(reloc, size)           ((reloc) <= (size))
-#define        flat_get_addr_from_rp(rp, relval, flags) get_unaligned(rp)
+#define        flat_get_addr_from_rp(rp, relval, flags, persistent) get_unaligned(rp)
 #define        flat_put_addr_at_rp(rp, val, relval)    put_unaligned(val,rp)
 #define        flat_get_relocate_addr(rel)             (rel)
+#define        flat_set_persistent(relval, p)          0
 
 #endif /* __ARM_FLAT_H__ */
index b824d371ae0b0c46ab1a90b8252a80873b1bca15..d742205ac172673f57c96f99e93d4125b945e46e 100644 (file)
@@ -35,7 +35,7 @@
 #define S3C2440_NFESTAT1 S3C2410_NFREG(0x28)
 #define S3C2440_NFMECC0  S3C2410_NFREG(0x2C)
 #define S3C2440_NFMECC1  S3C2410_NFREG(0x30)
-#define S3C2440_NFSECC   S3C24E10_NFREG(0x34)
+#define S3C2440_NFSECC   S3C2410_NFREG(0x34)
 #define S3C2440_NFSBLK   S3C2410_NFREG(0x38)
 #define S3C2440_NFEBLK   S3C2410_NFREG(0x3C)
 
index 14cb8d35924e7c3505126057d3f9648d927435fe..0212e180b90e327d1a82c9c68145c551ab757843 100644 (file)
@@ -80,6 +80,7 @@ extern int atomic_sub32(void);
 extern int atomic_ior32(void);
 extern int atomic_and32(void);
 extern int atomic_xor32(void);
+extern void safe_user_instruction(void);
 extern void sigreturn_stub(void);
 
 extern void *l1_data_A_sram_alloc(size_t);
index e6df84ee1557893f4e930b4fb4a3f3ac556fd2f6..37db66c7030d12e91eabc205ed9ea4059195515a 100644 (file)
@@ -17,4 +17,6 @@
 
 #define ATOMIC_SEQS_END                0x480
 
-#define FIXED_CODE_END         0x480
+#define SAFE_USER_INSTRUCTION   0x480
+
+#define FIXED_CODE_END         0x490
index c97ab03e43a641273ad87e110da796fa8b7cb691..8265ea473d5bc566cd2f7acc087b74d8f511f617 100644 (file)
@@ -197,6 +197,8 @@ uint32_t get_gptimer_period    (int timer_id);
 uint32_t get_gptimer_count     (int timer_id);
 uint16_t get_gptimer_intr      (int timer_id);
 void     clear_gptimer_intr    (int timer_id);
+uint16_t get_gptimer_over      (int timer_id);
+void     clear_gptimer_over    (int timer_id);
 void     set_gptimer_config    (int timer_id, uint16_t config);
 uint16_t get_gptimer_config    (int timer_id);
 void     set_gptimer_pulse_hi  (int timer_id);
index d6c24c54699d40a158ce6f35392f92964a7ee23e..fc69cf93f14951be462f843a911cc93c1416e07a 100644 (file)
 
 /* Bit masks for HOST_CONTROL */
 
-#define                   HOST_EN  0x1        /* Host Enable */
-#define                  nHOST_EN  0x0       
-#define                  HOST_END  0x2        /* Host Endianess */
-#define                 nHOST_END  0x0       
-#define                 DATA_SIZE  0x4        /* Data Size */
-#define                nDATA_SIZE  0x0       
-#define                  HOST_RST  0x8        /* Host Reset */
-#define                 nHOST_RST  0x0       
-#define                  HRDY_OVR  0x20       /* Host Ready Override */
-#define                 nHRDY_OVR  0x0       
-#define                  INT_MODE  0x40       /* Interrupt Mode */
-#define                 nINT_MODE  0x0       
-#define                     BT_EN  0x80       /* Bus Timeout Enable */
-#define                    nBT_EN  0x0       
-#define                       EHW  0x100      /* Enable Host Write */
-#define                      nEHW  0x0       
-#define                       EHR  0x200      /* Enable Host Read */
-#define                      nEHR  0x0       
-#define                       BDR  0x400      /* Burst DMA Requests */
-#define                      nBDR  0x0       
+#define                   HOST_CNTR_HOST_EN  0x1        /* Host Enable */
+#define                  HOST_CNTR_nHOST_EN  0x0
+#define                  HOST_CNTR_HOST_END  0x2        /* Host Endianess */
+#define                 HOST_CNTR_nHOST_END  0x0
+#define                 HOST_CNTR_DATA_SIZE  0x4        /* Data Size */
+#define                HOST_CNTR_nDATA_SIZE  0x0
+#define                  HOST_CNTR_HOST_RST  0x8        /* Host Reset */
+#define                 HOST_CNTR_nHOST_RST  0x0
+#define                  HOST_CNTR_HRDY_OVR  0x20       /* Host Ready Override */
+#define                 HOST_CNTR_nHRDY_OVR  0x0
+#define                  HOST_CNTR_INT_MODE  0x40       /* Interrupt Mode */
+#define                 HOST_CNTR_nINT_MODE  0x0
+#define                     HOST_CNTR_BT_EN  0x80       /* Bus Timeout Enable */
+#define                   HOST_CNTR_ nBT_EN  0x0
+#define                       HOST_CNTR_EHW  0x100      /* Enable Host Write */
+#define                      HOST_CNTR_nEHW  0x0
+#define                       HOST_CNTR_EHR  0x200      /* Enable Host Read */
+#define                      HOST_CNTR_nEHR  0x0
+#define                       HOST_CNTR_BDR  0x400      /* Burst DMA Requests */
+#define                      HOST_CNTR_nBDR  0x0
 
 /* Bit masks for HOST_STATUS */
 
-#define                     READY  0x1        /* DMA Ready */
-#define                    nREADY  0x0       
-#define                  FIFOFULL  0x2        /* FIFO Full */
-#define                 nFIFOFULL  0x0       
-#define                 FIFOEMPTY  0x4        /* FIFO Empty */
-#define                nFIFOEMPTY  0x0       
-#define                  COMPLETE  0x8        /* DMA Complete */
-#define                 nCOMPLETE  0x0       
-#define                      HSHK  0x10       /* Host Handshake */
-#define                     nHSHK  0x0       
-#define                   TIMEOUT  0x20       /* Host Timeout */
-#define                  nTIMEOUT  0x0       
-#define                      HIRQ  0x40       /* Host Interrupt Request */
-#define                     nHIRQ  0x0       
-#define                ALLOW_CNFG  0x80       /* Allow New Configuration */
-#define               nALLOW_CNFG  0x0       
-#define                   DMA_DIR  0x100      /* DMA Direction */
-#define                  nDMA_DIR  0x0       
-#define                       BTE  0x200      /* Bus Timeout Enabled */
-#define                      nBTE  0x0       
-#define               HOSTRD_DONE  0x8000     /* Host Read Completion Interrupt */
-#define              nHOSTRD_DONE  0x0
+#define                     HOST_STAT_READY  0x1        /* DMA Ready */
+#define                    HOST_STAT_nREADY  0x0
+#define                  HOST_STAT_FIFOFULL  0x2        /* FIFO Full */
+#define                 HOST_STAT_nFIFOFULL  0x0
+#define                 HOST_STAT_FIFOEMPTY  0x4        /* FIFO Empty */
+#define                HOST_STAT_nFIFOEMPTY  0x0
+#define                  HOST_STAT_COMPLETE  0x8        /* DMA Complete */
+#define                 HOST_STAT_nCOMPLETE  0x0
+#define                      HOST_STAT_HSHK  0x10       /* Host Handshake */
+#define                     HOST_STAT_nHSHK  0x0
+#define                   HOST_STAT_TIMEOUT  0x20       /* Host Timeout */
+#define                  HOST_STAT_nTIMEOUT  0x0
+#define                      HOST_STAT_HIRQ  0x40       /* Host Interrupt Request */
+#define                     HOST_STAT_nHIRQ  0x0
+#define                HOST_STAT_ALLOW_CNFG  0x80       /* Allow New Configuration */
+#define               HOST_STAT_nALLOW_CNFG  0x0
+#define                   HOST_STAT_DMA_DIR  0x100      /* DMA Direction */
+#define                  HOST_STAT_nDMA_DIR  0x0
+#define                       HOST_STAT_BTE  0x200      /* Bus Timeout Enabled */
+#define                      HOST_STAT_nBTE  0x0
+#define               HOST_STAT_HOSTRD_DONE  0x8000     /* Host Read Completion Interrupt */
+#define              HOST_STAT_nHOSTRD_DONE  0x0
 
 /* Bit masks for HOST_TIMEOUT */
 
-#define             COUNT_TIMEOUT  0x7ff      /* Host Timeout count */
+#define             HOST_COUNT_TIMEOUT  0x7ff      /* Host Timeout count */
 
 /* Bit masks for CNT_CONFIG */
 
index a41627ae9134f30e652ae4c56555c42cf15c0dc6..2dfee12864f684010e99496942cca94858ff3f42 100644 (file)
@@ -35,7 +35,6 @@
 #define MAX_BLACKFIN_DMA_CHANNEL 16
 
 #define CH_PPI                         0       /* PPI receive/transmit or NFC */
-#define CH_NFC                 0       /* PPI receive/transmit or NFC */
 #define CH_EMAC_RX             1       /* Ethernet MAC receive or HOSTDP */
 #define CH_EMAC_HOSTDP                 1       /* Ethernet MAC receive or HOSTDP */
 #define CH_EMAC_TX             2       /* Ethernet MAC transmit or NFC */
 #define CH_MEM_STREAM1_DEST    14      /* TX */
 #define CH_MEM_STREAM1_SRC     15      /* RX */
 
+#if defined(CONFIG_BF527_NAND_D_PORTF)
+#define CH_NFC                 CH_PPI  /* PPI receive/transmit or NFC */
+#elif defined(CONFIG_BF527_NAND_D_PORTH)
+#define CH_NFC                 CH_EMAC_TX /* PPI receive/transmit or NFC */
+#endif
+
 extern int channel2irq(unsigned int channel);
 extern struct dma_register *base_addr[];
 
index 4e46d657e50e8ad2c07013b101d4c6c3dd85ab2e..fcb72b41e007f607ed8d59e1f0f8ec806534623b 100644 (file)
 /* Bit masks for MXVR_DMAx_CONFIG */
 
 #define                    MDMAEN  0x1        /* DMA Channel Enable */
-#define                        DD  0x2        /* DMA Channel Direction */
+#define                     DMADD  0x2        /* DMA Channel Direction */
 #define                 BY4SWAPEN  0x20       /* DMA Channel Four Byte Swap Enable */
 #define                     LCHAN  0x3c0      /* DMA Channel Logical Channel */
 #define                 BITSWAPEN  0x400      /* DMA Channel Bit Swap Enable */
index 1d365c844ffe54889bc3f547e5b38bb3ac6bb50e..da979cb62f7dc36a88067ec436e2d4a0405b9fdd 100644 (file)
 #define                   PLL_OFF  0x2        /* Disable PLL */
 #define                        DF  0x1        /* Divide Frequency */
 
+/* SWRST Masks */
+#define              SYSTEM_RESET 0x0007       /* Initiates A System Software Reset */
+#define              DOUBLE_FAULT 0x0008       /* Core Double Fault Causes Reset */
+#define              RESET_DOUBLE 0x2000       /* SW Reset Generated By Core Double-Fault */
+#define                RESET_WDOG 0x4000       /* SW Reset Generated By Watchdog Timer */
+#define            RESET_SOFTWARE 0x8000       /* SW Reset Occurred Since Last Read Of SWRST */
+
 /* Bit masks for PLL_STAT */
 
 #define                PLL_LOCKED  0x20       /* PLL Locked Status */
index b382deb501a79137d99b893ece54923ea53b2f2b..6b485120015f85a4b6243aad03f5446444a218ea 100644 (file)
 #define P_AMC_BG       (P_DEFINED | P_IDENT(GPIO_PJ12) | P_FUNCT(0))
 #define P_AMC_BGH      (P_DEFINED | P_IDENT(GPIO_PJ13) | P_FUNCT(0))
 
+
+#define P_NAND_D0      (P_DONTCARE)
+#define P_NAND_D1      (P_DONTCARE)
+#define P_NAND_D2      (P_DONTCARE)
+#define P_NAND_D3      (P_DONTCARE)
+#define P_NAND_D4      (P_DONTCARE)
+#define P_NAND_D5      (P_DONTCARE)
+#define P_NAND_D6      (P_DONTCARE)
+#define P_NAND_D7      (P_DONTCARE)
+#define P_NAND_WE      (P_DONTCARE)
+#define P_NAND_RE      (P_DONTCARE)
+#define P_NAND_CLE     (P_DONTCARE)
+#define P_NAND_ALE     (P_DONTCARE)
+
 #endif /* _MACH_PORTMUX_H_ */
index bf7dc4e00065d2023c2133c8f018c1a3f960e02c..7945e8a3a8412fffa55c7b12ddd87773873e8bc4 100644 (file)
@@ -55,6 +55,9 @@
 /* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */
 #define SWRST                   SICA_SWRST
 #define SYSCR                   SICA_SYSCR
+#define RESET_DOUBLE            (SWRST_DBL_FAULT_B|SWRST_DBL_FAULT_A)
+#define RESET_WDOG              (SWRST_WDT_B|SWRST_WDT_A)
+#define RESET_SOFTWARE          (SWRST_OCCURRED)
 
 /* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */
 #define SICA_SWRST              0xFFC00100     /* Software Reset register */
index 43a7aac414e04e7d74a1a6b45065b1a3b3c3846e..c4f1e328a5ba845f0635e42f0669b137369a604d 100644 (file)
@@ -46,7 +46,7 @@
 #ifdef CONFIG_SMP
 
 extern unsigned long __per_cpu_offset[NR_CPUS];
-#define per_cpu_offset(x) (__per_cpu_offset(x))
+#define per_cpu_offset(x) (__per_cpu_offset[x])
 
 /* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */
 DECLARE_PER_CPU(unsigned long, local_per_cpu_offset);
index 471cc2ee9ac4c10be30a3b6d772f53912593d90e..4fa733dd417a4102ae7409661f9312a4b431ec9c 100644 (file)
@@ -60,7 +60,6 @@ extern cpumask_t cpu_online_map;
 extern cpumask_t cpu_core_map[NR_CPUS];
 DECLARE_PER_CPU(cpumask_t, cpu_sibling_map);
 extern int smp_num_siblings;
-extern int smp_num_cpucores;
 extern void __iomem *ipi_base_addr;
 extern unsigned char smp_int_redirect;
 
index affb32ce4af980e86502e9700a34da79e73503ff..032ca73f181bec27c0f7b741862ada66ec104342 100644 (file)
@@ -5,25 +5,14 @@
 #ifndef __ASM_I8253_H
 #define __ASM_I8253_H
 
+#include <linux/spinlock.h>
+
 /* i8253A PIT registers */
 #define PIT_MODE               0x43
 #define PIT_CH0                        0x40
 #define PIT_CH2                        0x42
 
-/* i8259A PIC registers */
-#define PIC_MASTER_CMD         0x20
-#define PIC_MASTER_IMR         0x21
-#define PIC_MASTER_ISR         PIC_MASTER_CMD
-#define PIC_MASTER_POLL                PIC_MASTER_ISR
-#define PIC_MASTER_OCW3                PIC_MASTER_ISR
-#define PIC_SLAVE_CMD          0xa0
-#define PIC_SLAVE_IMR          0xa1
-
-/* i8259A PIC related value */
-#define PIC_CASCADE_IR         2
-#define MASTER_ICW4_DEFAULT    0x01
-#define SLAVE_ICW4_DEFAULT     0x01
-#define PIC_ICW4_AEOI          2
+extern spinlock_t i8253_lock;
 
 extern void setup_pit_timer(void);
 
diff --git a/include/asm-mips/mach-au1x00/timex.h b/include/asm-mips/mach-au1x00/timex.h
deleted file mode 100644 (file)
index e3ada66..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * 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 by Ralf Baechle
- */
-#ifndef __ASM_MACH_AU1X00_TIMEX_H
-#define __ASM_MACH_AU1X00_TIMEX_H
-
-#define CLOCK_TICK_RATE                ((HZ * 100000UL) / 2)
-
-#endif /* __ASM_MACH_AU1X00_TIMEX_H */
index 179d0e850b59a6d35b6ec1ae009649f0e40ce858..57c8c9ac585162b6a16a32d912d7d438d0a772be 100644 (file)
@@ -35,7 +35,7 @@
  *     4 - ethernet
  *     5 - 16550 UART
  *     6 - cascade i8259
- *     7 - CP0 counter (unused)
+ *     7 - CP0 counter
  */
 #define MIPS_CPU_IRQ_BASE              16
 
@@ -48,7 +48,6 @@
 #define SCSI_IRQ                       (MIPS_CPU_IRQ_BASE + 5)
 #define I8259_CASCADE_IRQ              (MIPS_CPU_IRQ_BASE + 6)
 
-
 #define GT641XX_IRQ_BASE               24
 
 #include <asm/irq_gt641xx.h>
diff --git a/include/asm-mips/mach-generic/timex.h b/include/asm-mips/mach-generic/timex.h
deleted file mode 100644 (file)
index 48b4cfa..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * 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, 2005 by Ralf Baechle
- */
-#ifndef __ASM_MACH_GENERIC_TIMEX_H
-#define __ASM_MACH_GENERIC_TIMEX_H
-
-#define CLOCK_TICK_RATE                500000
-
-#endif /* __ASM_MACH_GENERIC_TIMEX_H */
diff --git a/include/asm-mips/mach-jazz/timex.h b/include/asm-mips/mach-jazz/timex.h
deleted file mode 100644 (file)
index 93affa3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * 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 by Ralf Baechle
- */
-#ifndef __ASM_MACH_JAZZ_TIMEX_H
-#define __ASM_MACH_JAZZ_TIMEX_H
-
-/*
- * Jazz is still using the R4030 100Hz counter
- */
-#define CLOCK_TICK_RATE                100
-
-#endif /* __ASM_MACH_JAZZ_TIMEX_H */
diff --git a/include/asm-mips/mach-qemu/timex.h b/include/asm-mips/mach-qemu/timex.h
deleted file mode 100644 (file)
index cd54369..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * 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) 2005 Daniel Jacobowitz
- */
-#ifndef __ASM_MACH_QEMU_TIMEX_H
-#define __ASM_MACH_QEMU_TIMEX_H
-
-/*
- * We use a simulated i8254 PIC...
- */
-#define CLOCK_TICK_RATE                1193182
-
-#endif /* __ASM_MACH_QEMU_TIMEX_H */
diff --git a/include/asm-mips/mach-rm/timex.h b/include/asm-mips/mach-rm/timex.h
deleted file mode 100644 (file)
index 11ff6cb..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * 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, 2005 by Ralf Baechle
- */
-#ifndef __ASM_MACH_RM200_TIMEX_H
-#define __ASM_MACH_RM200_TIMEX_H
-
-#define CLOCK_TICK_RATE                1193182
-
-#endif /* __ASM_MACH_RM200_TIMEX_H */
index 0a6bc7dc158e9b5d78acca0ca9b9566b613bc5aa..ee1663e64da1aad67162a469c690a605de5e45e7 100644 (file)
  * 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.
- *
- * Please refer to Documentation/mips/time.README.
  */
 #ifndef _ASM_TIME_H
 #define _ASM_TIME_H
 
-#include <linux/interrupt.h>
-#include <linux/linkage.h>
-#include <linux/ptrace.h>
 #include <linux/rtc.h>
 #include <linux/spinlock.h>
 #include <linux/clockchips.h>
@@ -38,25 +33,12 @@ extern int rtc_mips_set_mmss(unsigned long);
 /*
  * Timer interrupt functions.
  * mips_timer_state is needed for high precision timer calibration.
- * mips_timer_ack may be NULL if the interrupt is self-recoverable.
  */
 extern int (*mips_timer_state)(void);
 
-/*
- * High precision timer clocksource.
- * If .read is NULL, an R4k-compatible timer setup is attempted.
- */
-extern struct clocksource clocksource_mips;
-
-/*
- * profiling and process accouting is done separately in local_timer_interrupt
- */
-extern void local_timer_interrupt(int irq, void *dev_id);
-
 /*
  * board specific routines required by time_init().
  */
-struct irqaction;
 extern void plat_time_init(void);
 
 /*
index 87c68ae76ff8f109ada1eb6d6664542cc86e2a5b..5816ad1569d66762413fe7cf1748a5ff001ab391 100644 (file)
 #include <asm/mipsregs.h>
 
 /*
- * This is the frequency of the timer used for Linux's timer interrupt.
- * The value should be defined as accurate as possible or under certain
- * circumstances Linux timekeeping might become inaccurate or fail.
- *
- * For many system the exact clockrate of the timer isn't known but due to
- * the way this value is used we can get away with a wrong value as long
- * as this value is:
- *
- *  - a multiple of HZ
- *  - a divisor of the actual rate
- *
- * 500000 is a good such cheat value.
- *
- * The obscure number 1193182 is the same as used by the original i8254
- * time in legacy PC hardware; the chip unfortunately also found in a
- * bunch of MIPS systems.  The last remaining user of the i8254 for the
- * timer interrupt is the RM200; it's a very standard system so there is
- * no reason to make this a separate architecture.
+ * This is the clock rate of the i8253 PIT.  A MIPS system may not have
+ * a PIT by the symbol is used all over the kernel including some APIs.
+ * So keeping it defined to the number for the PIT is the only sane thing
+ * for now.
  */
-
-#include <timex.h>
+#define CLOCK_TICK_RATE 1193182
 
 /*
  * Standard way to access the cycle counter.
index 7a18649d1ccb873af58880fdd933f4f21d50469a..01e5cf51ba9b38012469e7ceb0b78ab222e42fe5 100644 (file)
@@ -18,9 +18,8 @@
 #define SH_CACHE_ASSOC         8
 
 #define L1_CACHE_BYTES         (1 << L1_CACHE_SHIFT)
-#define SMP_CACHE_BYTES                L1_CACHE_BYTES
 
-#define L1_CACHE_ALIGN(x)      (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
+#define __read_mostly __attribute__((__section__(".data.read_mostly")))
 
 #ifndef __ASSEMBLY__
 struct cache_info {
index c61d902b8bff118d511d88fe62409a22e835e4ce..11850f65c92216d510f7b242e990ebe33b4a82ff 100644 (file)
@@ -41,7 +41,7 @@ static inline int generic_irq_demux(int irq)
 #define irq_canonicalize(irq)  (irq)
 #define irq_demux(irq)         sh_mv.mv_irq_demux(irq)
 
-#ifdef CONFIG_4KSTACKS
+#ifdef CONFIG_IRQSTACKS
 extern void irq_ctx_init(int cpu);
 extern void irq_ctx_exit(int cpu);
 # define __ARCH_HAS_DO_SOFTIRQ
index cb3d46c59eabe28e627a41d19d00e471ba13454f..3aa8b07da47d043b759246252e97dfda3f3c2434 100644 (file)
@@ -128,7 +128,6 @@ typedef struct { unsigned long pgd; } pgd_t;
 #define __va(x)                        ((void *)((unsigned long)(x)+PAGE_OFFSET))
 #define pfn_to_kaddr(pfn)      __va((pfn) << PAGE_SHIFT)
 
-#define phys_to_page(phys)     (pfn_to_page(phys >> PAGE_SHIFT))
 #define page_to_phys(page)     (page_to_pfn(page) << PAGE_SHIFT)
 
 /* PFN start number, because of __MEMORY_START */
index cf0dd2b648c230c3d2a81e68ee2bdb2969d2d59e..0b1d7c665659f8f1b2c424c5dbd3d7b38046416e 100644 (file)
@@ -399,7 +399,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte)
 #define        pmd_bad(x)      (pmd_val(x) & ~PAGE_MASK)
 
 #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
-#define pte_page(x)    phys_to_page(pte_val(x)&PTE_PHYS_MASK)
+#define pte_page(x)    pfn_to_page(pte_pfn(x))
 
 /*
  * The following only work if pte_present() is true.
index 4f2922a1979c5fef654b9444c818123773cd4eab..ab0028db645a49d0ed24a4c1a25363ef51f81f60 100644 (file)
@@ -71,7 +71,7 @@ struct sh_cpuinfo {
        struct cache_info scache;       /* Secondary cache */
 
        unsigned long flags;
-} __attribute__ ((aligned(SMP_CACHE_BYTES)));
+} __attribute__ ((aligned(L1_CACHE_BYTES)));
 
 extern struct sh_cpuinfo cpu_data[];
 #define boot_cpu_data cpu_data[0]
index 586a9711a75dbec4ef86557fef94a71cc26e03ee..55a2bd328d990e24abc3e496641bddfd764eb3a7 100644 (file)
@@ -5,6 +5,20 @@
 
 #ifdef __KERNEL__
 
+/*
+ * This is set up by the setup-routine at boot-time
+ */
+#define PARAM  ((unsigned char *)empty_zero_page)
+
+#define MOUNT_ROOT_RDONLY (*(unsigned long *) (PARAM+0x000))
+#define RAMDISK_FLAGS (*(unsigned long *) (PARAM+0x004))
+#define ORIG_ROOT_DEV (*(unsigned long *) (PARAM+0x008))
+#define LOADER_TYPE (*(unsigned long *) (PARAM+0x00c))
+#define INITRD_START (*(unsigned long *) (PARAM+0x010))
+#define INITRD_SIZE (*(unsigned long *) (PARAM+0x014))
+/* ... */
+#define COMMAND_LINE ((char *) (PARAM+0x100))
+
 int setup_early_printk(char *);
 void sh_mv_setup(void);
 
index 876312fe82ccf9dbf894a100a26978a5f8267f10..df1097d6ffbe63258dc566924cedb9e393438d5f 100644 (file)
@@ -17,7 +17,8 @@
        "3:\n"                                          \
        "       .section .fixup,#alloc,#execinstr\n"    \
        "       .align  4\n"                            \
-       "4:     ba      3b\n"                           \
+       "4:     sethi   %%hi(3b), %0\n"                 \
+       "       jmpl    %0 + %%lo(3b), %%g0\n"          \
        "        mov    %5, %0\n"                       \
        "       .previous\n"                            \
        "       .section __ex_table,\"a\"\n"            \
@@ -91,7 +92,8 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
        "2:\n"
        "       .section .fixup,#alloc,#execinstr\n"
        "       .align  4\n"
-       "3:     ba      2b\n"
+       "3:     sethi   %%hi(2b), %0\n"
+       "       jmpl    %0 + %%lo(2b), %%g0\n"
        "        mov    %4, %0\n"
        "       .previous\n"
        "       .section __ex_table,\"a\"\n"
index 159e62b51d705055b7b975ab4a4f68f21c6e429a..99a669c190c776a030ddc2be595693982a1c3fe0 100644 (file)
@@ -178,7 +178,9 @@ do {        if (test_thread_flag(TIF_PERFCTR)) {                            \
        "ldx    [%%g6 + %9], %%g4\n\t"                                  \
        "brz,pt %%o7, 1f\n\t"                                           \
        " mov   %%g7, %0\n\t"                                           \
-       "b,a ret_from_syscall\n\t"                                      \
+       "sethi  %%hi(ret_from_syscall), %%g1\n\t"                       \
+       "jmpl   %%g1 + %%lo(ret_from_syscall), %%g0\n\t"                \
+       " nop\n\t"                                                      \
        "1:\n\t"                                                        \
        : "=&r" (last), "=r" (current), "=r" (current_thread_info_reg), \
          "=r" (__local_per_cpu_offset)                                 \
index afe236ba555b97527f197079ec213e0c38ee6307..93720e7b0289250267dbc461b1defb9d4160e6e5 100644 (file)
@@ -123,7 +123,8 @@ __asm__ __volatile__(                                                       \
        ".section .fixup,#alloc,#execinstr\n\t"                         \
        ".align 4\n"                                                    \
 "3:\n\t"                                                               \
-       "b      2b\n\t"                                                 \
+       "sethi  %%hi(2b), %0\n\t"                                       \
+       "jmpl   %0 + %%lo(2b), %%g0\n\t"                                \
        " mov   %3, %0\n\n\t"                                           \
        ".previous\n\t"                                                 \
        ".section __ex_table,\"a\"\n\t"                                 \
@@ -165,8 +166,9 @@ __asm__ __volatile__(                                                       \
        ".section .fixup,#alloc,#execinstr\n\t"                         \
        ".align 4\n"                                                    \
 "3:\n\t"                                                               \
+       "sethi  %%hi(2b), %0\n\t"                                       \
        "clr    %1\n\t"                                                 \
-       "b      2b\n\t"                                                 \
+       "jmpl   %0 + %%lo(2b), %%g0\n\t"                                \
        " mov   %3, %0\n\n\t"                                           \
        ".previous\n\t"                                                 \
        ".section __ex_table,\"a\"\n\t"                                 \
diff --git a/include/asm-x86/gart.h b/include/asm-x86/gart.h
new file mode 100644 (file)
index 0000000..f704c50
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef _ASM_X8664_IOMMU_H
+#define _ASM_X8664_IOMMU_H 1
+
+extern void pci_iommu_shutdown(void);
+extern void no_iommu_init(void);
+extern int force_iommu, no_iommu;
+extern int iommu_detected;
+#ifdef CONFIG_GART_IOMMU
+extern void gart_iommu_init(void);
+extern void gart_iommu_shutdown(void);
+extern void __init gart_parse_options(char *);
+extern void gart_iommu_hole_init(void);
+extern int fallback_aper_order;
+extern int fallback_aper_force;
+extern int gart_iommu_aperture;
+extern int gart_iommu_aperture_allowed;
+extern int gart_iommu_aperture_disabled;
+extern int fix_aperture;
+#else
+#define gart_iommu_aperture 0
+#define gart_iommu_aperture_allowed 0
+
+static inline void gart_iommu_shutdown(void)
+{
+}
+
+#endif
+
+#endif
index 5af471f228eeacad86659cbda4ce60c3fadf8054..07862fdd23c0e195f76cfb3753d136296c2371cd 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _ASM_X8664_IOMMU_H
-#define _ASM_X8664_IOMMU_H 1
+#ifndef _ASM_X8664_GART_H
+#define _ASM_X8664_GART_H 1
 
 extern void pci_iommu_shutdown(void);
 extern void no_iommu_init(void);
index 9baa46d9f594893a011b9e803566e17f2ac3f150..ef54226a9325a926a1c482ee7ce03d1410478f7b 100644 (file)
@@ -37,7 +37,7 @@ extern int iommu_setup(char *opt);
  */
 #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys)
 
-#if defined(CONFIG_IOMMU) || defined(CONFIG_CALGARY_IOMMU)
+#if defined(CONFIG_GART_IOMMU) || defined(CONFIG_CALGARY_IOMMU)
 
 #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)      \
        dma_addr_t ADDR_NAME;
index 6a65231bc7855a8fc918ab22bcd3402cff3df218..37bfa19d8064857897c1144101da3b2e9b44f198 100644 (file)
@@ -149,6 +149,7 @@ header-y += ticable.h
 header-y += times.h
 header-y += tiocl.h
 header-y += tipc.h
+header-y += tipc_config.h
 header-y += toshiba.h
 header-y += ultrasound.h
 header-y += un.h
@@ -325,6 +326,7 @@ unifdef-y += sonypi.h
 unifdef-y += soundcard.h
 unifdef-y += stat.h
 unifdef-y += stddef.h
+unifdef-y += string.h
 unifdef-y += synclink.h
 unifdef-y += sysctl.h
 unifdef-y += tcp.h
index 128dc7ad49017c16446b8dfa6fd32d2df2dba8dd..61535e72834dcf79403a222c6875d95cafea619a 100644 (file)
@@ -43,6 +43,7 @@ enum {
        ATA_MAX_SECTORS_128     = 128,
        ATA_MAX_SECTORS         = 256,
        ATA_MAX_SECTORS_LBA48   = 65535,/* TODO: 65536? */
+       ATA_MAX_SECTORS_TAPE    = 65535,
 
        ATA_ID_WORDS            = 256,
        ATA_ID_SERNO            = 10,
@@ -544,6 +545,11 @@ static inline int atapi_cdb_len(const u16 *dev_id)
        }
 }
 
+static inline int atapi_command_packet_set(const u16 *dev_id)
+{
+       return (dev_id[0] >> 8) & 0x1f;
+}
+
 static inline int is_atapi_taskfile(const struct ata_taskfile *tf)
 {
        return (tf->protocol == ATA_PROT_ATAPI) ||
index 62268929856c9d26c8a9be4b134e4d7704796aac..b45f240a8c45029d0d45107f40d5761f97028e2f 100644 (file)
@@ -527,6 +527,9 @@ struct input_absinfo {
 #define KEY_SPELLCHECK         0x1b0   /* AL Spell Check */
 #define KEY_LOGOFF             0x1b1   /* AL Logoff */
 
+#define KEY_DOLLAR             0x1b2
+#define KEY_EURO               0x1b3
+
 #define KEY_DEL_EOL            0x1c0
 #define KEY_DEL_EOS            0x1c1
 #define KEY_INS_LINE           0x1c2
index 56ae438ae5105033b55a9576cb77d3f291cd9f40..6e8cec50338000c31748bd1a8e5d4b28e26820cf 100644 (file)
@@ -173,7 +173,7 @@ static inline int ipmi_demangle_device_id(const unsigned char *data,
        id->firmware_revision_2 = data[3];
        id->ipmi_version = data[4];
        id->additional_device_support = data[5];
-       if (data_len >= 6) {
+       if (data_len >= 11) {
                id->manufacturer_id = (data[6] | (data[7] << 8) |
                                       (data[8] << 16));
                id->product_id = data[9] | (data[10] << 8);
index 147ccc40c8af0e1bbfd7f75532d14a6e986de52c..1e277852ba42077099f638d09d43bfb8078a7238 100644 (file)
@@ -221,6 +221,7 @@ enum {
        ATA_QCFLAG_IO           = (1 << 3), /* standard IO command */
        ATA_QCFLAG_RESULT_TF    = (1 << 4), /* result TF requested */
        ATA_QCFLAG_CLEAR_EXCL   = (1 << 5), /* clear excl_link on completion */
+       ATA_QCFLAG_QUIET        = (1 << 6), /* don't report device error */
 
        ATA_QCFLAG_FAILED       = (1 << 16), /* cmd failed and is owned by EH */
        ATA_QCFLAG_SENSE_VALID  = (1 << 17), /* sense data valid */
index 8df230a279a0ad9629d191e80661782f2739f67b..30e11aa3c1c94cb9d2b1419326896b6462edaaea 100644 (file)
@@ -8,9 +8,9 @@
 #define MV643XX_ETH_NAME               "mv643xx_eth"
 #define MV643XX_ETH_SHARED_REGS                0x2000
 #define MV643XX_ETH_SHARED_REGS_SIZE   0x2000
-#define MV643XX_ETH_BAR_4      0x220
-#define MV643XX_ETH_SIZE_REG_4 0x224
-#define MV643XX_ETH_BASE_ADDR_ENABLE_REG       0x0290
+#define MV643XX_ETH_BAR_4              0x2220
+#define MV643XX_ETH_SIZE_REG_4         0x2224
+#define MV643XX_ETH_BASE_ADDR_ENABLE_REG       0x2290
 
 struct mv643xx_eth_platform_data {
        int             port_number;
index 9b0c8f12373e14258382c40abeca4c55ee060b65..1e6af4f174b6cd5affaf7baf75597490e6915fce 100644 (file)
@@ -739,6 +739,16 @@ static inline void *netdev_priv(const struct net_device *dev)
  */
 #define SET_NETDEV_DEV(net, pdev)      ((net)->dev.parent = (pdev))
 
+/**
+ *     netif_napi_add - initialize a napi context
+ *     @dev:  network device
+ *     @napi: napi context
+ *     @poll: polling function
+ *     @weight: default weight
+ *
+ * netif_napi_add() must be used to initialize a napi context prior to calling
+ * *any* of the other napi related functions.
+ */
 static inline void netif_napi_add(struct net_device *dev,
                                  struct napi_struct *napi,
                                  int (*poll)(struct napi_struct *, int),
index b0b1fe6e0b17a5c41eb139c66137b4b2a51634c4..155d7438f7ad8b46cdb95939efe42ce8d7a07211 100644 (file)
@@ -1009,7 +1009,7 @@ struct task_struct {
        unsigned int rt_priority;
        cputime_t utime, stime, utimescaled, stimescaled;
        cputime_t gtime;
-       cputime_t prev_utime;
+       cputime_t prev_utime, prev_stime;
        unsigned long nvcsw, nivcsw; /* context switch counts */
        struct timespec start_time;             /* monotonic time */
        struct timespec real_start_time;        /* boot based time */
index 836062b7582a95d23878b994144f5cba85d4ce34..c5d3fcad7b57c87449d7de9085daa64cd80f984f 100644 (file)
@@ -3,16 +3,14 @@
 
 /* We don't want strings.h stuff being user by user stuff by accident */
 
-#ifdef __KERNEL__
+#ifndef __KERNEL__
+#include <string.h>
+#else
 
 #include <linux/compiler.h>    /* for inline */
 #include <linux/types.h>       /* for size_t */
 #include <linux/stddef.h>      /* for NULL */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 extern char *strndup_user(const char __user *, long);
 
 /*
@@ -111,9 +109,5 @@ extern void *kmemdup(const void *src, size_t len, gfp_t gfp);
 extern char **argv_split(gfp_t gfp, const char *str, int *argcp);
 extern void argv_free(char **argv);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
 #endif /* _LINUX_STRING_H_ */
index 5279466606d2bb33625431c4d6f000ddbbbd9c29..1fd449a6530b293f040eaa6c21ea40887994ea62 100644 (file)
@@ -51,13 +51,12 @@ static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns)
 }
 #endif
 
+#ifdef CONFIG_NET_NS
 extern void __put_net(struct net *net);
 
 static inline struct net *get_net(struct net *net)
 {
-#ifdef CONFIG_NET
        atomic_inc(&net->count);
-#endif
        return net;
 }
 
@@ -75,26 +74,44 @@ static inline struct net *maybe_get_net(struct net *net)
 
 static inline void put_net(struct net *net)
 {
-#ifdef CONFIG_NET
        if (atomic_dec_and_test(&net->count))
                __put_net(net);
-#endif
 }
 
 static inline struct net *hold_net(struct net *net)
 {
-#ifdef CONFIG_NET
        atomic_inc(&net->use_count);
-#endif
        return net;
 }
 
 static inline void release_net(struct net *net)
 {
-#ifdef CONFIG_NET
        atomic_dec(&net->use_count);
-#endif
 }
+#else
+static inline struct net *get_net(struct net *net)
+{
+       return net;
+}
+
+static inline void put_net(struct net *net)
+{
+}
+
+static inline struct net *hold_net(struct net *net)
+{
+       return net;
+}
+
+static inline void release_net(struct net *net)
+{
+}
+
+static inline struct net *maybe_get_net(struct net *net)
+{
+       return net;
+}
+#endif
 
 #define for_each_net(VAR)                              \
        list_for_each_entry(VAR, &net_namespace_list, list)
index 43fc3fa50d6237227e5bec82bc0b4e8e0d4ce8b7..20de3fa7ae40001bbe7771bb32915b8604f686f7 100644 (file)
@@ -779,7 +779,7 @@ extern void FASTCALL(release_sock(struct sock *sk));
 
 extern struct sock             *sk_alloc(struct net *net, int family,
                                          gfp_t priority,
-                                         struct proto *prot, int zero_it);
+                                         struct proto *prot);
 extern void                    sk_free(struct sock *sk);
 extern struct sock             *sk_clone(const struct sock *sk,
                                          const gfp_t priority);
@@ -993,20 +993,6 @@ static inline void sock_graft(struct sock *sk, struct socket *parent)
        write_unlock_bh(&sk->sk_callback_lock);
 }
 
-static inline void sock_copy(struct sock *nsk, const struct sock *osk)
-{
-#ifdef CONFIG_SECURITY_NETWORK
-       void *sptr = nsk->sk_security;
-#endif
-
-       memcpy(nsk, osk, osk->sk_prot->obj_size);
-       get_net(nsk->sk_net);
-#ifdef CONFIG_SECURITY_NETWORK
-       nsk->sk_security = sptr;
-       security_sk_clone(osk, nsk);
-#endif
-}
-
 extern int sock_i_uid(struct sock *sk);
 extern unsigned long sock_i_ino(struct sock *sk);
 
index a65bfc47177ce7e6c3f6bc68fa7a3b3e1a70dbf2..28a74015198899c3511f3daedbb2412c750c4fe4 100644 (file)
@@ -1057,6 +1057,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
        p->utimescaled = cputime_zero;
        p->stimescaled = cputime_zero;
        p->prev_utime = cputime_zero;
+       p->prev_stime = cputime_zero;
 
 #ifdef CONFIG_TASK_XACCT
        p->rchar = 0;           /* I/O counter: bytes read */
index 4537bdda1ebfa5c67f1ae8a8aec435c8b01a73b9..909a0cc6bc70a3078f3e41a1e42b94a28cd9ae6e 100644 (file)
@@ -124,7 +124,7 @@ void recalc_sigpending_and_wake(struct task_struct *t)
 
 void recalc_sigpending(void)
 {
-       if (!recalc_sigpending_tsk(current))
+       if (!recalc_sigpending_tsk(current) && !freezing(current))
                clear_thread_flag(TIF_SIGPENDING);
 
 }
index 52c7a151e298fbcd2a467697e7e448720beca175..56cb009a4b3592136d6fceb645f60fb1e4028867 100644 (file)
@@ -40,10 +40,14 @@ cond_syscall(sys_recvfrom);
 cond_syscall(sys_recv);
 cond_syscall(sys_socket);
 cond_syscall(sys_setsockopt);
+cond_syscall(compat_sys_setsockopt);
 cond_syscall(sys_getsockopt);
+cond_syscall(compat_sys_getsockopt);
 cond_syscall(sys_shutdown);
 cond_syscall(sys_sendmsg);
+cond_syscall(compat_sys_sendmsg);
 cond_syscall(sys_recvmsg);
+cond_syscall(compat_sys_recvmsg);
 cond_syscall(sys_socketcall);
 cond_syscall(sys_futex);
 cond_syscall(compat_sys_futex);
index 03d40360ff1be9682f4c192fec63e45b0d9e33fd..a7e3bf4d3c70317273b63003dc18f714a546ac36 100644 (file)
@@ -308,6 +308,19 @@ int kobject_rename(struct kobject * kobj, const char *new_name)
        if (!kobj->parent)
                return -EINVAL;
 
+       /* see if this name is already in use */
+       if (kobj->kset) {
+               struct kobject *temp_kobj;
+               temp_kobj = kset_find_obj(kobj->kset, new_name);
+               if (temp_kobj) {
+                       printk(KERN_WARNING "kobject '%s' can not be renamed "
+                              "to '%s' as '%s' is already in existance.\n",
+                              kobject_name(kobj), new_name, new_name);
+                       kobject_put(temp_kobj);
+                       return -EINVAL;
+               }
+       }
+
        devpath = kobject_get_path(kobj, GFP_KERNEL);
        if (!devpath) {
                error = -ENOMEM;
index 7c8643630023d239f099335f4a80480d5bde0a02..188cf5fd3e8d4acedec4e74c05375238526506e5 100644 (file)
@@ -1300,7 +1300,7 @@ int filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 
        size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
        if (vmf->pgoff >= size)
-               goto outside_data_content;
+               return VM_FAULT_SIGBUS;
 
        /* If we don't want any read-ahead, don't bother */
        if (VM_RandomReadHint(vma))
@@ -1377,7 +1377,7 @@ retry_find:
        if (unlikely(vmf->pgoff >= size)) {
                unlock_page(page);
                page_cache_release(page);
-               goto outside_data_content;
+               return VM_FAULT_SIGBUS;
        }
 
        /*
@@ -1388,15 +1388,6 @@ retry_find:
        vmf->page = page;
        return ret | VM_FAULT_LOCKED;
 
-outside_data_content:
-       /*
-        * An external ptracer can access pages that normally aren't
-        * accessible..
-        */
-       if (vma->vm_mm == current->mm)
-               return VM_FAULT_SIGBUS;
-
-       /* Fall through to the non-read-ahead case */
 no_cached_page:
        /*
         * We're only likely to ever get here if MADV_RANDOM is in
@@ -2511,21 +2502,17 @@ generic_file_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
        }
 
        retval = mapping->a_ops->direct_IO(rw, iocb, iov, offset, nr_segs);
-       if (retval)
-               goto out;
 
        /*
         * Finally, try again to invalidate clean pages which might have been
-        * faulted in by get_user_pages() if the source of the write was an
-        * mmap()ed region of the file we're writing.  That's a pretty crazy
-        * thing to do, so we don't support it 100%.  If this invalidation
-        * fails and we have -EIOCBQUEUED we ignore the failure.
+        * cached by non-direct readahead, or faulted in by get_user_pages()
+        * if the source of the write was an mmap'ed region of the file
+        * we're writing.  Either one is a pretty crazy thing to do,
+        * so we don't support it 100%.  If this invalidation
+        * fails, tough, the write still worked...
         */
        if (rw == WRITE && mapping->nrpages) {
-               int err = invalidate_inode_pages2_range(mapping,
-                                             offset >> PAGE_CACHE_SHIFT, end);
-               if (err && retval >= 0)
-                       retval = err;
+               invalidate_inode_pages2_range(mapping, offset >> PAGE_CACHE_SHIFT, end);
        }
 out:
        return retval;
index 404e53bb212764f8a6ab7f5bf688c54d4d4c9d06..253d205914bad382e48abfd49393f6fe87179646 100644 (file)
@@ -915,6 +915,21 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
        struct inode *inode;
 
        BUG_ON(!PageLocked(page));
+       /*
+        * shmem_backing_dev_info's capabilities prevent regular writeback or
+        * sync from ever calling shmem_writepage; but a stacking filesystem
+        * may use the ->writepage of its underlying filesystem, in which case
+        * we want to do nothing when that underlying filesystem is tmpfs
+        * (writing out to swap is useful as a response to memory pressure, but
+        * of no use to stabilize the data) - just redirty the page, unlock it
+        * and claim success in this case.  AOP_WRITEPAGE_ACTIVATE, and the
+        * page_mapped check below, must be avoided unless we're in reclaim.
+        */
+       if (!wbc->for_reclaim) {
+               set_page_dirty(page);
+               unlock_page(page);
+               return 0;
+       }
        BUG_ON(page_mapped(page));
 
        mapping = page->mapping;
index d3b718b0c20a4dde049a6ca4e8301bcfcfdc824d..22620f6a976bd3909a92ad1d8f1720ab09e4dce4 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include <linux/vmalloc.h>
+#include <linux/sched.h>
 #include <asm/dma.h>
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
index 7c0b5151d5265408614fda8c25e489aff50c5b41..e0d37d6dc1f81e6ec7455fe5d1f0c5acabc0ccd8 100644 (file)
@@ -1044,7 +1044,7 @@ static int atalk_create(struct net *net, struct socket *sock, int protocol)
        if (sock->type != SOCK_RAW && sock->type != SOCK_DGRAM)
                goto out;
        rc = -ENOMEM;
-       sk = sk_alloc(net, PF_APPLETALK, GFP_KERNEL, &ddp_proto, 1);
+       sk = sk_alloc(net, PF_APPLETALK, GFP_KERNEL, &ddp_proto);
        if (!sk)
                goto out;
        rc = 0;
index e166d9e0ffd949f0fe9246a615d7f0a7fbb54b9d..eba09a04f6bf446f7922ca6b2a36e4b976993143 100644 (file)
@@ -133,7 +133,7 @@ int vcc_create(struct net *net, struct socket *sock, int protocol, int family)
        sock->sk = NULL;
        if (sock->type == SOCK_STREAM)
                return -EINVAL;
-       sk = sk_alloc(net, family, GFP_KERNEL, &vcc_proto, 1);
+       sk = sk_alloc(net, family, GFP_KERNEL, &vcc_proto);
        if (!sk)
                return -ENOMEM;
        sock_init_data(sock, sk);
index 993e5c75e90908c22c079f02ae5646f250fbfa8f..8378afd54b3014139eadf74f1414252a088e2966 100644 (file)
@@ -836,7 +836,8 @@ static int ax25_create(struct net *net, struct socket *sock, int protocol)
                return -ESOCKTNOSUPPORT;
        }
 
-       if ((sk = sk_alloc(net, PF_AX25, GFP_ATOMIC, &ax25_proto, 1)) == NULL)
+       sk = sk_alloc(net, PF_AX25, GFP_ATOMIC, &ax25_proto);
+       if (sk == NULL)
                return -ENOMEM;
 
        ax25 = sk->sk_protinfo = ax25_create_cb();
@@ -861,7 +862,8 @@ struct sock *ax25_make_new(struct sock *osk, struct ax25_dev *ax25_dev)
        struct sock *sk;
        ax25_cb *ax25, *oax25;
 
-       if ((sk = sk_alloc(osk->sk_net, PF_AX25, GFP_ATOMIC, osk->sk_prot, 1)) == NULL)
+       sk = sk_alloc(osk->sk_net, PF_AX25, GFP_ATOMIC, osk->sk_prot);
+       if (sk == NULL)
                return NULL;
 
        if ((ax25 = ax25_create_cb()) == NULL) {
index f718965f296c7c3cdd2b46453ffff644fd62fa53..9ebd3c64474d916480506d20e2db8be6f1b30182 100644 (file)
@@ -213,7 +213,7 @@ static int bnep_sock_create(struct net *net, struct socket *sock, int protocol)
        if (sock->type != SOCK_RAW)
                return -ESOCKTNOSUPPORT;
 
-       sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &bnep_proto, 1);
+       sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &bnep_proto);
        if (!sk)
                return -ENOMEM;
 
index cf700c20d11eb8915d901914ce3a02e8b546d838..783edab12ce82c024610b9dd3b91b9ee9f21ca3e 100644 (file)
@@ -204,7 +204,7 @@ static int cmtp_sock_create(struct net *net, struct socket *sock, int protocol)
        if (sock->type != SOCK_RAW)
                return -ESOCKTNOSUPPORT;
 
-       sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &cmtp_proto, 1);
+       sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &cmtp_proto);
        if (!sk)
                return -ENOMEM;
 
index 8825102c517c48180960a5821c949f6463ce0480..14991323c273a15793823107e25d79af5403f58e 100644 (file)
@@ -645,7 +645,7 @@ static int hci_sock_create(struct net *net, struct socket *sock, int protocol)
 
        sock->ops = &hci_sock_ops;
 
-       sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &hci_sk_proto, 1);
+       sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &hci_sk_proto);
        if (!sk)
                return -ENOMEM;
 
index 1de2b6fbcac0d442a2d9073e145aa82e3eb9c1d4..3292b956a7c491267d023ae5406561447a639810 100644 (file)
@@ -255,7 +255,7 @@ static int hidp_sock_create(struct net *net, struct socket *sock, int protocol)
        if (sock->type != SOCK_RAW)
                return -ESOCKTNOSUPPORT;
 
-       sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &hidp_proto, 1);
+       sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &hidp_proto);
        if (!sk)
                return -ENOMEM;
 
index 6fbbae78b30452c8ee6e20742d011ebaba4acc11..477e052b17b5d57bdbb820f9b5b98252b13f17b9 100644 (file)
@@ -607,7 +607,7 @@ static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock, int p
 {
        struct sock *sk;
 
-       sk = sk_alloc(net, PF_BLUETOOTH, prio, &l2cap_proto, 1);
+       sk = sk_alloc(net, PF_BLUETOOTH, prio, &l2cap_proto);
        if (!sk)
                return NULL;
 
index 266b6972667d7713899a22681af5f0a8eef21f73..c46d51035e77fa9e1f4db6e95fadb3f2e17f3e60 100644 (file)
@@ -287,7 +287,7 @@ static struct sock *rfcomm_sock_alloc(struct net *net, struct socket *sock, int
        struct rfcomm_dlc *d;
        struct sock *sk;
 
-       sk = sk_alloc(net, PF_BLUETOOTH, prio, &rfcomm_proto, 1);
+       sk = sk_alloc(net, PF_BLUETOOTH, prio, &rfcomm_proto);
        if (!sk)
                return NULL;
 
index 82d0dfdfa7e268a3dc21d03fb6d3d822b6998c50..93ad1aae3f38dece58f5820002216c18942b6b75 100644 (file)
@@ -421,7 +421,7 @@ static struct sock *sco_sock_alloc(struct net *net, struct socket *sock, int pro
 {
        struct sock *sk;
 
-       sk = sk_alloc(net, PF_BLUETOOTH, prio, &sco_proto, 1);
+       sk = sk_alloc(net, PF_BLUETOOTH, prio, &sco_proto);
        if (!sk)
                return NULL;
 
index 853c8b575f1d51d2300433073d8e1795b85806a5..be6cedab5aa83cc3d5551e89ef66d5597dfccbf0 100644 (file)
@@ -1751,9 +1751,6 @@ DEFINE_PER_CPU(struct netif_rx_stats, netdev_rx_stat) = { 0, };
  *
  *     return values:
  *     NET_RX_SUCCESS  (no congestion)
- *     NET_RX_CN_LOW   (low congestion)
- *     NET_RX_CN_MOD   (moderate congestion)
- *     NET_RX_CN_HIGH  (high congestion)
  *     NET_RX_DROP     (packet was dropped)
  *
  */
@@ -2001,6 +1998,21 @@ out:
 }
 #endif
 
+/**
+ *     netif_receive_skb - process receive buffer from network
+ *     @skb: buffer to process
+ *
+ *     netif_receive_skb() is the main receive data processing function.
+ *     It always succeeds. The buffer may be dropped during processing
+ *     for congestion control or by the protocol layers.
+ *
+ *     This function may only be called from softirq context and interrupts
+ *     should be enabled.
+ *
+ *     Return values (usually ignored):
+ *     NET_RX_SUCCESS: no congestion
+ *     NET_RX_DROP: packet was dropped
+ */
 int netif_receive_skb(struct sk_buff *skb)
 {
        struct packet_type *ptype, *pt_prev;
@@ -2172,7 +2184,15 @@ static void net_rx_action(struct softirq_action *h)
 
                weight = n->weight;
 
-               work = n->poll(n, weight);
+               /* This NAPI_STATE_SCHED test is for avoiding a race
+                * with netpoll's poll_napi().  Only the entity which
+                * obtains the lock and sees NAPI_STATE_SCHED set will
+                * actually make the ->poll() call.  Therefore we avoid
+                * accidently calling ->poll() when NAPI is not scheduled.
+                */
+               work = 0;
+               if (test_bit(NAPI_STATE_SCHED, &n->state))
+                       work = n->poll(n, weight);
 
                WARN_ON_ONCE(work > weight);
 
@@ -3488,6 +3508,60 @@ static void net_set_todo(struct net_device *dev)
        spin_unlock(&net_todo_list_lock);
 }
 
+static void rollback_registered(struct net_device *dev)
+{
+       BUG_ON(dev_boot_phase);
+       ASSERT_RTNL();
+
+       /* Some devices call without registering for initialization unwind. */
+       if (dev->reg_state == NETREG_UNINITIALIZED) {
+               printk(KERN_DEBUG "unregister_netdevice: device %s/%p never "
+                                 "was registered\n", dev->name, dev);
+
+               WARN_ON(1);
+               return;
+       }
+
+       BUG_ON(dev->reg_state != NETREG_REGISTERED);
+
+       /* If device is running, close it first. */
+       dev_close(dev);
+
+       /* And unlink it from device chain. */
+       unlist_netdevice(dev);
+
+       dev->reg_state = NETREG_UNREGISTERING;
+
+       synchronize_net();
+
+       /* Shutdown queueing discipline. */
+       dev_shutdown(dev);
+
+
+       /* Notify protocols, that we are about to destroy
+          this device. They should clean all the things.
+       */
+       call_netdevice_notifiers(NETDEV_UNREGISTER, dev);
+
+       /*
+        *      Flush the unicast and multicast chains
+        */
+       dev_addr_discard(dev);
+
+       if (dev->uninit)
+               dev->uninit(dev);
+
+       /* Notifier chain MUST detach us from master device. */
+       BUG_TRAP(!dev->master);
+
+       /* Remove entries from kobject tree */
+       netdev_unregister_kobject(dev);
+
+       synchronize_net();
+
+       dev_put(dev);
+}
+
 /**
  *     register_netdevice      - register a network device
  *     @dev: device to register
@@ -3625,8 +3699,10 @@ int register_netdevice(struct net_device *dev)
        /* Notify protocols, that a new device appeared. */
        ret = call_netdevice_notifiers(NETDEV_REGISTER, dev);
        ret = notifier_to_errno(ret);
-       if (ret)
-               unregister_netdevice(dev);
+       if (ret) {
+               rollback_registered(dev);
+               dev->reg_state = NETREG_UNREGISTERED;
+       }
 
 out:
        return ret;
@@ -3903,59 +3979,9 @@ void synchronize_net(void)
 
 void unregister_netdevice(struct net_device *dev)
 {
-       BUG_ON(dev_boot_phase);
-       ASSERT_RTNL();
-
-       /* Some devices call without registering for initialization unwind. */
-       if (dev->reg_state == NETREG_UNINITIALIZED) {
-               printk(KERN_DEBUG "unregister_netdevice: device %s/%p never "
-                                 "was registered\n", dev->name, dev);
-
-               WARN_ON(1);
-               return;
-       }
-
-       BUG_ON(dev->reg_state != NETREG_REGISTERED);
-
-       /* If device is running, close it first. */
-       dev_close(dev);
-
-       /* And unlink it from device chain. */
-       unlist_netdevice(dev);
-
-       dev->reg_state = NETREG_UNREGISTERING;
-
-       synchronize_net();
-
-       /* Shutdown queueing discipline. */
-       dev_shutdown(dev);
-
-
-       /* Notify protocols, that we are about to destroy
-          this device. They should clean all the things.
-       */
-       call_netdevice_notifiers(NETDEV_UNREGISTER, dev);
-
-       /*
-        *      Flush the unicast and multicast chains
-        */
-       dev_addr_discard(dev);
-
-       if (dev->uninit)
-               dev->uninit(dev);
-
-       /* Notifier chain MUST detach us from master device. */
-       BUG_TRAP(!dev->master);
-
-       /* Remove entries from kobject tree */
-       netdev_unregister_kobject(dev);
-
+       rollback_registered(dev);
        /* Finish processing unregister after unlock */
        net_set_todo(dev);
-
-       synchronize_net();
-
-       dev_put(dev);
 }
 
 /**
index 6f71db8c4428c04a573020a2773b72a97c8e2ff7..e9f0964ce70bf89eef873b23c2ad9c2f80a4cf57 100644 (file)
@@ -17,74 +17,13 @@ static DEFINE_MUTEX(net_mutex);
 
 LIST_HEAD(net_namespace_list);
 
-static struct kmem_cache *net_cachep;
-
 struct net init_net;
 EXPORT_SYMBOL_GPL(init_net);
 
-static struct net *net_alloc(void)
-{
-       return kmem_cache_zalloc(net_cachep, GFP_KERNEL);
-}
-
-static void net_free(struct net *net)
-{
-       if (!net)
-               return;
-
-       if (unlikely(atomic_read(&net->use_count) != 0)) {
-               printk(KERN_EMERG "network namespace not free! Usage: %d\n",
-                       atomic_read(&net->use_count));
-               return;
-       }
-
-       kmem_cache_free(net_cachep, net);
-}
-
-static void cleanup_net(struct work_struct *work)
-{
-       struct pernet_operations *ops;
-       struct net *net;
-
-       net = container_of(work, struct net, work);
-
-       mutex_lock(&net_mutex);
-
-       /* Don't let anyone else find us. */
-       rtnl_lock();
-       list_del(&net->list);
-       rtnl_unlock();
-
-       /* Run all of the network namespace exit methods */
-       list_for_each_entry_reverse(ops, &pernet_list, list) {
-               if (ops->exit)
-                       ops->exit(net);
-       }
-
-       mutex_unlock(&net_mutex);
-
-       /* Ensure there are no outstanding rcu callbacks using this
-        * network namespace.
-        */
-       rcu_barrier();
-
-       /* Finally it is safe to free my network namespace structure */
-       net_free(net);
-}
-
-
-void __put_net(struct net *net)
-{
-       /* Cleanup the network namespace in process context */
-       INIT_WORK(&net->work, cleanup_net);
-       schedule_work(&net->work);
-}
-EXPORT_SYMBOL_GPL(__put_net);
-
 /*
  * setup_net runs the initializers for the network namespace object.
  */
-static int setup_net(struct net *net)
+static __net_init int setup_net(struct net *net)
 {
        /* Must be called with net_mutex held */
        struct pernet_operations *ops;
@@ -112,9 +51,19 @@ out_undo:
                if (ops->exit)
                        ops->exit(net);
        }
+
+       rcu_barrier();
        goto out;
 }
 
+#ifdef CONFIG_NET_NS
+static struct kmem_cache *net_cachep;
+
+static struct net *net_alloc(void)
+{
+       return kmem_cache_zalloc(net_cachep, GFP_KERNEL);
+}
+
 struct net *copy_net_ns(unsigned long flags, struct net *old_net)
 {
        struct net *new_net = NULL;
@@ -125,10 +74,6 @@ struct net *copy_net_ns(unsigned long flags, struct net *old_net)
        if (!(flags & CLONE_NEWNET))
                return old_net;
 
-#ifndef CONFIG_NET_NS
-       return ERR_PTR(-EINVAL);
-#endif
-
        err = -ENOMEM;
        new_net = net_alloc();
        if (!new_net)
@@ -155,14 +100,78 @@ out:
        return new_net;
 }
 
+static void net_free(struct net *net)
+{
+       if (!net)
+               return;
+
+       if (unlikely(atomic_read(&net->use_count) != 0)) {
+               printk(KERN_EMERG "network namespace not free! Usage: %d\n",
+                       atomic_read(&net->use_count));
+               return;
+       }
+
+       kmem_cache_free(net_cachep, net);
+}
+
+static void cleanup_net(struct work_struct *work)
+{
+       struct pernet_operations *ops;
+       struct net *net;
+
+       net = container_of(work, struct net, work);
+
+       mutex_lock(&net_mutex);
+
+       /* Don't let anyone else find us. */
+       rtnl_lock();
+       list_del(&net->list);
+       rtnl_unlock();
+
+       /* Run all of the network namespace exit methods */
+       list_for_each_entry_reverse(ops, &pernet_list, list) {
+               if (ops->exit)
+                       ops->exit(net);
+       }
+
+       mutex_unlock(&net_mutex);
+
+       /* Ensure there are no outstanding rcu callbacks using this
+        * network namespace.
+        */
+       rcu_barrier();
+
+       /* Finally it is safe to free my network namespace structure */
+       net_free(net);
+}
+
+void __put_net(struct net *net)
+{
+       /* Cleanup the network namespace in process context */
+       INIT_WORK(&net->work, cleanup_net);
+       schedule_work(&net->work);
+}
+EXPORT_SYMBOL_GPL(__put_net);
+
+#else
+struct net *copy_net_ns(unsigned long flags, struct net *old_net)
+{
+       if (flags & CLONE_NEWNET)
+               return ERR_PTR(-EINVAL);
+       return old_net;
+}
+#endif
+
 static int __init net_ns_init(void)
 {
        int err;
 
        printk(KERN_INFO "net_namespace: %zd bytes\n", sizeof(struct net));
+#ifdef CONFIG_NET_NS
        net_cachep = kmem_cache_create("net_namespace", sizeof(struct net),
                                        SMP_CACHE_BYTES,
                                        SLAB_PANIC, NULL);
+#endif
        mutex_lock(&net_mutex);
        err = setup_net(&init_net);
 
@@ -185,29 +194,28 @@ static int register_pernet_operations(struct list_head *list,
        struct net *net, *undo_net;
        int error;
 
-       error = 0;
        list_add_tail(&ops->list, list);
-       for_each_net(net) {
-               if (ops->init) {
+       if (ops->init) {
+               for_each_net(net) {
                        error = ops->init(net);
                        if (error)
                                goto out_undo;
                }
        }
-out:
-       return error;
+       return 0;
 
 out_undo:
        /* If I have an error cleanup all namespaces I initialized */
        list_del(&ops->list);
-       for_each_net(undo_net) {
-               if (undo_net == net)
-                       goto undone;
-               if (ops->exit)
+       if (ops->exit) {
+               for_each_net(undo_net) {
+                       if (undo_net == net)
+                               goto undone;
                        ops->exit(undo_net);
+               }
        }
 undone:
-       goto out;
+       return error;
 }
 
 static void unregister_pernet_operations(struct pernet_operations *ops)
@@ -215,8 +223,8 @@ static void unregister_pernet_operations(struct pernet_operations *ops)
        struct net *net;
 
        list_del(&ops->list);
-       for_each_net(net)
-               if (ops->exit)
+       if (ops->exit)
+               for_each_net(net)
                        ops->exit(net);
 }
 
index bf8d18f1b0130ffd258281eb264140ecbfe2b85d..c499b5c69bedbce96611baaec02eb9cfcb0798a6 100644 (file)
@@ -116,6 +116,29 @@ static __sum16 checksum_udp(struct sk_buff *skb, struct udphdr *uh,
  * network adapter, forcing superfluous retries and possibly timeouts.
  * Thus, we set our budget to greater than 1.
  */
+static int poll_one_napi(struct netpoll_info *npinfo,
+                        struct napi_struct *napi, int budget)
+{
+       int work;
+
+       /* net_rx_action's ->poll() invocations and our's are
+        * synchronized by this test which is only made while
+        * holding the napi->poll_lock.
+        */
+       if (!test_bit(NAPI_STATE_SCHED, &napi->state))
+               return budget;
+
+       npinfo->rx_flags |= NETPOLL_RX_DROP;
+       atomic_inc(&trapped);
+
+       work = napi->poll(napi, budget);
+
+       atomic_dec(&trapped);
+       npinfo->rx_flags &= ~NETPOLL_RX_DROP;
+
+       return budget - work;
+}
+
 static void poll_napi(struct netpoll *np)
 {
        struct netpoll_info *npinfo = np->dev->npinfo;
@@ -123,17 +146,13 @@ static void poll_napi(struct netpoll *np)
        int budget = 16;
 
        list_for_each_entry(napi, &np->dev->napi_list, dev_list) {
-               if (test_bit(NAPI_STATE_SCHED, &napi->state) &&
-                   napi->poll_owner != smp_processor_id() &&
+               if (napi->poll_owner != smp_processor_id() &&
                    spin_trylock(&napi->poll_lock)) {
-                       npinfo->rx_flags |= NETPOLL_RX_DROP;
-                       atomic_inc(&trapped);
-
-                       napi->poll(napi, budget);
-
-                       atomic_dec(&trapped);
-                       npinfo->rx_flags &= ~NETPOLL_RX_DROP;
+                       budget = poll_one_napi(npinfo, napi, budget);
                        spin_unlock(&napi->poll_lock);
+
+                       if (!budget)
+                               break;
                }
        }
 }
index 573e1724019716767a8d8872d5c290c4337e6999..64b50ff7a41399baeec0d10a44a94e291d9e8607 100644 (file)
@@ -2028,8 +2028,8 @@ void __init skb_init(void)
  *     Fill the specified scatter-gather list with mappings/pointers into a
  *     region of the buffer space attached to a socket buffer.
  */
-int
-skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len)
+static int
+__skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len)
 {
        int start = skb_headlen(skb);
        int i, copy = start - offset;
@@ -2078,7 +2078,8 @@ skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len)
                        if ((copy = end - offset) > 0) {
                                if (copy > len)
                                        copy = len;
-                               elt += skb_to_sgvec(list, sg+elt, offset - start, copy);
+                               elt += __skb_to_sgvec(list, sg+elt, offset - start,
+                                                     copy);
                                if ((len -= copy) == 0)
                                        return elt;
                                offset += copy;
@@ -2090,6 +2091,15 @@ skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len)
        return elt;
 }
 
+int skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len)
+{
+       int nsg = __skb_to_sgvec(skb, sg, offset, len);
+
+       __sg_mark_end(&sg[nsg - 1]);
+
+       return nsg;
+}
+
 /**
  *     skb_cow_data - Check that a socket buffer's data buffers are writable
  *     @skb: The socket buffer to check.
index bba9949681ff7e132f84629602814dc7d9aa17d4..12ad2067a988405b2768afa4eb421afd8440a1c8 100644 (file)
@@ -857,46 +857,43 @@ static inline void sock_lock_init(struct sock *sk)
                        af_family_keys + sk->sk_family);
 }
 
-/**
- *     sk_alloc - All socket objects are allocated here
- *     @net: the applicable net namespace
- *     @family: protocol family
- *     @priority: for allocation (%GFP_KERNEL, %GFP_ATOMIC, etc)
- *     @prot: struct proto associated with this new sock instance
- *     @zero_it: if we should zero the newly allocated sock
- */
-struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
-                     struct proto *prot, int zero_it)
+static void sock_copy(struct sock *nsk, const struct sock *osk)
+{
+#ifdef CONFIG_SECURITY_NETWORK
+       void *sptr = nsk->sk_security;
+#endif
+
+       memcpy(nsk, osk, osk->sk_prot->obj_size);
+#ifdef CONFIG_SECURITY_NETWORK
+       nsk->sk_security = sptr;
+       security_sk_clone(osk, nsk);
+#endif
+}
+
+static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority,
+               int family)
 {
-       struct sock *sk = NULL;
-       struct kmem_cache *slab = prot->slab;
+       struct sock *sk;
+       struct kmem_cache *slab;
 
+       slab = prot->slab;
        if (slab != NULL)
                sk = kmem_cache_alloc(slab, priority);
        else
                sk = kmalloc(prot->obj_size, priority);
 
-       if (sk) {
-               if (zero_it) {
-                       memset(sk, 0, prot->obj_size);
-                       sk->sk_family = family;
-                       /*
-                        * See comment in struct sock definition to understand
-                        * why we need sk_prot_creator -acme
-                        */
-                       sk->sk_prot = sk->sk_prot_creator = prot;
-                       sock_lock_init(sk);
-                       sk->sk_net = get_net(net);
-               }
-
+       if (sk != NULL) {
                if (security_sk_alloc(sk, family, priority))
                        goto out_free;
 
                if (!try_module_get(prot->owner))
-                       goto out_free;
+                       goto out_free_sec;
        }
+
        return sk;
 
+out_free_sec:
+       security_sk_free(sk);
 out_free:
        if (slab != NULL)
                kmem_cache_free(slab, sk);
@@ -905,10 +902,53 @@ out_free:
        return NULL;
 }
 
+static void sk_prot_free(struct proto *prot, struct sock *sk)
+{
+       struct kmem_cache *slab;
+       struct module *owner;
+
+       owner = prot->owner;
+       slab = prot->slab;
+
+       security_sk_free(sk);
+       if (slab != NULL)
+               kmem_cache_free(slab, sk);
+       else
+               kfree(sk);
+       module_put(owner);
+}
+
+/**
+ *     sk_alloc - All socket objects are allocated here
+ *     @net: the applicable net namespace
+ *     @family: protocol family
+ *     @priority: for allocation (%GFP_KERNEL, %GFP_ATOMIC, etc)
+ *     @prot: struct proto associated with this new sock instance
+ *     @zero_it: if we should zero the newly allocated sock
+ */
+struct sock *sk_alloc(struct net *net, int family, gfp_t priority,
+                     struct proto *prot)
+{
+       struct sock *sk;
+
+       sk = sk_prot_alloc(prot, priority | __GFP_ZERO, family);
+       if (sk) {
+               sk->sk_family = family;
+               /*
+                * See comment in struct sock definition to understand
+                * why we need sk_prot_creator -acme
+                */
+               sk->sk_prot = sk->sk_prot_creator = prot;
+               sock_lock_init(sk);
+               sk->sk_net = get_net(net);
+       }
+
+       return sk;
+}
+
 void sk_free(struct sock *sk)
 {
        struct sk_filter *filter;
-       struct module *owner = sk->sk_prot_creator->owner;
 
        if (sk->sk_destruct)
                sk->sk_destruct(sk);
@@ -925,25 +965,22 @@ void sk_free(struct sock *sk)
                printk(KERN_DEBUG "%s: optmem leakage (%d bytes) detected.\n",
                       __FUNCTION__, atomic_read(&sk->sk_omem_alloc));
 
-       security_sk_free(sk);
        put_net(sk->sk_net);
-       if (sk->sk_prot_creator->slab != NULL)
-               kmem_cache_free(sk->sk_prot_creator->slab, sk);
-       else
-               kfree(sk);
-       module_put(owner);
+       sk_prot_free(sk->sk_prot_creator, sk);
 }
 
 struct sock *sk_clone(const struct sock *sk, const gfp_t priority)
 {
-       struct sock *newsk = sk_alloc(sk->sk_net, sk->sk_family, priority, sk->sk_prot, 0);
+       struct sock *newsk;
 
+       newsk = sk_prot_alloc(sk->sk_prot, priority, sk->sk_family);
        if (newsk != NULL) {
                struct sk_filter *filter;
 
                sock_copy(newsk, sk);
 
                /* SANITY */
+               get_net(newsk->sk_net);
                sk_node_init(&newsk->sk_node);
                sock_lock_init(newsk);
                bh_lock_sock(newsk);
index aabe98d9402f492bac411e111da9a0cc66a011f8..57d5749518380c06cd9dc6863d649e8cfbc230fe 100644 (file)
@@ -474,7 +474,7 @@ static struct proto dn_proto = {
 static struct sock *dn_alloc_sock(struct net *net, struct socket *sock, gfp_t gfp)
 {
        struct dn_scp *scp;
-       struct sock *sk = sk_alloc(net, PF_DECnet, gfp, &dn_proto, 1);
+       struct sock *sk = sk_alloc(net, PF_DECnet, gfp, &dn_proto);
 
        if  (!sk)
                goto out;
index 9cae16b4e0b7cea737c88a763d34a8eb49d079a8..f70df073c58800552cf69a105da1b2c800e40383 100644 (file)
@@ -624,7 +624,7 @@ static int econet_create(struct net *net, struct socket *sock, int protocol)
        sock->state = SS_UNCONNECTED;
 
        err = -ENOBUFS;
-       sk = sk_alloc(net, PF_ECONET, GFP_KERNEL, &econet_proto, 1);
+       sk = sk_alloc(net, PF_ECONET, GFP_KERNEL, &econet_proto);
        if (sk == NULL)
                goto out;
 
index 621b128897d7af80015506b4ae7abb8116ad6d23..d2f22e74b26713b2125d2e6c2a7385eb47840336 100644 (file)
@@ -323,7 +323,7 @@ lookup_protocol:
        BUG_TRAP(answer_prot->slab != NULL);
 
        err = -ENOBUFS;
-       sk = sk_alloc(net, PF_INET, GFP_KERNEL, answer_prot, 1);
+       sk = sk_alloc(net, PF_INET, GFP_KERNEL, answer_prot);
        if (sk == NULL)
                goto out;
 
index cad4278025adc83b1b4430c949a3c65fa36f8f9c..c31bccb9b526c99d539c1c13a94531f23c982318 100644 (file)
@@ -111,9 +111,10 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb)
                                goto unlock;
                }
                sg_init_table(sg, nfrags);
-               sg_mark_end(sg, skb_to_sgvec(skb, sg, esph->enc_data +
-                                                     esp->conf.ivlen -
-                                                     skb->data, clen));
+               skb_to_sgvec(skb, sg,
+                            esph->enc_data +
+                            esp->conf.ivlen -
+                            skb->data, clen);
                err = crypto_blkcipher_encrypt(&desc, sg, sg, clen);
                if (unlikely(sg != &esp->sgbuf[0]))
                        kfree(sg);
@@ -205,8 +206,9 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb)
                        goto out;
        }
        sg_init_table(sg, nfrags);
-       sg_mark_end(sg, skb_to_sgvec(skb, sg, sizeof(*esph) + esp->conf.ivlen,
-                                    elen));
+       skb_to_sgvec(skb, sg,
+                    sizeof(*esph) + esp->conf.ivlen,
+                    elen);
        err = crypto_blkcipher_decrypt(&desc, sg, sg, elen);
        if (unlikely(sg != &esp->sgbuf[0]))
                kfree(sg);
index 6a1fec416eafc6fc0076dcb06632559238cd6da8..427b593c1069b82bab52215a16767db96fe6ae91 100644 (file)
@@ -48,8 +48,6 @@
 /* for sysctl */
 #include <linux/fs.h>
 #include <linux/sysctl.h>
-/* for proc_net_create/proc_net_remove */
-#include <linux/proc_fs.h>
 #include <net/net_namespace.h>
 
 #include <net/ip_vs.h>
@@ -547,71 +545,6 @@ static void ip_vs_lblcr_check_expire(unsigned long data)
        mod_timer(&tbl->periodic_timer, jiffies+CHECK_EXPIRE_INTERVAL);
 }
 
-
-#ifdef CONFIG_IP_VS_LBLCR_DEBUG
-static struct ip_vs_lblcr_table *lblcr_table_list;
-
-/*
- *     /proc/net/ip_vs_lblcr to display the mappings of
- *                  destination IP address <==> its serverSet
- */
-static int
-ip_vs_lblcr_getinfo(char *buffer, char **start, off_t offset, int length)
-{
-       off_t pos=0, begin;
-       int len=0, size;
-       struct ip_vs_lblcr_table *tbl;
-       unsigned long now = jiffies;
-       int i;
-       struct ip_vs_lblcr_entry *en;
-
-       tbl = lblcr_table_list;
-
-       size = sprintf(buffer, "LastTime Dest IP address  Server set\n");
-       pos += size;
-       len += size;
-
-       for (i=0; i<IP_VS_LBLCR_TAB_SIZE; i++) {
-               read_lock_bh(&tbl->lock);
-               list_for_each_entry(en, &tbl->bucket[i], list) {
-                       char tbuf[16];
-                       struct ip_vs_dest_list *d;
-
-                       sprintf(tbuf, "%u.%u.%u.%u", NIPQUAD(en->addr));
-                       size = sprintf(buffer+len, "%8lu %-16s ",
-                                      now-en->lastuse, tbuf);
-
-                       read_lock(&en->set.lock);
-                       for (d=en->set.list; d!=NULL; d=d->next) {
-                               size += sprintf(buffer+len+size,
-                                               "%u.%u.%u.%u ",
-                                               NIPQUAD(d->dest->addr));
-                       }
-                       read_unlock(&en->set.lock);
-                       size += sprintf(buffer+len+size, "\n");
-                       len += size;
-                       pos += size;
-                       if (pos <= offset)
-                               len=0;
-                       if (pos >= offset+length) {
-                               read_unlock_bh(&tbl->lock);
-                               goto done;
-                       }
-               }
-               read_unlock_bh(&tbl->lock);
-       }
-
-  done:
-       begin = len - (pos - offset);
-       *start = buffer + begin;
-       len -= begin;
-       if(len>length)
-               len = length;
-       return len;
-}
-#endif
-
-
 static int ip_vs_lblcr_init_svc(struct ip_vs_service *svc)
 {
        int i;
@@ -650,9 +583,6 @@ static int ip_vs_lblcr_init_svc(struct ip_vs_service *svc)
        tbl->periodic_timer.expires = jiffies+CHECK_EXPIRE_INTERVAL;
        add_timer(&tbl->periodic_timer);
 
-#ifdef CONFIG_IP_VS_LBLCR_DEBUG
-       lblcr_table_list = tbl;
-#endif
        return 0;
 }
 
@@ -843,18 +773,12 @@ static int __init ip_vs_lblcr_init(void)
 {
        INIT_LIST_HEAD(&ip_vs_lblcr_scheduler.n_list);
        sysctl_header = register_sysctl_table(lblcr_root_table);
-#ifdef CONFIG_IP_VS_LBLCR_DEBUG
-       proc_net_create(&init_net, "ip_vs_lblcr", 0, ip_vs_lblcr_getinfo);
-#endif
        return register_ip_vs_scheduler(&ip_vs_lblcr_scheduler);
 }
 
 
 static void __exit ip_vs_lblcr_cleanup(void)
 {
-#ifdef CONFIG_IP_VS_LBLCR_DEBUG
-       proc_net_remove(&init_net, "ip_vs_lblcr");
-#endif
        unregister_sysctl_table(sysctl_header);
        unregister_ip_vs_scheduler(&ip_vs_lblcr_scheduler);
 }
index c99f2a33fb9e9165a3f2b7144ea609b6b151e34b..0d4d9721cbd403c5276151aa643cf6dcf4ea3010 100644 (file)
@@ -72,7 +72,6 @@ struct ip_vs_sync_thread_data {
        int state;
 };
 
-#define IP_VS_SYNC_CONN_TIMEOUT (3*60*HZ)
 #define SIMPLE_CONN_SIZE  (sizeof(struct ip_vs_sync_conn))
 #define FULL_CONN_SIZE  \
 (sizeof(struct ip_vs_sync_conn) + sizeof(struct ip_vs_sync_conn_options))
@@ -284,6 +283,7 @@ static void ip_vs_process_message(const char *buffer, const size_t buflen)
        struct ip_vs_sync_conn *s;
        struct ip_vs_sync_conn_options *opt;
        struct ip_vs_conn *cp;
+       struct ip_vs_protocol *pp;
        char *p;
        int i;
 
@@ -342,7 +342,8 @@ static void ip_vs_process_message(const char *buffer, const size_t buflen)
                        p += SIMPLE_CONN_SIZE;
 
                atomic_set(&cp->in_pkts, sysctl_ip_vs_sync_threshold[0]);
-               cp->timeout = IP_VS_SYNC_CONN_TIMEOUT;
+               pp = ip_vs_proto_get(s->protocol);
+               cp->timeout = pp->timeout_table[cp->state];
                ip_vs_conn_put(cp);
 
                if (p > buffer+buflen) {
index fa97947c6ae1024fd1a88ae25a29dc4566977766..9aca9c55687cd6bfd6a96a63bb40d90b8d1f3ba1 100644 (file)
@@ -128,7 +128,7 @@ config IP_NF_MATCH_ADDRTYPE
          eg. UNICAST, LOCAL, BROADCAST, ...
        
          If you want to compile it as a module, say M here and read
-         <file:Documentation/modules.txt>.  If unsure, say `N'.
+         <file:Documentation/kbuild/modules.txt>.  If unsure, say `N'.
 
 # `filter', generic and specific targets
 config IP_NF_FILTER
@@ -371,7 +371,7 @@ config IP_NF_RAW
          and OUTPUT chains.
        
          If you want to compile it as a module, say M here and read
-         <file:Documentation/modules.txt>.  If unsure, say `N'.
+         <file:Documentation/kbuild/modules.txt>.  If unsure, say `N'.
 
 # ARP tables
 config IP_NF_ARPTABLES
index 9be0daa9c0ecc16c6a95f2c9402b9879df6fdc08..ffdccc0972e039d52dd5e236ee71f677fb4474f2 100644 (file)
@@ -304,7 +304,7 @@ static void icmp_put(struct seq_file *seq)
        for (i=0; icmpmibmap[i].name != NULL; i++)
                seq_printf(seq, " %lu",
                        snmp_fold_field((void **) icmpmsg_statistics,
-                               icmpmibmap[i].index));
+                               icmpmibmap[i].index | 0x100));
 }
 
 /*
index 2e6ad6dbba6c54d904d1df28d6e38dfcd7640b00..c64072bb504b3f6debca30cf670c411c30944d37 100644 (file)
@@ -2453,7 +2453,7 @@ void __init tcp_init(void)
                                        0,
                                        &tcp_hashinfo.ehash_size,
                                        NULL,
-                                       0);
+                                       thash_entries ? 0 : 512 * 1024);
        tcp_hashinfo.ehash_size = 1 << tcp_hashinfo.ehash_size;
        for (i = 0; i < tcp_hashinfo.ehash_size; i++) {
                rwlock_init(&tcp_hashinfo.ehash[i].lock);
index 69d8c38ccd3900aa7c9bedac6506f0b6cf34aaea..ca9590f4f520a4b08a2913659a1a48b374d341d9 100644 (file)
@@ -1330,12 +1330,15 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
                cached_fack_count = 0;
        }
 
-       for (i=0; i<num_sacks; i++, sp++) {
+       for (i = 0; i < num_sacks; i++) {
                struct sk_buff *skb;
                __u32 start_seq = ntohl(sp->start_seq);
                __u32 end_seq = ntohl(sp->end_seq);
                int fack_count;
                int dup_sack = (found_dup_sack && (i == first_sack_index));
+               int next_dup = (found_dup_sack && (i+1 == first_sack_index));
+
+               sp++;
 
                if (!tcp_is_sackblock_valid(tp, dup_sack, start_seq, end_seq)) {
                        if (dup_sack) {
@@ -1361,7 +1364,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
                        flag |= FLAG_DATA_LOST;
 
                tcp_for_write_queue_from(skb, sk) {
-                       int in_sack;
+                       int in_sack = 0;
                        u8 sacked;
 
                        if (skb == tcp_send_head(sk))
@@ -1380,7 +1383,23 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
                        if (!before(TCP_SKB_CB(skb)->seq, end_seq))
                                break;
 
-                       in_sack = tcp_match_skb_to_sack(sk, skb, start_seq, end_seq);
+                       dup_sack = (found_dup_sack && (i == first_sack_index));
+
+                       /* Due to sorting DSACK may reside within this SACK block! */
+                       if (next_dup) {
+                               u32 dup_start = ntohl(sp->start_seq);
+                               u32 dup_end = ntohl(sp->end_seq);
+
+                               if (before(TCP_SKB_CB(skb)->seq, dup_end)) {
+                                       in_sack = tcp_match_skb_to_sack(sk, skb, dup_start, dup_end);
+                                       if (in_sack > 0)
+                                               dup_sack = 1;
+                               }
+                       }
+
+                       /* DSACK info lost if out-of-mem, try SACK still */
+                       if (in_sack <= 0)
+                               in_sack = tcp_match_skb_to_sack(sk, skb, start_seq, end_seq);
                        if (in_sack < 0)
                                break;
 
@@ -2059,7 +2078,7 @@ static void tcp_update_scoreboard(struct sock *sk)
                        if (!tcp_skb_timedout(sk, skb))
                                break;
 
-                       if (!(TCP_SKB_CB(skb)->sacked&TCPCB_TAGBITS)) {
+                       if (!(TCP_SKB_CB(skb)->sacked & (TCPCB_SACKED_ACKED|TCPCB_LOST))) {
                                TCP_SKB_CB(skb)->sacked |= TCPCB_LOST;
                                tp->lost_out += tcp_skb_pcount(skb);
                                tcp_verify_retransmit_hint(tp, skb);
index ad759f1c377734bf252a25422e136c275f132312..eec02b29ffcfb7c71483f8e59816a44c528da02c 100644 (file)
@@ -858,16 +858,16 @@ int tcp_v4_md5_do_add(struct sock *sk, __be32 addr,
                      u8 *newkey, u8 newkeylen)
 {
        /* Add Key to the list */
-       struct tcp4_md5sig_key *key;
+       struct tcp_md5sig_key *key;
        struct tcp_sock *tp = tcp_sk(sk);
        struct tcp4_md5sig_key *keys;
 
-       key = (struct tcp4_md5sig_key *)tcp_v4_md5_do_lookup(sk, addr);
+       key = tcp_v4_md5_do_lookup(sk, addr);
        if (key) {
                /* Pre-existing entry - just update that one. */
-               kfree(key->base.key);
-               key->base.key = newkey;
-               key->base.keylen = newkeylen;
+               kfree(key->key);
+               key->key = newkey;
+               key->keylen = newkeylen;
        } else {
                struct tcp_md5sig_info *md5sig;
 
@@ -1083,7 +1083,7 @@ static int tcp_v4_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key,
        sg_set_buf(&sg[block++], key->key, key->keylen);
        nbytes += key->keylen;
 
-       sg_mark_end(sg, block);
+       __sg_mark_end(&sg[block - 1]);
 
        /* Now store the Hash into the packet */
        err = crypto_hash_init(desc);
index b49dedcda52df949c159db5b12635c9414a1538a..007304e99842f700da8d4ff7ffab7ac37fddd28c 100644 (file)
@@ -266,26 +266,25 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack,
                         */
                        diff = (old_wnd << V_PARAM_SHIFT) - target_cwnd;
 
-                       if (tp->snd_cwnd <= tp->snd_ssthresh) {
-                               /* Slow start.  */
-                               if (diff > gamma) {
-                                       /* Going too fast. Time to slow down
-                                        * and switch to congestion avoidance.
-                                        */
-                                       tp->snd_ssthresh = 2;
-
-                                       /* Set cwnd to match the actual rate
-                                        * exactly:
-                                        *   cwnd = (actual rate) * baseRTT
-                                        * Then we add 1 because the integer
-                                        * truncation robs us of full link
-                                        * utilization.
-                                        */
-                                       tp->snd_cwnd = min(tp->snd_cwnd,
-                                                          (target_cwnd >>
-                                                           V_PARAM_SHIFT)+1);
+                       if (diff > gamma && tp->snd_ssthresh > 2 ) {
+                               /* Going too fast. Time to slow down
+                                * and switch to congestion avoidance.
+                                */
+                               tp->snd_ssthresh = 2;
+
+                               /* Set cwnd to match the actual rate
+                                * exactly:
+                                *   cwnd = (actual rate) * baseRTT
+                                * Then we add 1 because the integer
+                                * truncation robs us of full link
+                                * utilization.
+                                */
+                               tp->snd_cwnd = min(tp->snd_cwnd,
+                                                  (target_cwnd >>
+                                                   V_PARAM_SHIFT)+1);
 
-                               }
+                       } else if (tp->snd_cwnd <= tp->snd_ssthresh) {
+                               /* Slow start.  */
                                tcp_slow_start(tp);
                        } else {
                                /* Congestion avoidance. */
index 348bd8d061125f61932c74d683e6a3f8d69c28e6..1bd8d818f8e9ec1b28b3ae74eae6d78975d03020 100644 (file)
@@ -4288,8 +4288,4 @@ void __exit addrconf_cleanup(void)
        del_timer(&addr_chk_timer);
 
        rtnl_unlock();
-
-#ifdef CONFIG_PROC_FS
-       proc_net_remove(&init_net, "if_inet6");
-#endif
 }
index 1b1caf3aa1c189d7ce57bf38d4276afa5d4c35c9..ecbd38894fdd1b2f971c1aeb25e36d1b74e961de 100644 (file)
@@ -162,7 +162,7 @@ lookup_protocol:
        BUG_TRAP(answer_prot->slab != NULL);
 
        err = -ENOBUFS;
-       sk = sk_alloc(net, PF_INET6, GFP_KERNEL, answer_prot, 1);
+       sk = sk_alloc(net, PF_INET6, GFP_KERNEL, answer_prot);
        if (sk == NULL)
                goto out;
 
index ab17b5e62355f144770d005ede345912f04c186c..7db66f10e00d18f80d705fd83459ac5aec43f327 100644 (file)
@@ -110,9 +110,10 @@ static int esp6_output(struct xfrm_state *x, struct sk_buff *skb)
                                goto unlock;
                }
                sg_init_table(sg, nfrags);
-               sg_mark_end(sg, skb_to_sgvec(skb, sg, esph->enc_data +
-                                                     esp->conf.ivlen -
-                                                     skb->data, clen));
+               skb_to_sgvec(skb, sg,
+                            esph->enc_data +
+                            esp->conf.ivlen -
+                            skb->data, clen);
                err = crypto_blkcipher_encrypt(&desc, sg, sg, clen);
                if (unlikely(sg != &esp->sgbuf[0]))
                        kfree(sg);
@@ -209,9 +210,9 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
                        }
                }
                sg_init_table(sg, nfrags);
-               sg_mark_end(sg, skb_to_sgvec(skb, sg,
-                                            sizeof(*esph) + esp->conf.ivlen,
-                                            elen));
+               skb_to_sgvec(skb, sg,
+                            sizeof(*esph) + esp->conf.ivlen,
+                            elen);
                ret = crypto_blkcipher_decrypt(&desc, sg, sg, elen);
                if (unlikely(sg != &esp->sgbuf[0]))
                        kfree(sg);
index 20cfc90d5597dc266d398beb8de1eaeb0a77107f..36f7dbfb6dbbd72cc36cca13157930c9fdc4915a 100644 (file)
@@ -1670,7 +1670,7 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f
                                            filp, buffer, lenp, ppos);
 
        else if ((strcmp(ctl->procname, "retrans_time_ms") == 0) ||
-                (strcmp(ctl->procname, "base_reacable_time_ms") == 0))
+                (strcmp(ctl->procname, "base_reachable_time_ms") == 0))
                ret = proc_dointvec_ms_jiffies(ctl, write,
                                               filp, buffer, lenp, ppos);
        else
index 85208026278b5a217123656a8c90e2ed25c93d46..4b9032880959421be4d8e08780f58efd38cdb726 100644 (file)
@@ -561,16 +561,16 @@ static int tcp_v6_md5_do_add(struct sock *sk, struct in6_addr *peer,
                             char *newkey, u8 newkeylen)
 {
        /* Add key to the list */
-       struct tcp6_md5sig_key *key;
+       struct tcp_md5sig_key *key;
        struct tcp_sock *tp = tcp_sk(sk);
        struct tcp6_md5sig_key *keys;
 
-       key = (struct tcp6_md5sig_key*) tcp_v6_md5_do_lookup(sk, peer);
+       key = tcp_v6_md5_do_lookup(sk, peer);
        if (key) {
                /* modify existing entry - just update that one */
-               kfree(key->base.key);
-               key->base.key = newkey;
-               key->base.keylen = newkeylen;
+               kfree(key->key);
+               key->key = newkey;
+               key->keylen = newkeylen;
        } else {
                /* reallocate new list if current one is full. */
                if (!tp->md5sig_info) {
@@ -781,7 +781,7 @@ static int tcp_v6_do_calc_md5_hash(char *md5_hash, struct tcp_md5sig_key *key,
        sg_set_buf(&sg[block++], key->key, key->keylen);
        nbytes += key->keylen;
 
-       sg_mark_end(sg, block);
+       __sg_mark_end(&sg[block - 1]);
 
        /* Now store the hash into the packet */
        err = crypto_hash_init(desc);
index 29b063d4312052cefd1a9bbdfd02b62d8b212211..a195a66e0cc799192e258533a84c0b3a558b92ce 100644 (file)
@@ -1381,7 +1381,7 @@ static int ipx_create(struct net *net, struct socket *sock, int protocol)
                goto out;
 
        rc = -ENOMEM;
-       sk = sk_alloc(net, PF_IPX, GFP_KERNEL, &ipx_proto, 1);
+       sk = sk_alloc(net, PF_IPX, GFP_KERNEL, &ipx_proto);
        if (!sk)
                goto out;
 #ifdef IPX_REFCNT_DEBUG
index 0328ae2654f43333fc09980368dec290641d24fb..48ce59a6e0265bf6bef19fa79b2e056e85aa9bdd 100644 (file)
@@ -1078,7 +1078,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol)
        }
 
        /* Allocate networking socket */
-       sk = sk_alloc(net, PF_IRDA, GFP_ATOMIC, &irda_proto, 1);
+       sk = sk_alloc(net, PF_IRDA, GFP_ATOMIC, &irda_proto);
        if (sk == NULL)
                return -ENOMEM;
 
index 2f9f8dce5a6946b1f72772b05f30eeaf550b4691..e0eab5927c4f434d6210711525ac9b14ba34599e 100644 (file)
@@ -731,15 +731,25 @@ dev_irnet_ioctl(struct inode *    inode,
       /* Get termios */
     case TCGETS:
       DEBUG(FS_INFO, "Get termios.\n");
+#ifndef TCGETS2
       if(kernel_termios_to_user_termios((struct termios __user *)argp, &ap->termios))
        break;
+#else
+      if(kernel_termios_to_user_termios_1((struct termios __user *)argp, &ap->termios))
+       break;
+#endif
       err = 0;
       break;
       /* Set termios */
     case TCSETSF:
       DEBUG(FS_INFO, "Set termios.\n");
+#ifndef TCGETS2
       if(user_termios_to_kernel_termios(&ap->termios, (struct termios __user *)argp))
        break;
+#else
+      if(user_termios_to_kernel_termios_1(&ap->termios, (struct termios __user *)argp))
+       break;
+#endif
       err = 0;
       break;
 
index 43e01c8d382b5ab09f8d1c94f7b2572b3c89902b..aef6645803559c0e0695574a731dad158fa8a091 100644 (file)
@@ -216,7 +216,7 @@ static struct sock *iucv_sock_alloc(struct socket *sock, int proto, gfp_t prio)
 {
        struct sock *sk;
 
-       sk = sk_alloc(&init_net, PF_IUCV, prio, &iucv_proto, 1);
+       sk = sk_alloc(&init_net, PF_IUCV, prio, &iucv_proto);
        if (!sk)
                return NULL;
 
index 7969f8a716df6063dbaaeebad90630b6cd6472cd..10c89d47f685e492702a595dfc0061269d27801f 100644 (file)
@@ -152,7 +152,7 @@ static int pfkey_create(struct net *net, struct socket *sock, int protocol)
                return -EPROTONOSUPPORT;
 
        err = -ENOMEM;
-       sk = sk_alloc(net, PF_KEY, GFP_KERNEL, &key_proto, 1);
+       sk = sk_alloc(net, PF_KEY, GFP_KERNEL, &key_proto);
        if (sk == NULL)
                goto out;
 
@@ -395,9 +395,9 @@ static inline int pfkey_sec_ctx_len(struct sadb_x_sec_ctx *sec_ctx)
 static inline int verify_sec_ctx_len(void *p)
 {
        struct sadb_x_sec_ctx *sec_ctx = (struct sadb_x_sec_ctx *)p;
-       int len;
+       int len = sec_ctx->sadb_x_ctx_len;
 
-       if (sec_ctx->sadb_x_ctx_len > PAGE_SIZE)
+       if (len > PAGE_SIZE)
                return -EINVAL;
 
        len = pfkey_sec_ctx_len(sec_ctx);
index 8ebc2769dfdabc88c288468002148d5c974fd68f..5c0b484237c81b0b370369f48d9449b796c3d9ac 100644 (file)
@@ -869,7 +869,7 @@ static void llc_sk_init(struct sock* sk)
  */
 struct sock *llc_sk_alloc(struct net *net, int family, gfp_t priority, struct proto *prot)
 {
-       struct sock *sk = sk_alloc(net, family, priority, prot, 1);
+       struct sock *sk = sk_alloc(net, family, priority, prot);
 
        if (!sk)
                goto out;
index d7a600a5720acaf306c83a67d18210ee39b495c9..21a9fcc0379671a251a34c9d312c1cfdd874bf08 100644 (file)
@@ -363,7 +363,7 @@ config NETFILTER_XT_TARGET_TRACE
          the tables, chains, rules.
 
          If you want to compile it as a module, say M here and read
-         <file:Documentation/modules.txt>.  If unsure, say `N'.
+         <file:Documentation/kbuild/modules.txt>.  If unsure, say `N'.
 
 config NETFILTER_XT_TARGET_SECMARK
        tristate '"SECMARK" target support'
index 4d6171bc0829cd1e9283718054b86b5af7195cc2..000c2fb462d07996106270e33eadc72fb07718e6 100644 (file)
@@ -999,7 +999,7 @@ struct hlist_head *nf_ct_alloc_hashtable(int *sizep, int *vmalloced)
        *vmalloced = 0;
 
        size = *sizep = roundup(*sizep, PAGE_SIZE / sizeof(struct hlist_head));
-       hash = (void*)__get_free_pages(GFP_KERNEL,
+       hash = (void*)__get_free_pages(GFP_KERNEL|__GFP_NOWARN,
                                       get_order(sizeof(struct hlist_head)
                                                 * size));
        if (!hash) {
index 4f994c0fb3f80dcc4542a4e7a17475637601b690..2601712555767b34d49fb694a5adbb12e734a44d 100644 (file)
@@ -396,7 +396,7 @@ static int __netlink_create(struct net *net, struct socket *sock,
 
        sock->ops = &netlink_ops;
 
-       sk = sk_alloc(net, PF_NETLINK, GFP_KERNEL, &netlink_proto, 1);
+       sk = sk_alloc(net, PF_NETLINK, GFP_KERNEL, &netlink_proto);
        if (!sk)
                return -ENOMEM;
 
index 3a4d479ea64e493c342f9fde022f28adbbeb29c1..972250c974f1ceaf053eb92712018d4be781ed78 100644 (file)
@@ -423,7 +423,8 @@ static int nr_create(struct net *net, struct socket *sock, int protocol)
        if (sock->type != SOCK_SEQPACKET || protocol != 0)
                return -ESOCKTNOSUPPORT;
 
-       if ((sk = sk_alloc(net, PF_NETROM, GFP_ATOMIC, &nr_proto, 1)) == NULL)
+       sk = sk_alloc(net, PF_NETROM, GFP_ATOMIC, &nr_proto);
+       if (sk  == NULL)
                return -ENOMEM;
 
        nr = nr_sk(sk);
@@ -465,7 +466,8 @@ static struct sock *nr_make_new(struct sock *osk)
        if (osk->sk_type != SOCK_SEQPACKET)
                return NULL;
 
-       if ((sk = sk_alloc(osk->sk_net, PF_NETROM, GFP_ATOMIC, osk->sk_prot, 1)) == NULL)
+       sk = sk_alloc(osk->sk_net, PF_NETROM, GFP_ATOMIC, osk->sk_prot);
+       if (sk == NULL)
                return NULL;
 
        nr = nr_sk(sk);
index d0936506b731abf62d5fabffe289a44789c52768..4cb2dfba09931225e151bf86f78d7e5ff7060cf9 100644 (file)
@@ -995,7 +995,7 @@ static int packet_create(struct net *net, struct socket *sock, int protocol)
        sock->state = SS_UNCONNECTED;
 
        err = -ENOBUFS;
-       sk = sk_alloc(net, PF_PACKET, GFP_KERNEL, &packet_proto, 1);
+       sk = sk_alloc(net, PF_PACKET, GFP_KERNEL, &packet_proto);
        if (sk == NULL)
                goto out;
 
index 509defe53ee53fb5b49f37c0b2372edfa83cc68b..ed2d65cd80106db4510bb708c8514ce4aa17fea6 100644 (file)
@@ -513,7 +513,8 @@ static int rose_create(struct net *net, struct socket *sock, int protocol)
        if (sock->type != SOCK_SEQPACKET || protocol != 0)
                return -ESOCKTNOSUPPORT;
 
-       if ((sk = sk_alloc(net, PF_ROSE, GFP_ATOMIC, &rose_proto, 1)) == NULL)
+       sk = sk_alloc(net, PF_ROSE, GFP_ATOMIC, &rose_proto);
+       if (sk == NULL)
                return -ENOMEM;
 
        rose = rose_sk(sk);
@@ -551,7 +552,8 @@ static struct sock *rose_make_new(struct sock *osk)
        if (osk->sk_type != SOCK_SEQPACKET)
                return NULL;
 
-       if ((sk = sk_alloc(osk->sk_net, PF_ROSE, GFP_ATOMIC, &rose_proto, 1)) == NULL)
+       sk = sk_alloc(osk->sk_net, PF_ROSE, GFP_ATOMIC, &rose_proto);
+       if (sk == NULL)
                return NULL;
 
        rose = rose_sk(sk);
index c680017f5c8e923f7b59a7d0fc146ed3d4351c8b..d6389450c4bffee0da440bccfbc49857fa258417 100644 (file)
@@ -627,7 +627,7 @@ static int rxrpc_create(struct net *net, struct socket *sock, int protocol)
        sock->ops = &rxrpc_rpc_ops;
        sock->state = SS_UNCONNECTED;
 
-       sk = sk_alloc(net, PF_RXRPC, GFP_KERNEL, &rxrpc_proto, 1);
+       sk = sk_alloc(net, PF_RXRPC, GFP_KERNEL, &rxrpc_proto);
        if (!sk)
                return -ENOMEM;
 
index eebefb6ef1392fef2c9b47007d141c299ee82b38..c387cf68a08c6431ef18ff2bd1df36b7b16e2f44 100644 (file)
@@ -237,7 +237,8 @@ static int rxkad_secure_packet_encrypt(const struct rxrpc_call *call,
        len = data_size + call->conn->size_align - 1;
        len &= ~(call->conn->size_align - 1);
 
-       sg_init_table(sg, skb_to_sgvec(skb, sg, 0, len));
+       sg_init_table(sg, nsg);
+       skb_to_sgvec(skb, sg, 0, len);
        crypto_blkcipher_encrypt_iv(&desc, sg, sg, len);
 
        _leave(" = 0");
@@ -344,7 +345,7 @@ static int rxkad_verify_packet_auth(const struct rxrpc_call *call,
                goto nomem;
 
        sg_init_table(sg, nsg);
-       sg_mark_end(sg, skb_to_sgvec(skb, sg, 0, 8));
+       skb_to_sgvec(skb, sg, 0, 8);
 
        /* start the decryption afresh */
        memset(&iv, 0, sizeof(iv));
@@ -426,7 +427,7 @@ static int rxkad_verify_packet_encrypt(const struct rxrpc_call *call,
        }
 
        sg_init_table(sg, nsg);
-       sg_mark_end(sg, skb_to_sgvec(skb, sg, 0, skb->len));
+       skb_to_sgvec(skb, sg, 0, skb->len);
 
        /* decrypt from the session key */
        payload = call->conn->key->payload.data;
@@ -701,7 +702,7 @@ static void rxkad_sg_set_buf2(struct scatterlist sg[2],
                nsg++;
        }
 
-       sg_mark_end(sg, nsg);
+       __sg_mark_end(&sg[nsg - 1]);
 
        ASSERTCMP(sg[0].length + sg[1].length, ==, buflen);
 }
index eb4deaf589148dbf7a8797449f34439779da4a63..7f31ff638bc63fd521bd84ec4ca901451e832fe5 100644 (file)
@@ -631,7 +631,7 @@ static struct sock *sctp_v6_create_accept_sk(struct sock *sk,
        struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
        struct sctp6_sock *newsctp6sk;
 
-       newsk = sk_alloc(sk->sk_net, PF_INET6, GFP_KERNEL, sk->sk_prot, 1);
+       newsk = sk_alloc(sk->sk_net, PF_INET6, GFP_KERNEL, sk->sk_prot);
        if (!newsk)
                goto out;
 
index f5cd96f5fe7421fbee8afcb33e0f558e99877e2a..40c1a47d1b8dc2972abcf481dc42c5d30ed55229 100644 (file)
@@ -552,7 +552,8 @@ static struct sock *sctp_v4_create_accept_sk(struct sock *sk,
 {
        struct inet_sock *inet = inet_sk(sk);
        struct inet_sock *newinet;
-       struct sock *newsk = sk_alloc(sk->sk_net, PF_INET, GFP_KERNEL, sk->sk_prot, 1);
+       struct sock *newsk = sk_alloc(sk->sk_net, PF_INET, GFP_KERNEL,
+                       sk->sk_prot);
 
        if (!newsk)
                goto out;
index 540013ea86206e0aeb40d567fc6f1482f6238ba0..5d879fd3d01dcaaadfe74a7032855554cbc4ad12 100644 (file)
@@ -1250,11 +1250,14 @@ asmlinkage long sys_socketpair(int family, int type, int protocol,
                goto out_release_both;
 
        fd1 = sock_alloc_fd(&newfile1);
-       if (unlikely(fd1 < 0))
+       if (unlikely(fd1 < 0)) {
+               err = fd1;
                goto out_release_both;
+       }
 
        fd2 = sock_alloc_fd(&newfile2);
        if (unlikely(fd2 < 0)) {
+               err = fd2;
                put_filp(newfile1);
                put_unused_fd(fd1);
                goto out_release_both;
index 91cd8f0d1e10772c477d6de98b8268e58e775a51..ab7cbd6575c45d0c860e599cf27202dee5249c57 100644 (file)
@@ -211,8 +211,8 @@ encryptor(struct scatterlist *sg, void *data)
        if (thislen == 0)
                return 0;
 
-       sg_mark_end(desc->infrags, desc->fragno);
-       sg_mark_end(desc->outfrags, desc->fragno);
+       __sg_mark_end(&desc->infrags[desc->fragno - 1]);
+       __sg_mark_end(&desc->outfrags[desc->fragno - 1]);
 
        ret = crypto_blkcipher_encrypt_iv(&desc->desc, desc->outfrags,
                                          desc->infrags, thislen);
@@ -293,7 +293,7 @@ decryptor(struct scatterlist *sg, void *data)
        if (thislen == 0)
                return 0;
 
-       sg_mark_end(desc->frags, desc->fragno);
+       __sg_mark_end(&desc->frags[desc->fragno - 1]);
 
        ret = crypto_blkcipher_decrypt_iv(&desc->desc, desc->frags,
                                          desc->frags, thislen);
index 864b541bbf5171eb1a4b3338583af6dc2fe41c19..2be714e9b382742be19d7c628f292500d65f77ce 100644 (file)
@@ -87,9 +87,8 @@ proc_dodebug(ctl_table *table, int write, struct file *file,
                        left--, s++;
                *(unsigned int *) table->data = value;
                /* Display the RPC tasks on writing to rpc_debug */
-               if (table->ctl_name == CTL_RPCDEBUG) {
+               if (strcmp(table->procname, "rpc_debug") == 0)
                        rpc_show_tasks();
-               }
        } else {
                if (!access_ok(VERIFY_WRITE, buffer, left))
                        return -EFAULT;
index f877b88091ce99423d86bea79bdca2af7d6c750c..9e11ce7159583e092627e863d44a9907f862c061 100644 (file)
@@ -221,8 +221,8 @@ rpcrdma_create_chunks(struct rpc_rqst *rqst, struct xdr_buf *target,
                                        seg->mr_base);
                        dprintk("RPC:       %s: read chunk "
                                "elem %d@0x%llx:0x%x pos %d (%s)\n", __func__,
-                               seg->mr_len, seg->mr_base, seg->mr_rkey, pos,
-                               n < nsegs ? "more" : "last");
+                               seg->mr_len, (unsigned long long)seg->mr_base,
+                               seg->mr_rkey, pos, n < nsegs ? "more" : "last");
                        cur_rchunk++;
                        r_xprt->rx_stats.read_chunk_count++;
                } else {                /* write/reply */
@@ -234,8 +234,8 @@ rpcrdma_create_chunks(struct rpc_rqst *rqst, struct xdr_buf *target,
                        dprintk("RPC:       %s: %s chunk "
                                "elem %d@0x%llx:0x%x (%s)\n", __func__,
                                (type == rpcrdma_replych) ? "reply" : "write",
-                               seg->mr_len, seg->mr_base, seg->mr_rkey,
-                               n < nsegs ? "more" : "last");
+                               seg->mr_len, (unsigned long long)seg->mr_base,
+                               seg->mr_rkey, n < nsegs ? "more" : "last");
                        cur_wchunk++;
                        if (type == rpcrdma_replych)
                                r_xprt->rx_stats.reply_chunk_count++;
@@ -577,7 +577,7 @@ rpcrdma_count_chunks(struct rpcrdma_rep *rep, int max, int wrchunk, __be32 **ipt
                        dprintk("RPC:       %s: chunk %d@0x%llx:0x%x\n",
                                __func__,
                                ntohl(seg->rs_length),
-                               off,
+                               (unsigned long long)off,
                                ntohl(seg->rs_handle));
                }
                total_len += ntohl(seg->rs_length);
index e36b4b5a5222320644fd1d7fe35c06bfe982e7f0..6b792265dc06e5b08085095178bd4fba3e427ff7 100644 (file)
@@ -201,7 +201,7 @@ static int tipc_create(struct net *net, struct socket *sock, int protocol)
                return -EPROTOTYPE;
        }
 
-       sk = sk_alloc(net, AF_TIPC, GFP_KERNEL, &tipc_proto, 1);
+       sk = sk_alloc(net, AF_TIPC, GFP_KERNEL, &tipc_proto);
        if (!sk) {
                tipc_deleteport(ref);
                return -ENOMEM;
index 9163ec526c2a0e66ed2fdf20f232173f6aed8d90..515e7a692f9bf85e263bf5a8752c22f0384595d0 100644 (file)
@@ -602,7 +602,7 @@ static struct sock * unix_create1(struct net *net, struct socket *sock)
        if (atomic_read(&unix_nr_socks) >= 2*get_max_files())
                goto out;
 
-       sk = sk_alloc(net, PF_UNIX, GFP_KERNEL, &unix_proto, 1);
+       sk = sk_alloc(net, PF_UNIX, GFP_KERNEL, &unix_proto);
        if (!sk)
                goto out;
 
index fc416f9606a9e259e22f2e641c602107e06b9200..92cfe8e3e0b8d24133b6e5e07cafa6d5d27328e2 100644 (file)
@@ -472,7 +472,7 @@ static struct proto x25_proto = {
 static struct sock *x25_alloc_socket(struct net *net)
 {
        struct x25_sock *x25;
-       struct sock *sk = sk_alloc(net, AF_X25, GFP_ATOMIC, &x25_proto, 1);
+       struct sock *sk = sk_alloc(net, AF_X25, GFP_ATOMIC, &x25_proto);
 
        if (!sk)
                goto out;