summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/iseries
AgeCommit message (Collapse)Author
2008-04-29powerpc: use non-racy method for proc entries creationDenis V. Lunev
Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Add correct ->owner to proc_fops to fix reading/module unloading race. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-24[POWERPC] Make iSeries spin on __secondary_hold_spinloop, like pSeriesTony Breeds
Currently all iSeries secondary CPUs spin directly on the cpu_start field in their paca. Make them spin on the global __secondary_hold_spinloop until after the pacas have been initialised. As Stephen Rothwell points out, this works at the moment because __secondary_hold_spinloop is being set already, but iSeries isn't looking at it :) Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-04-15[POWERPC] iSeries: Localise and constify some iSeries dataStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-04-15[POWERPC] iSeries: Make iseries_reg_save private to iSeriesStephen Rothwell
Now that we have the alpaca, the reg_save_ptr is no longer needed in the paca. Eradicate all global uses of it and make it static in the iSeries lpardata.c Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-04-15[POWERPC] iSeries: Use alternate paca structure for bootingStephen Rothwell
The iSeries HV only needs the first two fields of the paca statically initialised, so create an alternate paca that contains only those and switch to our real paca immediately after boot. This is in order to make the 1024 cpu patches easier since they will no longer have to statically initialise the pacas for iSeries. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-03-26[POWERPC] arch/powerpc/platforms/iseries/pci.c: Use time_* macrosS.Çağlar Onur
The functions time_before, time_before_eq, time_after, and time_after_eq are more robust for comparing jiffies against other values. This implements usage of the time_after() macro, defined at linux/jiffies.h, which deals with wrapping correctly. Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-02-14[POWERPC] free_property() must not be __initAdrian Bunk
This fixes the following section mismatch: <-- snip --> ... WARNING: vmlinux.o(.text+0x55648): Section mismatch in reference from the function .free_node() to the function .init.text:.free_property() ... <-- snip --> Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-02-05iommu sg: powerpc: convert iommu to use the IOMMU helperFUJITA Tomonori
This patch converts PPC's IOMMU to use the IOMMU helper functions. The IOMMU doesn't allocate a memory area spanning LLD's segment boundary anymore. iseries_hv_alloc and iseries_hv_map don't have proper device struct. 4GB boundary is used for them. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Jeff Garzik <jeff@garzik.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-17[POWERPC] iSeries: eliminate pci_dn bussubnoStephen Rothwell
xlate_iomm_address() really wants the ds_addr to pass to the HV, so store that value (instead of the BAR number) when we allocate the device bars. This is not a fast path, so we can look up the device_node property there instead of using the bussubno field of the pci_dn. The other user of iseries_ds_addr() was already scanning the device tree, so looking up a property will not slow it down any more. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-01-17[POWERPC] The pci_dn pcidev is only used by EEHStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-21Merge branch 'linux-2.6'Paul Mackerras
2007-12-20[POWERPC] arch/powerpc: Add missing of_node_putJulia Lawall
There should be an of_node_put when breaking out of a loop that iterates over calls to of_find_all_nodes, as this function does an of_node_get on the value it returns. This was fixed using the following semantic patch. (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ type T; identifier d; expression e; @@ T *d; ... for (d = NULL; (d = of_find_all_nodes(d)) != NULL; ) {... when != of_node_put(d) when != e = d ( return d; | + of_node_put(d); ? return ...; ) ...} // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-20[POWERPC] fix iSeries PCI resource managementBenjamin Herrenschmidt
The way iSeries manages PCI IO and Memory resources is a bit strange and is based on overriding the content of those resources with home cooked ones afterward. This changes it a bit to better integrate with the new resource handling so that the "virtual" tokens that iSeries replaces resources with are done from the proper per-device fixup hook, and bridge resources are set to enclose that token space. This fixes various things such as the output of /proc/iomem & ioports, among others. This also fixes up various boot messages as well. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-20[POWERPC] iSeries: Fix unregistering HV event handlersStephen Rothwell
Commit fbd568a3e61a7decb8a754ad952aaa5b5c82e9e5 ("Change synchronize_kernel to _rcu and _sched") changed the deprecated synchronize_kernel() in HvLpEvent_unregisterHandler() to synchronize_rcu(). It turns out that it should have been synchronize_sched(). Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-14[POWERPC] iSeries: don't printk with HV spinlock heldStephen Rothwell
Printk was observed to hang during module unload due to a limited window of characters that may be sent to the hypervisor. The window only reexpands when we receive an ack from the HV and the spinlock here prevents us from ever processing that ack. This fixes it by dropping the lock before doing the printk, then looping back to the top to reacquire the lock. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] iSeries: Merge vpdinfo.c into pci.cStephen Rothwell
There was only one global function in vpdinfo.c and it was only called from pci.c, so merge them and make the function static. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] iSeries: Clean up and simplify vdpinfo.cStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] iSeries: DeCamelCase vpdinfo.cStephen Rothwell
This is a purely mechanical transformation. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] Don't special case pci_domain_nr() for iSeriesStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] Remove some iSeries platform checks from the PCI codeStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] iSeries: Call iSeries_pcibios_init from setup_archStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] iSeries: Make pcibios_final_fixup not depend on pci_dnStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] iSeries: Reduce dependence on pci_dn bussubnoStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] iSeries: iseries_ds_addr is only used in pci.cStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] iSeries: Remove pci_dn dependency from iSeries_Device_InformationStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] iSeries: Remove one layer of IO routinesStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] iSeries: Consoldiate PCI IO error checkStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] iSeries: Unindent and clean iSeries_pci_final_fixupStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] iSeries: Remove some dead code from pci.cStephen Rothwell
and an unnecessary cast. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] iSeries: DeCamelCase pci.cStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] iSeries: Cleanup PCI retry code a littleStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-11[POWERPC] iSeries: Move find_Device_Node to avoid a forward declarationStephen Rothwell
Also remove another unnecessary forward declaration. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-03[POWERPC] iSeries: Fix sparse warnings in setup.cStephen Rothwell
arch/powerpc/platforms/iseries/setup.c:111:27: warning: constant 0x100000000 is so big it is long arch/powerpc/platforms/iseries/setup.c:113:23: warning: constant 0x100000000 is so big it is long arch/powerpc/platforms/iseries/setup.c:117:27: warning: constant 0x000fffffffffffff is so big it is long arch/powerpc/platforms/iseries/setup.c:127:28: warning: constant 0x100000000 is so big it is long arch/powerpc/platforms/iseries/setup.c:129:24: warning: constant 0x100000000 is so big it is long arch/powerpc/platforms/iseries/setup.c:233:5: warning: constant 0x000fffffffffffff is so big it is long arch/powerpc/platforms/iseries/setup.c:235:5: warning: constant 0x000fffffffffffff is so big it is long arch/powerpc/platforms/iseries/setup.c:319:6: warning: symbol 'mschunks_alloc' was not declared. Should it be static? arch/powerpc/platforms/iseries/setup.c:661:6: warning: symbol 'iSeries_early_setup' was not declared. Should it be static? Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-03[POWERPC] iSeries: Declare iSeries_pci_final_fixup in pci.hStephen Rothwell
Fixes sparse warning: arch/powerpc/platforms/iseries/pci.c:169:13: warning: symbol 'iSeries_pci_final_fixup' was not declared. Should it be static? Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-12-03[POWERPC] iSeries: Mark two functions __initStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] iSeries: Fix ref counting in vio setupStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-11-08[POWERPC] iSeries_init_IRQ non-PCI tidyStephen Rothwell
ppc_md.init_IRQ is not called if it is NULL, so we don't need an empty routine in the non PCI case. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-10-17[POWERPC] Fix iSeries_hpte_insert prototypeStephen Rothwell
Commit 1189be6508d45183013ddb82b18f4934193de274 ([POWERPC] Use 1TB segments) added an argument to hpte_insert. Also make iSeries_hpte_insert static. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-10-17[POWERPC] Fix copyright symbolStephen Rothwell
It seems to have been munged by patchwork. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-10-12[POWERPC] Use 1TB segmentsPaul Mackerras
This makes the kernel use 1TB segments for all kernel mappings and for user addresses of 1TB and above, on machines which support them (currently POWER5+, POWER6 and PA6T). We detect that the machine supports 1TB segments by looking at the ibm,processor-segment-sizes property in the device tree. We don't currently use 1TB segments for user addresses < 1T, since that would effectively prevent 32-bit processes from using huge pages unless we also had a way to revert to using 256MB segments. That would be possible but would involve extra complications (such as keeping track of which segment size was used when HPTEs were inserted) and is not addressed here. Parts of this patch were originally written by Ben Herrenschmidt. Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-10-11[POWERPC] iSeries: Move viodasd probingStephen Rothwell
This way we only have entries in the device tree for disks that actually exist. A slight complication is that disks may be attached to LPARs at runtime. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-10-11[POWERPC] iSeries: Move detection of virtual tapesStephen Rothwell
Now we will only have entries in the device tree for the actual existing devices (including their OS/400 properties). This way viotape.c gets all the information about the devices from the device tree. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-10-11[POWERPC] iSeries: Move detection of virtual cdromsStephen Rothwell
Now we will only have entries in the device tree for the actual existing devices (including their OS/400 properties). This way viocd.c gets all the information about the devices from the device tree. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-10-11[POWERPC] Remove more iSeries-specific stuff from vio.cStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-10-11[POWERPC] Remove iSeries_vio_devStephen Rothwell
It was only being used to carry around dma_iommu_ops and vio_iommu_table which we can use directly instead. This also means that vio_bus_device doesn't need to refer to them either. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-10-09[POWERPC] iSeries: Correct missing newline in printkStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-10-03[POWERPC] Enable tickless idle and high res timers for powerpcTony Breeds
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14[POWERPC] Invert null match behaviour for irq_hostsMichael Ellerman
Currently if you don't specify a match callback for your irq_host it's assumed you match everything. This is a kind of opt-out approach, and turns out to be the exception rather than the rule. So change the semantics to be opt-in, ie. you don't match anything unless you provide a match callback. This in itself isn't very useful, but will allow us to provide a default match implementation in a subsequent patch. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14[POWERPC] Add an optional device_node pointer to the irq_hostMichael Ellerman
The majority of irq_host implementations (3 out of 4) are associated with a device_node, and need to stash it somewhere. Rather than having it somewhere different for each host, add an optional device_node pointer to the irq_host structure. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-08-22[POWERPC] Exception numbers are not relevant to iSeriesStephen Rothwell
so remove them from the macros. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>