aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
Commit message (Collapse)AuthorAgeFilesLines
* [POWERPC] Move MPIC smp routines into mpic.cMichael Ellerman2007-02-141-0/+21
| | | | | | | | Move a couple of MPIC smp routines into mpic.c, they're inside an SMP block in mpic.c - so they're still only built for SMP. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* Merge branch '83xx' into for_paulusKumar Gala2007-02-091-19/+59
|\
| * [POWERPC] 83xx: Add platform_device for USB DR peripheral driverLi Yang2007-02-081-19/+59
| | | | | | | | | | | | | | | | Add platform_device setup code for OTG/peripheral mode of 834x DR module. It is needed for USB client driver to work. Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | [POWERPC] QE: Rename ucc_slow_info.us_regs to ucc_slow_info.regsTimur Tabi2007-02-081-3/+3
|/ | | | | | | | | | | Rename the 'us_regs' field of the ucc_slow_info structure in ucc_slow.h to just 'regs'. The equivalent field in the ucc_fast_info structure is also called 'regs', so this patch makes them comparable, and makes the code a little easier to read, because there already is a 'us_regs' in another ucc_slow structure. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* [POWERPC] Assign all PCI busses on G3 Blue & WhitePavel Roskin2007-02-071-0/+2
| | | | | | | | | | | | | G3 Blue & White is misconfigured by default so that CardBus controllers in PCI slots don't work. The PCI bridge is programmed to only allow access to bus 1 but not higher busses. The patch forces the PCI busses to be reassigned if a Grackle controller is found and the machine identifies itself as "PowerMac1,1" Signed-off-by: Pavel Roskin <proski@gnu.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] cpm2: CPM2 interrupt controller fixVitaly Bordug2007-02-072-63/+89
| | | | | | | | | | | | This contains important fixes for the CPM2 PIC code. Eliminated CPM_IRQ_OFFSET, pulling the respective interrupt numbers from the interrupt mapping. Updated devicetree files to reflect that. Changed direct IC-related IO accesses to the IO accessors. Fixed all the sense values to keep coherency with ipic. In the current code, CPM2 stuff will have no IRQs and hence could be hardly usable. Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] MPIC: support more than 256 sourcesOlof Johansson2007-02-071-22/+42
| | | | | | | | | | | | | Allow more than the default 256 MPIC sources. Allocates a new flag (MPIC_LARGE_VECTORS) to be used by platform code when instantiating the mpic. I picked 11 bits worth right now since it would cover the number of sources on any hardware I have seen. It can always be increased later if needed. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] 8xx: powerpc port of core CPM PICVitaly Bordug2007-02-075-0/+1352
| | | | | | | | | | This covers common CPM access functions, CPM interrupt controller code, micropatch and a few compatibility things to kee the same driver base working with arch/ppc. This version is refined with all the comments (mostly PIC-related) addressed. Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] 8xx: platform related changes to the fsl_socVitaly Bordug2007-02-071-2/+272
| | | | | | | | | Added 8xx SoC peripherials: fec for Ethernet and smc for UARTs. Ordinary routines to extract values from the device tree and insert respective platform devices Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Remove fastcall function attributeKumar Gala2007-01-261-2/+2
| | | | | | fastcall is an x86 specific function attribute and has no business in ppc code Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* [POWERPC] 83xx: Return a point to the struct ipic from ipic_init()Kumar Gala2007-01-261-6/+9
| | | | | | | | | | | | It's useful to have access to struct ipic handle that just got created in ipic_init(). For example, if we want to setup an external IRQ with out a device node we need access ipic->irqhost to create the virtual to HW IRQ mapping and to set the IRQ sense. With this we can mimic the old sense array concept that existed in arch/ppc. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* [POWERPC] arch/powerpc/sysdev/cpm2_pic.c of_node_get cleanupMariusz Kozlowski2007-01-241-3/+1
| | | | | | | | | Remove redundant argument check for of_node_get(). It's ok to remove 'node' check because in real life cpm2_pic_init() never gets called with node == NULL. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] arch/powerpc/sysdev/qe_lib of_node_get cleanupMariusz Kozlowski2007-01-241-1/+1
| | | | | | | | | | No need for ?: as of_node_get() can handle NULL argument. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> arch/powerpc/sysdev/qe_lib/qe_ic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] arch/powerpc/sysdev/mpic.c of_node_get cleanupMariusz Kozlowski2007-01-241-1/+1
| | | | | | | No need for ?: because of_node_get() can handle NULL argument. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] arch/powerpc/sysdev/ipic.c of_node_get cleanupMariusz Kozlowski2007-01-241-1/+1
| | | | | | | No need for ?: because of_node_get() can handle NULL argument. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Fix cell's mmio nvram to properly parse device treeBenjamin Herrenschmidt2007-01-221-17/+23
| | | | | | | | | | | The mmio nvram driver (used by cell only atm) isn't properly parsing the device-tree, meaning that nvram isn't found correctly on the new Cell blades. It works ok for old blades where the nvram is at the root of the device tree but fails on Malta and CAB when it's hanging off axon. This fixes it by using the proper OF parsing functions. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Don't include powerpc/sysdev/rom.o for arch/ppc buildsGrant Likely2007-01-091-1/+1
| | | | | | | | | sysdev/rom.c is for arch/powerpc only. Don't compile it when building an arch/ppc kernel. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Sylvain Munaut <tnt@246tNt.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* PCI: Only check the HT capability bits in mpic.cMichael Ellerman2006-12-201-1/+1
| | | | | | | | | Only compare the exact HT capability bits against HT_CAPTYPE_IRQ, this is a little paranoid, but doesn't hurt. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge branch 'for_paulus' of ↵Paul Mackerras2006-12-111-1/+2
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc
| * [POWERPC] Only export __mtdcr/__mfdcr if CONFIG_PPC_DCR is setKumar Gala2006-12-101-1/+2
| | | | | | | | | | | | | | | | | | | | On 85xx we don't build in dcr support because the core doesn't implement the instructions. This caused problems when building an 85xx kernel. Additionally made it so we only build __mtdcr/__mfdcr if we are CONFIG_PPC_DCR_NATIVE. The 85xx build issue wasPointed out by Dai Haruki. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | [POWERPC] Remove old dcr.SBenjamin Herrenschmidt2006-12-111-39/+0
| | | | | | | | | | | | | | | | When I renamed dcr.S to dcr_low.S (and added dcr.c) it looks like the old dcr.S file didn't properly get removed. This fixes it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] qe_ic: Do a sync when masking interruptsScott Wood2006-12-081-30/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch causes a sync do be done after masking a QE interrupt, to ensure that the masking has completed before interrupts are enabled. This allows the masking of the cascade IRQ to be removed without causing spurious interrupts. The mask_and_ack function is also removed and set to the mask function, as the two are identical. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] powerpc: fix build error in rom.cGeoff Levand2006-12-081-0/+1
|/ | | | | | | | | | Add missing include in rom.c. Fixes this build error when CONFIG_MTD=y: arch/powerpc/sysdev/rom.c:26: error: implicit declaration of function of_platform_device_create Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Replace kmalloc+memset with kzallocYan Burman2006-12-042-6/+2
| | | | | | | Replace kmalloc+memset with kzalloc. Signed-off-by: Yan Burman <burman.yan@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Move MPC52xx PIC driver into arch/powerpc/platforms/52xxGrant Likely2006-12-042-539/+0
| | | | | | | | No other chips use this device, it belongs in a 52xx-specific path. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Add of_platform support for ROM devicesVitaly Wool2006-12-042-0/+32
| | | | | | | | | | This adds support for flash device descriptions to the OF device tree. It's inspired by and partially borrowed from Sergei's patch "[RFC] Adding MTD to device tree.patch". Signed-off-by: Vitaly Wool <vwool@ru.mvista.com> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Don't compile arch/powerpc mpc52xx_pic driver for ARCH=ppcGrant Likely2006-12-041-1/+1
| | | | | | | arch/powerpc/sysdev/mpc52xx_pic.c breaks the ppc build Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Make pci_read_irq_line the default on mpc7448hpc2 boardZang Roy-r619112006-12-041-6/+42
| | | | | | | | | The following patch adds a tsi108/9 pci interrupt controller host. On mpc7448hpc2 board, pci_irq_fixup function is removed, which makes the pci_read_irq_line be the default pci irq fixup. Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Cell iommu supportJeremy Kerr2006-12-041-3/+0
| | | | | | | | | | | | | | This patch adds full cell iommu support (and iommu disabled mode). It implements mapping/unmapping of iommu pages on demand using the standard powerpc iommu framework. It also supports running with iommu disabled for machines with less than 2GB of memory. (The default is off in that case, though it can be forced on with the kernel command line option iommu=force). Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Refactor 64 bits DMA operationsBenjamin Herrenschmidt2006-12-041-22/+9
| | | | | | | | | | | | | | | | | This patch completely refactors DMA operations for 64 bits powerpc. 32 bits is untouched for now. We use the new dev_archdata structure to add the dma operations pointer and associated data to struct device. While at it, we also add the OF node pointer and numa node. In the future, we might want to look into merging that with pci_dn as well. The old vio, pci-iommu and pci-direct DMA ops are gone. They are now replaced by a set of generic iommu and direct DMA ops (non PCI specific) that can be used by bus types. The toplevel implementation is now inline. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Improve MPIC driver auto-configuration from DTBenjamin Herrenschmidt2006-12-041-13/+37
| | | | | | | | | | | | This patch applies on top of the MPIC DCR support. It makes the MPIC driver capable of a lot more auto-configuration based on the device-tree, for example, it can retreive it's own physical address if not passed as an argument, find out if it's DCR or MMIO mapped, and set the BIG_ENDIAN flag automatically in the presence of a "big-endian" property in the device-tree node. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Support for DCR based MPICBenjamin Herrenschmidt2006-12-041-36/+100
| | | | | | | | | | | | | | | | This patch implements support for DCR based MPIC implementations. Such implementations have the MPIC_USES_DCR flag set and don't use the phys_addr argument of mpic_alloc (they require a valid dcr mapping in the device node) This version of the patch can use a little bif of cleanup still (I can probably consolidate rb->dbase/doff, at least once I'm sure on how the hardware is actually supposed to work vs. possible simulator issues) and it should be possible to build a DCR-only version of the driver. I need to cleanup a bit the CONFIG_* handling for that and probably introduce CONFIG_MPIC_MMIO and CONFIG_MPIC_DCR. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Generic DCR infrastructureBenjamin Herrenschmidt2006-12-043-2/+177
| | | | | | | | | | | This patch adds new dcr_map/dcr_read/dcr_write accessors for DCRs that can be used by drivers to transparently address either native DCRs or memory mapped DCRs. The implementation for memory mapped DCRs is done after the binding being currently worked on for SLOF and the Axon chipset. This patch enables it for the cell native platform Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* Merge branch 'linux-2.6' into for-linusPaul Mackerras2006-12-049-16/+15
|\
| * [POWERPC] qe_lib: qe_issue_cmd writes wrong value to CECDRTimur Tabi2006-11-011-2/+1
| | | | | | | | | | | | | | | | | | Changed qe_issue_cmd() to write cmd_input to the CECDR unmodified. It was treating cmd_input as a virtual address and tried to convert it to a physical address. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * [POWERPC] Use 4kB iommu pages even on 64kB-page systemsLinas Vepstas2006-11-012-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 10Gigabit ethernet device drivers appear to be able to chew up all 256MB of TCE mappings on pSeries systems, as evidenced by numerous error messages: iommu_alloc failed, tbl c0000000010d5c48 vaddr c0000000d875eff0 npages 1 Some experimentation indicates that this is essentially because one 1500 byte ethernet MTU gets mapped as a 64K DMA region when the large 64K pages are enabled. Thus, it doesn't take much to exhaust all of the available DMA mappings for a high-speed card. This patch changes the iommu allocator to work with its own unique, distinct page size. Although the patch is long, its actually quite simple: it just #defines a distinct IOMMU_PAGE_SIZE and then uses this in all the places that matter. As a side effect, it also dramatically improves network performance on platforms with H-calls on iommu translation inserts/removes (since we no longer call it 16 times for a 1500 bytes packet when the iommu HW is still 4k). In the future, we might want to make the IOMMU_PAGE_SIZE a variable in the iommu_table instance, thus allowing support for different HW page sizes in the iommu itself. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Olof Johansson <olof@lixom.net> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * [POWERPC] Fix CHRP platforms with only 8259Benjamin Herrenschmidt2006-10-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | On CHRP platforms with only a 8259 controller, we should set the default IRQ host to the 8259 driver's one for the IRQ probing fallbacks to work in case the IRQ tree is incorrect (like on Pegasos for example). Without this fix, we get a bunch of WARN_ON's during boot. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * [POWERPC] IPIC: Fix spinlock recursion in set_irq_handlerScott Wood2006-10-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This causes ipic_set_irq_type to set the handler directly rather than call set_irq_handler, which causes spinlock recursion because the lock is already held when ipic_set_irq_type is called. I'm also not convinced that ipic_set_irq_type should be changing the handler at all. There seem to be several controllers that don't and several that do. Those that do would break what appears to be a common usage of calling set_irq_chip_and_handler followed by set_irq_type, if a non-standard handler were to be used. OTOH, irq_create_of_mapping() doesn't set the handler, but only calls set_irq_type(). This patch gets things working in the spinlock-debugging-enabled case, but I'm curious as to where the handler setting is ideally supposed to be done. I don't see any documentation on set_irq_type() that clarifies what the semantics are supposed to be. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * [POWERPC] Fix the UCC rx/tx clock of QELiu Dave-r632382006-10-251-0/+2
| | | | | | | | | | | | | | | | | | | | MPC8323EMDS board ethernet interface with RMII uses the CLK16 divisor for the rx and tx clock, but the ucc_set_qe_mux_rxtx() function doesn't handle the CLK16 setting of the CMXUCR3 and CMXUCR4 registers. This fixes it. Signed-off-by: Dave Liu <daveliu@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * [POWERPC] Fix spelling errors in ucc_fast.c and ucc_slow.cTimur Tabi2006-10-232-2/+2
| | | | | | | | | | | | | | In ucc_fast.c and ucc_slow.c, "illegal" is twice spelled "illagal". Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * [POWERPC] Fix compiler warning message on get_property callZang Roy-r619112006-10-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | This fixes the warning message from the return value of function get_property(), by making sure that the variable that receives the value is marked as const. Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> -- Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [PATCH] Optimize qe_brg struct to use an arrayTimur Tabi2006-11-131-2/+1
| | | | | | | | | | | | | | | | | | | | The qe_brg structure manually defined each of the 16 BRG registers, which made any code that used them cumbersome. This patch replaces the fields with a single 16-element array. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [PATCH] Slight refactor of interrupt mapping for FSL partsAndy Fleming2006-11-131-17/+11
| | | | | | | | | | | | | | | | | | | | | | * Cleaned up interrupt mapping a little by adding a helper function which parses the irq out of the device-tree, and puts it into a resource. * Changed the arch/ppc platform files to specify PHY_POLL, instead of -1 * Changed the fixed phy to use PHY_IGNORE_INTERRUPT * Added ethtool.h and mii.h to phy.h includes Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [PATCH] Add MPC5200 Interrupt Controller support.Nicolas DET2006-11-132-0/+539
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the MPC52xx Interrupt controller for ARCH=powerpc. It includes the main code in arch/powerpc/sysdev/ as well as a header file in include/asm-powerpc. Signed-off-by: Nicolas DET <nd@bplan-gmbh.de> Acked-by: Sylvain Munaut <tnt@246tNt.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Remove todc code from ARCH=powerpcDavid Gibson2006-10-162-393/+0
|/ | | | | | | | | | | | | | Apparently we've copied the todc drivers, for various RTCs used in embedded machines from ARCH=ppc to ARCH=powerpc, despite the fact that it's never used in the latter. This patch removes it. If we ever need these drivers (which we probably shouldn't now the RTC class stuff is in), we can transfer them one by one from ARCH=ppc, removing from the hideous abomination which is the todc "infrastructure". Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [HEADERS] Put linux/config.h out of its misery.Dave Jones2006-10-091-1/+0
| | | | Signed-off-by: Dave Jones <davej@redhat.com>
* [POWERPC] Fix up after irq changesOlaf Hering2006-10-077-17/+14
| | | | | | | | | Remove struct pt_regs * from all handlers. Also remove the regs argument from get_irq() functions. Compile tested with arch/powerpc/config/* and arch/ppc/configs/prep_defconfig Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Fix fsl_soc build breaksOlof Johansson2006-10-071-4/+5
| | | | | | | | | | | | | | | | | | | | | | | Hrm, there's no way this ever built at time of merge. There's a missing } and the wrong type on phy_irq. Also, another const for get_property(). CC arch/powerpc/sysdev/fsl_soc.o arch/powerpc/sysdev/fsl_soc.c: In function 'fs_enet_of_init': arch/powerpc/sysdev/fsl_soc.c:625: error: assignment of read-only variable 'phy_irq' arch/powerpc/sysdev/fsl_soc.c:625: warning: assignment makes integer from pointer without a cast arch/powerpc/sysdev/fsl_soc.c:661: warning: assignment discards qualifiers from pointer target type arch/powerpc/sysdev/fsl_soc.c:684: error: subscripted value is neither array nor pointer arch/powerpc/sysdev/fsl_soc.c:687: error: subscripted value is neither array nor pointer arch/powerpc/sysdev/fsl_soc.c:722: warning: ISO C90 forbids mixed declarations and code arch/powerpc/sysdev/fsl_soc.c:728: error: invalid storage class for function 'cpm_uart_of_init' arch/powerpc/sysdev/fsl_soc.c:798: error: initializer element is not constant arch/powerpc/sysdev/fsl_soc.c:798: error: expected declaration or statement at end of input make[1]: *** [arch/powerpc/sysdev/fsl_soc.o] Error 1 Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: irq change build breaksOlof Johansson2006-10-052-3/+3
| | | | | | | Fix up some of the buildbreaks from the irq handler changes. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells2006-10-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)