Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 7 Mar 2007 01:34:28 +0000 (17:34 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 7 Mar 2007 01:34:28 +0000 (17:34 -0800)
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid:
  HID blacklisting of all Code Mercenaries IOWarrior devices

504 files changed:
Documentation/SubmitChecklist
Documentation/arm/Samsung-S3C24XX/Suspend.txt
Documentation/cpu-load.txt [new file with mode: 0644]
Documentation/feature-removal-schedule.txt
Documentation/filesystems/proc.txt
Documentation/ide.txt
Documentation/kernel-parameters.txt
Documentation/networking/ip-sysctl.txt
Documentation/sound/alsa/ALSA-Configuration.txt
MAINTAINERS
arch/arm/Kconfig
arch/arm/mach-omap1/board-nokia770.c
arch/arm/mach-omap1/clock.c
arch/arm/mach-omap1/irq.c
arch/arm/mach-omap1/pm.c
arch/arm/mach-omap1/serial.c
arch/arm/mach-omap2/board-h4.c
arch/arm/mach-omap2/timer-gp.c
arch/arm/mach-pxa/corgi_pm.c
arch/arm/mach-pxa/spitz_pm.c
arch/arm/oprofile/common.c
arch/arm/plat-omap/dma.c
arch/arm/plat-omap/dmtimer.c
arch/arm/plat-omap/gpio.c
arch/arm/plat-omap/mcbsp.c
arch/arm/plat-omap/mux.c
arch/arm/plat-s3c24xx/Kconfig
arch/arm26/kernel/entry.S
arch/avr32/Kconfig
arch/cris/arch-v32/drivers/pci/dma.c
arch/frv/mm/init.c
arch/i386/Kconfig
arch/i386/kernel/apic.c
arch/i386/kernel/hpet.c
arch/i386/kernel/i8253.c
arch/i386/kernel/io_apic.c
arch/i386/kernel/paravirt.c
arch/i386/kernel/pci-dma.c
arch/i386/kernel/setup.c
arch/i386/kernel/smpboot.c
arch/i386/kernel/time.c
arch/i386/kernel/tsc.c
arch/i386/kernel/vmi.c
arch/i386/kernel/vmitime.c
arch/mips/Kconfig
arch/mips/arc/console.c
arch/mips/arc/init.c
arch/mips/arc/memory.c
arch/mips/arc/tree.c
arch/mips/au1000/mtx-1/board_setup.c
arch/mips/au1000/mtx-1/irqmap.c
arch/mips/cobalt/console.c
arch/mips/cobalt/setup.c
arch/mips/configs/jmr3927_defconfig
arch/mips/dec/prom/console.c
arch/mips/dec/prom/identify.c
arch/mips/gt64120/ev64120/promcon.c
arch/mips/jmr3927/common/Makefile
arch/mips/jmr3927/common/rtc_ds1742.c [deleted file]
arch/mips/jmr3927/rbhma3100/setup.c
arch/mips/kernel/Makefile
arch/mips/kernel/early_printk.c [new file with mode: 0644]
arch/mips/kernel/linux32.c
arch/mips/kernel/scall64-n32.S
arch/mips/kernel/scall64-o32.S
arch/mips/kernel/setup.c
arch/mips/lasat/lasat_board.c
arch/mips/lasat/prom.c
arch/mips/lasat/prom.h
arch/mips/lasat/setup.c
arch/mips/lib/Makefile
arch/mips/lib/promlib.c [deleted file]
arch/mips/mips-boards/generic/Makefile
arch/mips/mips-boards/generic/console.c [moved from arch/mips/mips-boards/generic/printf.c with 91% similarity]
arch/mips/mips-boards/generic/init.c
arch/mips/mips-boards/generic/memory.c
arch/mips/mips-boards/generic/time.c
arch/mips/mips-boards/sim/Makefile
arch/mips/mips-boards/sim/sim_console.c [moved from arch/mips/mips-boards/sim/sim_printf.c with 63% similarity]
arch/mips/mips-boards/sim/sim_mem.c
arch/mips/mips-boards/sim/sim_setup.c
arch/mips/mips-boards/sim/sim_time.c
arch/mips/mm/cerr-sb1.c
arch/mips/mm/dma-default.c
arch/mips/momentum/jaguar_atx/ja-console.c
arch/mips/momentum/jaguar_atx/platform.c
arch/mips/momentum/ocelot_3/platform.c
arch/mips/momentum/ocelot_c/platform.c
arch/mips/oprofile/op_model_mipsxx.c
arch/mips/pci/fixup-jmr3927.c
arch/mips/pci/fixup-sni.c
arch/mips/pci/ops-au1000.c
arch/mips/philips/pnx8550/common/prom.c
arch/mips/philips/pnx8550/common/setup.c
arch/mips/pmc-sierra/yosemite/py-console.c
arch/mips/sgi-ip27/ip27-console.c
arch/mips/sibyte/Kconfig
arch/mips/sibyte/bcm1480/irq.c
arch/mips/sibyte/bcm1480/setup.c
arch/mips/sibyte/cfe/setup.c
arch/mips/sibyte/sb1250/setup.c
arch/mips/sni/sniprom.c
arch/mips/tx4927/common/tx4927_setup.c
arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
arch/mips/tx4938/common/setup.c
arch/powerpc/kernel/irq.c
arch/powerpc/platforms/chrp/pegasos_eth.c
arch/powerpc/platforms/ps3/Kconfig
arch/ppc/syslib/mv64x60.c
arch/sparc/kernel/of_device.c
arch/sparc/kernel/pcic.c
arch/sparc64/defconfig
arch/sparc64/kernel/of_device.c
arch/sparc64/kernel/pci.c
arch/um/Kconfig.char
arch/um/kernel/signal.c
arch/um/os-Linux/elf_aux.c
arch/um/os-Linux/sigio.c
arch/um/os-Linux/skas/process.c
arch/um/os-Linux/trap.c
arch/um/sys-i386/ldt.c
arch/x86_64/kernel/hpet.c
arch/x86_64/kernel/io_apic.c
arch/x86_64/kernel/time.c
arch/x86_64/kernel/tsc.c
drivers/acorn/char/Makefile
drivers/acorn/char/i2c.c [deleted file]
drivers/acorn/char/pcf8583.c [deleted file]
drivers/acorn/char/pcf8583.h [deleted file]
drivers/acpi/Kconfig
drivers/ata/ahci.c
drivers/ata/ata_generic.c
drivers/ata/ata_piix.c
drivers/ata/libata-core.c
drivers/ata/libata-eh.c
drivers/ata/libata-scsi.c
drivers/ata/pata_ali.c
drivers/ata/pata_amd.c
drivers/ata/pata_atiixp.c
drivers/ata/pata_cmd64x.c
drivers/ata/pata_cs5520.c
drivers/ata/pata_cs5530.c
drivers/ata/pata_cs5535.c
drivers/ata/pata_cypress.c
drivers/ata/pata_efar.c
drivers/ata/pata_hpt366.c
drivers/ata/pata_hpt3x3.c
drivers/ata/pata_isapnp.c
drivers/ata/pata_it8213.c
drivers/ata/pata_it821x.c
drivers/ata/pata_jmicron.c
drivers/ata/pata_legacy.c
drivers/ata/pata_marvell.c
drivers/ata/pata_mpc52xx.c
drivers/ata/pata_mpiix.c
drivers/ata/pata_netcell.c
drivers/ata/pata_ns87410.c
drivers/ata/pata_oldpiix.c
drivers/ata/pata_opti.c
drivers/ata/pata_optidma.c
drivers/ata/pata_pdc202xx_old.c
drivers/ata/pata_platform.c
drivers/ata/pata_qdi.c
drivers/ata/pata_radisys.c
drivers/ata/pata_rz1000.c
drivers/ata/pata_sc1200.c
drivers/ata/pata_scc.c
drivers/ata/pata_serverworks.c
drivers/ata/pata_sil680.c
drivers/ata/pata_sis.c
drivers/ata/pata_sl82c105.c
drivers/ata/pata_triflex.c
drivers/ata/pata_via.c
drivers/ata/sata_inic162x.c
drivers/ata/sata_nv.c
drivers/ata/sata_sil.c
drivers/ata/sata_sil24.c
drivers/block/Kconfig
drivers/block/aoe/aoecmd.c
drivers/block/aoe/aoenet.c
drivers/block/cciss.c
drivers/block/umem.c
drivers/cdrom/viocd.c
drivers/char/cyclades.c
drivers/char/epca.c
drivers/char/ipmi/ipmi_si_intf.c
drivers/char/tty_io.c
drivers/clocksource/acpi_pm.c
drivers/clocksource/cyclone.c
drivers/crypto/geode-aes.c
drivers/hid/hid-core.c
drivers/hid/hid-debug.c
drivers/hid/hid-input.c
drivers/i2c/busses/Kconfig
drivers/i2c/busses/Makefile
drivers/i2c/busses/i2c-acorn.c [new file with mode: 0644]
drivers/ide/Kconfig
drivers/ide/cris/ide-cris.c
drivers/ide/ide-disk.c
drivers/ide/ide-iops.c
drivers/ide/ide-lib.c
drivers/ide/ide-probe.c
drivers/ide/ide.c
drivers/ide/legacy/ali14xx.c
drivers/ide/legacy/dtc2278.c
drivers/ide/legacy/ht6560b.c
drivers/ide/legacy/ide-cs.c
drivers/ide/legacy/qd65xx.c
drivers/ide/legacy/umc8672.c
drivers/ide/mips/au1xxx-ide.c
drivers/ide/pci/alim15x3.c
drivers/ide/pci/cmd640.c
drivers/ide/pci/cmd64x.c
drivers/ide/pci/delkin_cb.c
drivers/ide/pci/generic.c
drivers/ide/pci/opti621.c
drivers/ide/pci/piix.c
drivers/ide/pci/rz1000.c
drivers/ide/pci/siimage.c
drivers/ide/pci/slc90e66.c
drivers/ide/ppc/pmac.c
drivers/ide/ppc/scc_pata.c
drivers/input/keyboard/Kconfig
drivers/input/keyboard/gpio_keys.c
drivers/isdn/capi/Kconfig
drivers/isdn/capi/capidrv.c
drivers/isdn/capi/capiutil.c
drivers/isdn/capi/kcapi.c
drivers/isdn/gigaset/Makefile
drivers/isdn/gigaset/asyncdata.c
drivers/kvm/kvm.h
drivers/kvm/kvm_main.c
drivers/kvm/kvm_svm.h
drivers/kvm/mmu.c
drivers/kvm/paging_tmpl.h
drivers/kvm/svm.c
drivers/kvm/vmx.c
drivers/md/md.c
drivers/md/raid10.c
drivers/md/raid5.c
drivers/md/raid6mmx.c
drivers/md/raid6sse1.c
drivers/md/raid6sse2.c
drivers/md/raid6x86.h
drivers/media/dvb/dvb-usb/cxusb.c
drivers/media/dvb/dvb-usb/digitv.c
drivers/media/video/cafe_ccic.c
drivers/media/video/cx25840/cx25840-core.c
drivers/media/video/cx25840/cx25840-firmware.c
drivers/media/video/cx88/cx88-blackbird.c
drivers/media/video/cx88/cx88-video.c
drivers/media/video/cx88/cx88.h
drivers/media/video/pvrusb2/pvrusb2-hdw.c
drivers/media/video/pvrusb2/pvrusb2-hdw.h
drivers/media/video/pvrusb2/pvrusb2-v4l2.c
drivers/media/video/saa7115.c
drivers/media/video/saa7127.c
drivers/media/video/tvp5150.c
drivers/media/video/upd64031a.c
drivers/media/video/upd64083.c
drivers/media/video/usbvision/usbvision-video.c
drivers/media/video/v4l2-common.c
drivers/media/video/videodev.c
drivers/mmc/mmc.c
drivers/mmc/sdhci.c
drivers/net/3c59x.c
drivers/net/8139cp.c
drivers/net/acenic.c
drivers/net/amd8111e.c
drivers/net/atl1/atl1_main.c
drivers/net/bnx2.c
drivers/net/bonding/bond_main.c
drivers/net/chelsio/cxgb2.c
drivers/net/cxgb3/cxgb3_offload.c
drivers/net/cxgb3/version.h
drivers/net/e1000/e1000_main.c
drivers/net/ehea/ehea_main.c
drivers/net/gianfar.c
drivers/net/ixgb/ixgb_main.c
drivers/net/mv643xx_eth.c
drivers/net/mv643xx_eth.h
drivers/net/myri10ge/myri10ge.c
drivers/net/natsemi.c
drivers/net/netxen/netxen_nic.h
drivers/net/netxen/netxen_nic_ethtool.c
drivers/net/netxen/netxen_nic_hw.c
drivers/net/netxen/netxen_nic_init.c
drivers/net/netxen/netxen_nic_main.c
drivers/net/netxen/netxen_nic_phan_reg.h
drivers/net/ns83820.c
drivers/net/pcnet32.c
drivers/net/pppoe.c
drivers/net/qla3xxx.c
drivers/net/r8169.c
drivers/net/s2io.c
drivers/net/sis900.c
drivers/net/sky2.c
drivers/net/starfire.c
drivers/net/tc35815.c
drivers/net/tg3.c
drivers/net/tulip/de2104x.c
drivers/net/tulip/dmfe.c
drivers/net/tulip/tulip_core.c
drivers/net/typhoon.c
drivers/net/ucc_geth.c
drivers/net/wan/hdlc.c
drivers/net/wan/hdlc_cisco.c
drivers/net/wan/hdlc_fr.c
drivers/net/wan/hdlc_ppp.c
drivers/net/wan/hdlc_raw.c
drivers/net/wan/hdlc_x25.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/pci/msi.c
drivers/pci/pci.c
drivers/pci/pci.h
drivers/pci/probe.c
drivers/pci/quirks.c
drivers/rtc/Kconfig
drivers/rtc/class.c
drivers/rtc/interface.c
drivers/rtc/rtc-pcf8583.c
drivers/s390/net/qeth_main.c
drivers/scsi/arm/cumana_2.c
drivers/scsi/arm/eesox.c
drivers/scsi/arm/fas216.c
drivers/scsi/arm/powertec.c
drivers/scsi/arm/scsi.h
drivers/serial/dz.c
drivers/usb/input/hid-core.c
drivers/usb/storage/usb.c
drivers/video/Kconfig
drivers/video/aty/aty128fb.c
drivers/video/aty/atyfb.h
drivers/video/aty/atyfb_base.c
drivers/video/aty/mach64_ct.c
drivers/video/aty/radeon_base.c
drivers/video/nvidia/nv_backlight.c
drivers/video/nvidia/nvidia.c
drivers/video/riva/fbdev.c
drivers/video/sm501fb.c
fs/buffer.c
fs/cifs/CHANGES
fs/cifs/Makefile
fs/cifs/TODO
fs/cifs/cifsfs.c
fs/cifs/cifsfs.h
fs/cifs/cifsglob.h
fs/cifs/cifspdu.h
fs/cifs/cifsproto.h
fs/cifs/cifssmb.c
fs/cifs/dir.c
fs/cifs/export.c [new file with mode: 0644]
fs/cifs/file.c
fs/cifs/inode.c
fs/cifs/readdir.c
fs/cifs/transport.c
fs/ecryptfs/file.c
fs/ecryptfs/inode.c
fs/ecryptfs/main.c
fs/ecryptfs/mmap.c
fs/ext3/xattr.c
fs/ext4/xattr.c
fs/libfs.c
fs/ncpfs/inode.c
fs/ncpfs/sock.c
fs/sysfs/dir.c
include/asm-arm/arch-omap/entry-macro.S
include/asm-arm/arch-omap/memory.h
include/asm-arm/arch-omap/omap-alsa.h
include/asm-arm/system.h
include/asm-frv/pgtable.h
include/asm-i386/delay.h
include/asm-i386/io_apic.h
include/asm-i386/nmi.h
include/asm-i386/paravirt.h
include/asm-i386/pgtable.h
include/asm-i386/time.h
include/asm-i386/timer.h
include/asm-i386/topology.h
include/asm-i386/tsc.h
include/asm-i386/vmi.h
include/asm-i386/vmi_time.h
include/asm-ia64/topology.h
include/asm-mips/ds1742.h [deleted file]
include/asm-mips/jmr3927/jmr3927.h
include/asm-mips/lasat/lasat.h
include/asm-mips/mach-atlas/mc146818rtc.h
include/asm-mips/mach-generic/dma-coherence.h
include/asm-mips/mach-generic/mc146818rtc.h
include/asm-mips/mach-ip27/topology.h
include/asm-mips/mach-jmr3927/ds1742.h [deleted file]
include/asm-mips/mach-jmr3927/mangle-port.h [new file with mode: 0644]
include/asm-mips/mach-mips/mc146818rtc.h
include/asm-mips/mach-rm/mc146818rtc.h
include/asm-mips/mips-boards/prom.h
include/asm-mips/sgialib.h
include/asm-mips/sibyte/sb1250.h
include/asm-powerpc/topology.h
include/asm-sparc/pci.h
include/asm-sparc/prom.h
include/asm-sparc64/dma.h
include/asm-sparc64/parport.h
include/asm-sparc64/pci.h
include/asm-sparc64/prom.h
include/asm-um/pgtable.h
include/asm-x86_64/io_apic.h
include/asm-x86_64/nmi.h
include/asm-x86_64/topology.h
include/asm-x86_64/tsc.h
include/linux/audit.h
include/linux/ds1742rtc.h [deleted file]
include/linux/gpio_keys.h [moved from include/asm-arm/hardware/gpio_keys.h with 100% similarity]
include/linux/hid.h
include/linux/hrtimer.h
include/linux/hugetlb.h
include/linux/ide.h
include/linux/if_vlan.h
include/linux/igmp.h
include/linux/irq.h
include/linux/isdn/capiutil.h
include/linux/kvm.h
include/linux/kvm_para.h [new file with mode: 0644]
include/linux/libata.h
include/linux/magic.h
include/linux/migrate.h
include/linux/mm.h
include/linux/mmc/host.h
include/linux/mv643xx.h
include/linux/ncp_fs_sb.h
include/linux/page-flags.h
include/linux/pci.h
include/linux/pci_regs.h
include/linux/sched.h
include/linux/shm.h
include/linux/socket.h
include/linux/spinlock.h
include/linux/stat.h
include/linux/sunrpc/svc.h
include/linux/sunrpc/svcsock.h
include/linux/sysfs.h
include/linux/topology.h
include/linux/videodev2.h
include/linux/writeback.h
include/media/v4l2-common.h
include/media/v4l2-dev.h
include/net/sock.h
include/sound/version.h
init/Kconfig
ipc/mqueue.c
ipc/shm.c
kernel/hrtimer.c
kernel/lockdep.c
kernel/power/Kconfig
kernel/rcutorture.c
kernel/relay.c
kernel/sched.c
kernel/sysctl.c
kernel/time/clocksource.c
kernel/time/tick-broadcast.c
kernel/time/tick-common.c
kernel/time/tick-internal.h
kernel/timer.c
lib/bitmap.c
mm/mempolicy.c
mm/migrate.c
mm/mmap.c
mm/page-writeback.c
mm/page_alloc.c
mm/rmap.c
mm/shmem.c
mm/slab.c
mm/tiny-shmem.c
mm/truncate.c
mm/vmscan.c
net/8021q/vlan.c
net/bridge/br_ioctl.c
net/core/skbuff.c
net/dccp/output.c
net/ipv4/cipso_ipv4.c
net/ipv4/igmp.c
net/ipv4/tcp_minisocks.c
net/ipv6/addrconf.c
net/ipv6/anycast.c
net/ipx/ChangeLog [deleted file]
net/ipx/Kconfig
net/netfilter/nfnetlink.c
net/netlabel/netlabel_unlabeled.c
net/sunrpc/svc.c
net/sunrpc/svcsock.c
net/unix/af_unix.c
net/xfrm/xfrm_user.c
scripts/kernel-doc
sound/pci/ac97/ac97_patch.c
sound/pci/ali5451/ali5451.c
sound/pci/cmipci.c
sound/pci/echoaudio/echoaudio.c
sound/pci/hda/patch_analog.c
sound/pci/hda/patch_conexant.c
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_sigmatel.c
sound/pci/riptide/riptide.c
sound/pci/rme9652/hdspm.c
sound/soc/codecs/wm9712.c

index bfbb2718a2799b972fa6663ffbc0b34a7b88b999..bd23dc0bc0c7c9ced4323b761396377d700fad83 100644 (file)
@@ -76,3 +76,7 @@ kernel patches.
 22: Newly-added code has been compiled with `gcc -W'.  This will generate
     lots of noise, but is good for finding bugs like "warning: comparison
     between signed and unsigned".
+
+23: Tested after it has been merged into the -mm patchset to make sure
+    that it still works with all of the other queued patches and various
+    changes in the VM, VFS, and other subsystems.
index e12bc3284a272eae2c23999c30db92fdc47bfa5a..0dab6e32c130a2fc61192fd99cf95a963648beea 100644 (file)
@@ -5,10 +5,10 @@
 Introduction
 ------------
 
-  The S3C2410 supports a low-power suspend mode, where the SDRAM is kept
+  The S3C24XX supports a low-power suspend mode, where the SDRAM is kept
   in Self-Refresh mode, and all but the essential peripheral blocks are
   powered down. For more information on how this works, please look
-  at the S3C2410 datasheets from Samsung.
+  at the relevant CPU datasheet from Samsung.
 
 
 Requirements
@@ -56,6 +56,27 @@ Machine Support
   Note, the original method of adding an late_initcall() is wrong,
   and will end up initialising all compiled machines' pm init!
 
+  The following is an example of code used for testing wakeup from
+  an falling edge on IRQ_EINT0:
+
+
+static irqreturn_t button_irq(int irq, void *pw)
+{
+       return IRQ_HANDLED;
+}
+
+statuc void __init machine_init(void)
+{
+       ...
+
+       request_irq(IRQ_EINT0, button_irq, IRQF_TRIGGER_FALLING,
+                  "button-irq-eint0", NULL);
+
+       enable_irq_wake(IRQ_EINT0);
+
+       s3c2410_pm_init();
+}
+
 
 Debugging
 ---------
@@ -70,6 +91,12 @@ Debugging
      care should be taken that any external clock sources that the UARTs
      rely on are still enabled at that point.
 
+  3) If any debugging is placed in the resume path, then it must have the
+     relevant clocks and peripherals setup before use (ie, bootloader).
+
+     For example, if you transmit a character from the UART, the baud
+     rate and uart controls must be setup beforehand.
+
 
 Configuration
 -------------
@@ -89,6 +116,10 @@ Configuration
     Allows the entire memory to be checksummed before and after the
     suspend to see if there has been any corruption of the contents.
 
+    Note, the time to calculate the CRC is dependant on the CPU speed
+    and the size of memory. For an 64Mbyte RAM area on an 200MHz
+    S3C2410, this can take approximately 4 seconds to complete.
+
     This support requires the CRC32 function to be enabled.
 
 
diff --git a/Documentation/cpu-load.txt b/Documentation/cpu-load.txt
new file mode 100644 (file)
index 0000000..287224e
--- /dev/null
@@ -0,0 +1,113 @@
+CPU load
+--------
+
+Linux exports various bits of information via `/proc/stat' and
+`/proc/uptime' that userland tools, such as top(1), use to calculate
+the average time system spent in a particular state, for example:
+
+    $ iostat
+    Linux 2.6.18.3-exp (linmac)     02/20/2007
+
+    avg-cpu:  %user   %nice %system %iowait  %steal   %idle
+              10.01    0.00    2.92    5.44    0.00   81.63
+
+    ...
+
+Here the system thinks that over the default sampling period the
+system spent 10.01% of the time doing work in user space, 2.92% in the
+kernel, and was overall 81.63% of the time idle.
+
+In most cases the `/proc/stat' information reflects the reality quite
+closely, however due to the nature of how/when the kernel collects
+this data sometimes it can not be trusted at all.
+
+So how is this information collected?  Whenever timer interrupt is
+signalled the kernel looks what kind of task was running at this
+moment and increments the counter that corresponds to this tasks
+kind/state.  The problem with this is that the system could have
+switched between various states multiple times between two timer
+interrupts yet the counter is incremented only for the last state.
+
+
+Example
+-------
+
+If we imagine the system with one task that periodically burns cycles
+in the following manner:
+
+ time line between two timer interrupts
+|--------------------------------------|
+ ^                                    ^
+ |_ something begins working          |
+                                      |_ something goes to sleep
+                                     (only to be awaken quite soon)
+
+In the above situation the system will be 0% loaded according to the
+`/proc/stat' (since the timer interrupt will always happen when the
+system is executing the idle handler), but in reality the load is
+closer to 99%.
+
+One can imagine many more situations where this behavior of the kernel
+will lead to quite erratic information inside `/proc/stat'.
+
+
+/* gcc -o hog smallhog.c */
+#include <time.h>
+#include <limits.h>
+#include <signal.h>
+#include <sys/time.h>
+#define HIST 10
+
+static volatile sig_atomic_t stop;
+
+static void sighandler (int signr)
+{
+     (void) signr;
+     stop = 1;
+}
+static unsigned long hog (unsigned long niters)
+{
+     stop = 0;
+     while (!stop && --niters);
+     return niters;
+}
+int main (void)
+{
+     int i;
+     struct itimerval it = { .it_interval = { .tv_sec = 0, .tv_usec = 1 },
+                             .it_value = { .tv_sec = 0, .tv_usec = 1 } };
+     sigset_t set;
+     unsigned long v[HIST];
+     double tmp = 0.0;
+     unsigned long n;
+     signal (SIGALRM, &sighandler);
+     setitimer (ITIMER_REAL, &it, NULL);
+
+     hog (ULONG_MAX);
+     for (i = 0; i < HIST; ++i) v[i] = ULONG_MAX - hog (ULONG_MAX);
+     for (i = 0; i < HIST; ++i) tmp += v[i];
+     tmp /= HIST;
+     n = tmp - (tmp / 3.0);
+
+     sigemptyset (&set);
+     sigaddset (&set, SIGALRM);
+
+     for (;;) {
+         hog (n);
+         sigwait (&set, &i);
+     }
+     return 0;
+}
+
+
+References
+----------
+
+http://lkml.org/lkml/2007/2/12/6
+Documentation/filesystems/proc.txt (1.8)
+
+
+Thanks
+------
+
+Con Kolivas, Pavel Machek
index 6a451f47d40f3ede1ee6b726b5782d13ed145d6b..c3b1430cf603eafd2b51c2e43af55aec79a0fd40 100644 (file)
@@ -304,3 +304,15 @@ Why:       The code says it was obsolete when it was written in 2001.
 Who:   Richard Purdie <rpurdie@rpsys.net>
 
 ---------------------------
+
+What:  Wireless extensions over netlink (CONFIG_NET_WIRELESS_RTNETLINK)
+When:  with the merge of wireless-dev, 2.6.22 or later
+Why:   The option/code is
+        * not enabled on most kernels
+        * not required by any userspace tools (except an experimental one,
+          and even there only for some parts, others use ioctl)
+        * pointless since wext is no longer evolving and the ioctl
+          interface needs to be kept
+Who:   Johannes Berg <johannes@sipsolutions.net>
+
+---------------------------
index 72af5de1effb44a93d907ed4e0117ec403a8257e..5484ab5efd4f54433bc2a6f7c16c482cf8085001 100644 (file)
@@ -41,6 +41,7 @@ Table of Contents
   2.11 /proc/sys/fs/mqueue - POSIX message queues filesystem
   2.12 /proc/<pid>/oom_adj - Adjust the oom-killer score
   2.13 /proc/<pid>/oom_score - Display current oom-killer score
+  2.14 /proc/<pid>/io - Display the IO accounting fields
 
 ------------------------------------------------------------------------------
 Preface
@@ -1990,3 +1991,107 @@ need to  recompile  the kernel, or even to reboot the system. The files in the
 command to write value into these files, thereby changing the default settings
 of the kernel.
 ------------------------------------------------------------------------------
+
+2.14  /proc/<pid>/io - Display the IO accounting fields
+-------------------------------------------------------
+
+This file contains IO statistics for each running process
+
+Example
+-------
+
+test:/tmp # dd if=/dev/zero of=/tmp/test.dat &
+[1] 3828
+
+test:/tmp # cat /proc/3828/io
+rchar: 323934931
+wchar: 323929600
+syscr: 632687
+syscw: 632675
+read_bytes: 0
+write_bytes: 323932160
+cancelled_write_bytes: 0
+
+
+Description
+-----------
+
+rchar
+-----
+
+I/O counter: chars read
+The number of bytes which this task has caused to be read from storage. This
+is simply the sum of bytes which this process passed to read() and pread().
+It includes things like tty IO and it is unaffected by whether or not actual
+physical disk IO was required (the read might have been satisfied from
+pagecache)
+
+
+wchar
+-----
+
+I/O counter: chars written
+The number of bytes which this task has caused, or shall cause to be written
+to disk. Similar caveats apply here as with rchar.
+
+
+syscr
+-----
+
+I/O counter: read syscalls
+Attempt to count the number of read I/O operations, i.e. syscalls like read()
+and pread().
+
+
+syscw
+-----
+
+I/O counter: write syscalls
+Attempt to count the number of write I/O operations, i.e. syscalls like
+write() and pwrite().
+
+
+read_bytes
+----------
+
+I/O counter: bytes read
+Attempt to count the number of bytes which this process really did cause to
+be fetched from the storage layer. Done at the submit_bio() level, so it is
+accurate for block-backed filesystems. <please add status regarding NFS and
+CIFS at a later time>
+
+
+write_bytes
+-----------
+
+I/O counter: bytes written
+Attempt to count the number of bytes which this process caused to be sent to
+the storage layer. This is done at page-dirtying time.
+
+
+cancelled_write_bytes
+---------------------
+
+The big inaccuracy here is truncate. If a process writes 1MB to a file and
+then deletes the file, it will in fact perform no writeout. But it will have
+been accounted as having caused 1MB of write.
+In other words: The number of bytes which this process caused to not happen,
+by truncating pagecache. A task can cause "negative" IO too. If this task
+truncates some dirty pagecache, some IO which another task has been accounted
+for (in it's write_bytes) will not be happening. We _could_ just subtract that
+from the truncating task's write_bytes, but there is information loss in doing
+that.
+
+
+Note
+----
+
+At its current implementation state, this is a bit racy on 32-bit machines: if
+process A reads process B's /proc/pid/io while process B is updating one of
+those 64-bit counters, process A could see an intermediate result.
+
+
+More information about this can be found within the taskstats documentation in
+Documentation/accounting.
+
+------------------------------------------------------------------------------
index 786c3a766995f09ad8ad443c042be0af0a6484f3..3bb9f9c986113d4f2f31d1d56f461645bb84d917 100644 (file)
@@ -232,7 +232,9 @@ Summary of ide driver parameters for kernel command line
 
  "hdx=remap63"         : remap the drive: add 63 to all sector numbers
                          (for DM OnTrack)
+
+ "idex=noautotune"     : driver will NOT attempt to tune interface speed
+
  "hdx=autotune"                : driver will attempt to tune interface speed
                          to the fastest PIO mode supported,
                          if possible for this drive only.
@@ -267,17 +269,6 @@ Summary of ide driver parameters for kernel command line
  "idex=base,ctl"       : specify both base and ctl
 
  "idex=base,ctl,irq"   : specify base, ctl, and irq number
- "idex=autotune"       : driver will attempt to tune interface speed
-                         to the fastest PIO mode supported,
-                         for all drives on this interface.
-                         Not fully supported by all chipset types,
-                         and quite likely to cause trouble with
-                         older/odd IDE drives.
-
- "idex=noautotune"     : driver will NOT attempt to tune interface speed 
-                         This is the default for most chipsets,
-                         except the cmd640.
 
  "idex=serialize"      : do not overlap operations on idex. Please note
                          that you will have to specify this option for
@@ -303,13 +294,8 @@ The following are valid ONLY on ide0, which usually corresponds
 to the first ATA interface found on the particular host, and the defaults for
 the base,ctl ports must not be altered.
 
- "ide0=dtc2278"                : probe/support DTC2278 interface
- "ide0=ht6560b"                : probe/support HT6560B interface
  "ide0=cmd640_vlb"     : *REQUIRED* for VLB cards with the CMD640 chip
                          (not for PCI -- automatically detected)
- "ide0=qd65xx"         : probe/support qd65xx interface
- "ide0=ali14xx"                : probe/support ali14xx chipsets (ALI M1439/M1443/M1445)
- "ide0=umc8672"                : probe/support umc8672 chipsets
 
  "ide=doubler"         : probe/support IDE doublers on Amiga
 
@@ -317,6 +303,15 @@ There may be more options than shown -- use the source, Luke!
 
 Everything else is rejected with a "BAD OPTION" message.
 
+For legacy IDE VLB host drivers (ali14xx/dtc2278/ht6560b/qd65xx/umc8672)
+you need to explicitly enable probing by using "probe" kernel parameter,
+i.e. to enable probing for ALI M14xx chipsets (ali14xx host driver) use:
+
+* "ali14xx.probe" boot option when ali14xx driver is built-in the kernel
+
+* "probe" module parameter when ali14xx driver is compiled as module
+  ("modprobe ali14xx probe")
+
 ================================================================================
 
 IDE ATAPI streaming tape driver
index 03eb5ed503f7745e9e30f177fd35baba8ff96779..6e92ba61f7c0ea18b86557eec2bd17f2ece5d9ca 100644 (file)
@@ -1685,6 +1685,22 @@ and is between 256 and 4096 characters. It is defined in the file
        stifb=          [HW]
                        Format: bpp:<bpp1>[:<bpp2>[:<bpp3>...]]
 
+       sunrpc.pool_mode=
+                       [NFS]
+                       Control how the NFS server code allocates CPUs to
+                       service thread pools.  Depending on how many NICs
+                       you have and where their interrupts are bound, this
+                       option will affect which CPUs will do NFS serving.
+                       Note: this parameter cannot be changed while the
+                       NFS server is running.
+
+                       auto        the server chooses an appropriate mode
+                                   automatically using heuristics
+                       global      a single global pool contains all CPUs
+                       percpu      one pool for each CPU
+                       pernode     one pool for each NUMA node (equivalent
+                                   to global on non-NUMA machines)
+
        swiotlb=        [IA-64] Number of I/O TLB slabs
 
        switches=       [HW,M68k]
index a0f6842368c37b77b571c5817029adaf45db1769..d3aae1f9b4c1970f5d119be92e54549d19640be3 100644 (file)
@@ -147,6 +147,11 @@ tcp_available_congestion_control - STRING
        More congestion control algorithms may be available as modules,
        but not loaded.
 
+tcp_base_mss - INTEGER
+       The initial value of search_low to be used by Packetization Layer
+       Path MTU Discovery (MTU probing).  If MTU probing is enabled,
+       this is the inital MSS used by the connection.
+
 tcp_congestion_control - STRING
        Set the congestion control algorithm to be used for new
        connections. The algorithm "reno" is always available, but
@@ -243,6 +248,27 @@ tcp_mem - vector of 3 INTEGERs: min, pressure, max
        Defaults are calculated at boot time from amount of available
        memory.
 
+tcp_moderate_rcvbuf - BOOLEAN
+       If set, TCP performs receive buffer autotuning, attempting to
+       automatically size the buffer (no greater than tcp_rmem[2]) to
+       match the size required by the path for full throughput.  Enabled by
+       default.
+
+tcp_mtu_probing - INTEGER
+       Controls TCP Packetization-Layer Path MTU Discovery.  Takes three
+       values:
+         0 - Disabled
+         1 - Disabled by default, enabled when an ICMP black hole detected
+         2 - Always enabled, use initial MSS of tcp_base_mss.
+
+tcp_no_metrics_save - BOOLEAN
+       By default, TCP saves various connection metrics in the route cache
+       when the connection closes, so that connections established in the
+       near future can use these to set initial conditions.  Usually, this
+       increases overall performance, but may sometimes cause performance
+       degredation.  If set, TCP will not cache metrics on closing
+       connections.
+
 tcp_orphan_retries - INTEGER
        How may times to retry before killing TCP connection, closed
        by our side. Default value 7 corresponds to ~50sec-16min
index c30ff1bb2d1019aedfb8d96d97cd248b9e711b93..db398a6441c1b110c94b1f32b2038926b728e028 100644 (file)
@@ -370,7 +370,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
     mpu_port   - 0x300,0x310,0x320,0x330 = legacy port,
                  1 = integrated PCI port,
                  0 = disable (default)
-    fm_port     - 0x388 (default), 0 = disable (default)
+    fm_port     - 0x388 = legacy port,
+                 1 = integrated PCI port (default),
+                 0 = disable
     soft_ac3    - Software-conversion of raw SPDIF packets (model 033 only)
                   (default = 1)
     joystick_port - Joystick port address (0 = disable, 1 = auto-detect)
@@ -895,10 +897,16 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
                        can be adjusted.  Appearing only when compiled with
                        $CONFIG_SND_DEBUG=y
 
-       STAC9200/9205/9220/9221/9254
+       STAC9200/9205/9254
+         ref           Reference board
+
+       STAC9220/9221
          ref           Reference board
          3stack        D945 3stack
          5stack        D945 5stack + SPDIF
+         macmini       Intel Mac Mini
+         macbook       Intel Mac Book
+         macbook-pro   Intel Mac Book Pro
 
        STAC9202/9250/9251
          ref           Reference board, base config
index 35e0a648422dfe0bff1a681edeccd659dbc7b34b..9993b90094155cb181fe2006e2a914a0b7af3776 100644 (file)
@@ -1345,7 +1345,7 @@ S:        Supported
 
 FRAMEBUFFER LAYER
 P:     Antonino Daplas
-M:     adaplas@pol.net
+M:     adaplas@gmail.com
 L:     linux-fbdev-devel@lists.sourceforge.net (subscribers-only)
 W:     http://linux-fbdev.sourceforge.net/
 S:     Maintained
@@ -1492,6 +1492,7 @@ HID CORE LAYER
 P:     Jiri Kosina
 M:     jkosina@suse.cz
 L:     linux-input@atrey.karlin.mff.cuni.cz
+T:     git kernel.org:/pub/scm/linux/kernel/git/jikos/hid.git
 S:     Maintained
 
 HIGH-RESOLUTION TIMERS, CLOCKEVENTS, DYNTICKS
@@ -1756,7 +1757,7 @@ S:        Maintained
 
 INTEL 810/815 FRAMEBUFFER DRIVER
 P:     Antonino Daplas
-M:     adaplas@pol.net
+M:     adaplas@gmail.com
 L:     linux-fbdev-devel@lists.sourceforge.net (subscribers-only)
 S:     Maintained
 
@@ -2471,7 +2472,7 @@ S:        Maintained
 
 NVIDIA (rivafb and nvidiafb) FRAMEBUFFER DRIVER
 P:     Antonino Daplas
-M:     adaplas@pol.net
+M:     adaplas@gmail.com
 L:     linux-fbdev-devel@lists.sourceforge.net (subscribers-only)
 S:     Maintained
 
@@ -2552,16 +2553,8 @@ L:       i2c@lm-sensors.org
 S:     Maintained
 
 PARALLEL PORT SUPPORT
-P:     Phil Blundell
-M:     philb@gnu.org
-P:     Tim Waugh
-M:     tim@cyberelk.net
-P:     David Campbell
-P:     Andrea Arcangeli
-M:     andrea@suse.de
 L:     linux-parport@lists.infradead.org
-W:     http://people.redhat.com/twaugh/parport/
-S:     Maintained
+S:     Orphan
 
 PARIDE DRIVERS FOR PARALLEL PORT IDE DEVICES
 P:     Tim Waugh
@@ -2855,7 +2848,7 @@ S:        Orphan
 
 S3 SAVAGE FRAMEBUFFER DRIVER
 P:     Antonino Daplas
-M:     adaplas@pol.net
+M:     adaplas@gmail.com
 L:     linux-fbdev-devel@lists.sourceforge.net (subscribers-only)
 S:     Maintained
 
@@ -3423,6 +3416,7 @@ USB HID/HIDBP DRIVERS
 P:     Jiri Kosina
 M:     jkosina@suse.cz
 L:     linux-usb-devel@lists.sourceforge.net
+T:     git kernel.org:/pub/scm/linux/kernel/git/jikos/hid.git
 S:     Maintained
 
 USB HUB DRIVER
index d75879d9ddeb71dae7ff09c7840bfb538d8362a6..e7baca29f3fb47f59cab05cf016b3f5cf25ebb26 100644 (file)
@@ -21,6 +21,10 @@ config ARM
 config SYS_SUPPORTS_APM_EMULATION
        bool
 
+config GENERIC_GPIO
+       bool
+       default n
+
 config GENERIC_TIME
        bool
        default n
@@ -163,6 +167,7 @@ config ARCH_VERSATILE
 
 config ARCH_AT91
        bool "Atmel AT91"
+       select GENERIC_GPIO
        help
          This enables support for systems based on the Atmel AT91RM9200
          and AT91SAM9xxx processors.
@@ -190,6 +195,7 @@ config ARCH_CO285
 config ARCH_EBSA110
        bool "EBSA-110"
        select ISA
+       select NO_IOPORT
        help
          This is an evaluation board for the StrongARM processor available
          from Digital. It has limited hardware on-board, including an
@@ -303,6 +309,7 @@ config ARCH_PXA
        bool "PXA2xx-based"
        depends on MMU
        select ARCH_MTD_XIP
+       select GENERIC_GPIO
        select GENERIC_TIME
        help
          Support for Intel's PXA2XX processor line.
@@ -324,11 +331,13 @@ config ARCH_SA1100
        select ISA
        select ARCH_DISCONTIGMEM_ENABLE
        select ARCH_MTD_XIP
+       select GENERIC_GPIO
        help
          Support for StrongARM 11x0 based boards.
 
 config ARCH_S3C2410
        bool "Samsung S3C2410, S3C2412, S3C2413, S3C2440, S3C2442, S3C2443"
+       select GENERIC_GPIO
        help
          Samsung S3C2410X CPU based systems, such as the Simtec Electronics
          BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
@@ -353,6 +362,7 @@ config ARCH_LH7A40X
 
 config ARCH_OMAP
        bool "TI OMAP"
+       select GENERIC_GPIO
        help
          Support for TI's OMAP platform (OMAP1 and OMAP2).
 
index cbe909bad79b3fde3e1b064b69bdb78e081b56f1..70014f751bc4baa7c70e06f15affa9e84a01d771 100644 (file)
@@ -16,6 +16,8 @@
 
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
+#include <linux/workqueue.h>
+#include <linux/delay.h>
 
 #include <asm/hardware.h>
 #include <asm/mach-types.h>
@@ -103,7 +105,7 @@ static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata =
 
 static struct spi_board_info nokia770_spi_board_info[] __initdata = {
        [0] = {
-               .modalias       = "lcd_lph8923",
+               .modalias               = "lcd_mipid",
                .bus_num        = 2,
                .chip_select    = 3,
                .max_speed_hz   = 12000000,
index 638490e62d5f5ebb7e07a21f586c521b9b2f2fe2..f625f6dd228a5187598d115b7293afdee924c755 100644 (file)
@@ -432,8 +432,7 @@ static int omap1_clk_enable(struct clk *clk)
                        }
 
                        if (clk->flags & CLOCK_NO_IDLE_PARENT)
-                               if (!cpu_is_omap24xx())
-                                       omap1_clk_deny_idle(clk->parent);
+                               omap1_clk_deny_idle(clk->parent);
                }
 
                ret = clk->enable(clk);
@@ -454,8 +453,7 @@ static void omap1_clk_disable(struct clk *clk)
                if (likely(clk->parent)) {
                        omap1_clk_disable(clk->parent);
                        if (clk->flags & CLOCK_NO_IDLE_PARENT)
-                               if (!cpu_is_omap24xx())
-                                       omap1_clk_allow_idle(clk->parent);
+                               omap1_clk_allow_idle(clk->parent);
                }
        }
 }
@@ -471,7 +469,7 @@ static int omap1_clk_enable_generic(struct clk *clk)
        if (unlikely(clk->enable_reg == 0)) {
                printk(KERN_ERR "clock.c: Enable for %s without enable code\n",
                       clk->name);
-               return 0;
+               return -EINVAL;
        }
 
        if (clk->flags & ENABLE_REG_32BIT) {
@@ -651,10 +649,18 @@ int __init omap1_clk_init(void)
        int crystal_type = 0; /* Default 12 MHz */
        u32 reg;
 
+#ifdef CONFIG_DEBUG_LL
+       /* Resets some clocks that may be left on from bootloader,
+        * but leaves serial clocks on.
+        */
+       omap_writel(0x3 << 29, MOD_CONF_CTRL_0);
+#endif
+
        /* USB_REQ_EN will be disabled later if necessary (usb_dc_ck) */
        reg = omap_readw(SOFT_REQ_REG) & (1 << 4);
        omap_writew(reg, SOFT_REQ_REG);
-       omap_writew(0, SOFT_REQ_REG2);
+       if (!cpu_is_omap15xx())
+               omap_writew(0, SOFT_REQ_REG2);
 
        clk_init(&omap1_clk_functions);
 
@@ -685,7 +691,7 @@ int __init omap1_clk_init(void)
 
        info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config);
        if (info != NULL) {
-               if (!cpu_is_omap1510())
+               if (!cpu_is_omap15xx())
                        crystal_type = info->system_clock_type;
        }
 
index 6383a12ad970ffe275049d87237109ea80d13a5b..410d3e78dd0fd9911633c84657f23877792950c6 100644 (file)
@@ -238,7 +238,7 @@ void __init omap_init_irq(void)
 
        if (cpu_is_omap730())
                omap_unmask_irq(INT_730_IH2_IRQ);
-       else if (cpu_is_omap1510())
+       else if (cpu_is_omap15xx())
                omap_unmask_irq(INT_1510_IH2_IRQ);
        else if (cpu_is_omap16xx())
                omap_unmask_irq(INT_1610_IH2_IRQ);
index 4834758d340c60a9bdec5b349a780443d9893e52..49efe903dacda7c98e8b1043b7b761fa62c73298 100644 (file)
@@ -256,7 +256,8 @@ void omap_pm_suspend(void)
                tps65010_set_led(LED1, OFF);
        }
 
-       omap_writew(0xffff, ULPD_SOFT_DISABLE_REQ_REG);
+       if (!cpu_is_omap15xx())
+               omap_writew(0xffff, ULPD_SOFT_DISABLE_REQ_REG);
 
        /*
         * Step 1: turn off interrupts (FIXME: NOTE: already disabled)
@@ -434,7 +435,8 @@ void omap_pm_suspend(void)
                MPUI1610_RESTORE(OMAP_IH2_3_MIR);
        }
 
-       omap_writew(0, ULPD_SOFT_DISABLE_REQ_REG);
+       if (!cpu_is_omap15xx())
+               omap_writew(0, ULPD_SOFT_DISABLE_REQ_REG);
 
        /*
         * Reenable interrupts
@@ -704,6 +706,8 @@ static struct pm_ops omap_pm_ops ={
 
 static int __init omap_pm_init(void)
 {
+       int error;
+
        printk("Power Management for TI OMAP.\n");
 
        /*
@@ -760,7 +764,9 @@ static int __init omap_pm_init(void)
        omap_pm_init_proc();
 #endif
 
-       subsys_create_file(&power_subsys, &sleep_while_idle_attr);
+       error = subsys_create_file(&power_subsys, &sleep_while_idle_attr);
+       if (error)
+               printk(KERN_ERR "subsys_create_file failed: %d\n", error);
 
        if (cpu_is_omap16xx()) {
                /* configure LOW_PWR pin */
index 4cc98a578e4bf5ed98ac048f702f2c519ae7a22d..10a4fe88b2fd5993a9b8d262f63f9aea4dca5381 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * linux/arch/arm/mach-omap1/serial.c
  *
- * OMAP1 CPU identification code
+ * OMAP1 serial support.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -59,7 +59,7 @@ static void __init omap_serial_reset(struct plat_serial8250_port *p)
        omap_serial_outp(p, UART_OMAP_SCR, 0x08);       /* TX watermark */
        omap_serial_outp(p, UART_OMAP_MDR1, 0x00);      /* enable UART */
 
-       if (!cpu_is_omap1510()) {
+       if (!cpu_is_omap15xx()) {
                omap_serial_outp(p, UART_OMAP_SYSC, 0x01);
                while (!(omap_serial_in(p, UART_OMAP_SYSC) & 0x01));
        }
@@ -121,7 +121,7 @@ void __init omap_serial_init(void)
                serial_platform_data[1].irq = INT_730_UART_MODEM_IRDA_2;
        }
 
-       if (cpu_is_omap1510()) {
+       if (cpu_is_omap15xx()) {
                serial_platform_data[0].uartclk = OMAP1510_BASE_BAUD * 16;
                serial_platform_data[1].uartclk = OMAP1510_BASE_BAUD * 16;
                serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16;
@@ -147,10 +147,10 @@ void __init omap_serial_init(void)
                                printk("Could not get uart1_ck\n");
                        else {
                                clk_enable(uart1_ck);
-                               if (cpu_is_omap1510())
+                               if (cpu_is_omap15xx())
                                        clk_set_rate(uart1_ck, 12000000);
                        }
-                       if (cpu_is_omap1510()) {
+                       if (cpu_is_omap15xx()) {
                                omap_cfg_reg(UART1_TX);
                                omap_cfg_reg(UART1_RTS);
                                if (machine_is_omap_innovator()) {
@@ -167,12 +167,12 @@ void __init omap_serial_init(void)
                                printk("Could not get uart2_ck\n");
                        else {
                                clk_enable(uart2_ck);
-                               if (cpu_is_omap1510())
+                               if (cpu_is_omap15xx())
                                        clk_set_rate(uart2_ck, 12000000);
                                else
                                        clk_set_rate(uart2_ck, 48000000);
                        }
-                       if (cpu_is_omap1510()) {
+                       if (cpu_is_omap15xx()) {
                                omap_cfg_reg(UART2_TX);
                                omap_cfg_reg(UART2_RTS);
                                if (machine_is_omap_innovator()) {
@@ -189,10 +189,10 @@ void __init omap_serial_init(void)
                                printk("Could not get uart3_ck\n");
                        else {
                                clk_enable(uart3_ck);
-                               if (cpu_is_omap1510())
+                               if (cpu_is_omap15xx())
                                        clk_set_rate(uart3_ck, 12000000);
                        }
-                       if (cpu_is_omap1510()) {
+                       if (cpu_is_omap15xx()) {
                                omap_cfg_reg(UART3_TX);
                                omap_cfg_reg(UART3_RX);
                        }
index 3b1ad1d981a359288dc67c84c6f5416e5b1042c7..1e7ed6d22ca98efc6614ff56071d91ac4679af6f 100644 (file)
@@ -39,7 +39,6 @@
 #include "prcm-regs.h"
 
 #include <asm/io.h>
-#include <asm/delay.h>
 
 static unsigned int row_gpios[6] = { 88, 89, 124, 11, 6, 96 };
 static unsigned int col_gpios[7] = { 90, 91, 100, 36, 12, 97, 98 };
@@ -179,9 +178,11 @@ static int h4_select_irda(struct device *dev, int state)
        return err;
 }
 
-static void set_trans_mode(void *data)
+static void set_trans_mode(struct work_struct *work)
 {
-       int *mode = data;
+       struct omap_irda_config *irda_config =
+               container_of(work, struct omap_irda_config, gpio_expa.work);
+       int mode = irda_config->mode;
        unsigned char expa;
        int err = 0;
 
@@ -191,7 +192,7 @@ static void set_trans_mode(void *data)
 
        expa &= ~0x01;
 
-       if (!(*mode & IR_SIRMODE)) { /* MIR/FIR */
+       if (!(mode & IR_SIRMODE)) { /* MIR/FIR */
                expa |= 0x01;
        }
 
@@ -204,9 +205,9 @@ static int h4_transceiver_mode(struct device *dev, int mode)
 {
        struct omap_irda_config *irda_config = dev->platform_data;
 
+       irda_config->mode = mode;
        cancel_delayed_work(&irda_config->gpio_expa);
-       PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode);
-#error this is not permitted - mode is an argument variable
+       PREPARE_DELAYED_WORK(&irda_config->gpio_expa, set_trans_mode);
        schedule_delayed_work(&irda_config->gpio_expa, 0);
 
        return 0;
index 973189cd97665c7aee22f2a51439e5745eb4a630..45d1aaa51b576d47a3610d6c04c1d8b90691cee3 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/err.h>
 #include <linux/clk.h>
 #include <linux/delay.h>
+#include <linux/irq.h>
 
 #include <asm/mach/time.h>
 #include <asm/arch/dmtimer.h>
@@ -64,7 +65,7 @@ static void __init omap2_gp_timer_init(void)
        BUG_ON(gptimer == NULL);
 
        omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_SYS_CLK);
-       tick_period = clk_get_rate(omap_dm_timer_get_fclk(gptimer)) / 100;
+       tick_period = clk_get_rate(omap_dm_timer_get_fclk(gptimer)) / HZ;
        tick_period -= 1;
 
        setup_irq(omap_dm_timer_get_irq(gptimer), &omap2_gp_timer_irq);
index 165017de8d0d39e2e261c55d41af2ef01ffcdc20..392c38717362751b9614ae88e1db1abff6c229c7 100644 (file)
@@ -16,7 +16,8 @@
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
-#include <asm/apm-emulation.h>
+#include <linux/apm-emulation.h>
+
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 #include <asm/hardware.h>
index b97d543d93640d6a4f1cb01efbd8e46fac9fe0f7..745a4dc7acdde6dc2fe4918c427178aac1a5f546 100644 (file)
@@ -16,7 +16,8 @@
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
-#include <asm/apm-emulation.h>
+#include <linux/apm-emulation.h>
+
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 #include <asm/hardware.h>
index 0a007b931f6368f8dcb8eb3dc4b47d4c5ae17b6d..a9de727c9327aa29eb266e45860a681e72f1d55c 100644 (file)
@@ -131,6 +131,8 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
        struct op_arm_model_spec *spec = NULL;
        int ret = -ENODEV;
 
+       ops->backtrace = arm_backtrace;
+
 #ifdef CONFIG_CPU_XSCALE
        spec = &op_xscale_spec;
 #endif
@@ -161,7 +163,6 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
                ops->start = op_arm_start;
                ops->stop = op_arm_stop;
                ops->cpu_type = op_arm_model->name;
-               ops->backtrace = arm_backtrace;
                printk(KERN_INFO "oprofile: using %s\n", spec->name);
        }
 
index bb045e5ddbd837e3906a90415e5800b383c6dd08..f3f84fbf8b875da63e8cf10bf178745a2eff2a7d 100644 (file)
@@ -557,7 +557,7 @@ int omap_request_dma(int dev_id, const char *dev_name,
                omap_enable_channel_irq(free_ch);
                /* Clear the CSR register and IRQ status register */
                OMAP_DMA_CSR_REG(free_ch) = OMAP2_DMA_CSR_CLEAR_MASK;
-               omap_writel(~0x0, OMAP_DMA4_IRQSTATUS_L0);
+               omap_writel(1 << free_ch, OMAP_DMA4_IRQSTATUS_L0);
        }
 
        *dma_ch_out = free_ch;
@@ -597,10 +597,7 @@ void omap_free_dma(int lch)
 
                /* Clear the CSR register and IRQ status register */
                OMAP_DMA_CSR_REG(lch) = OMAP2_DMA_CSR_CLEAR_MASK;
-
-               val = omap_readl(OMAP_DMA4_IRQSTATUS_L0);
-               val |= 1 << lch;
-               omap_writel(val, OMAP_DMA4_IRQSTATUS_L0);
+               omap_writel(1 << lch, OMAP_DMA4_IRQSTATUS_L0);
 
                /* Disable all DMA interrupts for the channel. */
                OMAP_DMA_CICR_REG(lch) = 0;
@@ -927,7 +924,6 @@ static irqreturn_t omap1_dma_irq_handler(int irq, void *dev_id)
 static int omap2_dma_handle_ch(int ch)
 {
        u32 status = OMAP_DMA_CSR_REG(ch);
-       u32 val;
 
        if (!status)
                return 0;
@@ -948,11 +944,7 @@ static int omap2_dma_handle_ch(int ch)
                       dma_chan[ch].dev_id);
 
        OMAP_DMA_CSR_REG(ch) = OMAP2_DMA_CSR_CLEAR_MASK;
-
-       val = omap_readl(OMAP_DMA4_IRQSTATUS_L0);
-       /* ch in this function is from 0-31 while in register it is 1-32 */
-       val = 1 << (ch);
-       omap_writel(val, OMAP_DMA4_IRQSTATUS_L0);
+       omap_writel(1 << ch, OMAP_DMA4_IRQSTATUS_L0);
 
        if (likely(dma_chan[ch].callback != NULL))
                dma_chan[ch].callback(ch, status, dma_chan[ch].data);
index bcbb8d7392be6d5b5ca729b29a32439a1ba5331a..45f0439bffba6d81c946d7321dadb00b02254109 100644 (file)
@@ -90,8 +90,8 @@ static struct omap_dm_timer dm_timers[] = {
        { .phys_base = 0xfffb2c00, .irq = INT_1610_GPTIMER4 },
        { .phys_base = 0xfffb3400, .irq = INT_1610_GPTIMER5 },
        { .phys_base = 0xfffb3c00, .irq = INT_1610_GPTIMER6 },
-       { .phys_base = 0xfffb4400, .irq = INT_1610_GPTIMER7 },
-       { .phys_base = 0xfffb4c00, .irq = INT_1610_GPTIMER8 },
+       { .phys_base = 0xfffb7400, .irq = INT_1610_GPTIMER7 },
+       { .phys_base = 0xfffbd400, .irq = INT_1610_GPTIMER8 },
 };
 
 #elif defined(CONFIG_ARCH_OMAP2)
@@ -314,6 +314,8 @@ struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer)
 __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask)
 {
        BUG();
+
+       return 0;
 }
 
 #endif
index 4f2fd55913379a10b080412408f9d8e2a2b132c4..b8c01de208b4d0469dd0a9499e3109b1ec1fdd13 100644 (file)
@@ -974,10 +974,11 @@ static struct irq_chip gpio_irq_chip = {
 };
 
 static struct irq_chip mpuio_irq_chip = {
-       .name   = "MPUIO",
-       .ack    = mpuio_ack_irq,
-       .mask   = mpuio_mask_irq,
-       .unmask = mpuio_unmask_irq
+       .name     = "MPUIO",
+       .ack      = mpuio_ack_irq,
+       .mask     = mpuio_mask_irq,
+       .unmask   = mpuio_unmask_irq,
+       .set_type = gpio_irq_type,
 };
 
 static int initialized;
index ec50008a2df6421e46275d0ec022231bdf9a3b8f..b8d6f17ff58fc86e57301d64226a8ea87810a813 100644 (file)
@@ -20,8 +20,8 @@
 #include <linux/interrupt.h>
 #include <linux/err.h>
 #include <linux/clk.h>
+#include <linux/delay.h>
 
-#include <asm/delay.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 
index 042105ac30b8ea5058861343058d62112e44b288..6c798d288688a8f3ef73ba39ce30106c3a1e1f9c 100644 (file)
@@ -116,7 +116,7 @@ int __init_or_module omap_cfg_reg(const unsigned long index)
        }
 
        /* Check for pull up or pull down selection on 1610 */
-       if (!cpu_is_omap1510()) {
+       if (!cpu_is_omap15xx()) {
                if (cfg->pu_pd_reg && cfg->pull_val) {
                        spin_lock_irqsave(&mux_spin_lock, flags);
                        pu_pd_orig = omap_readl(cfg->pu_pd_reg);
@@ -172,7 +172,7 @@ int __init_or_module omap_cfg_reg(const unsigned long index)
                printk("      %s (0x%08x) = 0x%08x -> 0x%08x\n",
                       cfg->mux_reg_name, cfg->mux_reg, reg_orig, reg);
 
-               if (!cpu_is_omap1510()) {
+               if (!cpu_is_omap15xx()) {
                        if (cfg->pu_pd_reg && cfg->pull_val) {
                                printk("      %s (0x%08x) = 0x%08x -> 0x%08x\n",
                                       cfg->pu_pd_name, cfg->pu_pd_reg,
index 860869528f4c951751587b7c9f42ebd90f762d4d..b972f36d547ccd17190fd4cb698e1aa3e2656043 100644 (file)
@@ -58,6 +58,11 @@ config S3C2410_PM_CHECK
          going to sleep. The blocks are then checked on resume for any
          errors.
 
+         Note, this can take several seconds depending on memory size
+         and CPU speed.
+
+         See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>
+
 config S3C2410_PM_CHECK_CHUNKSIZE
        int "S3C2410 PM Suspend CRC Chunksize (KiB)"
        depends on ARCH_S3C2410 && PM && S3C2410_PM_CHECK
@@ -68,6 +73,8 @@ config S3C2410_PM_CHECK_CHUNKSIZE
          the CRC data block will take more memory, but wil identify any
          faults with better precision.
 
+         See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>
+
 config S3C2410_LOWLEVEL_UART_PORT
        int "S3C2410 UART to use for low-level messages"
        default 0
index 6d910ea43d34dbc78b67be83e78822f9c3b34204..91496cc687b1d6831acbbd7bb82a861da12783da 100644 (file)
@@ -245,11 +245,6 @@ ENTRY(vector_swi)
        zero_fp
        get_scno
 
-#ifdef CONFIG_ALIGNMENT_TRAP
-       ldr     ip, __cr_alignment
-       ldr     ip, [ip]
-       mcr     p15, 0, ip, c1, c0              @ update control register
-#endif
        enable_irqs ip
 
        str     r4, [sp, #-S_OFF]!              @ push fifth arg
@@ -299,11 +294,6 @@ __sys_trace_return:
        b       ret_slow_syscall
 
        .align  5
-#ifdef CONFIG_ALIGNMENT_TRAP
-       .type   __cr_alignment, #object
-__cr_alignment:
-       .word   cr_alignment
-#endif
 
        .type   sys_call_table, #object
 ENTRY(sys_call_table)
index bb059a4e1df94a757eac011ad007552a8649be69..ce4013aee59bcd728ba24071e306040ae4e25a4d 100644 (file)
@@ -22,6 +22,10 @@ config AVR32
 config UID16
        bool
 
+config GENERIC_GPIO
+       bool
+       default y
+
 config GENERIC_HARDIRQS
        bool
        default y
index 426b09878a05a5256c2fbc6ab3067a35c4726ccf..70d3bf0c92e8ebdda3c5d56bcb3663cfe6dc7ffc 100644 (file)
@@ -111,7 +111,7 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
        return DMA_MEMORY_IO;
 
  free1_out:
-       kfree(dev->dma_mem->bitmap);
+       kfree(dev->dma_mem);
  out:
        return 0;
 }
index 3f3a0ed3539bc514b7aa45f9f2b52fbfa42319b7..4103c2c487f3a114654f242f16b18d0e99281447 100644 (file)
@@ -126,8 +126,7 @@ void __init paging_init(void)
 
        /* distribute the allocatable pages across the various zones and pass them to the allocator
         */
-       zones_size[ZONE_DMA]     = max_low_pfn - min_low_pfn;
-       zones_size[ZONE_NORMAL]  = 0;
+       zones_size[ZONE_NORMAL]  = max_low_pfn - min_low_pfn;
 #ifdef CONFIG_HIGHMEM
        zones_size[ZONE_HIGHMEM] = num_physpages - num_mappedpages;
 #endif
index 2f7672545fe98ae0096d0249fefcf250dbdab5df..27e8453274e660b17c08d555aa4e394f7b01a548 100644 (file)
@@ -220,11 +220,11 @@ config PARAVIRT
 
 config VMI
        bool "VMI Paravirt-ops support"
-       depends on PARAVIRT && !NO_HZ
-       default y
+       depends on PARAVIRT
        help
-         VMI provides a paravirtualized interface to multiple hypervisors
-         include VMware ESX server and Xen by connecting to a ROM module
+         VMI provides a paravirtualized interface to the VMware ESX server
+         (it could be used by other hypervisors in theory too, but is not
+         at the moment), by linking the kernel to a GPL-ed ROM module
          provided by the hypervisor.
 
 config ACPI_SRAT
@@ -893,7 +893,6 @@ config HOTPLUG_CPU
 config COMPAT_VDSO
        bool "Compat VDSO support"
        default y
-       depends on !PARAVIRT
        help
          Map the VDSO to the predictable old-style address too.
        ---help---
@@ -1287,12 +1286,3 @@ config X86_TRAMPOLINE
 config KTIME_SCALAR
        bool
        default y
-
-config NO_IDLE_HZ
-       bool
-       depends on PARAVIRT
-       default y
-       help
-         Switches the regular HZ timer off when the system is going idle.
-         This helps a hypervisor detect that the Linux system is idle,
-         reducing the overhead of idle systems.
index 7a2c9cbdb511ebf2150a2bf172aff45621ad5f95..2383bcf18c5d0c321712f854721441562d522025 100644 (file)
@@ -493,8 +493,15 @@ void __init setup_boot_APIC_clock(void)
                /* No broadcast on UP ! */
                if (num_possible_cpus() == 1)
                        return;
-       } else
-               lapic_clockevent.features &= ~CLOCK_EVT_FEAT_DUMMY;
+       } else {
+               /*
+                * If nmi_watchdog is set to IO_APIC, we need the
+                * PIT/HPET going.  Otherwise register lapic as a dummy
+                * device.
+                */
+               if (nmi_watchdog != NMI_IO_APIC)
+                       lapic_clockevent.features &= ~CLOCK_EVT_FEAT_DUMMY;
+       }
 
        /* Setup the lapic or request the broadcast */
        setup_APIC_timer();
index e1006b7acc9e56d5be196599cd997d9cd364be8b..f3ab61ee749826282b8d1ee905f631c7b1efb06c 100644 (file)
@@ -200,6 +200,23 @@ static int hpet_next_event(unsigned long delta,
        return ((long)(hpet_readl(HPET_COUNTER) - cnt ) > 0);
 }
 
+/*
+ * Clock source related code
+ */
+static cycle_t read_hpet(void)
+{
+       return (cycle_t)hpet_readl(HPET_COUNTER);
+}
+
+static struct clocksource clocksource_hpet = {
+       .name           = "hpet",
+       .rating         = 250,
+       .read           = read_hpet,
+       .mask           = HPET_MASK,
+       .shift          = HPET_SHIFT,
+       .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
+};
+
 /*
  * Try to setup the HPET timer
  */
@@ -207,6 +224,7 @@ int __init hpet_enable(void)
 {
        unsigned long id;
        uint64_t hpet_freq;
+       u64 tmp;
 
        if (!is_hpet_capable())
                return 0;
@@ -253,6 +271,25 @@ int __init hpet_enable(void)
        /* Start the counter */
        hpet_start_counter();
 
+       /* Initialize and register HPET clocksource
+        *
+        * hpet period is in femto seconds per cycle
+        * so we need to convert this to ns/cyc units
+        * aproximated by mult/2^shift
+        *
+        *  fsec/cyc * 1nsec/1000000fsec = nsec/cyc = mult/2^shift
+        *  fsec/cyc * 1ns/1000000fsec * 2^shift = mult
+        *  fsec/cyc * 2^shift * 1nsec/1000000fsec = mult
+        *  (fsec/cyc << shift)/1000000 = mult
+        *  (hpet_period << shift)/FSEC_PER_NSEC = mult
+        */
+       tmp = (u64)hpet_period << HPET_SHIFT;
+       do_div(tmp, FSEC_PER_NSEC);
+       clocksource_hpet.mult = (u32)tmp;
+
+       clocksource_register(&clocksource_hpet);
+
+
        if (id & HPET_ID_LEGSUP) {
                hpet_enable_int();
                hpet_reserve_platform_timers(id);
@@ -273,49 +310,6 @@ out_nohpet:
        return 0;
 }
 
-/*
- * Clock source related code
- */
-static cycle_t read_hpet(void)
-{
-       return (cycle_t)hpet_readl(HPET_COUNTER);
-}
-
-static struct clocksource clocksource_hpet = {
-       .name           = "hpet",
-       .rating         = 250,
-       .read           = read_hpet,
-       .mask           = HPET_MASK,
-       .shift          = HPET_SHIFT,
-       .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
-};
-
-static int __init init_hpet_clocksource(void)
-{
-       u64 tmp;
-
-       if (!hpet_virt_address)
-               return -ENODEV;
-
-       /*
-        * hpet period is in femto seconds per cycle
-        * so we need to convert this to ns/cyc units
-        * aproximated by mult/2^shift
-        *
-        *  fsec/cyc * 1nsec/1000000fsec = nsec/cyc = mult/2^shift
-        *  fsec/cyc * 1ns/1000000fsec * 2^shift = mult
-        *  fsec/cyc * 2^shift * 1nsec/1000000fsec = mult
-        *  (fsec/cyc << shift)/1000000 = mult
-        *  (hpet_period << shift)/FSEC_PER_NSEC = mult
-        */
-       tmp = (u64)hpet_period << HPET_SHIFT;
-       do_div(tmp, FSEC_PER_NSEC);
-       clocksource_hpet.mult = (u32)tmp;
-
-       return clocksource_register(&clocksource_hpet);
-}
-
-module_init(init_hpet_clocksource);
 
 #ifdef CONFIG_HPET_EMULATE_RTC
 
index a6bc7bb38834282239bba67631b6ae2041b14e2b..5cbb776b3089b96f9d9a113c234037e28f3aa1c8 100644 (file)
@@ -195,4 +195,4 @@ static int __init init_pit_clocksource(void)
        clocksource_pit.mult = clocksource_hz2mult(CLOCK_TICK_RATE, 20);
        return clocksource_register(&clocksource_pit);
 }
-module_init(init_pit_clocksource);
+arch_initcall(init_pit_clocksource);
index 6fec4dab70bb92f5adcd6105f513352cdf4bccf0..e4408ff4e6747224a77a66b5b2f21d02a7992a25 100644 (file)
@@ -1354,7 +1354,6 @@ static void __init setup_IO_APIC_irqs(void)
                }
                spin_lock_irqsave(&ioapic_lock, flags);
                __ioapic_write_entry(apic, pin, entry);
-               irq_desc[irq].affinity = TARGET_CPUS;
                spin_unlock_irqrestore(&ioapic_lock, flags);
        }
        }
@@ -2875,7 +2874,6 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
 
        spin_lock_irqsave(&ioapic_lock, flags);
        __ioapic_write_entry(ioapic, pin, entry);
-       irq_desc[irq].affinity = TARGET_CPUS;
        spin_unlock_irqrestore(&ioapic_lock, flags);
 
        return 0;
index c156ecfa38727c2133ec4f3994ba8f4f9e82fc9f..2ec331e03fa9ede01a5bed5bee5faf1043b9f6dd 100644 (file)
@@ -32,6 +32,7 @@
 #include <asm/fixmap.h>
 #include <asm/apic.h>
 #include <asm/tlbflush.h>
+#include <asm/timer.h>
 
 /* nop stub */
 static void native_nop(void)
@@ -493,7 +494,7 @@ struct paravirt_ops paravirt_ops = {
        .memory_setup = machine_specific_memory_setup,
        .get_wallclock = native_get_wallclock,
        .set_wallclock = native_set_wallclock,
-       .time_init = time_init_hook,
+       .time_init = hpet_time_init,
        .init_IRQ = native_init_IRQ,
 
        .cpuid = native_cpuid,
@@ -520,6 +521,8 @@ struct paravirt_ops paravirt_ops = {
        .write_msr = native_write_msr,
        .read_tsc = native_read_tsc,
        .read_pmc = native_read_pmc,
+       .get_scheduled_cycles = native_read_tsc,
+       .get_cpu_khz = native_calculate_cpu_khz,
        .load_tr_desc = native_load_tr_desc,
        .set_ldt = native_set_ldt,
        .load_gdt = native_load_gdt,
@@ -535,7 +538,6 @@ struct paravirt_ops paravirt_ops = {
 
        .set_iopl_mask = native_set_iopl_mask,
        .io_delay = native_io_delay,
-       .const_udelay = __const_udelay,
 
 #ifdef CONFIG_X86_LOCAL_APIC
        .apic_write = native_apic_write,
@@ -550,6 +552,8 @@ struct paravirt_ops paravirt_ops = {
        .flush_tlb_kernel = native_flush_tlb_global,
        .flush_tlb_single = native_flush_tlb_single,
 
+       .map_pt_hook = (void *)native_nop,
+
        .alloc_pt = (void *)native_nop,
        .alloc_pd = (void *)native_nop,
        .alloc_pd_clone = (void *)native_nop,
index 41af692c1584908b6864356b757294b64b787de2..3ebcea033623e357904d52195d4d52d526267636 100644 (file)
@@ -110,7 +110,7 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
        return DMA_MEMORY_IO;
 
  free1_out:
-       kfree(dev->dma_mem->bitmap);
+       kfree(dev->dma_mem);
  out:
        if (mem_base)
                iounmap(mem_base);
index 122623dcc6e1bc94543f0d343d0fe4a19e90cef7..698c24fe482eef9085fd380233b9364333581c14 100644 (file)
@@ -657,5 +657,4 @@ void __init setup_arch(char **cmdline_p)
        conswitchp = &dummy_con;
 #endif
 #endif
-       tsc_init();
 }
index 48bfcaa13ecca45c79503f791814c75ed4a5ba54..9b0dd2744c82093e98e9fa8f8b63b61b57cbf768 100644 (file)
  *             Dave Jones      :       Report invalid combinations of Athlon CPUs.
 *              Rusty Russell   :       Hacked into shape for new "hotplug" boot process. */
 
-
-/* SMP boot always wants to use real time delay to allow sufficient time for
- * the APs to come online */
-#define USE_REAL_TIME_DELAY
-
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
index a5350059557a6541c0c96b8f8ba6933073999d05..94e5cb09110402ddc1d8b793d8b8c9d002fb5cf5 100644 (file)
@@ -262,14 +262,23 @@ void notify_arch_cmos_timer(void)
 
 extern void (*late_time_init)(void);
 /* Duplicate of time_init() below, with hpet_enable part added */
-static void __init hpet_time_init(void)
+void __init hpet_time_init(void)
 {
        if (!hpet_enable())
                setup_pit_timer();
-       do_time_init();
+       time_init_hook();
 }
 
+/*
+ * This is called directly from init code; we must delay timer setup in the
+ * HPET case as we can't make the decision to turn on HPET this early in the
+ * boot process.
+ *
+ * The chosen time_init function will usually be hpet_time_init, above, but
+ * in the case of virtual hardware, an alternative function may be substituted.
+ */
 void __init time_init(void)
 {
-       late_time_init = hpet_time_init;
+       tsc_init();
+       late_time_init = choose_time_init();
 }
index 3082a418635c11d6f3cdce2b53d3499a3124c075..602660df455c7676b2fd9400f628831b8b3d716c 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/delay.h>
 #include <asm/tsc.h>
 #include <asm/io.h>
+#include <asm/timer.h>
 
 #include "mach_timer.h"
 
@@ -23,7 +24,6 @@
  * an extra value to store the TSC freq
  */
 unsigned int tsc_khz;
-unsigned long long (*custom_sched_clock)(void);
 
 int tsc_disable;
 
@@ -102,9 +102,6 @@ unsigned long long sched_clock(void)
 {
        unsigned long long this_offset;
 
-       if (unlikely(custom_sched_clock))
-               return (*custom_sched_clock)();
-
        /*
         * Fall back to jiffies if there's no TSC available:
         */
@@ -113,13 +110,13 @@ unsigned long long sched_clock(void)
                return (jiffies_64 - INITIAL_JIFFIES) * (1000000000 / HZ);
 
        /* read the Time Stamp Counter: */
-       rdtscll(this_offset);
+       get_scheduled_cycles(this_offset);
 
        /* return the value in ns */
        return cycles_2_ns(this_offset);
 }
 
-static unsigned long calculate_cpu_khz(void)
+unsigned long native_calculate_cpu_khz(void)
 {
        unsigned long long start, end;
        unsigned long count;
@@ -186,34 +183,6 @@ int recalibrate_cpu_khz(void)
 
 EXPORT_SYMBOL(recalibrate_cpu_khz);
 
-void __init tsc_init(void)
-{
-       if (!cpu_has_tsc || tsc_disable)
-               goto out_no_tsc;
-
-       cpu_khz = calculate_cpu_khz();
-       tsc_khz = cpu_khz;
-
-       if (!cpu_khz)
-               goto out_no_tsc;
-
-       printk("Detected %lu.%03lu MHz processor.\n",
-                               (unsigned long)cpu_khz / 1000,
-                               (unsigned long)cpu_khz % 1000);
-
-       set_cyc2ns_scale(cpu_khz);
-       use_tsc_delay();
-       return;
-
-out_no_tsc:
-       /*
-        * Set the tsc_disable flag if there's no TSC support, this
-        * makes it a fast flag for the kernel to see whether it
-        * should be using the TSC.
-        */
-       tsc_disable = 1;
-}
-
 #ifdef CONFIG_CPU_FREQ
 
 /*
@@ -383,28 +352,47 @@ static void __init check_geode_tsc_reliable(void)
 static inline void check_geode_tsc_reliable(void) { }
 #endif
 
-static int __init init_tsc_clocksource(void)
+
+void __init tsc_init(void)
 {
+       if (!cpu_has_tsc || tsc_disable)
+               goto out_no_tsc;
 
-       if (cpu_has_tsc && tsc_khz && !tsc_disable) {
-               /* check blacklist */
-               dmi_check_system(bad_tsc_dmi_table);
+       cpu_khz = calculate_cpu_khz();
+       tsc_khz = cpu_khz;
 
-               unsynchronized_tsc();
-               check_geode_tsc_reliable();
-               current_tsc_khz = tsc_khz;
-               clocksource_tsc.mult = clocksource_khz2mult(current_tsc_khz,
-                                                       clocksource_tsc.shift);
-               /* lower the rating if we already know its unstable: */
-               if (check_tsc_unstable()) {
-                       clocksource_tsc.rating = 0;
-                       clocksource_tsc.flags &= ~CLOCK_SOURCE_IS_CONTINUOUS;
-               }
+       if (!cpu_khz)
+               goto out_no_tsc;
+
+       printk("Detected %lu.%03lu MHz processor.\n",
+                               (unsigned long)cpu_khz / 1000,
+                               (unsigned long)cpu_khz % 1000);
+
+       set_cyc2ns_scale(cpu_khz);
+       use_tsc_delay();
 
-               return clocksource_register(&clocksource_tsc);
+       /* Check and install the TSC clocksource */
+       dmi_check_system(bad_tsc_dmi_table);
+
+       unsynchronized_tsc();
+       check_geode_tsc_reliable();
+       current_tsc_khz = tsc_khz;
+       clocksource_tsc.mult = clocksource_khz2mult(current_tsc_khz,
+                                                       clocksource_tsc.shift);
+       /* lower the rating if we already know its unstable: */
+       if (check_tsc_unstable()) {
+               clocksource_tsc.rating = 0;
+               clocksource_tsc.flags &= ~CLOCK_SOURCE_IS_CONTINUOUS;
        }
+       clocksource_register(&clocksource_tsc);
 
-       return 0;
-}
+       return;
 
-module_init(init_tsc_clocksource);
+out_no_tsc:
+       /*
+        * Set the tsc_disable flag if there's no TSC support, this
+        * makes it a fast flag for the kernel to see whether it
+        * should be using the TSC.
+        */
+       tsc_disable = 1;
+}
index bb5a7abf949cfd89c239ac7ec68ff4219969ac74..fbf45fa083207c7b70a1be6eed15bb27b4dcdb35 100644 (file)
@@ -35,6 +35,7 @@
 #include <asm/processor.h>
 #include <asm/timer.h>
 #include <asm/vmi_time.h>
+#include <asm/kmap_types.h>
 
 /* Convenient for calling VMI functions indirectly in the ROM */
 typedef u32 __attribute__((regparm(1))) (VROMFUNC)(void);
@@ -48,12 +49,13 @@ typedef u64 __attribute__((regparm(2))) (VROMLONGFUNC)(int);
 
 static struct vrom_header *vmi_rom;
 static int license_gplok;
-static int disable_nodelay;
 static int disable_pge;
 static int disable_pse;
 static int disable_sep;
 static int disable_tsc;
 static int disable_mtrr;
+static int disable_noidle;
+static int disable_vmi_timer;
 
 /* Cached VMI operations */
 struct {
@@ -255,7 +257,6 @@ static void vmi_nop(void)
 }
 
 /* For NO_IDLE_HZ, we stop the clock when halting the kernel */
-#ifdef CONFIG_NO_IDLE_HZ
 static fastcall void vmi_safe_halt(void)
 {
        int idle = vmi_stop_hz_timer();
@@ -266,7 +267,6 @@ static fastcall void vmi_safe_halt(void)
                local_irq_enable();
        }
 }
-#endif
 
 #ifdef CONFIG_DEBUG_PAGE_TYPE
 
@@ -371,6 +371,24 @@ static void vmi_check_page_type(u32 pfn, int type)
 #define vmi_check_page_type(p,t) do { } while (0)
 #endif
 
+static void vmi_map_pt_hook(int type, pte_t *va, u32 pfn)
+{
+       /*
+        * Internally, the VMI ROM must map virtual addresses to physical
+        * addresses for processing MMU updates.  By the time MMU updates
+        * are issued, this information is typically already lost.
+        * Fortunately, the VMI provides a cache of mapping slots for active
+        * page tables.
+        *
+        * We use slot zero for the linear mapping of physical memory, and
+        * in HIGHPTE kernels, slot 1 and 2 for KM_PTE0 and KM_PTE1.
+        *
+        *  args:                 SLOT                 VA    COUNT PFN
+        */
+       BUG_ON(type != KM_PTE0 && type != KM_PTE1);
+       vmi_ops.set_linear_mapping((type - KM_PTE0)+1, (u32)va, 1, pfn);
+}
+
 static void vmi_allocate_pt(u32 pfn)
 {
        vmi_set_page_type(pfn, VMI_PAGE_L1);
@@ -508,13 +526,14 @@ void vmi_pmd_clear(pmd_t *pmd)
 #endif
 
 #ifdef CONFIG_SMP
-struct vmi_ap_state ap;
 extern void setup_pda(void);
 
-static void __init /* XXX cpu hotplug */
+static void __devinit
 vmi_startup_ipi_hook(int phys_apicid, unsigned long start_eip,
                     unsigned long start_esp)
 {
+       struct vmi_ap_state ap;
+
        /* Default everything to zero.  This is fine for most GPRs. */
        memset(&ap, 0, sizeof(struct vmi_ap_state));
 
@@ -553,7 +572,7 @@ vmi_startup_ipi_hook(int phys_apicid, unsigned long start_eip,
        /* Protected mode, paging, AM, WP, NE, MP. */
        ap.cr0 = 0x80050023;
        ap.cr4 = mmu_cr4_features;
-       vmi_ops.set_initial_ap_state(__pa(&ap), phys_apicid);
+       vmi_ops.set_initial_ap_state((u32)&ap, phys_apicid);
 }
 #endif
 
@@ -645,12 +664,12 @@ static inline int __init probe_vmi_rom(void)
 void vmi_bringup(void)
 {
        /* We must establish the lowmem mapping for MMU ops to work */
-       if (vmi_rom)
+       if (vmi_ops.set_linear_mapping)
                vmi_ops.set_linear_mapping(0, __PAGE_OFFSET, max_low_pfn, 0);
 }
 
 /*
- * Return a pointer to the VMI function or a NOP stub
+ * Return a pointer to a VMI function or NULL if unimplemented
  */
 static void *vmi_get_function(int vmicall)
 {
@@ -661,12 +680,13 @@ static void *vmi_get_function(int vmicall)
        if (rel->type == VMI_RELOCATION_CALL_REL)
                return (void *)rel->eip;
        else
-               return (void *)vmi_nop;
+               return NULL;
 }
 
 /*
  * Helper macro for making the VMI paravirt-ops fill code readable.
- * For unimplemented operations, fall back to default.
+ * For unimplemented operations, fall back to default, unless nop
+ * is returned by the ROM.
  */
 #define para_fill(opname, vmicall)                             \
 do {                                                           \
@@ -675,9 +695,29 @@ do {                                                               \
        if (rel->type != VMI_RELOCATION_NONE) {                 \
                BUG_ON(rel->type != VMI_RELOCATION_CALL_REL);   \
                paravirt_ops.opname = (void *)rel->eip;         \
+       } else if (rel->type == VMI_RELOCATION_NOP)             \
+               paravirt_ops.opname = (void *)vmi_nop;          \
+} while (0)
+
+/*
+ * Helper macro for making the VMI paravirt-ops fill code readable.
+ * For cached operations which do not match the VMI ROM ABI and must
+ * go through a tranlation stub.  Ignore NOPs, since it is not clear
+ * a NOP * VMI function corresponds to a NOP paravirt-op when the
+ * functions are not in 1-1 correspondence.
+ */
+#define para_wrap(opname, wrapper, cache, vmicall)             \
+do {                                                           \
+       reloc = call_vrom_long_func(vmi_rom, get_reloc,         \
+                                   VMI_CALL_##vmicall);        \
+       BUG_ON(rel->type == VMI_RELOCATION_JUMP_REL);           \
+       if (rel->type == VMI_RELOCATION_CALL_REL) {             \
+               paravirt_ops.opname = wrapper;                  \
+               vmi_ops.cache = (void *)rel->eip;               \
        }                                                       \
 } while (0)
 
+
 /*
  * Activate the VMI interface and switch into paravirtualized mode
  */
@@ -714,13 +754,8 @@ static inline int __init activate_vmi(void)
         *  rdpmc is not yet used in Linux
         */
 
-       /* CPUID is special, so very special */
-       reloc = call_vrom_long_func(vmi_rom, get_reloc, VMI_CALL_CPUID);
-       if (rel->type != VMI_RELOCATION_NONE) {
-               BUG_ON(rel->type != VMI_RELOCATION_CALL_REL);
-               vmi_ops.cpuid = (void *)rel->eip;
-               paravirt_ops.cpuid = vmi_cpuid;
-       }
+       /* CPUID is special, so very special it gets wrapped like a present */
+       para_wrap(cpuid, vmi_cpuid, cpuid, CPUID);
 
        para_fill(clts, CLTS);
        para_fill(get_debugreg, GetDR);
@@ -737,38 +772,26 @@ static inline int __init activate_vmi(void)
        para_fill(restore_fl, SetInterruptMask);
        para_fill(irq_disable, DisableInterrupts);
        para_fill(irq_enable, EnableInterrupts);
+
        /* irq_save_disable !!! sheer pain */
        patch_offset(&irq_save_disable_callout[IRQ_PATCH_INT_MASK],
                     (char *)paravirt_ops.save_fl);
        patch_offset(&irq_save_disable_callout[IRQ_PATCH_DISABLE],
                     (char *)paravirt_ops.irq_disable);
-#ifndef CONFIG_NO_IDLE_HZ
-       para_fill(safe_halt, Halt);
-#else
-       vmi_ops.halt = vmi_get_function(VMI_CALL_Halt);
-       paravirt_ops.safe_halt = vmi_safe_halt;
-#endif
+
        para_fill(wbinvd, WBINVD);
+       para_fill(read_tsc, RDTSC);
+
+       /* The following we emulate with trap and emulate for now */
        /* paravirt_ops.read_msr = vmi_rdmsr */
        /* paravirt_ops.write_msr = vmi_wrmsr */
-       para_fill(read_tsc, RDTSC);
        /* paravirt_ops.rdpmc = vmi_rdpmc */
 
-       /* TR interface doesn't pass TR value */
-       reloc = call_vrom_long_func(vmi_rom, get_reloc, VMI_CALL_SetTR);
-       if (rel->type != VMI_RELOCATION_NONE) {
-               BUG_ON(rel->type != VMI_RELOCATION_CALL_REL);
-               vmi_ops.set_tr = (void *)rel->eip;
-               paravirt_ops.load_tr_desc = vmi_set_tr;
-       }
+       /* TR interface doesn't pass TR value, wrap */
+       para_wrap(load_tr_desc, vmi_set_tr, set_tr, SetTR);
 
        /* LDT is special, too */
-       reloc = call_vrom_long_func(vmi_rom, get_reloc, VMI_CALL_SetLDT);
-       if (rel->type != VMI_RELOCATION_NONE) {
-               BUG_ON(rel->type != VMI_RELOCATION_CALL_REL);
-               vmi_ops._set_ldt = (void *)rel->eip;
-               paravirt_ops.set_ldt = vmi_set_ldt;
-       }
+       para_wrap(set_ldt, vmi_set_ldt, _set_ldt, SetLDT);
 
        para_fill(load_gdt, SetGDT);
        para_fill(load_idt, SetIDT);
@@ -779,28 +802,14 @@ static inline int __init activate_vmi(void)
        para_fill(write_ldt_entry, WriteLDTEntry);
        para_fill(write_gdt_entry, WriteGDTEntry);
        para_fill(write_idt_entry, WriteIDTEntry);
-       reloc = call_vrom_long_func(vmi_rom, get_reloc,
-                                   VMI_CALL_UpdateKernelStack);
-       if (rel->type != VMI_RELOCATION_NONE) {
-               BUG_ON(rel->type != VMI_RELOCATION_CALL_REL);
-               vmi_ops.set_kernel_stack = (void *)rel->eip;
-               paravirt_ops.load_esp0 = vmi_load_esp0;
-       }
-
+       para_wrap(load_esp0, vmi_load_esp0, set_kernel_stack, UpdateKernelStack);
        para_fill(set_iopl_mask, SetIOPLMask);
-       paravirt_ops.io_delay = (void *)vmi_nop;
-       if (!disable_nodelay) {
-               paravirt_ops.const_udelay = (void *)vmi_nop;
-       }
-
+       para_fill(io_delay, IODelay);
        para_fill(set_lazy_mode, SetLazyMode);
 
-       reloc = call_vrom_long_func(vmi_rom, get_reloc, VMI_CALL_FlushTLB);
-       if (rel->type != VMI_RELOCATION_NONE) {
-               vmi_ops.flush_tlb = (void *)rel->eip;
-               paravirt_ops.flush_tlb_user = vmi_flush_tlb_user;
-               paravirt_ops.flush_tlb_kernel = vmi_flush_tlb_kernel;
-       }
+       /* user and kernel flush are just handled with different flags to FlushTLB */
+       para_wrap(flush_tlb_user, vmi_flush_tlb_user, flush_tlb, FlushTLB);
+       para_wrap(flush_tlb_kernel, vmi_flush_tlb_kernel, flush_tlb, FlushTLB);
        para_fill(flush_tlb_single, InvalPage);
 
        /*
@@ -815,27 +824,40 @@ static inline int __init activate_vmi(void)
        vmi_ops.set_pte = vmi_get_function(VMI_CALL_SetPxE);
        vmi_ops.update_pte = vmi_get_function(VMI_CALL_UpdatePxE);
 #endif
-       vmi_ops.set_linear_mapping = vmi_get_function(VMI_CALL_SetLinearMapping);
-       vmi_ops.allocate_page = vmi_get_function(VMI_CALL_AllocatePage);
-       vmi_ops.release_page = vmi_get_function(VMI_CALL_ReleasePage);
 
-       paravirt_ops.alloc_pt = vmi_allocate_pt;
-       paravirt_ops.alloc_pd = vmi_allocate_pd;
-       paravirt_ops.alloc_pd_clone = vmi_allocate_pd_clone;
-       paravirt_ops.release_pt = vmi_release_pt;
-       paravirt_ops.release_pd = vmi_release_pd;
-       paravirt_ops.set_pte = vmi_set_pte;
-       paravirt_ops.set_pte_at = vmi_set_pte_at;
-       paravirt_ops.set_pmd = vmi_set_pmd;
-       paravirt_ops.pte_update = vmi_update_pte;
-       paravirt_ops.pte_update_defer = vmi_update_pte_defer;
+       if (vmi_ops.set_pte) {
+               paravirt_ops.set_pte = vmi_set_pte;
+               paravirt_ops.set_pte_at = vmi_set_pte_at;
+               paravirt_ops.set_pmd = vmi_set_pmd;
 #ifdef CONFIG_X86_PAE
-       paravirt_ops.set_pte_atomic = vmi_set_pte_atomic;
-       paravirt_ops.set_pte_present = vmi_set_pte_present;
-       paravirt_ops.set_pud = vmi_set_pud;
-       paravirt_ops.pte_clear = vmi_pte_clear;
-       paravirt_ops.pmd_clear = vmi_pmd_clear;
+               paravirt_ops.set_pte_atomic = vmi_set_pte_atomic;
+               paravirt_ops.set_pte_present = vmi_set_pte_present;
+               paravirt_ops.set_pud = vmi_set_pud;
+               paravirt_ops.pte_clear = vmi_pte_clear;
+               paravirt_ops.pmd_clear = vmi_pmd_clear;
 #endif
+       }
+
+       if (vmi_ops.update_pte) {
+               paravirt_ops.pte_update = vmi_update_pte;
+               paravirt_ops.pte_update_defer = vmi_update_pte_defer;
+       }
+
+       vmi_ops.allocate_page = vmi_get_function(VMI_CALL_AllocatePage);
+       if (vmi_ops.allocate_page) {
+               paravirt_ops.alloc_pt = vmi_allocate_pt;
+               paravirt_ops.alloc_pd = vmi_allocate_pd;
+               paravirt_ops.alloc_pd_clone = vmi_allocate_pd_clone;
+       }
+
+       vmi_ops.release_page = vmi_get_function(VMI_CALL_ReleasePage);
+       if (vmi_ops.release_page) {
+               paravirt_ops.release_pt = vmi_release_pt;
+               paravirt_ops.release_pd = vmi_release_pd;
+       }
+       para_wrap(map_pt_hook, vmi_map_pt_hook, set_linear_mapping,
+                 SetLinearMapping);
+
        /*
         * These MUST always be patched.  Don't support indirect jumps
         * through these operations, as the VMI interface may use either
@@ -847,21 +869,20 @@ static inline int __init activate_vmi(void)
        paravirt_ops.iret = (void *)0xbadbab0;
 
 #ifdef CONFIG_SMP
-       paravirt_ops.startup_ipi_hook = vmi_startup_ipi_hook;
-       vmi_ops.set_initial_ap_state = vmi_get_function(VMI_CALL_SetInitialAPState);
+       para_wrap(startup_ipi_hook, vmi_startup_ipi_hook, set_initial_ap_state, SetInitialAPState);
 #endif
 
 #ifdef CONFIG_X86_LOCAL_APIC
-       paravirt_ops.apic_read = vmi_get_function(VMI_CALL_APICRead);
-       paravirt_ops.apic_write = vmi_get_function(VMI_CALL_APICWrite);
-       paravirt_ops.apic_write_atomic = vmi_get_function(VMI_CALL_APICWrite);
+       para_fill(apic_read, APICRead);
+       para_fill(apic_write, APICWrite);
+       para_fill(apic_write_atomic, APICWrite);
 #endif
 
        /*
         * Check for VMI timer functionality by probing for a cycle frequency method
         */
        reloc = call_vrom_long_func(vmi_rom, get_reloc, VMI_CALL_GetCycleFrequency);
-       if (rel->type != VMI_RELOCATION_NONE) {
+       if (!disable_vmi_timer && rel->type != VMI_RELOCATION_NONE) {
                vmi_timer_ops.get_cycle_frequency = (void *)rel->eip;
                vmi_timer_ops.get_cycle_counter =
                        vmi_get_function(VMI_CALL_GetCycleCounter);
@@ -879,9 +900,22 @@ static inline int __init activate_vmi(void)
                paravirt_ops.setup_boot_clock = vmi_timer_setup_boot_alarm;
                paravirt_ops.setup_secondary_clock = vmi_timer_setup_secondary_alarm;
 #endif
-               custom_sched_clock = vmi_sched_clock;
+               paravirt_ops.get_scheduled_cycles = vmi_get_sched_cycles;
+               paravirt_ops.get_cpu_khz = vmi_cpu_khz;
+
+               /* We have true wallclock functions; disable CMOS clock sync */
+               no_sync_cmos_clock = 1;
+       } else {
+               disable_noidle = 1;
+               disable_vmi_timer = 1;
        }
 
+       /* No idle HZ mode only works if VMI timer and no idle is enabled */
+       if (disable_noidle || disable_vmi_timer)
+               para_fill(safe_halt, Halt);
+       else
+               para_wrap(safe_halt, vmi_safe_halt, halt, Halt);
+
        /*
         * Alternative instruction rewriting doesn't happen soon enough
         * to convert VMI_IRET to a call instead of a jump; so we have
@@ -914,7 +948,9 @@ void __init vmi_init(void)
 
        local_irq_save(flags);
        activate_vmi();
-#ifdef CONFIG_SMP
+
+#ifdef CONFIG_X86_IO_APIC
+       /* This is virtual hardware; timer routing is wired correctly */
        no_timer_check = 1;
 #endif
        local_irq_restore(flags & X86_EFLAGS_IF);
@@ -925,9 +961,7 @@ static int __init parse_vmi(char *arg)
        if (!arg)
                return -EINVAL;
 
-       if (!strcmp(arg, "disable_nodelay"))
-               disable_nodelay = 1;
-       else if (!strcmp(arg, "disable_pge")) {
+       if (!strcmp(arg, "disable_pge")) {
                clear_bit(X86_FEATURE_PGE, boot_cpu_data.x86_capability);
                disable_pge = 1;
        } else if (!strcmp(arg, "disable_pse")) {
@@ -942,7 +976,11 @@ static int __init parse_vmi(char *arg)
        } else if (!strcmp(arg, "disable_mtrr")) {
                clear_bit(X86_FEATURE_MTRR, boot_cpu_data.x86_capability);
                disable_mtrr = 1;
-       }
+       } else if (!strcmp(arg, "disable_timer")) {
+               disable_vmi_timer = 1;
+               disable_noidle = 1;
+       } else if (!strcmp(arg, "disable_noidle"))
+               disable_noidle = 1;
        return 0;
 }
 
index 76d2adcae5a30b74ed5505544cf5c0b45d89e427..9dfb17739b67743d13470f7b3c2893b2fd8d2e7c 100644 (file)
@@ -123,12 +123,10 @@ static struct clocksource clocksource_vmi = {
 static irqreturn_t vmi_timer_interrupt(int irq, void *dev_id);
 
 static struct irqaction vmi_timer_irq  = {
-       vmi_timer_interrupt,
-       SA_INTERRUPT,
-       CPU_MASK_NONE,
-       "VMI-alarm",
-       NULL,
-       NULL
+       .handler = vmi_timer_interrupt,
+       .flags = IRQF_DISABLED,
+       .mask = CPU_MASK_NONE,
+       .name = "VMI-alarm",
 };
 
 /* Alarm rate */
@@ -153,13 +151,6 @@ static void vmi_get_wallclock_ts(struct timespec *ts)
        ts->tv_sec = wallclock;
 }
 
-static void update_xtime_from_wallclock(void)
-{
-       struct timespec ts;
-       vmi_get_wallclock_ts(&ts);
-       do_settimeofday(&ts);
-}
-
 unsigned long vmi_get_wallclock(void)
 {
        struct timespec ts;
@@ -172,11 +163,20 @@ int vmi_set_wallclock(unsigned long now)
        return -1;
 }
 
-unsigned long long vmi_sched_clock(void)
+unsigned long long vmi_get_sched_cycles(void)
 {
        return read_available_cycles();
 }
 
+unsigned long vmi_cpu_khz(void)
+{
+       unsigned long long khz;
+
+       khz = vmi_timer_ops.get_cycle_frequency();
+       (void)do_div(khz, 1000);
+       return khz;
+}
+
 void __init vmi_time_init(void)
 {
        unsigned long long cycles_per_sec, cycles_per_msec;
@@ -188,25 +188,16 @@ void __init vmi_time_init(void)
        set_intr_gate(LOCAL_TIMER_VECTOR, apic_vmi_timer_interrupt);
 #endif
 
-       no_sync_cmos_clock = 1;
-
-       vmi_get_wallclock_ts(&xtime);
-       set_normalized_timespec(&wall_to_monotonic,
-               -xtime.tv_sec, -xtime.tv_nsec);
-
        real_cycles_accounted_system = read_real_cycles();
-       update_xtime_from_wallclock();
        per_cpu(process_times_cycles_accounted_cpu, 0) = read_available_cycles();
 
        cycles_per_sec = vmi_timer_ops.get_cycle_frequency();
-
        cycles_per_jiffy = cycles_per_sec;
        (void)do_div(cycles_per_jiffy, HZ);
        cycles_per_alarm = cycles_per_sec;
        (void)do_div(cycles_per_alarm, alarm_hz);
        cycles_per_msec = cycles_per_sec;
        (void)do_div(cycles_per_msec, 1000);
-       cpu_khz = cycles_per_msec;
 
        printk(KERN_WARNING "VMI timer cycles/sec = %llu ; cycles/jiffy = %llu ;"
               "cycles/alarm = %llu\n", cycles_per_sec, cycles_per_jiffy,
@@ -250,7 +241,7 @@ void __init vmi_timer_setup_boot_alarm(void)
 
 /* Initialize the time accounting variables for an AP on an SMP system.
  * Also, set the local alarm for the AP. */
-void __init vmi_timer_setup_secondary_alarm(void)
+void __devinit vmi_timer_setup_secondary_alarm(void)
 {
        int cpu = smp_processor_id();
 
@@ -276,16 +267,13 @@ static void vmi_account_real_cycles(unsigned long long cur_real_cycles)
 
        cycles_not_accounted = cur_real_cycles - real_cycles_accounted_system;
        while (cycles_not_accounted >= cycles_per_jiffy) {
-               /* systems wide jiffies and wallclock. */
+               /* systems wide jiffies. */
                do_timer(1);
 
                cycles_not_accounted -= cycles_per_jiffy;
                real_cycles_accounted_system += cycles_per_jiffy;
        }
 
-       if (vmi_timer_ops.wallclock_updated())
-               update_xtime_from_wallclock();
-
        write_sequnlock(&xtime_lock);
 }
 
@@ -380,7 +368,6 @@ int vmi_stop_hz_timer(void)
        unsigned long seq, next;
        unsigned long long real_cycles_expiry;
        int cpu = smp_processor_id();
-       int idle;
 
        BUG_ON(!irqs_disabled());
        if (sysctl_hz_timer != 0)
@@ -388,13 +375,13 @@ int vmi_stop_hz_timer(void)
 
        cpu_set(cpu, nohz_cpu_mask);
        smp_mb();
+
        if (rcu_needs_cpu(cpu) || local_softirq_pending() ||
-           (next = next_timer_interrupt(), time_before_eq(next, jiffies))) {
+           (next = next_timer_interrupt(),
+            time_before_eq(next, jiffies + HZ/CONFIG_VMI_ALARM_HZ))) {
                cpu_clear(cpu, nohz_cpu_mask);
-               next = jiffies;
-               idle = 0;
-       } else
-               idle = 1;
+               return 0;
+       }
 
        /* Convert jiffies to the real cycle counter. */
        do {
@@ -404,17 +391,13 @@ int vmi_stop_hz_timer(void)
        } while (read_seqretry(&xtime_lock, seq));
 
        /* This cpu is going idle. Disable the periodic alarm. */
-       if (idle) {
-               vmi_timer_ops.cancel_alarm(VMI_CYCLES_AVAILABLE);
-               per_cpu(idle_start_jiffies, cpu) = jiffies;
-       }
-
+       vmi_timer_ops.cancel_alarm(VMI_CYCLES_AVAILABLE);
+       per_cpu(idle_start_jiffies, cpu) = jiffies;
        /* Set the real time alarm to expire at the next event. */
        vmi_timer_ops.set_alarm(
-                     VMI_ALARM_WIRING | VMI_ALARM_IS_ONESHOT | VMI_CYCLES_REAL,
-                     real_cycles_expiry, 0);
-
-       return idle;
+               VMI_ALARM_WIRING | VMI_ALARM_IS_ONESHOT | VMI_CYCLES_REAL,
+               real_cycles_expiry, 0);
+       return 1;
 }
 
 static void vmi_reenable_hz_timer(int cpu)
index 71729d0f013d521eb6bb31bb403a1c4837a6f81c..4ec2dd5455f37b3e720fa952af7f8bdb42a48edd 100644 (file)
@@ -176,7 +176,7 @@ config MACH_DECSTATION
        bool "DECstations"
        select BOOT_ELF32
        select DMA_NONCOHERENT
-       select EARLY_PRINTK
+       select SYS_HAS_EARLY_PRINTK
        select IRQ_CPU
        select SYS_HAS_CPU_R3000
        select SYS_HAS_CPU_R4X00
@@ -242,6 +242,7 @@ config MACH_JAZZ
 config LASAT
        bool "LASAT Networks platforms"
        select DMA_NONCOHERENT
+       select SYS_HAS_EARLY_PRINTK
        select HW_HAS_PCI
        select MIPS_GT64120
        select MIPS_NILE4
@@ -256,6 +257,7 @@ config MIPS_ATLAS
        bool "MIPS Atlas board"
        select BOOT_ELF32
        select DMA_NONCOHERENT
+       select SYS_HAS_EARLY_PRINTK
        select IRQ_CPU
        select HW_HAS_PCI
        select MIPS_BOARDS_GEN
@@ -301,6 +303,7 @@ config MIPS_MALTA
        select SYS_HAS_CPU_MIPS64_R1
        select SYS_HAS_CPU_NEVADA
        select SYS_HAS_CPU_RM7000
+       select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
@@ -316,6 +319,7 @@ config MIPS_SEAD
        depends on EXPERIMENTAL
        select IRQ_CPU
        select DMA_NONCOHERENT
+       select SYS_HAS_EARLY_PRINTK
        select MIPS_BOARDS_GEN
        select SYS_HAS_CPU_MIPS32_R1
        select SYS_HAS_CPU_MIPS32_R2
@@ -353,9 +357,11 @@ config WR_PPMC
 config MIPS_SIM
        bool 'MIPS simulator (MIPSsim)'
        select DMA_NONCOHERENT
+       select SYS_HAS_EARLY_PRINTK
        select IRQ_CPU
        select SYS_HAS_CPU_MIPS32_R1
        select SYS_HAS_CPU_MIPS32_R2
+       select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
        select SYS_SUPPORTS_LITTLE_ENDIAN
@@ -376,6 +382,7 @@ config MOMENCO_JAGUAR_ATX
        select RM7000_CPU_SCACHE
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_RM9000
+       select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
@@ -513,6 +520,7 @@ config PMC_YOSEMITE
        select IRQ_CPU_RM9K
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_RM9000
+       select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
@@ -573,6 +581,7 @@ config SGI_IP22
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_R4X00
        select SYS_HAS_CPU_R5000
+       select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
@@ -587,7 +596,7 @@ config SGI_IP27
        select ARC64
        select BOOT_ELF64
        select DMA_IP27
-       select EARLY_PRINTK
+       select SYS_HAS_EARLY_PRINTK
        select HW_HAS_PCI
        select NR_CPUS_DEFAULT_64
        select PCI_DOMAINS
@@ -749,6 +758,7 @@ config SNI_RM
        select SYS_HAS_CPU_R5000
        select SYS_HAS_CPU_R10000
        select R5000_CPU_SCACHE
+       select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
        select SYS_SUPPORTS_BIG_ENDIAN
@@ -897,6 +907,20 @@ config DMA_NEED_PCI_MAP_STATE
        bool
 
 config EARLY_PRINTK
+       bool "Early printk" if EMBEDDED && DEBUG_KERNEL
+       depends on SYS_HAS_EARLY_PRINTK
+       default y
+       help
+         This option enables special console drivers which allow the kernel
+         to print messages very early in the bootup process.
+
+         This is useful for kernel debugging when your machine crashes very
+         early before the console code is initialized. For normal operation
+         it is not recommended because it looks on some machines ugly and
+         oesn't cooperate with an X server. You should normally N here,
+         unless you want to debug such a crash.
+
+config SYS_HAS_EARLY_PRINTK
        bool
 
 config GENERIC_ISA_DMA
@@ -1033,6 +1057,7 @@ config SOC_PNX8550
        select DMA_NONCOHERENT
        select HW_HAS_PCI
        select SYS_HAS_CPU_MIPS32_R1
+       select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
        select GENERIC_HARDIRQS_NO__DO_IRQ
        select SYS_SUPPORTS_KGDB
@@ -1093,7 +1118,7 @@ config HAVE_STD_PC_SERIAL_PORT
 
 config ARC_CONSOLE
        bool "ARC console support"
-       depends on SGI_IP22 || SNI_RM
+       depends on SGI_IP22 || (SNI_RM && CPU_LITTLE_ENDIAN)
 
 config ARC_MEMORY
        bool
@@ -1895,10 +1920,6 @@ config HZ
 
 source "kernel/Kconfig.preempt"
 
-config RTC_DS1742
-       bool "DS1742 BRAM/RTC support"
-       depends on TOSHIBA_JMR3927 || TOSHIBA_RBTX4927
-
 config MIPS_INSANE_LARGE
        bool "Support for large 64-bit configurations"
        depends on CPU_R10000 && 64BIT
index 6a9d144512c01dcb34d58517d7fbb94140b22155..0fe6032999cbc4f2ff602c7c791490e68bb981e8 100644 (file)
@@ -29,35 +29,3 @@ void prom_putchar(char c)
        ArcWrite(1, &it, 1, &cnt);
        bc_enable();
 }
-
-char prom_getchar(void)
-{
-       ULONG cnt;
-       CHAR c;
-
-       bc_disable();
-       ArcRead(0, &c, 1, &cnt);
-       bc_enable();
-
-       return c;
-}
-
-void prom_printf(char *fmt, ...)
-{
-       va_list args;
-       char ppbuf[1024];
-       char *bptr;
-
-       va_start(args, fmt);
-       vsprintf(ppbuf, fmt, args);
-
-       bptr = ppbuf;
-
-       while (*bptr != 0) {
-               if (*bptr == '\n')
-                       prom_putchar('\r');
-
-               prom_putchar(*bptr++);
-       }
-       va_end(args);
-}
index 76ab505ca69302e59c43cc8eb974d4e77457f888..0ac8f42d37525b5040fd31584d0318e561e15af8 100644 (file)
@@ -24,12 +24,15 @@ void __init prom_init(void)
 {
        PSYSTEM_PARAMETER_BLOCK pb = PROMBLOCK;
        romvec = ROMVECTOR;
+       ULONG cnt;
+       CHAR c;
+
        prom_argc = fw_arg0;
        _prom_argv = (LONG *) fw_arg1;
        _prom_envp = (LONG *) fw_arg2;
 
        if (pb->magic != 0x53435241) {
-               prom_printf("Aieee, bad prom vector magic %08lx\n", pb->magic);
+               printk(KERN_CRIT "Aieee, bad prom vector magic %08lx\n", pb->magic);
                while(1)
                        ;
        }
@@ -41,8 +44,8 @@ void __init prom_init(void)
        prom_meminit();
 
 #ifdef DEBUG_PROM_INIT
-       prom_printf("Press a key to reboot\n");
-       prom_getchar();
+       pr_info("Press a key to reboot\n");
+       ArcRead(0, &c, 1, &cnt);
        ArcEnterInteractiveMode();
 #endif
 }
index 456cb81a32d9c88edb5d9abba1138f37cccb30aa..83d15791ef6a589a596e2004b7e2de1ccd11867d 100644 (file)
@@ -118,11 +118,11 @@ void __init prom_meminit(void)
 #ifdef DEBUG
        int i = 0;
 
-       prom_printf("ARCS MEMORY DESCRIPTOR dump:\n");
+       printk("ARCS MEMORY DESCRIPTOR dump:\n");
        p = ArcGetMemoryDescriptor(PROM_NULL_MDESC);
        while(p) {
-               prom_printf("[%d,%p]: base<%08lx> pages<%08lx> type<%s>\n",
-                           i, p, p->base, p->pages, mtypes(p->type));
+               printk("[%d,%p]: base<%08lx> pages<%08lx> type<%s>\n",
+                      i, p, p->base, p->pages, mtypes(p->type));
                p = ArcGetMemoryDescriptor(p);
                i++;
        }
index 2aedd4f528392632e788a3ea7d43a072deb03be5..abd1786ea09b13bd33ecabacc5508c69590e0840 100644 (file)
@@ -93,11 +93,11 @@ static char *iflags[] = {
 static void __init
 dump_component(pcomponent *p)
 {
-       prom_printf("[%p]:class<%s>type<%s>flags<%s>ver<%d>rev<%d>",
-                   p, classes[p->class], types[p->type],
-                   iflags[p->iflags], p->vers, p->rev);
-       prom_printf("key<%08lx>\n\tamask<%08lx>cdsize<%d>ilen<%d>iname<%s>\n",
-                   p->key, p->amask, (int)p->cdsize, (int)p->ilen, p->iname);
+       printk("[%p]:class<%s>type<%s>flags<%s>ver<%d>rev<%d>",
+              p, classes[p->class], types[p->type],
+              iflags[p->iflags], p->vers, p->rev);
+       printk("key<%08lx>\n\tamask<%08lx>cdsize<%d>ilen<%d>iname<%s>\n",
+              p->key, p->amask, (int)p->cdsize, (int)p->ilen, p->iname);
 }
 
 static void __init
index 13f9bf5f91a628c10e92b6522c9db2d9a921d87d..7bc5af8917dafacde69719fa6fafb14ff0eed8d1 100644 (file)
@@ -43,6 +43,9 @@
 #include <asm/pgtable.h>
 #include <asm/mach-au1x00/au1000.h>
 
+extern int (*board_pci_idsel)(unsigned int devsel, int assert);
+int    mtx1_pci_idsel(unsigned int devsel, int assert);
+
 void board_reset (void)
 {
        /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
@@ -66,19 +69,43 @@ void __init board_setup(void)
 #endif
 
        // initialize sys_pinfunc:
-       // disable second ethernet port (SYS_PF_NI2)
-       // set U3/GPIO23 to GPIO23 (SYS_PF_U3)
-       au_writel( SYS_PF_NI2 | SYS_PF_U3, SYS_PINFUNC );
+       au_writel( SYS_PF_NI2, SYS_PINFUNC );
 
        // initialize GPIO
        au_writel( 0xFFFFFFFF, SYS_TRIOUTCLR );
        au_writel( 0x00000001, SYS_OUTPUTCLR ); // set M66EN (PCI 66MHz) to OFF
        au_writel( 0x00000008, SYS_OUTPUTSET ); // set PCI CLKRUN# to OFF
+       au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON
        au_writel( 0x00000020, SYS_OUTPUTCLR ); // set eth PHY TX_ER to OFF
 
        // enable LED and set it to green
        au_writel( au_readl(GPIO2_DIR) | 0x1800, GPIO2_DIR );
        au_writel( 0x18000800, GPIO2_OUTPUT );
 
+       board_pci_idsel = mtx1_pci_idsel;
+
        printk("4G Systems MTX-1 Board\n");
 }
+
+int
+mtx1_pci_idsel(unsigned int devsel, int assert)
+{
+#define MTX_IDSEL_ONLY_0_AND_3 0
+#if MTX_IDSEL_ONLY_0_AND_3
+       if (devsel != 0 && devsel != 3) {
+               printk("*** not 0 or 3\n");
+               return 0;
+       }
+#endif
+
+       if (assert && devsel != 0) {
+               // supress signal to cardbus
+               au_writel( 0x00000002, SYS_OUTPUTCLR ); // set EXT_IO3 OFF
+       }
+       else {
+               au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON
+       }
+       au_sync_udelay(1);
+       return 1;
+}
+
index 4693a4eb2b829972966a0ee1306b54cb07ade10e..a4fa0f227e420d2958b8645a109bd0bd3688e79c 100644 (file)
@@ -48,7 +48,7 @@
 #include <asm/mach-au1x00/au1000.h>
 
 char irq_tab_alchemy[][5] __initdata = {
- [0] = { -1, INTA, INTB, INTX, INTX},   /* IDSEL 00 - AdapterA-Slot0 (top)    */
+ [0] = { -1, INTA, INTA, INTX, INTX},   /* IDSEL 00 - AdapterA-Slot0 (top)    */
  [1] = { -1, INTB, INTA, INTX, INTX},   /* IDSEL 01 - AdapterA-Slot1 (bottom) */
  [2] = { -1, INTC, INTD, INTX, INTX},   /* IDSEL 02 - AdapterB-Slot0 (top)    */
  [3] = { -1, INTD, INTC, INTX, INTX},   /* IDSEL 03 - AdapterB-Slot1 (bottom) */
index 46c23b66bc171883d2d9ae2e58dc8d750ffd7bab..fff20d28114fe893c3dbd0adcabd4f3a61b5f8d1 100644 (file)
@@ -19,29 +19,3 @@ static void putchar(int c)
 
        COBALT_UART[UART_TX] = c;
 }
-
-static void cons_write(struct console *c, const char *s, unsigned n)
-{
-       while(n-- && *s)
-               putchar(*s++);
-}
-
-static struct console cons_info =
-{
-       .name   = "uart",
-       .write  = cons_write,
-       .flags  = CON_PRINTBUFFER | CON_BOOT,
-       .index  = -1,
-};
-
-void __init cobalt_early_console(void)
-{
-       register_console(&cons_info);
-
-       printk("Cobalt: early console registered\n");
-}
-
-void __init disable_early_printk(void)
-{
-       unregister_console(&cons_info);
-}
index 415ff8710b553d3e76ea3f0589d70da63cedbb67..88d34f11385acc6c42d5b518a805357e686cfecc 100644 (file)
@@ -79,37 +79,38 @@ static struct resource cobalt_io_resource = {
        .flags  = IORESOURCE_IO
 };
 
-static struct resource cobalt_io_resources[] = {
-       {
+/*
+ * Cobalt doesn't have PS/2 keyboard/mouse interfaces,
+ * keyboard conntroller is never used.
+ * Also PCI-ISA bridge DMA contoroller is never used.
+ */
+static struct resource cobalt_reserved_resources[] = {
+       {       /* dma1 */
                .start  = 0x00,
                .end    = 0x1f,
-               .name   = "dma1",
-               .flags  = IORESOURCE_BUSY
-       }, {
-               .start  = 0x40,
-               .end    = 0x5f,
-               .name   = "timer",
-               .flags  = IORESOURCE_BUSY
-       }, {
+               .name   = "reserved",
+               .flags  = IORESOURCE_BUSY | IORESOURCE_IO,
+       },
+       {       /* keyboard */
                .start  = 0x60,
                .end    = 0x6f,
-               .name   = "keyboard",
-               .flags  = IORESOURCE_BUSY
-       }, {
+               .name   = "reserved",
+               .flags  = IORESOURCE_BUSY | IORESOURCE_IO,
+       },
+       {       /* dma page reg */
                .start  = 0x80,
                .end    = 0x8f,
-               .name   = "dma page reg",
-               .flags  = IORESOURCE_BUSY
-       }, {
+               .name   = "reserved",
+               .flags  = IORESOURCE_BUSY | IORESOURCE_IO,
+       },
+       {       /* dma2 */
                .start  = 0xc0,
                .end    = 0xdf,
-               .name   = "dma2",
-               .flags  = IORESOURCE_BUSY
+               .name   = "reserved",
+               .flags  = IORESOURCE_BUSY | IORESOURCE_IO,
        },
 };
 
-#define COBALT_IO_RESOURCES (sizeof(cobalt_io_resources)/sizeof(struct resource))
-
 static struct pci_controller cobalt_pci_controller = {
        .pci_ops        = &gt64111_pci_ops,
        .mem_resource   = &cobalt_mem_resource,
@@ -133,9 +134,9 @@ void __init plat_mem_setup(void)
        /* I/O port resource must include LCD/buttons */
        ioport_resource.end = 0x0fffffff;
 
-       /* request I/O space for devices used on all i[345]86 PCs */
-       for (i = 0; i < COBALT_IO_RESOURCES; i++)
-               request_resource(&ioport_resource, cobalt_io_resources + i);
+       /* These resources have been reserved by VIA SuperI/O chip. */
+       for (i = 0; i < ARRAY_SIZE(cobalt_reserved_resources); i++)
+               request_resource(&ioport_resource, cobalt_reserved_resources + i);
 
         /* Read the cobalt id register out of the PCI config space */
         PCI_CFG_SET(devfn, (VIA_COBALT_BRD_ID_REG & ~0x3));
@@ -150,10 +151,6 @@ void __init plat_mem_setup(void)
 #endif
 
        if (cobalt_board_id > COBALT_BRD_ID_RAQ1) {
-#ifdef CONFIG_EARLY_PRINTK
-               cobalt_early_console();
-#endif
-
 #ifdef CONFIG_SERIAL_8250
                uart.line       = 0;
                uart.type       = PORT_UNKNOWN;
index 9ebb522fbbbd278bb6c68d851c15da30e13fb4f9..98b9fbc042f42f54c83eecbd826d64db7486aeae 100644 (file)
@@ -148,7 +148,6 @@ CONFIG_HZ=1000
 CONFIG_PREEMPT_NONE=y
 # CONFIG_PREEMPT_VOLUNTARY is not set
 # CONFIG_PREEMPT is not set
-CONFIG_RTC_DS1742=y
 # CONFIG_KEXEC is not set
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_STACKTRACE_SUPPORT=y
@@ -802,7 +801,28 @@ CONFIG_USB_ARCH_HAS_EHCI=y
 #
 # Real Time Clock
 #
-# CONFIG_RTC_CLASS is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_DS1553 is not set
+CONFIG_RTC_DRV_DS1742=y
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_V3020 is not set
 
 #
 # DMA Engine support
index cade16ec7e5a2c140e79f6c9acbad5ede7b80978..65419bf32441be996b689a28790a1a610dcc8d37 100644 (file)
 
 #include <asm/dec/prom.h>
 
-static void __init prom_console_write(struct console *con, const char *s,
-                                     unsigned int c)
+void prom_putchar(char c)
 {
-       static char sfmt[] __initdata = "%%%us";
-       char fmt[13];
+       char s[2];
 
-       snprintf(fmt, sizeof(fmt), sfmt, c);
-       prom_printf(fmt, s);
-}
-
-static struct console promcons __initdata = {
-       .name   = "prom",
-       .write  = prom_console_write,
-       .flags  = CON_PRINTBUFFER,
-       .index  = -1,
-};
-
-static int promcons_output __initdata = 0;
-
-void __init register_prom_console(void)
-{
-       if (!promcons_output) {
-               promcons_output = 1;
-               register_console(&promcons);
-       }
-}
+       s[0] = c;
+       s[1] = '\0';
 
-void __init unregister_prom_console(void)
-{
-       if (promcons_output) {
-               unregister_console(&promcons);
-               promcons_output = 0;
-       }
+       prom_printf( s);
 }
-
-void disable_early_printk(void)
-       __attribute__((alias("unregister_prom_console")));
index c4e3c1ea0d48946f0c84b315817c43dab0f1aef6..cd85924e25723697ae6927369b7dce59baa7b4ad 100644 (file)
@@ -26,9 +26,6 @@
 
 #include "dectypes.h"
 
-extern unsigned long mips_machgroup;
-extern unsigned long mips_machtype;
-
 static const char *dec_system_strings[] = {
        [MACH_DSUNKNOWN]        "unknown DECstation",
        [MACH_DS23100]          "DECstation 2100/3100",
index b5937c4ba7db18827ca2ef967ed09baf3356fd73..6e0ecfed964045d7356d29f6a5323263a0d21e03 100644 (file)
@@ -24,11 +24,6 @@ static void prom_console_write(struct console *co, const char *s,
        }
 }
 
-int prom_getchar(void)
-{
-       return 0;
-}
-
 static struct console sercons = {
     .name      = "ttyS",
     .write     = prom_console_write,
index cb09a8eede155cf177484844a197d0cbe8bb8449..01e7db19bcbe23a02a151349c54374eedbfd9d64 100644 (file)
@@ -2,4 +2,4 @@
 # Makefile for the common code of TOSHIBA JMR-TX3927 board
 #
 
-obj-y   += prom.o puts.o rtc_ds1742.o
+obj-y   += prom.o puts.o
diff --git a/arch/mips/jmr3927/common/rtc_ds1742.c b/arch/mips/jmr3927/common/rtc_ds1742.c
deleted file mode 100644 (file)
index e656134..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright 2001 MontaVista Software Inc.
- * Author: MontaVista Software, Inc.
- *              ahennessy@mvista.com
- *
- * arch/mips/jmr3927/common/rtc_ds1742.c
- * Based on arch/mips/ddb5xxx/common/rtc_ds1386.c
- *     low-level RTC hookups for s for Dallas 1742 chip.
- *
- * Copyright (C) 2000-2001 Toshiba 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  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
- *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
- *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
- *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
- *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
- *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
- *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *  You should have received a copy of the  GNU General Public License along
- *  with this program; if not, write  to the Free Software Foundation, Inc.,
- *  675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-
-/*
- * This file exports a function, rtc_ds1386_init(), which expects an
- * uncached base address as the argument.  It will set the two function
- * pointers expected by the MIPS generic timer code.
- */
-
-#include <linux/bcd.h>
-#include <linux/types.h>
-#include <linux/time.h>
-#include <linux/rtc.h>
-#include <linux/ds1742rtc.h>
-
-#include <asm/time.h>
-#include <asm/addrspace.h>
-
-#include <asm/debug.h>
-
-#define        EPOCH           2000
-
-static unsigned long rtc_base;
-
-static unsigned long
-rtc_ds1742_get_time(void)
-{
-       unsigned int year, month, day, hour, minute, second;
-       unsigned int century;
-       unsigned long flags;
-
-       spin_lock_irqsave(&rtc_lock, flags);
-       rtc_write(RTC_READ, RTC_CONTROL);
-       second = BCD2BIN(rtc_read(RTC_SECONDS) & RTC_SECONDS_MASK);
-       minute = BCD2BIN(rtc_read(RTC_MINUTES));
-       hour = BCD2BIN(rtc_read(RTC_HOURS));
-       day = BCD2BIN(rtc_read(RTC_DATE));
-       month = BCD2BIN(rtc_read(RTC_MONTH));
-       year = BCD2BIN(rtc_read(RTC_YEAR));
-       century = BCD2BIN(rtc_read(RTC_CENTURY) & RTC_CENTURY_MASK);
-       rtc_write(0, RTC_CONTROL);
-       spin_unlock_irqrestore(&rtc_lock, flags);
-
-       year += century * 100;
-
-       return mktime(year, month, day, hour, minute, second);
-}
-extern void to_tm(unsigned long tim, struct rtc_time * tm);
-
-static int
-rtc_ds1742_set_time(unsigned long t)
-{
-       struct rtc_time tm;
-       u8 year, month, day, hour, minute, second;
-       u8 cmos_year, cmos_month, cmos_day, cmos_hour, cmos_minute, cmos_second;
-       int cmos_century;
-       unsigned long flags;
-
-       spin_lock_irqsave(&rtc_lock, flags);
-       rtc_write(RTC_READ, RTC_CONTROL);
-       cmos_second = (u8)(rtc_read(RTC_SECONDS) & RTC_SECONDS_MASK);
-       cmos_minute = (u8)rtc_read(RTC_MINUTES);
-       cmos_hour = (u8)rtc_read(RTC_HOURS);
-       cmos_day = (u8)rtc_read(RTC_DATE);
-       cmos_month = (u8)rtc_read(RTC_MONTH);
-       cmos_year = (u8)rtc_read(RTC_YEAR);
-       cmos_century = rtc_read(RTC_CENTURY) & RTC_CENTURY_MASK;
-
-       rtc_write(RTC_WRITE, RTC_CONTROL);
-
-       /* convert */
-       to_tm(t, &tm);
-
-       /* check each field one by one */
-       year = BIN2BCD(tm.tm_year - EPOCH);
-       if (year != cmos_year) {
-               rtc_write(year,RTC_YEAR);
-       }
-
-       month = BIN2BCD(tm.tm_mon);
-       if (month != (cmos_month & 0x1f)) {
-               rtc_write((month & 0x1f) | (cmos_month & ~0x1f),RTC_MONTH);
-       }
-
-       day = BIN2BCD(tm.tm_mday);
-       if (day != cmos_day) {
-
-               rtc_write(day, RTC_DATE);
-       }
-
-       if (cmos_hour & 0x40) {
-               /* 12 hour format */
-               hour = 0x40;
-               if (tm.tm_hour > 12) {
-                       hour |= 0x20 | (BIN2BCD(hour-12) & 0x1f);
-               } else {
-                       hour |= BIN2BCD(tm.tm_hour);
-               }
-       } else {
-               /* 24 hour format */
-               hour = BIN2BCD(tm.tm_hour) & 0x3f;
-       }
-       if (hour != cmos_hour) rtc_write(hour, RTC_HOURS);
-
-       minute = BIN2BCD(tm.tm_min);
-       if (minute !=  cmos_minute) {
-               rtc_write(minute, RTC_MINUTES);
-       }
-
-       second = BIN2BCD(tm.tm_sec);
-       if (second !=  cmos_second) {
-               rtc_write(second & RTC_SECONDS_MASK,RTC_SECONDS);
-       }
-
-       /* RTC_CENTURY and RTC_CONTROL share same address... */
-       rtc_write(cmos_century, RTC_CONTROL);
-       spin_unlock_irqrestore(&rtc_lock, flags);
-
-       return 0;
-}
-
-void
-rtc_ds1742_init(unsigned long base)
-{
-       u8  cmos_second;
-
-       /* remember the base */
-       rtc_base = base;
-       db_assert((rtc_base & 0xe0000000) == KSEG1);
-
-       /* set the function pointers */
-       rtc_mips_get_time = rtc_ds1742_get_time;
-       rtc_mips_set_time = rtc_ds1742_set_time;
-
-       /* clear oscillator stop bit */
-       rtc_write(RTC_READ, RTC_CONTROL);
-       cmos_second = (u8)(rtc_read(RTC_SECONDS) & RTC_SECONDS_MASK);
-       rtc_write(RTC_WRITE, RTC_CONTROL);
-       rtc_write(cmos_second, RTC_SECONDS); /* clear msb */
-       rtc_write(0, RTC_CONTROL);
-}
index 7ca3d6d07b34f9c9998ed7e136c2722fcfbe9e92..fc523bda068f4a109c5bb42d55f52550224d1347 100644 (file)
@@ -45,6 +45,7 @@
 #include <linux/param.h>       /* for HZ */
 #include <linux/delay.h>
 #include <linux/pm.h>
+#include <linux/platform_device.h>
 #ifdef CONFIG_SERIAL_TXX9
 #include <linux/tty.h>
 #include <linux/serial.h>
@@ -137,10 +138,6 @@ int jmr3927_ccfg_toeon = 0;
 
 static inline void do_reset(void)
 {
-#ifdef CONFIG_TC35815
-       extern void tc35815_killall(void);
-       tc35815_killall();
-#endif
 #if 1  /* Resetting PCI bus */
        jmr3927_ioc_reg_out(0, JMR3927_IOC_RESET_ADDR);
        jmr3927_ioc_reg_out(JMR3927_IOC_RESET_PCI, JMR3927_IOC_RESET_ADDR);
@@ -176,19 +173,10 @@ static cycle_t jmr3927_hpt_read(void)
        return jiffies * (JMR3927_TIMER_CLK / HZ) + jmr3927_tmrptr->trr;
 }
 
-#define USE_RTC_DS1742
-#ifdef USE_RTC_DS1742
-extern void rtc_ds1742_init(unsigned long base);
-#endif
 static void __init jmr3927_time_init(void)
 {
        clocksource_mips.read = jmr3927_hpt_read;
        mips_hpt_frequency = JMR3927_TIMER_CLK;
-#ifdef USE_RTC_DS1742
-       if (jmr3927_have_nvram()) {
-               rtc_ds1742_init(JMR3927_IOC_NVRAMB_ADDR);
-       }
-#endif
 }
 
 void __init plat_timer_setup(struct irqaction *irq)
@@ -544,3 +532,32 @@ void __init tx3927_setup(void)
                        printk("TX3927 D-Cache WriteBack (CWF) .\n");
        }
 }
+
+/* This trick makes rtc-ds1742 driver usable as is. */
+unsigned long __swizzle_addr_b(unsigned long port)
+{
+       if ((port & 0xffff0000) != JMR3927_IOC_NVRAMB_ADDR)
+               return port;
+       port = (port & 0xffff0000) | (port & 0x7fff << 1);
+#ifdef __BIG_ENDIAN
+       return port;
+#else
+       return port | 1;
+#endif
+}
+EXPORT_SYMBOL(__swizzle_addr_b);
+
+static int __init jmr3927_rtc_init(void)
+{
+       struct resource res = {
+               .start  = JMR3927_IOC_NVRAMB_ADDR - IO_BASE,
+               .end    = JMR3927_IOC_NVRAMB_ADDR - IO_BASE + 0x800 - 1,
+               .flags  = IORESOURCE_MEM,
+       };
+       struct platform_device *dev;
+       if (!jmr3927_have_nvram())
+               return -ENODEV;
+       dev = platform_device_register_simple("ds1742", -1, &res, 1);
+       return IS_ERR(dev) ? PTR_ERR(dev) : 0;
+}
+device_initcall(jmr3927_rtc_init);
index a3dad394acb79064ada30bdb122c7e3299eea021..49246264cc7c66a0386bb44733dbc79396006b1e 100644 (file)
@@ -65,5 +65,6 @@ obj-$(CONFIG_64BIT)           += cpu-bugs64.o
 obj-$(CONFIG_I8253)            += i8253.o
 
 obj-$(CONFIG_KEXEC)            += machine_kexec.o relocate_kernel.o
+obj-$(CONFIG_EARLY_PRINTK)     += early_printk.o
 
 CFLAGS_cpu-bugs64.o    = $(shell if $(CC) $(CFLAGS) -Wa,-mdaddi -c -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi)
diff --git a/arch/mips/kernel/early_printk.c b/arch/mips/kernel/early_printk.c
new file mode 100644 (file)
index 0000000..304efdc
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * 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) 2002, 2003, 06, 07 Ralf Baechle (ralf@linux-mips.org)
+ * Copyright (C) 2007 MIPS Technologies, Inc.
+ *   written by Ralf Baechle (ralf@linux-mips.org)
+ */
+#include <linux/console.h>
+#include <linux/init.h>
+
+extern void prom_putchar(char);
+
+static void early_console_write(struct console *con, const char *s, unsigned n)
+{
+       while (n-- && *s) {
+               if (*s == '\n')
+                       prom_putchar('\r');
+               prom_putchar(*s);
+               s++;
+       }
+}
+
+static struct console early_console = {
+       .name   = "early",
+       .write  = early_console_write,
+       .flags  = CON_PRINTBUFFER | CON_BOOT,
+       .index  = -1
+};
+
+void __init setup_early_printk(void)
+{
+       register_console(&early_console);
+}
+
+void __init disable_early_printk(void)
+{
+       unregister_console(&early_console);
+}
index fc4dd6c9dd802c8308f16f422b7f93cc15734905..30d433f14f935e6f7a426db41c420280a7cc99e5 100644 (file)
@@ -166,34 +166,6 @@ out:
        return error;
 }
 
-asmlinkage long
-sysn32_waitid(int which, compat_pid_t pid,
-             siginfo_t __user *uinfo, int options,
-             struct compat_rusage __user *uru)
-{
-       struct rusage ru;
-       long ret;
-       mm_segment_t old_fs = get_fs();
-       int si_signo;
-
-       if (!access_ok(VERIFY_WRITE, uinfo, sizeof(*uinfo)))
-               return -EFAULT;
-
-       set_fs (KERNEL_DS);
-       ret = sys_waitid(which, pid, uinfo, options,
-                        uru ? (struct rusage __user *) &ru : NULL);
-       set_fs (old_fs);
-
-       if (__get_user(si_signo, &uinfo->si_signo))
-               return -EFAULT;
-       if (ret < 0 || si_signo == 0)
-               return ret;
-
-       if (uru)
-               ret = put_compat_rusage(&ru, uru);
-       return ret;
-}
-
 #define RLIM_INFINITY32        0x7fffffff
 #define RESOURCE32(x) ((x > RLIM_INFINITY32) ? RLIM_INFINITY32 : x)
 
@@ -572,151 +544,6 @@ asmlinkage long sys32_sync_file_range(int fd, int __pad,
                        flags);
 }
 
-/* Argument list sizes for sys_socketcall */
-#define AL(x) ((x) * sizeof(unsigned int))
-static unsigned char socketcall_nargs[18]={AL(0),AL(3),AL(3),AL(3),AL(2),AL(3),
-                               AL(3),AL(3),AL(4),AL(4),AL(4),AL(6),
-                               AL(6),AL(2),AL(5),AL(5),AL(3),AL(3)};
-#undef AL
-
-/*
- *     System call vectors.
- *
- *     Argument checking cleaned up. Saved 20% in size.
- *  This function doesn't need to set the kernel lock because
- *  it is set by the callees.
- */
-
-asmlinkage long sys32_socketcall(int call, unsigned int __user *args32)
-{
-       unsigned int a[6];
-       unsigned int a0,a1;
-       int err;
-
-       extern asmlinkage long sys_socket(int family, int type, int protocol);
-       extern asmlinkage long sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen);
-       extern asmlinkage long sys_connect(int fd, struct sockaddr __user *uservaddr, int addrlen);
-       extern asmlinkage long sys_listen(int fd, int backlog);
-       extern asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr, int __user *upeer_addrlen);
-       extern asmlinkage long sys_getsockname(int fd, struct sockaddr __user *usockaddr, int __user *usockaddr_len);
-       extern asmlinkage long sys_getpeername(int fd, struct sockaddr __user *usockaddr, int __user *usockaddr_len);
-       extern asmlinkage long sys_socketpair(int family, int type, int protocol, int __user *usockvec);
-       extern asmlinkage long sys_send(int fd, void __user * buff, size_t len, unsigned flags);
-       extern asmlinkage long sys_sendto(int fd, void __user * buff, size_t len, unsigned flags,
-                                         struct sockaddr __user *addr, int addr_len);
-       extern asmlinkage long sys_recv(int fd, void __user * ubuf, size_t size, unsigned flags);
-       extern asmlinkage long sys_recvfrom(int fd, void __user * ubuf, size_t size, unsigned flags,
-                                           struct sockaddr __user *addr, int __user *addr_len);
-       extern asmlinkage long sys_shutdown(int fd, int how);
-       extern asmlinkage long sys_setsockopt(int fd, int level, int optname, char __user *optval, int optlen);
-       extern asmlinkage long sys_getsockopt(int fd, int level, int optname, char __user *optval, int __user *optlen);
-       extern asmlinkage long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags);
-       extern asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, unsigned int flags);
-
-
-       if(call<1||call>SYS_RECVMSG)
-               return -EINVAL;
-
-       /* copy_from_user should be SMP safe. */
-       if (copy_from_user(a, args32, socketcall_nargs[call]))
-               return -EFAULT;
-
-       a0=a[0];
-       a1=a[1];
-
-       switch(call)
-       {
-               case SYS_SOCKET:
-                       err = sys_socket(a0,a1,a[2]);
-                       break;
-               case SYS_BIND:
-                       err = sys_bind(a0,(struct sockaddr __user *)A(a1), a[2]);
-                       break;
-               case SYS_CONNECT:
-                       err = sys_connect(a0, (struct sockaddr __user *)A(a1), a[2]);
-                       break;
-               case SYS_LISTEN:
-                       err = sys_listen(a0,a1);
-                       break;
-               case SYS_ACCEPT:
-                       err = sys_accept(a0,(struct sockaddr __user *)A(a1), (int __user *)A(a[2]));
-                       break;
-               case SYS_GETSOCKNAME:
-                       err = sys_getsockname(a0,(struct sockaddr __user *)A(a1), (int __user *)A(a[2]));
-                       break;
-               case SYS_GETPEERNAME:
-                       err = sys_getpeername(a0, (struct sockaddr __user *)A(a1), (int __user *)A(a[2]));
-                       break;
-               case SYS_SOCKETPAIR:
-                       err = sys_socketpair(a0,a1, a[2], (int __user *)A(a[3]));
-                       break;
-               case SYS_SEND:
-                       err = sys_send(a0, (void __user *)A(a1), a[2], a[3]);
-                       break;
-               case SYS_SENDTO:
-                       err = sys_sendto(a0,(void __user *)A(a1), a[2], a[3],
-                                        (struct sockaddr __user *)A(a[4]), a[5]);
-                       break;
-               case SYS_RECV:
-                       err = sys_recv(a0, (void __user *)A(a1), a[2], a[3]);
-                       break;
-               case SYS_RECVFROM:
-                       err = sys_recvfrom(a0, (void __user *)A(a1), a[2], a[3],
-                                          (struct sockaddr __user *)A(a[4]), (int __user *)A(a[5]));
-                       break;
-               case SYS_SHUTDOWN:
-                       err = sys_shutdown(a0,a1);
-                       break;
-               case SYS_SETSOCKOPT:
-                       err = sys_setsockopt(a0, a1, a[2], (char __user *)A(a[3]), a[4]);
-                       break;
-               case SYS_GETSOCKOPT:
-                       err = sys_getsockopt(a0, a1, a[2], (char __user *)A(a[3]), (int __user *)A(a[4]));
-                       break;
-               case SYS_SENDMSG:
-                       err = sys_sendmsg(a0, (struct msghdr __user *) A(a1), a[2]);
-                       break;
-               case SYS_RECVMSG:
-                       err = sys_recvmsg(a0, (struct msghdr __user *) A(a1), a[2]);
-                       break;
-               default:
-                       err = -EINVAL;
-                       break;
-       }
-       return err;
-}
-
-struct sigevent32 {
-       u32 sigev_value;
-       u32 sigev_signo;
-       u32 sigev_notify;
-       u32 payload[(64 / 4) - 3];
-};
-
-extern asmlinkage long
-sys_timer_create(clockid_t which_clock,
-                struct sigevent __user *timer_event_spec,
-                timer_t __user * created_timer_id);
-
-long
-sys32_timer_create(u32 clock, struct sigevent32 __user *se32, timer_t __user *timer_id)
-{
-       struct sigevent __user *p = NULL;
-       if (se32) {
-               struct sigevent se;
-               p = compat_alloc_user_space(sizeof(struct sigevent));
-               memset(&se, 0, sizeof(struct sigevent));
-               if (get_user(se.sigev_value.sival_int,  &se32->sigev_value) ||
-                   __get_user(se.sigev_signo, &se32->sigev_signo) ||
-                   __get_user(se.sigev_notify, &se32->sigev_notify) ||
-                   __copy_from_user(&se._sigev_un._pad, &se32->payload,
-                                    sizeof(se32->payload)) ||
-                   copy_to_user(p, &se, sizeof(se)))
-                       return -EFAULT;
-       }
-       return sys_timer_create(clock, p, timer_id);
-}
-
 save_static_function(sys32_clone);
 __attribute_used__ noinline static int
 _sys32_clone(nabi_no_regargs struct pt_regs regs)
index 2ceda4644a4d7b4ee64d778753b8fcd0c9dce170..f17e31e3bff22b393a851d49001ecc1215f77f27 100644 (file)
@@ -340,7 +340,7 @@ EXPORT(sysn32_call_table)
        PTR     compat_sys_statfs64
        PTR     compat_sys_fstatfs64
        PTR     sys_sendfile64
-       PTR     sys32_timer_create              /* 6220 */
+       PTR     compat_sys_timer_create         /* 6220 */
        PTR     compat_sys_timer_settime
        PTR     compat_sys_timer_gettime
        PTR     sys_timer_getoverrun
@@ -361,7 +361,7 @@ EXPORT(sysn32_call_table)
        PTR     compat_sys_mq_notify
        PTR     compat_sys_mq_getsetattr
        PTR     sys_ni_syscall                  /* 6240, sys_vserver */
-       PTR     sysn32_waitid
+       PTR     compat_sys_waitid
        PTR     sys_ni_syscall                  /* available, was setaltroot */
        PTR     sys_add_key
        PTR     sys_request_key
index bcc42489dc3c670e9a7932c7a1e92ed3f7bd43a6..142c9b70c026f2b20138f7fb8434608136036194 100644 (file)
@@ -307,7 +307,7 @@ sys_call_table:
        PTR     compat_sys_statfs
        PTR     compat_sys_fstatfs              /* 4100 */
        PTR     sys_ni_syscall                  /* sys_ioperm */
-       PTR     sys32_socketcall
+       PTR     compat_sys_socketcall
        PTR     sys_syslog
        PTR     compat_sys_setitimer
        PTR     compat_sys_getitimer            /* 4105 */
@@ -462,7 +462,7 @@ sys_call_table:
        PTR     sys_fadvise64_64
        PTR     compat_sys_statfs64             /* 4255 */
        PTR     compat_sys_fstatfs64
-       PTR     sys32_timer_create
+       PTR     compat_sys_timer_create
        PTR     compat_sys_timer_settime
        PTR     compat_sys_timer_gettime
        PTR     sys_timer_getoverrun            /* 4260 */
index 11ab222a2e972226ab406d3aefa2093804f05311..4975da0bfb634cdf52ebffbfe2bffe68da61ace0 100644 (file)
@@ -525,6 +525,14 @@ void __init setup_arch(char **cmdline_p)
 {
        cpu_probe();
        prom_init();
+
+#ifdef CONFIG_EARLY_PRINTK
+       {
+               extern void setup_early_printk(void);
+
+               setup_early_printk();
+       }
+#endif
        cpu_report();
 
 #if defined(CONFIG_VT)
index d425120b0282f28e54c96f6c15444dcb20c689a6..fbe9a87bd0ade6686062a99c68bbd461de59b059 100644 (file)
@@ -110,12 +110,13 @@ int lasat_init_board_info(void)
                    sizeof(struct lasat_eeprom_struct) - 4);
 
        if (crc != lasat_board_info.li_eeprom_info.crc32) {
-               prom_printf("WARNING...\nWARNING...\nEEPROM CRC does not match calculated, attempting to soldier on...\n");
+               printk(KERN_WARNING "WARNING...\nWARNING...\nEEPROM CRC does "
+                      "not match calculated, attempting to soldier on...\n");
        }
 
-       if (lasat_board_info.li_eeprom_info.version != LASAT_EEPROM_VERSION)
-       {
-               prom_printf("WARNING...\nWARNING...\nEEPROM version %d, wanted version %d, attempting to soldier on...\n",
+       if (lasat_board_info.li_eeprom_info.version != LASAT_EEPROM_VERSION) {
+               printk(KERN_WARNING "WARNING...\nWARNING...\nEEPROM version "
+                      "%d, wanted version %d, attempting to soldier on...\n",
                       (unsigned int)lasat_board_info.li_eeprom_info.version,
                       LASAT_EEPROM_VERSION);
        }
@@ -124,7 +125,9 @@ int lasat_init_board_info(void)
        cfg1 = lasat_board_info.li_eeprom_info.cfg[1];
 
        if ( LASAT_W0_DSCTYPE(cfg0) != 1) {
-               prom_printf("WARNING...\nWARNING...\nInvalid configuration read from EEPROM, attempting to soldier on...");
+               printk(KERN_WARNING "WARNING...\nWARNING...\n"
+                      "Invalid configuration read from EEPROM, attempting to "
+                      "soldier on...");
        }
        /* We have a valid configuration */
 
index d47692f73a26ee0f619428526eb45535f631ab3e..812c6ac366bea2571933732fc86f5035197b6e28 100644 (file)
 #define PROM_PUTC_ADDR         PROM_JUMP_TABLE_ENTRY(1)
 #define PROM_MONITOR_ADDR      PROM_JUMP_TABLE_ENTRY(2)
 
-static void null_prom_printf(const char * fmt, ...)
-{
-}
-
 static void null_prom_display(const char *string, int pos, int clear)
 {
 }
@@ -40,50 +36,29 @@ static void null_prom_putc(char c)
 }
 
 /* these are functions provided by the bootloader */
-static void (* prom_putc)(char c) = null_prom_putc;
-void (* prom_printf)(const char * fmt, ...) = null_prom_printf;
+static void (* __prom_putc)(char c) = null_prom_putc;
+
+void prom_putchar(char c)
+{
+       __prom_putc(c);
+}
+
 void (* prom_display)(const char *string, int pos, int clear) =
                null_prom_display;
 void (* prom_monitor)(void) = null_prom_monitor;
 
 unsigned int lasat_ndelay_divider;
 
-#define PROM_PRINTFBUF_SIZE 256
-static char prom_printfbuf[PROM_PRINTFBUF_SIZE];
-
-static void real_prom_printf(const char * fmt, ...)
-{
-       va_list ap;
-       int len;
-       char *c = prom_printfbuf;
-       int i;
-
-       va_start(ap, fmt);
-       len = vsnprintf(prom_printfbuf, PROM_PRINTFBUF_SIZE, fmt, ap);
-       va_end(ap);
-
-       /* output overflowed the buffer */
-       if (len < 0 || len > PROM_PRINTFBUF_SIZE)
-               len = PROM_PRINTFBUF_SIZE;
-
-       for (i=0; i < len; i++) {
-               if (*c == '\n')
-                       prom_putc('\r');
-               prom_putc(*c++);
-       }
-}
-
 static void setup_prom_vectors(void)
 {
        u32 version = *(u32 *)(RESET_VECTOR + 0x90);
 
        if (version >= 307) {
                prom_display = (void *)PROM_DISPLAY_ADDR;
-               prom_putc = (void *)PROM_PUTC_ADDR;
-               prom_printf = real_prom_printf;
+               __prom_putc = (void *)PROM_PUTC_ADDR;
                prom_monitor = (void *)PROM_MONITOR_ADDR;
        }
-       prom_printf("prom vectors set up\n");
+       printk("prom vectors set up\n");
 }
 
 static struct at93c_defs at93c_defs[N_MACHTYPES] = {
@@ -101,11 +76,11 @@ void __init prom_init(void)
        setup_prom_vectors();
 
        if (current_cpu_data.cputype == CPU_R5000) {
-               prom_printf("LASAT 200 board\n");
+               printk("LASAT 200 board\n");
                mips_machtype = MACH_LASAT_200;
                 lasat_ndelay_divider = LASAT_200_DIVIDER;
         } else {
-               prom_printf("LASAT 100 board\n");
+               printk("LASAT 100 board\n");
                mips_machtype = MACH_LASAT_100;
                 lasat_ndelay_divider = LASAT_100_DIVIDER;
         }
index 07be7bf1e4a3960cd55b76dc8792f7679e4a569b..019d45fbd268e634b6dd19747fc90f34d79ac636 100644 (file)
@@ -2,5 +2,4 @@
 #define PROM_H
 extern void (* prom_display)(const char *string, int pos, int clear);
 extern void (* prom_monitor)(void);
-extern void (* prom_printf)(const char * fmt, ...);
 #endif
index 14c55168f1ff11d50016fa0afe25feea24443f73..488007f13988402a1fb5348cc6f7e1c09e0f784f 100644 (file)
@@ -116,7 +116,6 @@ static void lasat_time_init(void)
 
 void __init plat_timer_setup(struct irqaction *irq)
 {
-       write_c0_compare( read_c0_count() + mips_hpt_frequency / HZ);
        change_c0_status(ST0_IM, IE_IRQ0 | IE_IRQ5);
 }
 
@@ -179,5 +178,5 @@ void __init plat_mem_setup(void)
        /* Switch from prom exception handler to normal mode */
        change_c0_status(ST0_BEV,0);
 
-       prom_printf("Lasat specific initialization complete\n");
+       pr_info("Lasat specific initialization complete\n");
 }
index 52e0ec8bcb15a3738721255836f5fcaa5d872c9d..d7d3b14dcfb2ba0bd3043e98253ed0aeac4cf5f1 100644 (file)
@@ -2,8 +2,8 @@
 # Makefile for MIPS-specific library files..
 #
 
-lib-y  += csum_partial.o memcpy.o memcpy-inatomic.o memset.o promlib.o \
-          strlen_user.o strncpy_user.o strnlen_user.o uncached.o
+lib-y  += csum_partial.o memcpy.o memcpy-inatomic.o memset.o strlen_user.o \
+          strncpy_user.o strnlen_user.o uncached.o
 
 obj-y                  += iomap.o
 obj-$(CONFIG_PCI)      += iomap-pci.o
diff --git a/arch/mips/lib/promlib.c b/arch/mips/lib/promlib.c
deleted file mode 100644 (file)
index dddfe98..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <stdarg.h>
-#include <linux/kernel.h>
-
-extern void prom_putchar(char);
-
-void prom_printf(char *fmt, ...)
-{
-       va_list args;
-       char ppbuf[1024];
-       char *bptr;
-
-       va_start(args, fmt);
-       vsprintf(ppbuf, fmt, args);
-
-       bptr = ppbuf;
-
-       while (*bptr != 0) {
-               if (*bptr == '\n')
-                       prom_putchar('\r');
-
-               prom_putchar(*bptr++);
-       }
-       va_end(args);
-}
index 0a30f5dc9b722660ff508fdaa0a674e7826c1bdc..aade36d7878777ef3a2289b844b718818a8c9b5a 100644 (file)
@@ -18,7 +18,9 @@
 # Makefile for the MIPS boards generic routines under Linux.
 #
 
-obj-y                          := reset.o display.o init.o memory.o printf.o \
+obj-y                          := reset.o display.o init.o memory.o \
                                   cmdline.o time.o
+
+obj-$(CONFIG_EARLY_PRINTK)     += console.o
 obj-$(CONFIG_PCI)              += pci.o
 obj-$(CONFIG_KGDB)             += gdb_hook.o
similarity index 91%
rename from arch/mips/mips-boards/generic/printf.c
rename to arch/mips/mips-boards/generic/console.c
index 1a711bd79b51520e900271cccc981cbd350779f3..4d8ab99e4155404395eef9b16a72a4fb8153c210 100644 (file)
  *
  * Putting things on the screen/serial line using YAMONs facilities.
  */
+#include <linux/console.h>
 #include <linux/init.h>
-#include <linux/kernel.h>
 #include <linux/serial_reg.h>
-#include <linux/spinlock.h>
 #include <asm/io.h>
 
 #ifdef CONFIG_MIPS_ATLAS
@@ -67,12 +66,3 @@ int prom_putchar(char c)
 
        return 1;
 }
-
-char prom_getchar(void)
-{
-       while (!(serial_in(UART_LSR) & UART_LSR_DR))
-               ;
-
-       return serial_in(UART_RX);
-}
-
index 58a0fe883591467333c2624640ab5840e850b0ea..b11337600129b170a75ad0918a89ff72cd5db180 100644 (file)
@@ -167,7 +167,7 @@ static void __init console_config(void)
                        flow = 'r';
                sprintf (console_string, " console=ttyS0,%d%c%c%c", baud, parity, bits, flow);
                strcat (prom_getcmdline(), console_string);
-               prom_printf("Config serial console:%s\n", console_string);
+               pr_info("Config serial console:%s\n", console_string);
        }
 }
 #endif
@@ -210,8 +210,9 @@ void __init kgdb_config (void)
                        generic_getDebugChar = rs_getDebugChar;
                }
 
-               prom_printf("KGDB: Using serial line /dev/ttyS%d at %d for session, "
-                           "please connect your debugger\n", line ? 1 : 0, speed);
+               pr_info("KGDB: Using serial line /dev/ttyS%d at %d for "
+                       "session, please connect your debugger\n",
+                       line ? 1 : 0, speed);
 
                {
                        char *s;
@@ -382,7 +383,7 @@ void __init prom_init(void)
        board_nmi_handler_setup = mips_nmi_setup;
        board_ejtag_handler_setup = mips_ejtag_setup;
 
-       prom_printf("\nLINUX started...\n");
+       pr_info("\nLINUX started...\n");
        prom_init_cmdline();
        prom_meminit();
 #ifdef CONFIG_SERIAL_8250_CONSOLE
index ebf0e16c5a0de5c36ff4c63016f42a9dbaf95328..ae39953da2c485d3b39d227728aab3f882a7aad8 100644 (file)
@@ -59,11 +59,12 @@ struct prom_pmemblock * __init prom_getmdesc(void)
        /* otherwise look in the environment */
        memsize_str = prom_getenv("memsize");
        if (!memsize_str) {
-               prom_printf("memsize not set in boot prom, set to default (32Mb)\n");
+               printk(KERN_WARNING
+                      "memsize not set in boot prom, set to default (32Mb)\n");
                physical_memsize = 0x02000000;
        } else {
 #ifdef DEBUG
-               prom_printf("prom_memsize = %s\n", memsize_str);
+               pr_debug("prom_memsize = %s\n", memsize_str);
 #endif
                physical_memsize = simple_strtol(memsize_str, NULL, 0);
        }
@@ -141,12 +142,12 @@ void __init prom_meminit(void)
        struct prom_pmemblock *p;
 
 #ifdef DEBUG
-       prom_printf("YAMON MEMORY DESCRIPTOR dump:\n");
+       pr_debug("YAMON MEMORY DESCRIPTOR dump:\n");
        p = prom_getmdesc();
        while (p->size) {
                int i = 0;
-               prom_printf("[%d,%p]: base<%08lx> size<%08lx> type<%s>\n",
-                           i, p, p->base, p->size, mtypes[p->type]);
+               pr_debug("[%d,%p]: base<%08lx> size<%08lx> type<%s>\n",
+                        i, p, p->base, p->size, mtypes[p->type]);
                p++;
                i++;
        }
index a3c3a1d462b272f39900d9c9910ac1f1d8bde455..df2a2bd3aa5d198188e0fc3f8e1eadb167ee5dfd 100644 (file)
@@ -295,7 +295,4 @@ void __init plat_timer_setup(struct irqaction *irq)
        irq_desc[mips_cpu_timer_irq].status |= IRQ_PER_CPU;
        set_irq_handler(mips_cpu_timer_irq, handle_percpu_irq);
 #endif
-
-        /* to generate the first timer interrupt */
-       write_c0_compare (read_c0_count() + mips_hpt_frequency/HZ);
 }
index a12e32aafde09476bd230a0b37aa679e914201c5..6aeebc9122f25ff96de48b107833a7a324a6de65 100644 (file)
@@ -1,5 +1,7 @@
 #
 # Copyright (C) 2005 MIPS Technologies, Inc.  All rights reserved.
+# Copyright (C) 2007 MIPS Technologies, Inc.
+#   written by Ralf Baechle (ralf@linux-mips.org)
 #
 # This program is free software; you can distribute it and/or modify it
 # under the terms of the GNU General Public License (Version 2) as
@@ -15,5 +17,7 @@
 # 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
 #
 
-obj-y := sim_setup.o sim_mem.o sim_time.o sim_printf.o sim_int.o sim_cmdline.o
+obj-y := sim_setup.o sim_mem.o sim_time.o sim_int.o sim_cmdline.o
+
+obj-$(CONFIG_EARLY_PRINTK) += sim_console.o
 obj-$(CONFIG_SMP) += sim_smp.o
similarity index 63%
rename from arch/mips/mips-boards/sim/sim_printf.c
rename to arch/mips/mips-boards/sim/sim_console.c
index 3ee5a0b501a6aede28d02b695858ac26970f40e1..de595a9ccb27578bb507ecc8875dc7533f67ec14 100644 (file)
@@ -1,7 +1,4 @@
 /*
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 1999,2000 MIPS Technologies, Inc.  All rights reserved.
- *
  *  This program is free software; you can distribute it and/or modify it
  *  under the terms of the GNU General Public License (Version 2) as
  *  published by the Free Software Foundation.
  *  with this program; if not, write to the Free Software Foundation, Inc.,
  *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  *
- * Putting things on the screen/serial line using YAMONs facilities.
+ * Carsten Langgaard, carstenl@mips.com
+ * Copyright (C) 1999,2000 MIPS Technologies, Inc.  All rights reserved.
+ * Copyright (C) 2007 MIPS Technologies, Inc.
+ *   written by Ralf Baechle
  */
 #include <linux/init.h>
-#include <linux/kernel.h>
 #include <linux/serial_reg.h>
-#include <linux/spinlock.h>
 #include <asm/io.h>
-#include <asm/system.h>
 
 static inline unsigned int serial_in(int offset)
 {
@@ -34,41 +31,10 @@ static inline void serial_out(int offset, int value)
        outb(value, 0x3f8 + offset);
 }
 
-int putPromChar(char c)
+void __init prom_putchar(char c)
 {
        while ((serial_in(UART_LSR) & UART_LSR_THRE) == 0)
                ;
 
        serial_out(UART_TX, c);
-
-       return 1;
-}
-
-char getPromChar(void)
-{
-       while (!(serial_in(UART_LSR) & 1))
-               ;
-
-       return serial_in(UART_RX);
-}
-
-void prom_printf(char *fmt, ...)
-{
-       va_list args;
-       int l;
-       char *p, *buf_end;
-       char buf[1024];
-
-       va_start(args, fmt);
-       l = vsprintf(buf, fmt, args); /* hopefully i < sizeof(buf) */
-       va_end(args);
-
-       buf_end = buf + l;
-
-       for (p = buf; p < buf_end; p++) {
-               /* Crude cr/nl handling is better than none */
-               if (*p == '\n')
-                       putPromChar('\r');
-               putPromChar(*p);
-       }
 }
index 46bc16f8b15d3fe4d50e3a9ab989a17f3e440114..e408ef0bcd6e4af27f89ce3aba9df885a5b9dcaf 100644 (file)
@@ -46,7 +46,7 @@ struct prom_pmemblock * __init prom_getmdesc(void)
        unsigned int memsize;
 
        memsize = 0x02000000;
-       prom_printf("Setting default memory size 0x%08x\n", memsize);
+       pr_info("Setting default memory size 0x%08x\n", memsize);
 
        memset(mdesc, 0, sizeof(mdesc));
 
index ea2066c3a1f77e43ca1c6f0f0af5e38ac8046572..b705f09e57c311a8b6fc64fea54776a1dbd21626 100644 (file)
@@ -55,7 +55,7 @@ void __init plat_mem_setup(void)
        serial_init();
 
        board_time_init = sim_time_init;
-       prom_printf("Linux started...\n");
+       pr_info("Linux started...\n");
 
 #ifdef CONFIG_MIPS_MT_SMP
        sanitize_tlb_entries();
@@ -66,7 +66,7 @@ void prom_init(void)
 {
        set_io_port_base(0xbfd00000);
 
-       prom_printf("\nLINUX started...\n");
+       pr_info("\nLINUX started...\n");
        prom_init_cmdline();
        prom_meminit();
 }
@@ -91,7 +91,7 @@ static void __init serial_init(void)
        s.timeout = 4;
 
        if (early_serial_setup(&s) != 0) {
-               prom_printf(KERN_ERR "Serial setup failed!\n");
+               printk(KERN_ERR "Serial setup failed!\n");
        }
 
 #endif
index 30711d016fed008a7520b1341e32c0d81fbf2ccb..d3a21c741514617abb962c931188d24f0d30e9fb 100644 (file)
@@ -199,7 +199,4 @@ void __init plat_timer_setup(struct irqaction *irq)
        irq_desc[mips_cpu_timer_irq].flags |= IRQ_PER_CPU;
        set_irq_handler(mips_cpu_timer_irq, handle_percpu_irq);
 #endif
-
-       /* to generate the first timer interrupt */
-       write_c0_compare(read_c0_count() + (mips_hpt_frequency/HZ));
 }
index e19fbb9ee47f240e9785cef121e819aacc6f8436..11a916629d3b57859796766d589ac5a1837b2c84 100644 (file)
@@ -77,66 +77,66 @@ static uint32_t     extract_dc(unsigned short addr, int data);
 static inline void breakout_errctl(unsigned int val)
 {
        if (val & CP0_ERRCTL_RECOVERABLE)
-               prom_printf(" recoverable");
+               printk(" recoverable");
        if (val & CP0_ERRCTL_DCACHE)
-               prom_printf(" dcache");
+               printk(" dcache");
        if (val & CP0_ERRCTL_ICACHE)
-               prom_printf(" icache");
+               printk(" icache");
        if (val & CP0_ERRCTL_MULTIBUS)
-               prom_printf(" multiple-buserr");
-       prom_printf("\n");
+               printk(" multiple-buserr");
+       printk("\n");
 }
 
 static inline void breakout_cerri(unsigned int val)
 {
        if (val & CP0_CERRI_TAG_PARITY)
-               prom_printf(" tag-parity");
+               printk(" tag-parity");
        if (val & CP0_CERRI_DATA_PARITY)
-               prom_printf(" data-parity");
+               printk(" data-parity");
        if (val & CP0_CERRI_EXTERNAL)
-               prom_printf(" external");
-       prom_printf("\n");
+               printk(" external");
+       printk("\n");
 }
 
 static inline void breakout_cerrd(unsigned int val)
 {
        switch (val & CP0_CERRD_CAUSES) {
        case CP0_CERRD_LOAD:
-               prom_printf(" load,");
+               printk(" load,");
                break;
        case CP0_CERRD_STORE:
-               prom_printf(" store,");
+               printk(" store,");
                break;
        case CP0_CERRD_FILLWB:
-               prom_printf(" fill/wb,");
+               printk(" fill/wb,");
                break;
        case CP0_CERRD_COHERENCY:
-               prom_printf(" coherency,");
+               printk(" coherency,");
                break;
        case CP0_CERRD_DUPTAG:
-               prom_printf(" duptags,");
+               printk(" duptags,");
                break;
        default:
-               prom_printf(" NO CAUSE,");
+               printk(" NO CAUSE,");
                break;
        }
        if (!(val & CP0_CERRD_TYPES))
-               prom_printf(" NO TYPE");
+               printk(" NO TYPE");
        else {
                if (val & CP0_CERRD_MULTIPLE)
-                       prom_printf(" multi-err");
+                       printk(" multi-err");
                if (val & CP0_CERRD_TAG_STATE)
-                       prom_printf(" tag-state");
+                       printk(" tag-state");
                if (val & CP0_CERRD_TAG_ADDRESS)
-                       prom_printf(" tag-address");
+                       printk(" tag-address");
                if (val & CP0_CERRD_DATA_SBE)
-                       prom_printf(" data-SBE");
+                       printk(" data-SBE");
                if (val & CP0_CERRD_DATA_DBE)
-                       prom_printf(" data-DBE");
+                       printk(" data-DBE");
                if (val & CP0_CERRD_EXTERNAL)
-                       prom_printf(" external");
+                       printk(" external");
        }
-       prom_printf("\n");
+       printk("\n");
 }
 
 #ifndef CONFIG_SIBYTE_BUS_WATCHER
@@ -157,18 +157,18 @@ static void check_bus_watcher(void)
                l2_tag = in64(IO_SPACE_BASE | A_L2_ECC_TAG);
 #endif
                memio_err = csr_in32(IOADDR(A_BUS_MEM_IO_ERRORS));
-               prom_printf("Bus watcher error counters: %08x %08x\n", l2_err, memio_err);
-               prom_printf("\nLast recorded signature:\n");
-               prom_printf("Request %02x from %d, answered by %d with Dcode %d\n",
+               printk("Bus watcher error counters: %08x %08x\n", l2_err, memio_err);
+               printk("\nLast recorded signature:\n");
+               printk("Request %02x from %d, answered by %d with Dcode %d\n",
                       (unsigned int)(G_SCD_BERR_TID(status) & 0x3f),
                       (int)(G_SCD_BERR_TID(status) >> 6),
                       (int)G_SCD_BERR_RID(status),
                       (int)G_SCD_BERR_DCODE(status));
 #ifdef DUMP_L2_ECC_TAG_ON_ERROR
-               prom_printf("Last L2 tag w/ bad ECC: %016llx\n", l2_tag);
+               printk("Last L2 tag w/ bad ECC: %016llx\n", l2_tag);
 #endif
        } else {
-               prom_printf("Bus watcher indicates no error\n");
+               printk("Bus watcher indicates no error\n");
        }
 }
 #else
@@ -187,11 +187,11 @@ asmlinkage void sb1_cache_error(void)
 #else
        csr_out32(M_SCD_TRACE_CFG_FREEZE, IO_SPACE_BASE | A_SCD_TRACE_CFG);
 #endif
-       prom_printf("Trace buffer frozen\n");
+       printk("Trace buffer frozen\n");
 #endif
 
-       prom_printf("Cache error exception on CPU %x:\n",
-                   (read_c0_prid() >> 25) & 0x7);
+       printk("Cache error exception on CPU %x:\n",
+              (read_c0_prid() >> 25) & 0x7);
 
        __asm__ __volatile__ (
        "       .set    push\n\t"
@@ -209,43 +209,43 @@ asmlinkage void sb1_cache_error(void)
          "=r" (dpahi), "=r" (dpalo), "=r" (eepc));
 
        cerr_dpa = (((uint64_t)dpahi) << 32) | dpalo;
-       prom_printf(" c0_errorepc ==   %08x\n", eepc);
-       prom_printf(" c0_errctl   ==   %08x", errctl);
+       printk(" c0_errorepc ==   %08x\n", eepc);
+       printk(" c0_errctl   ==   %08x", errctl);
        breakout_errctl(errctl);
        if (errctl & CP0_ERRCTL_ICACHE) {
-               prom_printf(" c0_cerr_i   ==   %08x", cerr_i);
+               printk(" c0_cerr_i   ==   %08x", cerr_i);
                breakout_cerri(cerr_i);
                if (CP0_CERRI_IDX_VALID(cerr_i)) {
                        /* Check index of EPC, allowing for delay slot */
                        if (((eepc & SB1_CACHE_INDEX_MASK) != (cerr_i & SB1_CACHE_INDEX_MASK)) &&
                            ((eepc & SB1_CACHE_INDEX_MASK) != ((cerr_i & SB1_CACHE_INDEX_MASK) - 4)))
-                               prom_printf(" cerr_i idx doesn't match eepc\n");
+                               printk(" cerr_i idx doesn't match eepc\n");
                        else {
                                res = extract_ic(cerr_i & SB1_CACHE_INDEX_MASK,
                                                 (cerr_i & CP0_CERRI_DATA) != 0);
                                if (!(res & cerr_i))
-                                       prom_printf("...didn't see indicated icache problem\n");
+                                       printk("...didn't see indicated icache problem\n");
                        }
                }
        }
        if (errctl & CP0_ERRCTL_DCACHE) {
-               prom_printf(" c0_cerr_d   ==   %08x", cerr_d);
+               printk(" c0_cerr_d   ==   %08x", cerr_d);
                breakout_cerrd(cerr_d);
                if (CP0_CERRD_DPA_VALID(cerr_d)) {
-                       prom_printf(" c0_cerr_dpa == %010llx\n", cerr_dpa);
+                       printk(" c0_cerr_dpa == %010llx\n", cerr_dpa);
                        if (!CP0_CERRD_IDX_VALID(cerr_d)) {
                                res = extract_dc(cerr_dpa & SB1_CACHE_INDEX_MASK,
                                                 (cerr_d & CP0_CERRD_DATA) != 0);
                                if (!(res & cerr_d))
-                                       prom_printf("...didn't see indicated dcache problem\n");
+                                       printk("...didn't see indicated dcache problem\n");
                        } else {
                                if ((cerr_dpa & SB1_CACHE_INDEX_MASK) != (cerr_d & SB1_CACHE_INDEX_MASK))
-                                       prom_printf(" cerr_d idx doesn't match cerr_dpa\n");
+                                       printk(" cerr_d idx doesn't match cerr_dpa\n");
                                else {
                                        res = extract_dc(cerr_d & SB1_CACHE_INDEX_MASK,
                                                         (cerr_d & CP0_CERRD_DATA) != 0);
                                        if (!(res & cerr_d))
-                                               prom_printf("...didn't see indicated problem\n");
+                                               printk("...didn't see indicated problem\n");
                                }
                        }
                }
@@ -334,7 +334,7 @@ static uint32_t extract_ic(unsigned short addr, int data)
        uint8_t lru;
        int res = 0;
 
-       prom_printf("Icache index 0x%04x  ", addr);
+       printk("Icache index 0x%04x  ", addr);
        for (way = 0; way < 4; way++) {
                /* Index-load-tag-I */
                __asm__ __volatile__ (
@@ -354,7 +354,7 @@ static uint32_t extract_ic(unsigned short addr, int data)
                taglo = ((unsigned long long)taglohi << 32) | taglolo;
                if (way == 0) {
                        lru = (taghi >> 14) & 0xff;
-                       prom_printf("[Bank %d Set 0x%02x]  LRU > %d %d %d %d > MRU\n",
+                       printk("[Bank %d Set 0x%02x]  LRU > %d %d %d %d > MRU\n",
                                    ((addr >> 5) & 0x3), /* bank */
                                    ((addr >> 7) & 0x3f), /* index */
                                    (lru & 0x3),
@@ -369,19 +369,19 @@ static uint32_t extract_ic(unsigned short addr, int data)
                if (valid) {
                        tlo_tmp = taglo & 0xfff3ff;
                        if (((taglo >> 10) & 1) ^ range_parity(tlo_tmp, 23, 0)) {
-                               prom_printf("   ** bad parity in VTag0/G/ASID\n");
+                               printk("   ** bad parity in VTag0/G/ASID\n");
                                res |= CP0_CERRI_TAG_PARITY;
                        }
                        if (((taglo >> 11) & 1) ^ range_parity(taglo, 63, 24)) {
-                               prom_printf("   ** bad parity in R/VTag1\n");
+                               printk("   ** bad parity in R/VTag1\n");
                                res |= CP0_CERRI_TAG_PARITY;
                        }
                }
                if (valid ^ ((taghi >> 27) & 1)) {
-                       prom_printf("   ** bad parity for valid bit\n");
+                       printk("   ** bad parity for valid bit\n");
                        res |= CP0_CERRI_TAG_PARITY;
                }
-               prom_printf(" %d  [VA %016llx]  [Vld? %d]  raw tags: %08X-%016llX\n",
+               printk(" %d  [VA %016llx]  [Vld? %d]  raw tags: %08X-%016llX\n",
                            way, va, valid, taghi, taglo);
 
                if (data) {
@@ -407,21 +407,21 @@ static uint32_t extract_ic(unsigned short addr, int data)
                                : "r" ((way << 13) | addr | (offset << 3)));
                                predecode = (datahi >> 8) & 0xff;
                                if (((datahi >> 16) & 1) != (uint32_t)range_parity(predecode, 7, 0)) {
-                                       prom_printf("   ** bad parity in predecode\n");
+                                       printk("   ** bad parity in predecode\n");
                                        res |= CP0_CERRI_DATA_PARITY;
                                }
                                /* XXXKW should/could check predecode bits themselves */
                                if (((datahi >> 4) & 0xf) ^ inst_parity(insta)) {
-                                       prom_printf("   ** bad parity in instruction a\n");
+                                       printk("   ** bad parity in instruction a\n");
                                        res |= CP0_CERRI_DATA_PARITY;
                                }
                                if ((datahi & 0xf) ^ inst_parity(instb)) {
-                                       prom_printf("   ** bad parity in instruction b\n");
+                                       printk("   ** bad parity in instruction b\n");
                                        res |= CP0_CERRI_DATA_PARITY;
                                }
-                               prom_printf("  %05X-%08X%08X", datahi, insta, instb);
+                               printk("  %05X-%08X%08X", datahi, insta, instb);
                        }
-                       prom_printf("\n");
+                       printk("\n");
                }
        }
        return res;
@@ -489,7 +489,7 @@ static uint32_t extract_dc(unsigned short addr, int data)
        uint8_t ecc, lru;
        int res = 0;
 
-       prom_printf("Dcache index 0x%04x  ", addr);
+       printk("Dcache index 0x%04x  ", addr);
        for (way = 0; way < 4; way++) {
                __asm__ __volatile__ (
                "       .set    push\n\t"
@@ -509,7 +509,7 @@ static uint32_t extract_dc(unsigned short addr, int data)
                pa = (taglo & 0xFFFFFFE000ULL) | addr;
                if (way == 0) {
                        lru = (taghi >> 14) & 0xff;
-                       prom_printf("[Bank %d Set 0x%02x]  LRU > %d %d %d %d > MRU\n",
+                       printk("[Bank %d Set 0x%02x]  LRU > %d %d %d %d > MRU\n",
                                    ((addr >> 11) & 0x2) | ((addr >> 5) & 1), /* bank */
                                    ((addr >> 6) & 0x3f), /* index */
                                    (lru & 0x3),
@@ -519,15 +519,15 @@ static uint32_t extract_dc(unsigned short addr, int data)
                }
                state = (taghi >> 25) & 0x1f;
                valid = DC_TAG_VALID(state);
-               prom_printf(" %d  [PA %010llx]  [state %s (%02x)]  raw tags: %08X-%016llX\n",
+               printk(" %d  [PA %010llx]  [state %s (%02x)]  raw tags: %08X-%016llX\n",
                            way, pa, dc_state_str(state), state, taghi, taglo);
                if (valid) {
                        if (((taglo >> 11) & 1) ^ range_parity(taglo, 39, 26)) {
-                               prom_printf("   ** bad parity in PTag1\n");
+                               printk("   ** bad parity in PTag1\n");
                                res |= CP0_CERRD_TAG_ADDRESS;
                        }
                        if (((taglo >> 10) & 1) ^ range_parity(taglo, 25, 13)) {
-                               prom_printf("   ** bad parity in PTag0\n");
+                               printk("   ** bad parity in PTag0\n");
                                res |= CP0_CERRD_TAG_ADDRESS;
                        }
                } else {
@@ -567,13 +567,13 @@ static uint32_t extract_dc(unsigned short addr, int data)
                                        }
                                        res |= (bits == 1) ? CP0_CERRD_DATA_SBE : CP0_CERRD_DATA_DBE;
                                }
-                               prom_printf("  %02X-%016llX", datahi, datalo);
+                               printk("  %02X-%016llX", datahi, datalo);
                        }
-                       prom_printf("\n");
+                       printk("\n");
                        if (bad_ecc)
-                               prom_printf("  dwords w/ bad ECC: %d %d %d %d\n",
-                                           !!(bad_ecc & 8), !!(bad_ecc & 4),
-                                           !!(bad_ecc & 2), !!(bad_ecc & 1));
+                               printk("  dwords w/ bad ECC: %d %d %d %d\n",
+                                      !!(bad_ecc & 8), !!(bad_ecc & 4),
+                                      !!(bad_ecc & 2), !!(bad_ecc & 1));
                }
        }
        return res;
index a72093ad105f093839d24488a7e24a74f816fec8..f503d02e403bbf78bdb421402ff6a6dfddf6f742 100644 (file)
@@ -295,7 +295,7 @@ void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
 
        /* Make sure that gcc doesn't leave the empty loop body.  */
        for (i = 0; i < nelems; i++, sg++) {
-               if (!plat_device_is_coherent(dev))
+               if (cpu_is_noncoherent_r10000(dev))
                        __dma_sync((unsigned long)page_address(sg->page),
                                   sg->length, direction);
                plat_unmap_dma_mem(sg->dma_address);
index 2292d0ec47fc27aadfe255499214293f81ea5622..2c30b4f562456ef12c68b277adfccaa8da98dfb6 100644 (file)
@@ -74,11 +74,6 @@ void prom_putchar(char c)
        uart->iu_thr = c;
 }
 
-char __init prom_getchar(void)
-{
-       return 0;
-}
-
 static void inline ja_console_probe(void)
 {
        struct uart_port up;
index 3df36eda75af6228445a64d28c2c4ee12a98d89e..561844878a90075a475130a3440b7ae96c023429 100644 (file)
@@ -47,10 +47,8 @@ static struct resource mv64x60_eth0_resources[] = {
        },
 };
 
-static char eth0_mac_addr[ETH_ALEN];
-
 static struct mv643xx_eth_platform_data eth0_pd = {
-       .mac_addr       = eth0_mac_addr,
+       .port_number    = 0,
 
        .tx_sram_addr   = MV_SRAM_BASE_ETH0,
        .tx_sram_size   = MV_SRAM_TXRING_SIZE,
@@ -80,10 +78,8 @@ static struct resource mv64x60_eth1_resources[] = {
        },
 };
 
-static char eth1_mac_addr[ETH_ALEN];
-
 static struct mv643xx_eth_platform_data eth1_pd = {
-       .mac_addr       = eth1_mac_addr,
+       .port_number    = 1,
 
        .tx_sram_addr   = MV_SRAM_BASE_ETH1,
        .tx_sram_size   = MV_SRAM_TXRING_SIZE,
@@ -113,10 +109,8 @@ static struct resource mv64x60_eth2_resources[] = {
        },
 };
 
-static char eth2_mac_addr[ETH_ALEN];
-
 static struct mv643xx_eth_platform_data eth2_pd = {
-       .mac_addr       = eth2_mac_addr,
+       .port_number    = 2,
 };
 
 static struct platform_device eth2_device = {
@@ -200,9 +194,9 @@ static int __init mv643xx_eth_add_pds(void)
        int ret;
 
        get_mac(mac);
-       eth_mac_add(eth0_mac_addr, mac, 0);
-       eth_mac_add(eth1_mac_addr, mac, 1);
-       eth_mac_add(eth2_mac_addr, mac, 2);
+       eth_mac_add(eth0_pd.mac_addr, mac, 0);
+       eth_mac_add(eth1_pd.mac_addr, mac, 1);
+       eth_mac_add(eth2_pd.mac_addr, mac, 2);
        ret = platform_add_devices(mv643xx_eth_pd_devs,
                        ARRAY_SIZE(mv643xx_eth_pd_devs));
 
index 024aef25f3728bba2d8a988141778ca75a8c391d..44e4c3fc740398fdbfc6680c973864b6316f2bf1 100644 (file)
@@ -47,10 +47,8 @@ static struct resource mv64x60_eth0_resources[] = {
        },
 };
 
-static char eth0_mac_addr[ETH_ALEN];
-
 static struct mv643xx_eth_platform_data eth0_pd = {
-       .mac_addr       = eth0_mac_addr,
+       .port_number    = 0,
 
        .tx_sram_addr   = MV_SRAM_BASE_ETH0,
        .tx_sram_size   = MV_SRAM_TXRING_SIZE,
@@ -80,10 +78,8 @@ static struct resource mv64x60_eth1_resources[] = {
        },
 };
 
-static char eth1_mac_addr[ETH_ALEN];
-
 static struct mv643xx_eth_platform_data eth1_pd = {
-       .mac_addr       = eth1_mac_addr,
+       .port_number    = 1,
 
        .tx_sram_addr   = MV_SRAM_BASE_ETH1,
        .tx_sram_size   = MV_SRAM_TXRING_SIZE,
@@