- 23 Aug, 2004 40 commits
-
-
Ryan S. Arnold authored
Here are a set of HVCS (drivers/char/hvcs.c) fixes that were suggested by Jeff Garzik on July 29th in his review of this driver as well as some other fixes for problems I found while reviewing the driver. These are all relatively minor, but necessary. - Cleaned up curly braces on single line conditional blocks. - Replaced debug memset(...,0x3F,...) with memset(...,0x00,...). - Removed explicit '= 0' after static int declarations since these default to zero. - Removed list_for_each_safe() instances and replaced with list_for_each_entry() which cut down on amt of code. The 'safe' version is un-needed now that the driver is using spinlocks. - Changed spin_lock_irqsave() to spin_lock() when locking hvcs_structs_lock and hvcs_pi_lock since these are not touched in an int handler. - changed spin_lock_irqsave() to spin_lock() in interrupt handler. - Initialized hvcs_structs_lock and hvcs_pi_lock to SPIN_LOCK_UNLOCKED at declaration tiem rather than in hvcs_module_init(). - Added spin_lock around list_del() in destroy_hvcs_struct() to protect the list traversal from deletion. The original omission was an oversight. - Removed '= NULL' from pointer declarations since they are initialized NULL by default. - Removed wmb() instance from hvcs_try_write(). They probably aren't needed with locking in place. - Added check and cleanup for hvcs_pi_buff = kmalloc() in hvcs_module_init(). - Exposed hvcs_struct.index via a sysfs attribute so that the coupling between /dev/hvcs* and a vty-server can be systematically determined. - Moved kobject_put() in hvcs_open() outside of the spin_unlock_irqrestore(). - In hvcs_probe() changed kmalloc(sizeof(*hvcsd),...) to kmalloc(sizeof(struct hvcs_struct)) because hvcsd references a NULL pointer at the time of kmalloc. - Incremented the HVCS_DRIVER_VERSION to 1.3.1 arch/ppc64/kernel/hvcserver.c: - Changed function documentation of EXPORTed functions to comply with proper kernel-doc documentation style. - Changed 'unsigned int' types to 'uint32_t' to comply with how unit addresses and partition IDs are handled in other arch/ppc64 vterm code. - Cleaned up curly braces on single line conditional blocks. include/asm-ppc64/hvcserver.h: - Added kernel-doc style documentation for hvcs_partner_info struct. - changed 'unsigned int' types to 'uint32_t' to comply with how unit addresses and partition IDs are handled in other arch/ppc64 vterm code. Signed-off-by: Ryan S. Arnold <rsa@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Dave Boutcher authored
arch/ppc64/kernel/mf_proc.c uses a bad interface for moving along file position in a proc_write routine. This quit working altogether in 2.6.8. Patch to fix. And I did a quick scan of the kernel to see if anyone else was similarly broken...apparantly not :-) Fixes a broken update of f_pos in a proc file write routine. Signed-off-by: Dave Boutcher <sleddog@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
Firmware expects the size of the buffer that you hand it when you ask it for information about a hardware error to be of a very specific size, but different versions of firmware appearently expect different sizes; using the wrong size results in a painful, hard-to-debug crash in firmware. Benh provided a patch for this some months ago, but appreantly missed this code path. This patch sets up the log buffer size dynamically; it also fixes a bug with the return code not being handled correctly. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
The patch below implements the ability to query outstanding imalloc regions for a given virtual address range. (Imalloc is the allocator of virtual space for ioremap.) The patch extends im_get_area() to allow a region criterion of IM_REGION_SUPERSET. For a particular "superset" virtual address and size passed into im_get_area(), the function returns the first outstanding region that is contained within this superset region. The patch also changes iounmap_explicit() to allow for the unmapping of all regions that fit under a "superset". This ability is necessary for dynamic (runtime) removal of pci host bridges (PHBs). For a PHB removal, the platform specification (the RPA) requires that all of its children slots already be dynamically removed. Each of these slot-level removals has fractured the imalloc region assigned to the PHB at boot. At PHB removal time, it is necessary to iounmap() the remaining artifacts of the initial PHB region. Signed-off-by: John Rose <johnrose@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Stephen Rothwell authored
This patch adds the ability to use DVD-RAM drives to the iSeries virtual cdrom driver. This version adresses (hopefully) Jens comments on the previous one. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
Below patch reuses the big-endian bitops for the little endian ones, and moves the ext2_{set,clear}_bit_atomic functions to be truly atomic instead of lock based. This requires that the bitmaps passed to the ext2_* bitop functions are 8-byte aligned. I have been assured that they will be 512-byte or 1024-byte aligned, and sparc and ppc32 also impose an alignment requirement on the bitmap. Signed-off-by: Olof Johansson <olof@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
At present rtas_call() can be called before the kmalloc subsystem is initialized, and if RTAS reports a hardware error, the code tries to do a kmalloc to make a copy of the error report. This patch changes it so that we don't do the kmalloc in that situation. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Linas Vepstas authored
Signed-off-by: Linas Vepstas <linas@linas.org> Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Nathan Lynch authored
The current code does schedule_timeout(HZ) when waiting for a cpu to die, which is a bit coarse and tends to limit the "throughput" of my stress tests :) Change the HZ timeout to HZ/5, increase the number of tries to 25 so the overall wait time is similar. In practice, I've never seen the loop need more than two iterations. Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com> Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Olof Johansson authored
Minor cleanup: Use C99 initializers for the screen_info struct. Signed-off-by: Olof Johansson <olof@austin.ibm.com> Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
David Gibson authored
Tested, at least basically, on Power4 iSeries with shared processors, on Power4 pSeries and RS64 (non-SLB) iSeries machines. On pSeries SLB machines we "bolt" an SLB entry for the first segment of the vmalloc() area into the SLB, to reduce the SLB miss rate. This caused problems, so was disabled, on iSeries because the bolted entry was not restored properly on shared processor switch. This patch adds information about the bolted vmalloc segment to the lpar map, which should be restored on shared processor switch. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Hollis Blanchard authored
This is a console driver for IBM's p5 servers; please consider it for inclusion. I've addressed all the comments I've received so far. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Srivatsa Vaddagiri authored
During some signal test, we found that v_regs pointer was not setup correctly. v_regs was made to point to itself, as a result of which the pointer was corrupted when vec registers were copied over. When the signal handler returned, restore_sigcontext tried derefering the invalid pointer and in the process killed the app with SIGSEGV. Signed-off-by: Srivatsa Vaddagiri <vatsa@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
Currently on pSeries systems the kernel will print out a hex dump of any error events reported by the platform at boot time. These can be rather large and are practically incomprehensible to humans. With this patch, the kernel will by default print a 1-line summary for each error reported with the severity, type, etc. printed as text strings. The old behaviour is still available by using the rtasmsgs=on kernel command line option. The patch also renames some RTAS-specific symbols to start with "RTAS_". Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
The EEH code currently can end up doing an extra pci_dev_put() in the case where we hot-unplug a card for which we are ignoring EEH errors (e.g. a graphics card). This patch fixes that problem by only maintaining a reference to the PCI device if we have entered any of its resource addresses into our address -> PCI device cache. This patch is based on an earlier patch by Linas Vepstas. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
Firmware can report errors at any time, and not atypically during boot. However, these reports were being discarded until th rtasd comes up, which occurs fairly late in the boot cycle. As a result, firmware errors during boot were being silently ignored. Signed-off-by: Linas Vepstas <linas@linas.org> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
David Gibson authored
Fairly trivial PPC64 cleanup. This patch makes the ppc64 INIT_THREAD #define use C99 initializers, which will make it less likely to get broken if we need to change thread_struct. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
In the default_idle and dedicated_idle loops, there are some inner loops out of which we should break if the cpu is marked offline. Otherwise, it is possible for the cpu to get stuck and never actually go offline. shared_idle is unaffected. Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
When taking a cpu offline, once the cpu has been removed from cpu_online_map, it is not supposed to service any more interrupts. This presents a problem on ppc64 because we cannot truly disable the decrementer. There used to be cpu_is_offline() checks in several scheduler functions (e.g. rebalance_tick()) which papered over this issue, but these checks were removed recently. So with recent 2.6 kernels, an attempt to offline a cpu can result in a crash in find_busiest_group(). This patch prevents such crashes. Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
Here is a patch that sets struct iommu_table->it_type to TCE_PCI in pSeries_iommu.c. This is just for code completeness (and it is updated in iSeries_iommu.c, but was somehow missed in pSeries_iommu.c). Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Anton Blanchard authored
Clean up an oprofile error message, it was missing a newline. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Anton Blanchard authored
Add some missing exports, required for oprofile to be compiled as a module. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Anton Blanchard authored
Allow the oprofile module to be unloaded, before we never removed the oprofile specific interrupt handler. Handle the pending exception case in the dummy interrupt handler instead. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Anton Blanchard authored
Disable oprofile debug messages. They arent much use now things are working reliably. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Anton Blanchard authored
POWER4 oprofile updates from Carl Love. - Create mmcr0, mmcr1, mmcra oprofilefs files. - Use kernel and user profile disable bits. (Some modifications by me) Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
With cpu_present_map, we don't need these any longer. Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
Our (ab)use of cpu_possible_map in setup_system to start secondary SMT threads bothers me. Mark such threads in cpu_possible_map during early boot; let RTAS tell us which present cpus are still offline later so we can start them. I'm not totally sure about this one, it might be better to set up cpu_sibling_map in prom_hold_cpus and use that in setup_system. Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
Adopt the "standard" cpu_present_map for describing cpus which are present in the system, but not necessarily online. cpu_present_map is meant to be a superset of cpu_online_map and a subset of cpu_possible_map. Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
We were using Linux's cpu numbering for cpu-related hypervisor calls (e.g. vpa registration, H_CONFER). It happened to work most of the time because Linux and the hypervisor usually, but not always, have the same numbering for cpus. Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Dave Hansen authored
arch/ppc64/kernel/irq.c: In function `init_irq_proc': arch/ppc64/kernel/irq.c:797: warning: implicit declaration of function `create_prof_cpu_mask' Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
Somewhere along the line we lost the code that updates some fields of the systemcfg structure that are used for translating timebase values to time of day. I want to get rid of the systemcfg structure eventually, but applications are using it (and in particular these fields) and I don't want to break the ABI in a stable kernel series. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Anton Blanchard authored
Remove some unused things in asm-offsets.c Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Anton Blanchard authored
Reduce the stack overflow warning from 4kB to 2kB now that its been in and tested for a while. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Matt Porter authored
This patch removes warnings associated with Ebony MTD related defines. Please apply. Signed-off-by: Eugene Surovegin <ebs@ebshome.net> Signed-off-by: Matt Porter <mporter@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
This patch fixes a bug in the kernel emulation of altivec instructions with denormalized operands. The emulation of the vmaddfp and vmnsubfp instructions was giving the wrong answer because I had the wrong order of operands to the fmadds and fnmsubs instructions. This patch fixes it for both ppc32 and ppc64. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Eugene Surovegin authored
This patch adds missing exports for __dma_sync and __dma_sync_page (DMA API helpers for non-coherent cache PPCs). Signed-off-by: Eugene Surovegin <ebs@ebshome.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Matt Porter authored
Adds documentation of the PPC noltlbs and nobats kernel cmdline parameters. noltlbs is a new option and nobats never had an entry. Signed-off-by: Matt Porter <mporter@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
This patch adds emulation in the illegal instruction handler for a couple of old instructions that are no longer implemented in the PPC970 and later chips. This patch adds the code for both ppc32 and ppc64, and cleans up the ppc64 traps.c a bit, along the lines of the ppc32 code. It also makes sure that the ppc64 code generates a SIGTRAP after emulating an instruction if single-stepping is enabled. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Paul Mackerras authored
This patch adds code to the ppc32 alignment exception handler to make it handle the load/store string and load/store multiple word instructions. This is an issue for older CPUs such as the PPC601, which traps on load/store string instructions which cross a page boundary (newer CPUs handle this in hardware). I have a little test program which exercises this code, so I am reasonably confident it's correct. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Matt Porter authored
This makes the PPC40x lowmem large tlb mapping selectable via a cmdline option. This allows use of the normal page-sized mapping so that kernel text can be read only if desired. Signed-off-by: Josh Boyer <jwboyer@charter.net> Signed-off-by: Matt Porter <mporter@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-