android_kernel_xiaomi_sm7250/arch/sparc64/kernel
David S. Miller 085ae41f66 [PATCH] Make sparc64 use setup-res.c
There were three changes necessary in order to allow
sparc64 to use setup-res.c:

1) Sparc64 roots the PCI I/O and MEM address space using
   parent resources contained in the PCI controller structure.
   I'm actually surprised no other platforms do this, especially
   ones like Alpha and PPC{,64}.  These resources get linked into the
   iomem/ioport tree when PCI controllers are probed.

   So the hierarchy looks like this:

   iomem --|
	   PCI controller 1 MEM space --|
				        device 1
					device 2
					etc.
	   PCI controller 2 MEM space --|
				        ...
   ioport --|
            PCI controller 1 IO space --|
					...
            PCI controller 2 IO space --|
					...

   You get the idea.  The drivers/pci/setup-res.c code allocates
   using plain iomem_space and ioport_space as the root, so that
   wouldn't work with the above setup.

   So I added a pcibios_select_root() that is used to handle this.
   It uses the PCI controller struct's io_space and mem_space on
   sparc64, and io{port,mem}_resource on every other platform to
   keep current behavior.

2) quirk_io_region() is buggy.  It takes in raw BUS view addresses
   and tries to use them as a PCI resource.

   pci_claim_resource() expects the resource to be fully formed when
   it gets called.  The sparc64 implementation would do the translation
   but that's absolutely wrong, because if the same resource gets
   released then re-claimed we'll adjust things twice.

   So I fixed up quirk_io_region() to do the proper pcibios_bus_to_resource()
   conversion before passing it on to pci_claim_resource().

3) I was mistakedly __init'ing the function methods the PCI controller
   drivers provide on sparc64 to implement some parts of these
   routines.  This was, of course, easy to fix.

So we end up with the following, and that nasty SPARC64 makefile
ifdef in drivers/pci/Makefile is finally zapped.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-08 14:57:25 -07:00
..
auxio.c [SPARC64]: Get rid of fast IRQ feature. 2005-06-27 17:04:45 -07:00
binfmt_aout32.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
binfmt_elf32.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
central.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
chmc.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cpu.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
devices.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dtlb_backend.S [SPARC64]: Typo in dtlb_backend.S, _PAGE_SZ4M --> _PAGE_SZ4MB 2005-07-08 13:33:10 -07:00
dtlb_base.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dtlb_prot.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ebus.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
entry.S [SPARC64]: Do not expand CHEETAH_LOG_ERROR 3 times. 2005-08-30 15:11:52 -07:00
etrap.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
head.S [SPARC64]: Kill BRANCH_IF_ANY_CHEETAH() from copy page. 2005-08-30 11:26:15 -07:00
idprom.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
init_task.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ioctl32.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
iommu_common.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
iommu_common.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
irq.c [SPARC64]: Privatize sun5_timer. 2005-07-24 19:36:13 -07:00
isa.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
itlb_base.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
kprobes.c [PATCH] Kprobes: prevent possible race conditions sparc64 changes 2005-09-07 16:58:00 -07:00
Makefile [SPARC64]: Move kernel unaligned trap handlers into assembler file. 2005-08-19 15:55:33 -07:00
module.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci_common.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci_impl.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci_iommu.c [SPARC64]: More fully work around Spitfire Errata 51. 2005-08-29 12:46:22 -07:00
pci_psycho.c [PATCH] Make sparc64 use setup-res.c 2005-09-08 14:57:25 -07:00
pci_sabre.c [PATCH] Make sparc64 use setup-res.c 2005-09-08 14:57:25 -07:00
pci_schizo.c [PATCH] Make sparc64 use setup-res.c 2005-09-08 14:57:25 -07:00
pci.c [PATCH] Make sparc64 use setup-res.c 2005-09-08 14:57:25 -07:00
power.c [PATCH] Don't export machine_restart, machine_halt, or machine_power_off. 2005-07-26 14:35:42 -07:00
process.c [SPARC64]: More fully work around Spitfire Errata 51. 2005-08-29 12:46:22 -07:00
ptrace.c [SPARC64]: Add syscall auditing support. 2005-07-10 19:29:45 -07:00
rtrap.S [SPARC64]: Eliminate irq_cpustat_t. 2005-08-29 22:46:43 -07:00
sbus.c [SPARC64]: More fully work around Spitfire Errata 51. 2005-08-29 12:46:22 -07:00
semaphore.c [SPARC64]: Avoid membar instructions in delay slots. 2005-06-27 15:42:04 -07:00
setup.c [SPARC64]: Eliminate irq_cpustat_t. 2005-08-29 22:46:43 -07:00
signal32.c [SPARC64]: More fully work around Spitfire Errata 51. 2005-08-29 12:46:22 -07:00
signal.c [PATCH] convert signal handling of NODEFER to act like other Unix boxes. 2005-08-29 10:03:11 -07:00
smp.c [SPARC64]: More fully work around Spitfire Errata 51. 2005-08-29 12:46:22 -07:00
sparc64_ksyms.c [SPARC]: Kill io_remap_page_range() 2005-09-01 21:51:26 -07:00
starfire.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sunos_ioctl32.c [SPARC64]: Fix set/get MTU cases in sunos_ioctl() 2005-09-06 20:12:15 -07:00
sys32.S [SPARC]: Add ioprio system call support. 2005-07-10 15:11:45 -07:00
sys_sparc32.c [PATCH] remove duplicated sys_open32() code from 64bit archs 2005-09-07 16:57:43 -07:00
sys_sparc.c [PATCH] Avoiding mmap fragmentation 2005-06-21 18:46:16 -07:00
sys_sunos32.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
systbls.S [SPARC]: Add inotify syscall entries. 2005-07-27 14:14:39 -07:00
time.c [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
trampoline.S [SPARC64]: Avoid membar instructions in delay slots. 2005-06-27 15:42:04 -07:00
traps.c [SPARC64]: Revamp Spitfire error trap handling. 2005-08-29 12:45:11 -07:00
ttable.S [SPARC64]: Revamp Spitfire error trap handling. 2005-08-29 12:45:11 -07:00
una_asm.S [SPARC64]: Move kernel unaligned trap handlers into assembler file. 2005-08-19 15:55:33 -07:00
unaligned.c [SPARC64]: Revamp Spitfire error trap handling. 2005-08-29 12:45:11 -07:00
us2e_cpufreq.c [SPARC64]: Fix 2 bugs in cpufreq drivers. 2005-08-18 14:35:38 -07:00
us3_cpufreq.c [SPARC64]: Fix 2 bugs in cpufreq drivers. 2005-08-18 14:35:38 -07:00
vmlinux.lds.S [PATCH] Kprobes: prevent possible race conditions sparc64 changes 2005-09-07 16:58:00 -07:00
winfixup.S [SPARC64]: Revamp Spitfire error trap handling. 2005-08-29 12:45:11 -07:00