summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel
Commit message (Collapse)AuthorAgeFilesLines
* [SPARC64]: Fix section mismatch warnings in arch/sparc64/kernel/prom.cDavid S. Miller2007-05-071-12/+13
| | | | | | The IRQ translation init routines should all be __init. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Fix section mismatch warnings in arch/sparc64/kernel/pci.cDavid S. Miller2007-05-071-14/+14
| | | | | | | | apb_calc_first_last(), apb_fake_ranges(), pci_of_scan_bus(), of_scan_pci_bridge(), pci_of_scan_bus(), and pci_scan_one_pbm() should all be __devinit. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Fix section mismatch warnings in arch/sparc64/kernel/console.cDavid S. Miller2007-05-071-3/+3
| | | | | | probe_other_fhcs() and central_probe() should be __init Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: SUN4U PCI-E controller support.David S. Miller2007-05-066-22/+534
| | | | | | | | | | | | | | | | | | | | | Some minor refactoring in the generic code was necessary for this: 1) This controller requires 8-byte access to the interrupt map and clear register. They are 64-bits on all the other SBUS and PCI controllers anyways, so this was easy to cure. 2) The IMAP register has a different layout and some bits that we need to preserve, so use a read/modify/write when making changes to the IMAP register in generic code. 3) Flushing the entire IOMMU TLB is best done with a single write to a register on this PCI controller, add a iommu->iommu_flushinv for this. Still lacks MSI support, that will come later. Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6Linus Torvalds2007-05-051-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (231 commits) [PATCH] i386: Don't delete cpu_devs data to identify different x86 types in late_initcall [PATCH] i386: type may be unused [PATCH] i386: Some additional chipset register values validation. [PATCH] i386: Add missing !X86_PAE dependincy to the 2G/2G split. [PATCH] x86-64: Don't exclude asm-offsets.c in Documentation/dontdiff [PATCH] i386: avoid redundant preempt_disable in __unlazy_fpu [PATCH] i386: white space fixes in i387.h [PATCH] i386: Drop noisy e820 debugging printks [PATCH] x86-64: Fix allnoconfig error in genapic_flat.c [PATCH] x86-64: Shut up warnings for vfat compat ioctls on other file systems [PATCH] x86-64: Share identical video.S between i386 and x86-64 [PATCH] x86-64: Remove CONFIG_REORDER [PATCH] x86-64: Print type and size correctly for unknown compat ioctls [PATCH] i386: Remove copy_*_user BUG_ONs for (size < 0) [PATCH] i386: Little cleanups in smpboot.c [PATCH] x86-64: Don't enable NUMA for a single node in K8 NUMA scanning [PATCH] x86: Use RDTSCP for synchronous get_cycles if possible [PATCH] i386: Add X86_FEATURE_RDTSCP [PATCH] i386: Implement X86_FEATURE_SYNC_RDTSC on i386 [PATCH] i386: Implement alternative_io for i386 ... Fix up trivial conflict in include/linux/highmem.h manually. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * [PATCH] x86: Allow percpu variables to be page-alignedJeremy Fitzhardinge2007-05-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's allow page-alignment in general for per-cpu data (wanted by Xen, and Ingo suggested KVM as well). Because larger alignments can use more room, we increase the max per-cpu memory to 64k rather than 32k: it's getting a little tight. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Andi Kleen <ak@suse.de> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
* | MSI: arch must connect the irq and the msi_descMichael Ellerman2007-05-022-4/+4
|/ | | | | | | | | | | | | | | | | | | | set_irq_msi() currently connects an irq_desc to an msi_desc. The archs call it at some point in their setup routine, and then the generic code sets up the reverse mapping from the msi_desc back to the irq. set_irq_msi() should do both connections, making it the one and only call required to connect an irq with it's MSI desc and vice versa. The arch code MUST call set_irq_msi(), and it must do so only once it's sure it's not going to fail the irq allocation. Given that there's no need for the arch to return the irq anymore, the return value from the arch setup routine just becomes 0 for success and anything else for failure. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [SPARC64]: Convert PCI over to generic struct iommu/strbuf.David S. Miller2007-04-265-61/+59
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Convert SBUS over to generic iommu/strbuf structs.David S. Miller2007-04-261-97/+132
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Consolidate {sbus,pci}_iommu_arena.David S. Miller2007-04-263-14/+8
| | | | | | Move to asm-sparc64/iommu.h and rename to plain "iommu_arena". Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: constify some paramaters of OF routinesStephen Rothwell2007-04-261-4/+7
| | | | | | | | This starts bringing the PowerPC and Sparc64 implemetations back closer together. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Fix PCI rework to adhere to of_get_property() const return.David S. Miller2007-04-265-12/+12
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Make sure pbm->prom_node is setup easly enough in psycho.cDavid S. Miller2007-04-261-2/+2
| | | | | | It needs to be ready before we invoke pci_determine_mem_io_space(). Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Force dummy host controller onto bus zero.David S. Miller2007-04-261-8/+10
| | | | | | | | | | | | | | | | | | This helps deal with the invisible bridge that sits between the host controller and the top-most visisble PCI devices on hypervisor systems. For example, on T1000 the bus-range property says 2 --> 4 and so there is a PCI express bridge at bus 2, devfn 0, etc. So if we don't force the dummy host controller to bus zero, we'll try to create two devices with the same domain/bus/devfn triplet. Also, add some more log diagnostics to make debugging stuff like this easyer. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Add dummy host controller to root of all PCI domains.David S. Miller2007-04-266-30/+129
| | | | | | | We fake up a dummy one in all cases because that is the simplest thing to do and it happens to be necessary for hypervisor systems. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Const'ify pci_iommu_ops.David S. Miller2007-04-263-4/+4
| | | | | | | Based upon a similar patch for x86_64 written by Stephen Hemminger. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Kill pbm->pci_first_slot.David S. Miller2007-04-265-14/+2
| | | | | | Set but never used. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Kill pci_controller->pbms_same_domainDavid S. Miller2007-04-264-66/+12
| | | | | | | | We don't do the "Simba APB is a PBM" bogosity for Sabre controllers any longer, so this pbms_same_domain thing is no longer necessary. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Kill pci_controller->base_address_update().David S. Miller2007-04-264-182/+0
| | | | | | Implemented but never actually used. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Kill pci_controller->resource_adjust()David S. Miller2007-04-265-49/+12
| | | | | | | All the implementations can be identical and generic, so no need for controller specific methods. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Kill PBM ranges software state.David S. Miller2007-04-264-32/+15
| | | | | | | It is only used in one spot and we can just fetch the OF property right there. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Kill PBM intmap software state.David S. Miller2007-04-263-28/+0
| | | | | | Set but never used. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Consolidate PCI mem/io resource determination.David S. Miller2007-04-266-218/+103
| | | | | | It can be done for every PCI configuration using OF properties. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Fix sabre pci controllers with new probing scheme.David S. Miller2007-04-263-284/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SIMBA APB bridge is strange, it is a PCI bridge but it lacks some standard OF properties, in particular it lacks a 'ranges' property. What you have to do is read the IO and MEM range registers in the APB bridge to determine the ranges handled by each bridge. So fill in the bus resources by doing that. Since we now handle this quirk in the generic PCI and OF device probing layers, we can flat out eliminate all of that code from the sabre pci controller driver. In fact we can thus eliminate completely another quirk of the sabre driver. It tried to make the two APB bridges look like PBMs but that makes zero sense now (and it's questionable whether it ever made sense). So now just use pbm_A and probe the whole PCI hierarchy using that as the root. This simplification allows many future cleanups to occur. Also, I've found yet another quirk that needs to be worked around while testing this. You can't use the 'class-code' OF firmware property, especially for IDE controllers. We have to read the value out of PCI config space or else we'll see the value the device was showing before it was programmed into native mode. I'm starting to think it might be wise to just read all of the values out of PCI config space instead of using the OF properties. :-/ Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Fix obppath pci device sysfs creation.David S. Miller2007-04-261-0/+3
| | | | | | | Need to traverse recursively down child busses else we only get the file created under devices at the top-level. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Minor cleanups to schizo pci controller driver.David S. Miller2007-04-261-79/+31
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Internalize pci_memspace_mask.David S. Miller2007-04-263-1/+3
| | | | | | | | | The only user was bus_dvma_to_mem() which is no longer used by any driver, so kill that, and the export of pci_memspace_mask. The only user now is the PCI mmap support code. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Probe PCI bus using OF device tree.David S. Miller2007-04-268-1039/+409
| | | | | | | | | Almost entirely taken from the 64-bit PowerPC PCI code. This allowed to eliminate a ton of cruft from the sparc64 PCI layer. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64] isa: Convert to use pci_device_to_OF_node().David S. Miller2007-04-261-32/+4
| | | | | | | Also, do not try to compute resources by hand, instead use the pre-computed ones in the of_device. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64] ebus: Convert to use pci_device_to_OF_node().David S. Miller2007-04-261-9/+3
| | | | | | | Also, we don't need to store or use the PBM so kill that from the linux_ebus. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Use strcasecmp for OFW property name comparisons.David S. Miller2007-04-261-2/+2
| | | | | | | | This allows us to simplify sharing code with powerpc which has properties that have various forms of capitalization when on the sparc64 side the property is all lower-case. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC/64]: constify of_get_property returnStephen Rothwell2007-04-261-1/+1
| | | | | | | Finally, we actually change the functions themselves. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: constify of_get_property return: arch/sparc64Stephen Rothwell2007-04-2610-42/+44
| | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Small cleanups time.cTony Breeds2007-04-261-11/+6
| | | | | | | | | - Removes days_in_mo[], as it's almost identical to month_days[] - Use the leapyear() macro - Line length wrapping. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Fix sparc64_next_event() error return.David S. Miller2007-04-261-1/+1
| | | | | | | | It should return an error code not a boolean. Based upon an hpet timer fix by Thomas Gleixner. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Add clocksource/clockevents support.David S. Miller2007-04-262-216/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'd like to thank John Stul and others for helping me along the way. A lot of cleanups fell out of this. For example, the get_compare() tick_op was totally unused, so was deleted. And the most often used tick_op members were grouped together for cache-friendlyness. The sparc64 TSC is given to the kernel as a one-shot timer. tick_ops->init_timer() simply turns off the privileged bit in the tick register (when possible), and disables the interrupt by setting bit 63 in the compare register. The ->disable_irq() op also sets this bit. tick_ops->add_compare() is changed to: 1) Add the given delta to "tick" not to "compare" 2) Return a boolean which, if true, means that the tick value read after writing the compare value was found to have incremented past the initial tick value. This mirrors logic used in the HPET driver's ->next_event() method. Each tick_ops implementation also now provides a name string. And we feed this into the clocksource and clockevents layers. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Add tick_nohz_{stop,restart}_sched_tick() calls to cpu_idle().David S. Miller2007-04-261-6/+9
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Unify timer interrupt handler.David S. Miller2007-04-264-141/+21
| | | | | | | | | Things were scattered all over the place, split between SMP and non-SMP. Unify it all so that dyntick support is easier to add. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Synchronize RTC clock via timer just like x86.David S. Miller2007-04-261-18/+48
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Fix inline directive in pci_iommu.cTom "spot" Callaway2007-04-131-1/+1
| | | | | | | | | While building a test kernel for the new esp driver (against git-current), I hit this bug. Trivial fix, put the inline declaration in the right place. :) Signed-off-by: Tom "spot" Callaway <tcallawa@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Fix arg passing to compat_sys_ipc().David S. Miller2007-04-132-2/+1
| | | | | | | | | Do not sign extend args using the sys32_ipc stub, that is buggy and unnecessary. Based upon an excellent report by Mikael Pettersson. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Fix section mismatch warnings in pci.c and pcic.cRobert Reif2007-04-121-2/+2
| | | | | | | | Fix section mismatch in arch/sparc/kernel/pcic.c and arch/sparc64/kernel/pci.c. Signed-off-by: Robert Reif <reif@earthlink.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: avoid CHILD_MAX and OPEN_MAX constantsRoland McGrath2007-04-121-2/+2
| | | | | | | | | | | | | | | | I don't figure anyone really cares about SunOS syscall emulation, and I certainly don't. But I'm getting rid of uses of the OPEN_MAX and CHILD_MAX compile-time constant, and these are almost the only ones. OPEN_MAX is a bogus constant with no meaning about anything. The RLIMIT_NOFILE resource limit is what sysconf (_SC_OPEN_MAX) actually wants to return. The CHILD_MAX cases weren't actually using anything I want to get rid of, but I noticed that they are there and are wrong too. The CHILD_MAX value is not really unlimited as a -1 return from sysconf indicates. The RLIMIT_NPROC resource limit is what sysconf (_SC_CHILD_MAX) wants to return. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Fix SBUS IOMMU allocation code.David S. Miller2007-04-111-328/+232
| | | | | | | | | | | | | | | | There are several IOMMU allocator bugs. Instead of trying to fix this overly complicated code, just mirror the PCI IOMMU arena allocator which is very stable and well stress tested. I tried to make the code as identical as possible so we can switch sun4u PCI and SBUS over to a common piece of IOMMU code. All that will be need are two callbacks, one to do a full IOMMU flush and one to do a streaming buffer flush. This patch gets rid of a lot of hangs and mysterious crashes on SBUS sparc64 systems, at least for me. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: store-init needs trailing membar.David S. Miller2007-03-191-0/+1
| | | | | | | | | | | | | | | | The manual says that it is required and we actually have crash reports where loads see stale data due to not having membars here. In one case the networking does: memset(skb, 0, offsetof(struct sk_buff, truesize)); and then some code later checks skb->nohdr for zero, but it's still the value that was there before the memset(). Note that arch/sparc64/lib/xor.S already got this right. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Get DEBUG_PAGEALLOC working again.David S. Miller2007-03-161-1/+7
| | | | | | | | | | | | | We have to make sure to use base-pagesize TLB entries even during the early transition period where we need TLB miss handling but don't have the kernel page tables setup yet for the linear region. Also, it is necessary therefore to not use the 4MB TSB for these translations, and instead use the normal kernel TSB. This allows us to also get rid of the 4MB tsb for debug builds which shrinks the kernel a little bit. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Hook up missing syscalls.David S. Miller2007-03-121-2/+7
| | | | | | | | | | | | | | | sys_mbind sys_get_mempolicy sys_set_mempolicy sys_kexec_load sys_move_pages sys_getcpu sys_epoll_pwait This work is largely a result of David Woodhouse's most excellent missing syscalls patch. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: Fix atomicity of TIF update in flush_thread()Mathieu Desnoyers2007-03-101-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix atomicity of TIF update in flush_thread() for sparc64 Fixes correctly the race by using *_ti_thread_flag. Race : parent process executing : sys_ptrace() (lock_kernel()) (ptrace_get_task_struct(pid)) arch_ptrace() ptrace_detach() ptrace_disable(child); clear_singlestep(child); clear_tsk_thread_flag(child, TIF_SINGLESTEP); (which clears the TIF_SINGLESTEP flag atomically from a different process) (put_task_struct(child)) (unlock_kernel()) And at the same time, in the child process : sys_execve() do_execve() search_binary_handler() load_elf_binary() flush_old_exec() flush_thread() doing a non-atomic thread flag update Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Provide pci_device_to_OF_node() just like powerpc.David S. Miller2007-03-021-0/+8
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Handle unresolvable resources better in of_device.cDavid S. Miller2007-03-021-3/+0
| | | | | | Just leave them as zero if we couldn't calculate it. Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud