linux/drivers
Benjamin Herrenschmidt 3d5134ee83 [POWERPC] Rewrite IO allocation & mapping on powerpc64
This rewrites pretty much from scratch the handling of MMIO and PIO
space allocations on powerpc64.  The main goals are:

 - Get rid of imalloc and use more common code where possible
 - Simplify the current mess so that PIO space is allocated and
   mapped in a single place for PCI bridges
 - Handle allocation constraints of PIO for all bridges including
   hot plugged ones within the 2GB space reserved for IO ports,
   so that devices on hotplugged busses will now work with drivers
   that assume IO ports fit in an int.
 - Cleanup and separate tracking of the ISA space in the reserved
   low 64K of IO space. No ISA -> Nothing mapped there.

I booted a cell blade with IDE on PIO and MMIO and a dual G5 so
far, that's it :-)

With this patch, all allocations are done using the code in
mm/vmalloc.c, though we use the low level __get_vm_area with
explicit start/stop constraints in order to manage separate
areas for vmalloc/vmap, ioremap, and PCI IOs.

This greatly simplifies a lot of things, as you can see in the
diffstat of that patch :-)

A new pair of functions pcibios_map/unmap_io_space() now replace
all of the previous code that used to manipulate PCI IOs space.
The allocation is done at mapping time, which is now called from
scan_phb's, just before the devices are probed (instead of after,
which is by itself a bug fix). The only other caller is the PCI
hotplug code for hot adding PCI-PCI bridges (slots).

imalloc is gone, as is the "sub-allocation" thing, but I do beleive
that hotplug should still work in the sense that the space allocation
is always done by the PHB, but if you unmap a child bus of this PHB
(which seems to be possible), then the code should properly tear
down all the HPTE mappings for that area of the PHB allocated IO space.

I now always reserve the first 64K of IO space for the bridge with
the ISA bus on it. I have moved the code for tracking ISA in a separate
file which should also make it smarter if we ever are capable of
hot unplugging or re-plugging an ISA bridge.

This should have a side effect on platforms like powermac where VGA IOs
will no longer work. This is done on purpose though as they would have
worked semi-randomly before. The idea at this point is to isolate drivers
that might need to access those and fix them by providing a proper
function to obtain an offset to the legacy IOs of a given bus.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-14 22:29:56 +10:00
..
acorn
acpi Pull osi-now into release branch 2007-06-02 01:02:09 -04:00
amba
ata libata: limit post SRST nsect/lbal wait to ~100ms 2007-06-11 00:52:53 -04:00
atm [ATM]: Fix warning. 2007-06-03 18:08:44 -07:00
auxdisplay cfag12864bfb: Use sys_ instead of cfb_ framebuffer accessors 2007-06-01 08:18:28 -07:00
base firmware: remove orphaned Email 2007-06-08 12:41:08 -07:00
block loop: preallocate eight loop devices 2007-06-08 17:23:32 -07:00
bluetooth [Bluetooth] Always send HCI_Reset for Broadcom devices 2007-05-24 14:26:15 +02:00
cdrom potential parse error in ifdef part 3 2007-06-08 17:23:33 -07:00
char Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart 2007-06-11 11:39:05 -07:00
clocksource
connector
cpufreq Add suspend-related notifications for CPU hotplug 2007-05-09 12:30:56 -07:00
crypto [CRYPTO] geode: Fix in-place operations and set key 2007-05-24 21:23:24 +10:00
dio
dma [S390] Kconfig: unwanted menus for s390. 2007-05-10 15:46:07 +02:00
edac [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
eisa
fc4
firewire firewire: Change struct fw_cdev_iso_packet to not use bitfields. 2007-05-31 21:40:15 +02:00
firmware
hid USB HID: hiddev - fix race between hiddev_send_event() and hiddev_release() 2007-05-10 08:45:56 +02:00
hwmon hwmon/applesmc: Handle name file creation error and deletion 2007-05-27 22:17:43 +02:00
i2c [ARM] 4403/1: Make the PXA-I2C driver work with lockdep validator 2007-05-26 10:09:39 +01:00
ide ide: Add the MCP73/77 support to PATA driver 2007-06-08 15:14:32 +02:00
ieee1394 ieee1394: sbp2: offer SAM-conforming target port ID in sysfs 2007-05-31 21:40:13 +02:00
infiniband Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband 2007-06-11 15:46:08 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2007-06-13 14:09:39 -07:00
isdn isdn/diva: fix section mismatch 2007-06-08 17:23:33 -07:00
kvm kvm: fix section mismatch warning in kvm-intel.o 2007-06-01 08:18:30 -07:00
leds [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
macintosh [POWERPC] Don't allow PMAC_APM_EMU for 64-bit 2007-06-02 21:01:56 +10:00
mca mca: add integrated device bus matching 2007-05-09 12:30:49 -07:00
md md: fix bug with linear hot-add and elsewhere 2007-05-23 20:14:14 -07:00
media V4L/DVB (5751): Ivtv: fix ia64 printk format warnings. 2007-06-08 08:54:41 -03:00
message Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2007-05-29 13:39:52 -07:00
mfd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2007-06-04 13:27:33 -07:00
misc Pull now into release branch 2007-06-02 00:48:48 -04:00
mmc mmc: get back read-only switch function 2007-06-13 19:11:20 +02:00
mtd Merge git://git.infradead.org/mtd-2.6 2007-06-04 17:54:09 -07:00
net Merge branch 'master' into upstream-fixes 2007-06-12 22:34:34 -04:00
nubus
oprofile Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
parisc
parport parport_pc needs dma-mapping.h 2007-05-16 21:19:15 -07:00
pci [POWERPC] Rewrite IO allocation & mapping on powerpc64 2007-06-14 22:29:56 +10:00
pcmcia at91: fix enable/disable_irq_wake symmetry in pcmcia driver 2007-05-31 07:58:13 -07:00
pnp [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
ps3
rapidio
rtc RTC: use fallback IRQ if PNP tables don't provide one 2007-06-01 08:18:29 -07:00
s390 [S390] cio: deregister ccw device when pgid disband failed 2007-05-31 17:38:14 +02:00
sbus [SPARC]: Missing #include <linux/mm.h> in drivers/sbus/char/flash.c 2007-05-31 01:52:53 -07:00
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2007-06-04 13:31:39 -07:00
serial [ARM] Fix 4417/1: Serial: Fix AMBA drivers locking 2007-06-05 19:39:49 +01:00
sh
sn
spi SPI dynamic busid generation bugfix 2007-06-04 13:25:09 -07:00
tc potential parse error in ifdef part 3 2007-06-08 17:23:33 -07:00
telephony [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
usb OHCI: Fix machine check in ohci_hub_status_data 2007-06-08 16:24:31 -07:00
video [VIDEO] sunxvr500fb: Fix pseudo_palette array size 2007-06-05 13:15:26 -07:00
w1 [S390] Kconfig: menus with depends on HAS_IOMEM. 2007-05-10 15:46:07 +02:00
zorro
Kconfig
Makefile Merge branch 'juju' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2007-05-10 13:30:08 -07:00