summaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* Merge master.kernel.org:/pub/scm/linux/kernel/git/willy/parisc-2.6Linus Torvalds2006-10-056-54/+56
|\ | | | | | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/willy/parisc-2.6: [PA-RISC] Fix time.c for new do_timer() calling convention [PA-RISC] Fix must_check warnings in drivers.c [PA-RISC] Fix parisc_newuname() [PA-RISC] Remove warning from pci.c [PA-RISC] Fix filldir warnings [PA-RISC] Fix sys32_sysctl [PA-RISC] Fix sba_iommu compilation
| * [PA-RISC] Fix time.c for new do_timer() calling conventionMatthew Wilcox2006-10-051-14/+23
| | | | | | | | | | | | | | | | | | do_timer now wants to know how many ticks have elapsed. Now that we have to calculate that, we can eliminate some of the clever code that avoided having to calculate that. Also add some more documentation. I'd like to thank Grant Grundler for helping me with this. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
| * [PA-RISC] Fix must_check warnings in drivers.cMatthew Wilcox2006-10-051-3/+8
| | | | | | | | | | | | | | | | | | Panic if we can't register the parisc bus or the root parisc device. There's no way we can boot without them, so let the user know ASAP. If we can't register a parisc device, handle the failure gracefully. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
| * [PA-RISC] Fix parisc_newuname()Matthew Wilcox2006-10-051-23/+10Star
| | | | | | | | | | | | | | The utsname virtualisation broke parisc_newuname compilation. Rewrite the implementation to call sys_newuname() like sparc64 does. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
| * [PA-RISC] Remove warning from pci.cMatthew Wilcox2006-10-051-1/+1
| | | | | | | | | | | | | | max() doesn't like comparing an unsigned long and a resource_size_t, so make the local variables resource_size_t too. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
| * [PA-RISC] Fix filldir warningsMatthew Wilcox2006-10-052-7/+5Star
| | | | | | | | | | | | filldir_t now takes a u64, not an ino_t. Signed-off-by: Matthew Wilcox <matthew@wil.cx>
| * [PA-RISC] Fix sys32_sysctlMatthew Wilcox2006-10-051-6/+9
| | | | | | | | | | | | | | | | When CONFIG_SYSCTL_SYSCALL isn't defined, do_sysctl doesn't exist and we fail to link. Fix with an ifdef, the same way sparc64 did. Also add some minor changes to be more like sparc64. Signed-off-by: Matthew Wilcox <matthew@wil.cx>
* | [POWERPC] cell: fix bugs found by sparseArnd Bergmann2006-10-053-8/+12
| | | | | | | | | | | | | | | | | | | | - Some long constants should be marked 'ul'. - When using desc->handler_data to pass an __iomem register area, we need to add casts to and from __iomem. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] spiderpic: enable new style devtree supportArnd Bergmann2006-10-051-3/+1Star
| | | | | | | | | | | | | | This enables support for new firmware test releases. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Update cell_defconfigArnd Bergmann2006-10-051-14/+46
| | | | | | | | | | | | | | | | This adds defaults for new configuration options added since 2.6.18 and it enables the option for 64kb pages by default. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] spufs: add infrastructure for finding elf objectsArnd Bergmann2006-10-053-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an 'object-id' file that the spe library can use to store a pointer to its ELF object. This was originally meant for use by oprofile, but is now also used by the GNU debugger, if available. In order for oprofile to find the location in an spu-elf binary where an event counter triggered, we need a way to identify the binary in the first place. Unfortunately, that binary itself can be embedded in a powerpc ELF binary. Since we can assume it is mapped into the effective address space of the running process, have that one write the pointer value into a new spufs file. When a context switch occurs, pass the user value to the profiler so that can look at the mapped file (with some care). Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] spufs: support new OF device tree formatArnd Bergmann2006-10-051-5/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The properties we used traditionally in the device tree are somewhat nonstandard. This adds support for a more conventional format using 'interrupts' and 'reg' properties. The interrupts are specified in three cells (class 0, 1 and 2) and registered at the interrupt-parent. The reg property contains either three or four register areas in the order 'local-store', 'problem', 'priv2', and 'priv1', so the priv1 one can be left out in case of hypervisor driven systems that access these through hcalls. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] spufs: add support for read/write on cntlArnd Bergmann2006-10-051-19/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Writing to cntl can be used to stop execution on the spu and to restart it, reading from cntl gives the contents of the current status register. The access is always in ascii, as for most other files. This was always meant to be there, but we had a little problem with writing to runctl so it was left out so far. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] spufs: remove support for ancient firmwareArnd Bergmann2006-10-051-12/+0Star
| | | | | | | | | | | | | | | | Any firmware that still uses the 'spc' nodes already stopped running for other reasons, so let's get rid of this. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] spufs: make mailbox functions handle multiple elementsArnd Bergmann2006-10-051-29/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since libspe2 will provide a function that can read/write multiple mailbox elements at once, the kernel should handle that efficiently. read/write on the three mailbox files can now access the spe context multiple times to operate on any number of mailbox data elements. If the spu application keeps writing to its outbound mailbox, the read call will pick up all the data in a single system call. Unfortunately, if the user passes an invalid pointer, we may lose a mailbox element on read, since we can't put it back. This probably impossible to solve, if the user also accesses the mailbox through direct register access. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] spufs: use correct pg_prot for mapping SPU local storeArnd Bergmann2006-10-051-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This hopefully fixes a long-standing bug in the spu file system. An spu context comes with local memory that can be either saved in kernel pages or point directly to a physical SPE. When mapping the physical SPE, that mapping needs to be cache-inhibited. For simplicity, we used to map the kernel backing memory that way too, but unfortunately that was not only inefficient, but also incorrect because the same page could then be accessed simultaneously through a cacheable and a cache-inhibited mapping, which is not allowed by the powerpc specification and in our case caused data inconsistency for which we did a really ugly workaround in user space. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] spufs: Add infrastructure needed for gang schedulingArnd Bergmann2006-10-056-41/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the concept of a gang to spufs as a new type of object. So far, this has no impact whatsover on scheduling, but makes it possible to add that later. A new type of object in spufs is now a spu_gang. It is created with the spu_create system call with the flags argument set to SPU_CREATE_GANG (0x2). Inside of a spu_gang, it is then possible to create spu_context objects, which until now was only possible at the root of spufs. There is a new member in struct spu_context pointing to the spu_gang it belongs to, if any. The spu_gang maintains a list of spu_context structures that are its children. This information can then be used in the scheduler in the future. There is still a bug that needs to be resolved in this basic infrastructure regarding the order in which objects are removed. When the spu_gang file descriptor is closed before the spu_context descriptors, we leak the dentry and inode for the gang. Any ideas how to cleanly solve this are appreciated. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] spufs: implement error event delivery to user spaceArnd Bergmann2006-10-056-24/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This tries to fix spufs so we have an interface closer to what is specified in the man page for events returned in the third argument of spu_run. Fortunately, libspe has never been using the returned contents of that register, as they were the same as the return code of spu_run (duh!). Unlike the specification that we never implemented correctly, we now require a SPU_CREATE_EVENTS_ENABLED flag passed to spu_create, in order to get the new behavior. When this flag is not passed, spu_run will simply ignore the third argument now. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] spufs: fix context switch during page faultHyeonSeung Jang2006-10-051-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For better explanation, I break down the page fault handling into steps: 1) There is a page fault caused by DMA operation initiated by SPU and DMA is suspended. 2) The interrupt handler 'spu_irq_class_1()/__spu_trap_data_map()' is called and it just wakes up the sleeping spe-manager thread. 3) by PPE scheduler, the corresponding bottom half, spu_irq_class_1_bottom() is called in process context and DMA is restarted. There can be a quite large time gap between 2) and 3) and I found the following problem: Between 2) and 3) If the context becomes unbound, 3) is not executed because when the spe-manager thread is awaken, the context is already saved. (This situation can happen, for example, when a high priority spe thread newly started in that time gap) But the actual problem is that the corresponding SPU context does not work even if it is bound again to a SPU. Besides I can see the following warning in mambo simulator when the context becomes unbound(in save_mfc_cmd()), i.e. when unbind() is called for the context after step 2) before 3) : 'WARNING: 61392752237: SPE2: MFC_CMD_QUEUE channel count of 15 is inconsistent with number of available DMA queue entries of 16' After I go through available documents, I found that the problem is because the suspended DMA is not restarted when it is bound again. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] spufs: scheduler support for NUMA.Mark Nutter2006-10-052-298/+197Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds NUMA support to the the spufs scheduler. The new arch/powerpc/platforms/cell/spufs/sched.c is greatly simplified, in an attempt to reduce complexity while adding support for NUMA scheduler domains. SPUs are allocated starting from the calling thread's node, moving to others as supported by current->cpus_allowed. Preemption is gone as it was buggy, but should be re-enabled in another patch when stable. The new arch/powerpc/platforms/cell/spu_base.c maintains idle lists on a per-node basis, and allows caller to specify which node(s) an SPU should be allocated from, while passing -1 tells spu_alloc() that any node is allowed. Since the patch removes the currently implemented preemptive scheduling, it is technically a regression, but practically all users have since migrated to this version, as it is part of the IBM SDK and the yellowdog distribution, so there is not much point holding it back while the new preemptive scheduling patch gets delayed further. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] spufs: cell spu problem state mapping updatesBenjamin Herrenschmidt2006-10-052-51/+84
|/ | | | | | | | | | | | | | | | | | | | | This patch adds a new "psmap" file to spufs that allows mmap of all of the problem state mapping of SPEs. It is compatible with 64k pages. In addition, it removes mmap ability of individual files when using 64k pages, with the exception of signal1 and signal2 which will both map the entire 64k page holding both registers. It also removes CONFIG_SPUFS_MMAP as there is no point in not building mmap support in spufs. It goes along a separate patch to libspe implementing usage of that new file to access problem state registers. Another patch will follow up to fix races opened up by accessing the 'runcntl' register directly, which is made possible with this patch. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [S390] Remove open-coded mem_map usage.Heiko Carstens2006-10-041-4/+6
| | | | | | Use page_to_phys and pfn_to_page to avoid open-coded mem_map usage. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* [S390] Have s390 use add_active_range() and free_area_init_nodes.Heiko Carstens2006-10-044-67/+27Star
| | | | | | Size zones and holes in an architecture independent manner for s390. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* [S390] Remove crept in whitespace from head*.S again.Heiko Carstens2006-10-042-10/+10
| | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* [S390] Wire up sys_getcpu system call.Heiko Carstens2006-10-042-0/+9
| | | | Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* [S390] user-copy optimization fallout.Martin Schwidefsky2006-10-041-10/+7Star
| | | | | | | | Fix new restore_sigregs function. It copies the user space copy of the old psw without correcting the psw.mask and the psw.addr high order bit. While we are at it, simplify save_sigregs a bit. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [S390] update default configurationMartin Schwidefsky2006-10-041-12/+44
| | | | Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds2006-10-045-18/+12Star
|\ | | | | | | | | | | * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Remove remaining reference to ite_gpio.h from Kbuild [MIPS] PNX8550 fixups
| * [MIPS] PNX8550 fixupsVitaly Wool2006-10-045-18/+12Star
| | | | | | | | | | | | | | | | | | This patch fixes the compilation errors on PNX8550 and hard-to-track bug in interrupt handling. It also corresponds to the latest changes in PNX8550 serial driver. Signed-off-by: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | [PATCH] AVR32: Allow renumbering of serial devicesHaavard Skinnemoen2006-10-044-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | Allow the board to remap actual USART peripheral devices to serial devices by calling at32_map_usart(hw_id, serial_line). This ensures that even though ATSTK1002 uses USART1 as the first serial port, it will still have a ttyS0 device. This also adds a board-specific early setup hook and moves the at32_setup_serial_console() call there from the platform code. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] atmel_serial: Pass fixed register mappings through platform_dataHaavard Skinnemoen2006-10-042-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to initialize the serial console early, the atmel_serial driver had to do a hack where it compared the physical address of the port with an address known to be permanently mapped, and used it as a virtual address. This got around the limitation that ioremap() isn't always available when the console is being initalized. This patch removes that hack and replaces it with a new "regs" field in struct atmel_uart_data that the board-specific code can initialize to a fixed virtual mapping for platform devices where this is possible. It also initializes the DBGU's regs field with the address the driver used to check against. On AVR32, the "regs" field is initialized from the physical base address when this it can be accessed through a permanently 1:1 mapped segment, i.e. the P4 segment. If regs is NULL, the console initialization is delayed until the "real" driver is up and running and ioremap() can be used. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Acked-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] at91_serial -> atmel_serial: Public definitionsHaavard Skinnemoen2006-10-042-13/+13
| | | | | | | | | | | | | | | | | | | | | | Rename the following public definitions: * AT91_NR_UART -> ATMEL_MAX_UART * struct at91_uart_data -> struct atmel_uart_data * at91_default_console_device -> atmel_default_console_device Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Acked-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] at91_serial -> atmel_serial: Platform device nameHaavard Skinnemoen2006-10-042-25/+25
| | | | | | | | | | | | | | | | | | Rename the "at91_usart" platform driver "atmel_usart" and update platform devices accordingly. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Acked-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | [PATCH] at91_serial -> atmel_serial: Kconfig symbolsHaavard Skinnemoen2006-10-0411-29/+29
| | | | | | | | | | | | | | | | | | | | | | Rename the following Kconfig symbols: * CONFIG_SERIAL_AT91 -> CONFIG_SERIAL_ATMEL * CONFIG_SERIAL_AT91_CONSOLE -> CONFIG_SERIAL_ATMEL_CONSOLE * CONFIG_SERIAL_AT91_TTYAT -> CONFIG_SERIAL_ATMEL_TTYAT Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Acked-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/confighLinus Torvalds2006-10-0487-94/+3Star
|\ \ | |/ |/| | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/davej/configh: Remove all inclusions of <linux/config.h> Manually resolved trivial path conflicts due to removed files in the sound/oss/ subdirectory.
| * Remove all inclusions of <linux/config.h>Dave Jones2006-10-0487-94/+3Star
| | | | | | | | | | | | kbuild explicitly includes this at build time. Signed-off-by: Dave Jones <davej@redhat.com>
* | Merge master.kernel.org:/pub/scm/linux/kernel/git/willy/parisc-2.6Linus Torvalds2006-10-0416-200/+360
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/willy/parisc-2.6: (41 commits) [PARISC] Kill wall_jiffies use [PARISC] Honour "panic_on_oops" sysctl [PARISC] Fix fs/binfmt_som.c [PARISC] Export clear_user_page to modules [PARISC] Make DMA routines more stubby [PARISC] Define pci_get_legacy_ide_irq [PARISC] Fix CONFIG_DEBUG_SPINLOCK [PARISC] Fix HPUX compat compile with current GCC [PARISC] Fix iounmap compile warning [PARISC] Add support for Quicksilver AGPGART [PARISC] Move LBA and SBA register defines to the common ropes.h [PARISC] Create shared <asm/ropes.h> header [PARISC] Stash the lba_device in its struct device drvdata [PARISC] Generalize IS_ASTRO et al to take a parisc_device like [PARISC] Pretty print the name of the lba type on kernel boot [PARISC] Remove some obsolete comments and I checked that Reo is similar to Ike [PARISC] Add hardware found in the rp8400 [PARISC] Allow nested interrupts [PARISC] Further updates to timer_interrupt() [PARISC] remove halftick and copy clocktick to local var (gcc can optimize usage) ...
| * | [PARISC] Kill wall_jiffies useAndrew Morton2006-10-041-3/+0Star
| | | | | | | | | | | | | | | | | | | | | wall_jiffies and jiffies are now equal, so this is a noop... Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
| * | [PARISC] Honour "panic_on_oops" sysctlHelge Deller2006-10-041-0/+10
| | | | | | | | | | | | | | | Signed-off-by: Helge Deller <deller@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
| * | [PARISC] Export clear_user_page to modulesMatthew Wilcox2006-10-041-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
| * | [PARISC] Fix CONFIG_DEBUG_SPINLOCKMatthew Wilcox2006-10-041-3/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Joel Soete points out that we refer to pa_tlb_lock but only define it if CONFIG_SMP which breaks a uniprocessor build with CONFIG_DEBUG_SPINLOCK enabled. No module refers to pa_tlb_lock, so we can delete the export. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
| * | [PARISC] Fix HPUX compat compile with current GCCMatthew Wilcox2006-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | GCC no longer allows a cast as lvalue; fix the same way fs/readdir.c was Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
| * | [PARISC] Fix iounmap compile warningMatthew Wilcox2006-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | iounmap's argument needs to be both const and volatile, otherwise we'll get warnings that we're discarding pointer qualifiers Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
| * | [PARISC] Add hardware found in the rp8400Matthew Wilcox2006-10-041-0/+3
| | | | | | | | | | | | | | | Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
| * | [PARISC] Allow nested interruptsJames Bottomley2006-10-042-63/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our prior mode of operation didn't allow nested interrupts because it makes the interrupt code much simpler. However, nested interrupts are better for latency. This code uses the EIEM register to simulate level interrupts and thus achieve nesting. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
| * | [PARISC] Further updates to timer_interrupt()Grant Grundler2006-10-041-62/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This version (relative to the current tree): o eliminates "while (ticks_elapsed)" loop. It's not needed. o drop "ticks_elapsed" completely from timer_interrupt(). o Estimates elapsed cycles (based on HZ) to see which kind of math we want to use to calculate "cycles_remainder". o Fixes a bug where we would loose a tick if we decided we wanted to skip one interrupt. Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
| * | [PARISC] remove halftick and copy clocktick to local var (gcc can optimize ↵Grant Grundler2006-10-041-15/+31
| | | | | | | | | | | | | | | | | | | | | usage) Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
| * | [PARISC] Rewrite timer_interrupt() and gettimeoffset() using "unsigned" math.Grant Grundler2006-10-041-44/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's just a bit easier to follow and timer code is complex enough. So far, only tested on A500-5x (64-bit SMP), ie: gettimeoffset() code hasn't been tested at all. Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
| * | [PARISC] Add new function to start local Interval Timer, start_cpu_itimer()Grant Grundler2006-10-042-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I couldn't find where the itimer was getting started for slave CPUs. CPU 0 (master) itimer was started in time_init() (arch/parisc/kernel/time.c). start_cpu_itimer() code was striped from time_init(). Slaves now start their itimer in smp_cpu_init(). This is a first step towards making gettimeoffset() work for SMP. Next step will be to determine the CR16 (cycle counter) offsets for each CPU relative to the master (CPU 0). Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
| * | [PARISC] Prevent processor_probe() from clobbering cpu_data[0]Grant Grundler2006-10-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | processor_probe() shouldn't clobber cpu_data[0] cpu_data[0].it_value (used by timer_interrupt()) is already set. Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>