Li Yang [Mon, 28 May 2007 10:48:06 +0000 (18:48 +0800)]
[POWERPC] qe_lib: export symbols for QE driver to compile as module
Export symbols of qe_lib to be used by QE driver.
Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Selvamuthukumar V <vsmkumar.84@gmail.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kazunori Asayama [Fri, 29 Jun 2007 00:58:09 +0000 (10:58 +1000)]
[POWERPC] spufs: Save dma_tagstatus_R in CSA
The function backing_ops->read_mfc_tagstatus() doesn't return a
correct value because the dma_tagstatus_R register isn't saved in
CSA. This fixes the problem.
Signed-off-by: Kazunori Asayama <asayama@sm.sony.co.jp> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Kazunori Asayama [Fri, 29 Jun 2007 00:58:08 +0000 (10:58 +1000)]
[POWERPC] spufs: Fix lost events in poll/epoll on mfc
When waiting for I/O events on mfc in an SPU context by using
poll/epoll syscalls, some of the events can be lost because of wrong
order of poll_wait and MFC status checks in the spufs_mfc_poll
function and non-atomic update of tagwait. This fixes the
problem.
Signed-off-by: Kazunori Asayama <asayama@sm.sony.co.jp> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
spu_activate can be called from multiple threads at the same time on
behalf of the same spu context. We need to make sure to only add it
once to avoid runqueue corruption.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Provide load average information for spu context. The format
is identical to /proc/loadavg, which is also where a lot of code
and concepts is borrowed from.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
The new tid file contains the ID of the thread currently running the
context, if any. This is used so that the new spu-top and spu-ps
tools can find the thread in /proc.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Add a cpus_allowed allowed filed to struct spu_context so that we always
use the cpu mask of the owning thread instead of the one happening to
call into the scheduler. Also use this information in
grab_runnable_context to avoid spurious wakeups.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
[POWERPC] spusched: Update scheduling paramters on every spu_run
Update scheduling information on every spu_run to allow for setting
threads to realtime priority just before running them. This requires
some slightly ugly code in spufs_run_spu because we can just update
the information unlocked if the spu is not runnable, but we need to
acquire the active_mutex when it is runnable to protect against
find_victim. This locking scheme requires opencoding
spu_acquire_runnable in spufs_run_spu which actually is a nice cleanup
all by itself.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Jeremy Kerr [Fri, 29 Jun 2007 00:57:53 +0000 (10:57 +1000)]
[POWERPC] spusched: Fix timeslice calculations
The current timeslice code mixes 'jiffies' up with 'spesched ticks'. This
change correctly defines the number of time slices each SPE contexts is
given, and clarifies the comment.
This brings the default timeslice for SPE contexts into a reasonable
range.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
[POWERPC] spusched: Dynamic timeslicing for SCHED_OTHER
Enable preemptive scheduling for non-RT contexts.
We use the same algorithms as the CPU scheduler to calculate the time
slice length, and for now we also use the same timeslice length as the
CPU scheduler. This might be not enough for good performance and can be
changed after some benchmarking.
Note that currently we do not boost the priority for contexts waiting
on the runqueue for a long time, so contexts with a higher nice value
could starve ones with less priority. This could easily be fixed once
the rework of the spu lists that Luke and I discussed is done.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
[POWERPC] spusched: Switch from workqueues to kthread + timer tick
Get rid of the scheduler workqueues that complicated things a lot to
a dedicated spu scheduler thread that gets woken by a traditional
scheduler tick. By default this scheduler tick runs a HZ * 10, aka
one spu scheduler tick for every 10 cpu ticks.
Currently the tick is not disabled when we have less context than
available spus, but I will implement this later.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Add a bit define from book, and replace one hex number with a
symbol, for clarity.
Signed-off-by: Sebastian Siewior <bigeasy@linux.vnet.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Sebastian Siewior <bigeasy@linux.vnet.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Kumar Gala [Wed, 27 Jun 2007 18:09:43 +0000 (13:09 -0500)]
[POWERPC] Use ppc64 style list management for pci_controller on ppc32
Use the ppc64 style list management and allocation functions for
pci_controllers. This makes the pci_controller structs just a bit more
common between ppc32 & ppc64.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Zhang Wei [Tue, 26 Jun 2007 23:22:40 +0000 (18:22 -0500)]
[POWERPC] 86xx: Created quirk_fsl_pcie_transparent() to initialize bridge resources.
The Freescale PCI-e RC poses as a transparent bridge, but does not
implement the IO_BASE or IO_LIMIT registers in the config space. This
means that the code which initializes the bridge resources ends up
setting the IO resources erroneously. Add quick_fsl_pcie_transparent()
to handle this.
This change sets RC of mpc8641 to be a transparent bridge
for legacy I/O access and initializes the RC bridge resources
from the device tree.
Signed-off-by: Zhang Wei <wei.zhang@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
York Sun [Mon, 4 Jun 2007 16:56:42 +0000 (11:56 -0500)]
[POWERPC] Let subordinate transparent bridges be transparent.
In pcibios_fixup_bus(), bridges that are subordinate
to transparent bridges were still relocating their
IORESOURCE_IO and IO_RESOURCE_MEM start and end values.
Fix this by preventing the transparent bridge from
relocating the start and end values, thus allowing the
subordinate non-transparent bridge full molestation rights.
Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Tue, 26 Jun 2007 17:12:55 +0000 (12:12 -0500)]
[POWERPC] 86xx: Workaround PCI_PRIMARY_BUS usage
The Freescale PCI-e controllers have an issue in that they use the
PCI_PRIMARY_BUS register in the virtual P2P bridge to determine which
bus number to match on when generating a type 0 config cycle. The
issue is if we are renumbering bus numbers to match Linux we will try
setting the PCI_PRIMARY_BUS and will not know which bus number to use
for generating type 0 config cycles. We surpress writing the register
in the P2P bridge and always keep it at zero.
In the future when proper PCI domain support is working we should be
able to remove this.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Mon, 25 Jun 2007 20:19:48 +0000 (15:19 -0500)]
[POWERPC] Added indirect_type to handle variants of PCI ops
The generic PCI config ops indirect support for ppc32 covers only two
cases (implicit vs explicit) type 0/1 config cycles via set_cfg_type.
Added a indirect_type bit mask to handle other variants.
Added support for PCI-e extended registers and moved the cfg_type
handling into the bit mask for ARCH=powerpc. We can also use this to
handle indirect quirks.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Wade Farnsworth [Mon, 4 Jun 2007 20:24:47 +0000 (13:24 -0700)]
[POWERPC] 86xx: Add uli1575 pci-bridge sector to MPC8641HPCN dts file.
This adds device nodes for the PCI bridges as well as the ISA devices on
the newer revision MPC8641HPCN. It also adds the PCI ranges to the soc
node so that address translation for the ISA devices works properly.
Signed-off-by: Wade Farnsworth <wfarnsworth@mvista.com> Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Mon, 25 Jun 2007 18:32:48 +0000 (13:32 -0500)]
[POWERPC] Removed remnants of bus_offset
Removed the remants of bus_offset and use self_busno in the mv64x60 case
and use pci_assign_all_buses on 83xx/85xx.
83xx/85xx have multiple PHBs and the firmwares on these devices tend not
to handle topologies with P2P bridges well so we let Linux just reassign
the bus numbers to match.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Mon, 25 Jun 2007 18:09:42 +0000 (13:09 -0500)]
[POWERPC] Added self_busno to indicate which bus number the PHB is
Added self_busno to pci_controller and indirect PCI ops to be set by
board code to indicate which bus number to use when talking to the PHB.
By default we use zero since the majority of controllers that have
implicit mechanisms to talk to the PHBs use a bus number of zero.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Mon, 25 Jun 2007 17:53:51 +0000 (12:53 -0500)]
[POWERPC] Remove bus_offset in places its not really used
The user of the fsl_pcie code doesn't set bus_offset and 82xx doesn't
require it either. Remove the places in the code that reference it so
we can remove it all together.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Fri, 22 Jun 2007 05:29:46 +0000 (00:29 -0500)]
[POWERPC] Remove hack to determine the 2nd PHBs bus number
Now that we have the pci_controller in the exclude function we can easy
figure out if the bus number is the PHB or not. The old style of using a
variable setup at init time was actually broken and would only work in
specific cases.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Fri, 22 Jun 2007 05:23:57 +0000 (00:23 -0500)]
[POWERPC] Pass the pci_controller into pci_exclude_device
There are times that we need to know which controller we are on to decide
how to exclude devices properly. We now pass the pci_controller that we
are going to use down to the pci_exclude_device function. This will
greatly simplify being able to exclude the PHBs in multiple controller
setups.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Thu, 21 Jun 2007 16:22:47 +0000 (11:22 -0500)]
[POWERPC] Remove set_cfg_type for PCI indirect users that don't need it
The Freescale and Marvell PCI controllers dont require explicit setting for
type 1 config cycles. They handle producing them by implicitly looking at the
bus, devfn.
The TSI108 and 52xx don't use the generic PCI indirect code and thus don't
bother with set_cfg_type.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Arnd Bergmann [Sun, 17 Jun 2007 23:06:56 +0000 (01:06 +0200)]
[POWERPC] kill isa_{io,mem}_base definitions for !PCI
When CONFIG_PCI is disabled, the definitions for isa_io_base,
isa_mem_base and pci_dram_offset are entirely unused, but they
can result in link failure because they are defined in multiple
places.
The easiest fix is to just remove all these definitions.
Arnd Bergmann [Sun, 17 Jun 2007 23:06:54 +0000 (01:06 +0200)]
[POWERPC] rename add_bridge to avoid namespace clashes
Many platforms currently define their own add_bridge function, some
of them globally. This breaks some multiplatform configurations.
Prefixing each of these functions with the platform name avoids
this problem.
Arnd Bergmann [Sun, 17 Jun 2007 23:06:52 +0000 (01:06 +0200)]
[POWERPC] move 82xx/83xx/86xx Kconfig options to platform selection
The cores used in the MPC82xx/83xx/86xx embedded controllers are very similar
to those in the 32 bit general-purpose processors, so it makes sense to
treat them as the same CPU family.
Choosing between the embedded platforms and the multiplatform code is
now done in the platform menu, but functionally everything stays the
same.
David Gibson [Thu, 28 Jun 2007 05:56:26 +0000 (15:56 +1000)]
[POWERPC] In booting-without-of.txt, clarify that properties must precede subnodes
A strict reading of the flattened device tree format defined in
booting-without-of.txt does in fact require that all the tags defining
properties for a node go before any definitions of subnodes, however
it's not particularly emphasised. Although allowing intermingled
properties and subnodes would not be ambiguous in meaning, the kernel
parser does currently require that properties precede subnodes.
Furthermore, keeping this constraint makes life easier for various
device tree scanning tools.
Therefore, re-emphasise in booting-without-of.txt that this is a
strict requirement of the flattened device tree format.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
David Gibson [Wed, 27 Jun 2007 06:54:58 +0000 (16:54 +1000)]
[POWERPC] Abolish unused ucBoardRev variables
asm-powerpc/processor.h declares, and arch/ppc/platforms/prep_setup.c
defines variables ucBoardRev, ucBoardRevMaj and ucBoardRevMin which
are used nowhere in the current kernel (neither in arch/ppc nor
arch/powerpc). This removes them.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
David Gibson [Wed, 27 Jun 2007 06:54:58 +0000 (16:54 +1000)]
[POWERPC] Make more OF-related bootwrapper functions available to non-OF platforms
Commit 2e6016133755eb3cc44e8efab92573d23ed75888 split up
arch/powerpc/boot/of.c so that some OF functions can be used on
platforms that don't want to use the overall OF platform boot code.
This is useful on things like PReP which can have an OF implementation
which is useful for debugging output, but inadequate for booting.
However, that commit didn't export quite enough things to make a
usable OF console on a non-OF system. In particular, the device tree
manipulation performed to initialize the OF console code must
explicitly use the OF device tree, rather than the flattened device
tree, even if the system is otherwise booting using a flattened device
tree. This makes it so.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Tony Breeds [Fri, 22 Jun 2007 06:54:30 +0000 (16:54 +1000)]
[POWERPC] Move iSeries_tb_recal into its own late_initcall.
Currently iSeries will recalibrate the cputime_factors in the first
settimeofday() call.
It seems the reason for doing this is to ensure a resaonable time delta after
time_init(). On current kernels (with udev), this call is made 40-60 seconds
into the boot process, by moving it to a late initcall it is called
approximately 5 seconds after time_init() is called. This is sufficient to
recalibrate the timebase.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> CC: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Geoff Levand [Fri, 15 Jun 2007 22:06:23 +0000 (08:06 +1000)]
[POWERPC] Correct __secondary_hold comment
Remove references to pSeries and OpenFirmware in the __secondary_hold
usage comment. __secondary_hold is a generic routine and can be used
by other platforms.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Convert the ps3fb device from a platform device to a PS3 system bus device.
Fix the remove and shutdown methods to support kexec and to make ps3fb a
loadable module.
Geoff Levand [Fri, 15 Jun 2007 22:05:01 +0000 (08:05 +1000)]
[POWERPC] PS3: Rework AV settings driver
Make the PS3 ps3av driver a loadable module.
- Replace static data with kmalloc()'ed.
o Allocate struct ps3av dynamically, as it contains data used as vuart
receive/transmit buffers
o Move static recv_buf from ps3av_do_pkt() to struct ps3av
- Move ps3av_vuart_{read,write}() from drivers/ps3/ps3av_cmd.c to
drivers/ps3/ps3av.c and make them static as they're used in that file only.
- Make device a PS3 system-bus device.
- Update copyright formatting.
- Make two new routines ps3av_register_flip_ctl() and ps3av_flip_ctl() to
support late binding of the frame buffer flip control routine.
Geoff Levand [Fri, 15 Jun 2007 22:03:54 +0000 (08:03 +1000)]
[POWERPC] PS3: System manager re-work
PS3 sys-manager updates to reflect the new PS3 unifed device support.
Fixups to the PS3 sys-manager driver to properly support sys_reboot().
- Add varable request_tag to struct ps3_sys_manager_header.
- Move ctrl_alt_del from PS3_SM_EVENT_POWER_RELEASED to
PS3_SM_EVENT_POWER_PRESSED.
- Make the PS3 sys-manager driver a loadable module.
- Add new file sys-manager-core.c.
- Add new struct ps3_sys_manager_ops for dynamic binding.
- Put data sent to device on stack.
- Add support for PS3_SM_SERVICE_ID_REQUEST_ERROR.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Geoff Levand [Fri, 15 Jun 2007 22:01:06 +0000 (08:01 +1000)]
[POWERPC] PS3: Vuart rework
PS3 vuart updates to reflect the new PS3 unified device support.
- Move vuart devices to the PS3 system bus.
- Replace use of ps3_vuart_port_device with ps3_system_bus_device.
- Make the PS3 vuart bus driver a loadable module.
- Add remove() and shutdown() routines.
- Move ps3_vuart_work into ps3_vuart_port_priv.tx_list.
- Remove redundant spinlock ps3_vuart_work.lock.
- No longer free ps3_vuart_port_device.priv on shutdown.
- Cleanup Kconfig defs.
- Export symbols needed for modular port drivers.
- Arrange to use port numbers found in repository.
- Fix bugs in ps3_vuart_read_async() and polled reading
- Cleanup handling of shared interrupt with ps3_vuart_bus_interrupt_get()
and ps3_vuart_bus_interrupt_put()
- Add more comments to vuart.c.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Geoff Levand [Fri, 15 Jun 2007 21:55:58 +0000 (07:55 +1000)]
[POWERPC] PS3: Repository probe cleanups
Repository updates:
- Extract ps3_repository_find_bus() from ps3_repository_find_device(), as the
storage driver needs it.
- Make ps3_repository_find_device() return -ENODEV if a device is not found,
just like if a bus is not found.
- Add ps3_repository_read_vuart_sysmgr_port() and
ps3_repository_read_vuart_av_port() to get vuart port info.
- Add device enumeration routines ps3_repository_find_device() and
ps3_repository_find_devices().
- Cleanup debug routines.
David Woodhouse [Fri, 15 Jun 2007 21:55:20 +0000 (07:55 +1000)]
[POWERPC] PS3: System-bus modinfo attribute
Add modinfo attribute to ps3_system_bus devices. Also make them all
children of the same ps3_system_bus 'device' so they appear in a
corresponding subdirectory under /sys/devices.
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
David Woodhouse [Fri, 15 Jun 2007 21:55:14 +0000 (07:55 +1000)]
[POWERPC] PS3: System-bus uevent
To allow userspace to automatically load modules, we need to hook up
uevent for ps3_system_bus devices. I've used the form 'ps3:%d' with
the ps3_match_id, since that's what we use for matching drivers.
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Geoff Levand [Fri, 15 Jun 2007 21:52:02 +0000 (07:52 +1000)]
[POWERPC] PS3: System-bus rework
Rework the PS3 system bus to unify device support.
- DMA region sizes must be a power of two
- storage bus DMA updates:
- Small fixes for the PS3 DMA core:
o fix alignment bug
o kill superfluous test
o indentation
o spelling
o export ps3_dma_region_{create,free}()
- ps3_dma_region_init():
o Add `addr' and `len' parameters, so you can create a DMA region that
does not cover all memory (use `NULL' and `0' to cover all memory).
This is needed because there are not sufficient IOMMU resources to have
all DMA regions cover all memory.
o Uninline
- Added remove and shutdown routines to all drivers.
- Added loadable module support to all drivers.
- Added HV calls for iopte management (needed by sound driver).
Geoff Levand [Fri, 15 Jun 2007 21:19:32 +0000 (07:19 +1000)]
[POWERPC] PS3: Kexec support
Fixup the core platform parts needed for kexec to work on the PS3.
- Setup ps3_hpte_clear correctly.
- Mask interrupts on irq removal.
- Release all hypervisor resources.
- Create new routine ps3_shutdown_IRQ()
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Geoff Levand [Fri, 15 Jun 2007 21:19:18 +0000 (07:19 +1000)]
[POWERPC] PS3: Move chip mask defs up
This just moves the definitions of the PS3 chip_mask routines up
above the irq setup routines. This change is needed for the
kexec updates that follow. Also adds some inline documentation
to the routines.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Geoff Levand [Fri, 15 Jun 2007 21:17:32 +0000 (07:17 +1000)]
[POWERPC] cell: Add spu shutdown method
Add a shutdown method to spu_sysdev_class to allow proper spu resource
cleanup on system shutdown. This is needed to support kexec on the PS3
platform.
Sachin P. Sant [Thu, 14 Jun 2007 05:31:34 +0000 (15:31 +1000)]
[POWERPC] Fix Kexec/Kdump for power6
On Power machines supporting VRMA, Kexec/Kdump does not work.
VRMA (virtual real-mode area) means that accesses with IR/DR = 0
(i.e. the MMU "off") actually still go through the hash table,
using entries put there by the hypervisor.
This means that when we clear out the hash table on kexec, we need to
make sure these entries are left untouched.
This also adds plpar_pte_read_raw() on the lines of
plpar_pte_remove_raw().
Signed-off-by : Sachin Sant <sachinp@in.ibm.com>
Signed-off-by : Mohan Kumar M <mohan@in.ibm.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
Mohan Kumar M [Tue, 12 Jun 2007 14:51:57 +0000 (00:51 +1000)]
[POWERPC] Fix interrupt distribution in ppc970
In some of the PPC970 based systems, interrupt would be distributed to
offline cpus also even when booted with "maxcpus=1". So check whether
cpu online map and cpu present map are equal or not. If they are equal
default_distrib_server is used as interrupt server otherwise boot cpu
(default_server) used as interrupt server.
In addition to this, if an interrupt is assigned to a specific cpu (ie
smp affinity) and if that cpu is not online, the earlier code used to
return the default_distrib_server as interrupt server. This
introduces an additional parameter to the get_irq function, called
strict_check. Based on this parameter, if the cpu is not online
either default_distrib_server or -1 is returned.
Signed-off-by: Mohan Kumar M <mohan@in.ibm.com> Cc: Michael Ellerman <michael@ellerman.id.au> Acked-by: Milton Miller <miltonm@bga.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Michael Neuling [Fri, 8 Jun 2007 03:18:50 +0000 (13:18 +1000)]
[POWERPC] Fix stolen time for SMT without LPAR
For POWERPC, stolen time accounts for cycles lost to the hypervisor or
PURR cycles attributed to the other SMT thread. Hence, when a PURR is
available, we should still calculate stolen time, irrespective of being
virtualised.
Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Mark A. Greer [Thu, 7 Jun 2007 00:38:00 +0000 (10:38 +1000)]
[POWERPC] Call add_preferred_console when MPSC is console
When a Marvell MPSC (serial controller) port is the specified
/chosen/stdout-path device, call 'add_preferred_console()' so the user
doesn't have to specify a 'console=ttyMMx' cmdline argument.
Signed-off-by: Mark A. Greer <mgreer@mvista.com> Acked-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Paul Mackerras <paulus@samba.org>