summaryrefslogtreecommitdiffstats
path: root/arch/sparc
Commit message (Collapse)AuthorAgeFilesLines
* [SPARC]: Fix regression in sys_getdomainname()Andy Walker2006-09-181-4/+6
| | | | | | | | This patch corrects the buffer length checking in the sys_getdomainname() implementation for sparc/sparc64. Signed-off-by: Andy Walker <andy@puszczka.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [PATCH] IA64,sparc: local DoS with corrupted ELFsKirill Korotaev2006-09-081-12/+15
| | | | | | | | | | | | | | | | | | | | | This prevents cross-region mappings on IA64 and SPARC which could lead to system crash. They were correctly trapped for normal mmap() calls, but not for the kernel internal calls generated by executable loading. This code just moves the architecture-specific cross-region checks into an arch-specific "arch_mmap_check()" macro, and defines that for the architectures that needed it (ia64, sparc and sparc64). Architectures that don't have any special requirements can just ignore the new cross-region check, since the mmap() code will just notice on its own when the macro isn't defined. Signed-off-by: Pavel Emelianov <xemul@openvz.org> Signed-off-by: Kirill Korotaev <dev@openvz.org> Acked-by: David Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> [ Cleaned up to not affect architectures that don't need it ] Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [SPARC]: Small smp cleanup.Krzysztof Helt2006-08-263-4/+1
| | | | | | | It moves the smp_procesors_ready variable to sun4d_smp.c only. Signed-off-by: Krzysztof Helt (krzysztof.h1@wp.pl) Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: enabling of the 2nd CPU in 2.6.18-rc4Krzysztof Helt2006-08-261-2/+2
| | | | | | | | smp_setup_cpu_possible_map() needs to run after paging_init() so that the in-kernel device tree is setup. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Defer clock_probe to fs_initcall()Bob Breuer2006-07-271-32/+42
| | | | | | | | | From: Bob Breuer <breuerr@mc.net> That way all the of_driver bits will be ready. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Fix length parameter verification in sys_getdomainname().David S. Miller2006-07-211-9/+9
| | | | | | Found by scrashme. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Get sun4d SMP building again.Raymond Burns2006-07-212-78/+121
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Do not call sun4m_irq_rotate on sun4d.Raymond Burns2006-07-211-1/+1
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Simplify and correct __cpu_find_by()David S. Miller2006-07-211-18/+7
| | | | | | | | | By using for_each_node_by_type(). Also, correct a spurioud test in check_cpu_node() on sparc64. It is only called with nodes that have device_type "cpu". Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Initialize iounit spinlock in iounit_init().Raymond Burns2006-07-211-0/+1
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Fix initialization of sun4d SBUS interrupts.David S. Miller2006-07-211-3/+31
| | | | | | | | | 1) Explicitly traverse to the root looking for the "sbi". 2) Grab the "board#" property from the sbi's parent and verify that this parent is an "io-unit" node. 3) Skip IRQ initialization when device lacks "reg" property. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Fix property name acquisition in prom.cBob Breuer2006-07-211-3/+6
| | | | | | | | | On sparc32 the prom_{first,next}prop() interfaces work a little differently. The buffer argument is ignored on sparc32 and the firmware just returns a raw pointer to the property name. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Kill prom_getname, unused and not implemented properly.David S. Miller2006-07-212-19/+0
| | | | | | | The m68k port's sun3 asm/oplib.h had a stray reference too, so I killed that off as well. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Fix OF register translations under sub-PCI busses.David S. Miller2006-07-131-58/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is an implicit assumption in the code that ranges will translate to something that can fit in 2 32-bit cells, or a 64-bit value. For certain kinds of things below PCI this isn't necessarily true. Here is what the relevant OF device hierarchy looks like for one of the serial controllers on an Ultra5: Node 0xf005f1e0 ranges: 00000000.00000000.00000000.000001fe.01000000.00000000.01000000 01000000.00000000.00000000.000001fe.02000000.00000000.01000000 02000000.00000000.00000000.000001ff.00000000.00000001.00000000 03000000.00000000.00000000.000001ff.00000000.00000001.00000000 device_type: 'pci' model: 'SUNW,sabre' Node 0xf005f9d4 device_type: 'pci' model: 'SUNW,simba' Node 0xf0060d24 ranges: 00000010.00000000 82010810.00000000.f0000000 01000000 00000014.00000000 82010814.00000000.f1000000 00800000 name: 'ebus' Node 0xf0062dac reg: 00000014.003083f8.00000008 --> 0x1ff.f13083f8 device_type: 'serial' name: 'su' So the correct translation here is: 1) Match "su" register to second ranges entry of 'ebus', which translates into a PCI triplet "82010814.00000000.f1000000" of size 00800000, which gives us "82010814.00000000.f13083f8". 2) Pass-through "SUNW,simba" since it lacks ranges property 3) Match "82010814.00000000.f13083f8" to third ranges property of PCI controller node 'SUNW,sabre', and we arrive at the final physical MMIO address of "0x1fff13083f8". Due to the 2-cell assumption, we couldn't translate to a PCI 3-cell value, and we couldn't perform a pass-thru on it either. It was easiest to just stop splitting the ranges application operation between two methods, ->map and ->translate, and just let ->map do all the work. That way it would work purely on 32-bit cell arrays instead of having to "return" some value like a u64. It's still not %100 correct because the out-of-range check is still done using the 64 least significant bits of the range and address. But it does work for all the cases I've thrown at it so far. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC64]: of_device_register() error checking fixAndrew Morton2006-07-131-2/+4
| | | | | | | | | | device_create_file() can fail. This causes the sparc64 compile to fail when my fanatical __must_check patch is applied, due to -Werror. [ Added necessary identical fix for sparc32. -DaveM] Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [PATCH] tty: Remove include of screen_info.h from tty.hJon Smirl2006-07-101-1/+1
| | | | | | | | | | | | | | | | screen_info.h doesn't have anything to do with the tty layer and shouldn't be included by tty.h. This patches removes the include and modifies all users to directly include screen_info.h. struct screen_info is mainly used to communicate with the console drivers in drivers/video/console. Note that this patch touches every arch and I have no way of testing it. If there is a mistake the worst thing that will happen is a compile error. [akpm@osdl.org: fix arm build] [akpm@osdl.org: fix alpha build] Signed-off-by: Jon Smirl <jonsmir@gmail.com> Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] irq-flags: SPARC: Use the new IRQF_ constantsThomas Gleixner2006-07-026-17/+17
| | | | | | | | | | | Use the new IRQF_ constants and remove the SA_INTERRUPT define Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds2006-06-3038-38/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: Remove obsolete #include <linux/config.h> remove obsolete swsusp_encrypt arch/arm26/Kconfig typos Documentation/IPMI typos Kconfig: Typos in net/sched/Kconfig v9fs: do not include linux/version.h Documentation/DocBook/mtdnand.tmpl: typo fixes typo fixes: specfic -> specific typo fixes in Documentation/networking/pktgen.txt typo fixes: occuring -> occurring typo fixes: infomation -> information typo fixes: disadvantadge -> disadvantage typo fixes: aquire -> acquire typo fixes: mecanism -> mechanism typo fixes: bandwith -> bandwidth fix a typo in the RTC_CLASS help text smb is no longer maintained Manually merged trivial conflict in arch/um/kernel/vmlinux.lds.S
| * Remove obsolete #include <linux/config.h>Jörn Engel2006-06-3038-38/+0
| | | | | | | | | | Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* | [PATCH] zoned vm counters: conversion of nr_pagecache to per zone counterChristoph Lameter2006-06-301-1/+1
|/ | | | | | | | | | | | | | | | | | Currently a single atomic variable is used to establish the size of the page cache in the whole machine. The zoned VM counters have the same method of implementation as the nr_pagecache code but also allow the determination of the pagecache size per zone. Remove the special implementation for nr_pagecache and make it a zoned counter named NR_FILE_PAGES. Updates of the page cache counters are always performed with interrupts off. We can therefore use the __ variant here. Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [SPARC]: sparc32 side of of_device layer IRQ resolution.David S. Miller2006-06-291-7/+62
| | | | | | | | | | | | | | Happily, life is much simpler on 32-bit sparc systems. The "intr" property, preferred over the "interrupts" property is used-as. Some minor translations of this value happen on sun4d systems. The stage is now set to rewrite the sparc serial driver probing to use the of_driver framework, and then to convert all SBUS, EBUS, and ISA drivers in-kind so that we can nuke all those special bus frameworks. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Convert clock drivers to of_driver framework.David S. Miller2006-06-291-69/+40
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Add of_io{remap,unmap}().David S. Miller2006-06-291-0/+17
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Encode I/O space into resource flags on sparc32.David S. Miller2006-06-291-2/+2
| | | | | | | On sparc64 we don't need to do this because the resource values are large enough to encode the full physical address. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Beginnings of generic of_device framework.David S. Miller2006-06-291-2/+420
| | | | | | | | | | The idea is to fully construct the device register and interrupt values into these of_device objects, and convert all of SBUS, EBUS, ISA drivers to use this new stuff. Much ideas and code taken from Ben H.'s powerpc work. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Add of_n_{addr,size}_cells().David S. Miller2006-06-291-0/+30
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6Linus Torvalds2006-06-292-4/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: [PATCH] i386: export memory more than 4G through /proc/iomem [PATCH] 64bit Resource: finally enable 64bit resource sizes [PATCH] 64bit Resource: convert a few remaining drivers to use resource_size_t where needed [PATCH] 64bit resource: change pnp core to use resource_size_t [PATCH] 64bit resource: change pci core and arch code to use resource_size_t [PATCH] 64bit resource: change resource core to use resource_size_t [PATCH] 64bit resource: introduce resource_size_t for the start and end of struct resource [PATCH] 64bit resource: fix up printks for resources in misc drivers [PATCH] 64bit resource: fix up printks for resources in arch and core code [PATCH] 64bit resource: fix up printks for resources in pcmcia drivers [PATCH] 64bit resource: fix up printks for resources in video drivers [PATCH] 64bit resource: fix up printks for resources in ide drivers [PATCH] 64bit resource: fix up printks for resources in mtd drivers [PATCH] 64bit resource: fix up printks for resources in pci core and hotplug drivers [PATCH] 64bit resource: fix up printks for resources in networks drivers [PATCH] 64bit resource: fix up printks for resources in sound drivers [PATCH] 64bit resource: C99 changes for struct resource declarations Fixed up trivial conflict in drivers/ide/pci/cmd64x.c (the printk that was changed by the 64-bit resources had been deleted in the meantime ;)
| * [PATCH] 64bit resource: change pci core and arch code to use resource_size_tGreg Kroah-Hartman2006-06-271-1/+1
| | | | | | | | | | | | | | | | Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * [PATCH] 64bit resource: change resource core to use resource_size_tGreg Kroah-Hartman2006-06-271-2/+2
| | | | | | | | | | | | | | | | Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * [PATCH] 64bit resource: fix up printks for resources in arch and core codeGreg Kroah-Hartman2006-06-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed if we wish to change the size of the resource structures. Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com> and Andrew Morton. (tweaked by Andy Isaacson <adi@hexapodia.org>) Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Andy Isaacson <adi@hexapodia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | [PATCH] sparc: register_cpu() build fixAndrew Morton2006-06-291-1/+1
|/ | | | | | | | | arch/sparc/kernel/setup.c: In function 'topology_init': arch/sparc/kernel/setup.c:528: error: too many arguments to function 'register_cpu' Cc: William Lee Irwin III <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [SPARC]: Add iomap interfaces.David S. Miller2006-06-252-0/+50
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Add unique device_node IDs and a ".node" property.David S. Miller2006-06-251-18/+35
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Add of_set_property() interface.David S. Miller2006-06-251-0/+53
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Export x_bus_type to modules.David S. Miller2006-06-251-0/+2
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SBUS]: Rewrite and plug into of_device framework.David S. Miller2006-06-231-0/+85
| | | | | | | I severely apologize, I was still learning how to program in C when I wrote this stuff 10 years ago... Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Port of_device layer and make ebus use it.David S. Miller2006-06-233-1/+290
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Port sparc64 in-kernel device tree code to sparc32.David S. Miller2006-06-235-82/+563
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SBUS]: Start cleaning up generic sbus support layer.David S. Miller2006-06-231-1/+45
| | | | | | | In particular, move the IRQ probing out to sparc32/sparc64 arch specific code where it belongs. Signed-off-by: David S. Miller <davem@davemloft.net>
* [PATCH] sparc build breakageAl Viro2006-06-221-1/+1
| | | | | | | | | | | | rd_prompt et.al. depend on CONFIG_BLK_DEV_RAM, not CONFIG_BLK_INITRD; now that those are independent, setup.c blows with INITRD on and BLK_DEV_RAM off. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Cc: "David S. Miller" <davem@davemloft.net> Cc: William Lee Irwin III <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [SPARC]: Kill __irq_itoa().David S. Miller2006-06-205-32/+0
| | | | | | | | | | | | | | | | | | This ugly hack was long overdue to die. It was a way to print out Sparc interrupts in a more freindly format, since IRQ numbers were arbitrary opaque 32-bit integers which vectored into PIL levels. These 32-bit integers were not necessarily in the 0-->NR_IRQS range, but the PILs they vectored to were. The idea now is that we will increase NR_IRQS a little bit and use a virtual<-->real IRQ number mapping scheme similar to PowerPC. That makes this IRQ printing hack irrelevant, and furthermore only a handful of drivers actually used __irq_itoa() making it even less useful. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Fix iommu_flush_iotlb end addressBob Breuer2006-06-201-1/+2
| | | | | | | | | Fix the calculation of the end address when flushing iotlb entries to ram. This bug has been a cause of esp dma errors, and it affects HyperSPARC systems much worse than SuperSPARC systems. Signed-off-by: Bob Breuer <breuerr@mc.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Mark smp init functions as cpuinitBob Breuer2006-06-202-10/+5
| | | | | | | | Fix the smp related section mismatch warnings by marking the smp init functions as cpuinit. Signed-off-by: Bob Breuer <breuerr@mc.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Setup cpu_possible_mapBob Breuer2006-06-202-8/+24
| | | | | | | Setup cpu_possible_map so the secondary cpus will get started. Signed-off-by: Bob Breuer <breuerr@mc.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Add topology_init()Bob Breuer2006-06-201-1/+31
| | | | | | | | Fix a crash in SMP mode by adding the missing topology_init. Also makes /proc/cpuinfo backwards compatible with 2.4. Signed-off-by: Bob Breuer <breuerr@mc.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Migration cost tune up in sparc smp.Krzysztof Helt2006-06-101-0/+11
| | | | | | | | | This patch sets the max_cache_size value required to tune up scheduler in SMP systems. Otherwise, the calculated migration_cost is too high and task scheduling may lock up. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Add robust futex syscall entries.David S. Miller2006-05-211-1/+2
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Handle UNWIND_INFO properly.David S. Miller2006-05-121-0/+1
| | | | | | | | | For sparc32 we need R_SPARC_UA32 relocation support, for sparc64 we need the handle R_SPARC_DISP32 relocations. Based upon reports and initial patch by Martin Habets. Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: show device name in /proc/dvma_mapMartin Habets2006-05-071-0/+5
| | | | | | | | This patch will set the device name in a resource, which will be shown in /proc/dvma_map. Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SPARC]: Remove duplicate symbol exportsMartin Habets2006-05-071-13/+0
| | | | | | | | | | | | | | | | | | This patch resolves the following build warnings seen in 2.6.17-rc3: WARNING: vmlinux: 'sys_close' exported twice. Previous export was in vmlinux WARNING: vmlinux: 'memchr' exported twice. Previous export was in vmlinux WARNING: vmlinux: 'strstr' exported twice. Previous export was in vmlinux WARNING: vmlinux: 'strnlen' exported twice. Previous export was in vmlinux WARNING: vmlinux: 'strrchr' exported twice. Previous export was in vmlinux WARNING: vmlinux: 'strchr' exported twice. Previous export was in vmlinux WARNING: vmlinux: 'strcmp' exported twice. Previous export was in vmlinux WARNING: vmlinux: 'strncat' exported twice. Previous export was in vmlinux WARNING: vmlinux: 'strcat' exported twice. Previous export was in vmlinux WARNING: vmlinux: 'strncpy' exported twice. Previous export was in vmlinux WARNING: vmlinux: 'strcpy' exported twice. Previous export was in vmlinux Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>