summaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* sparc: move symbol exporters to use export.h not module.hPaul Gortmaker2011-10-3123-23/+23
| | | | | | | | Many of the core sparc kernel files are not modules, but just including module.h for exporting symbols. Now these files can use the lighter footprint export.h for this role. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* sparc: add export.h to arch/sparc files as requiredPaul Gortmaker2011-10-3118-0/+18
| | | | | | | | | These files are only exporting symbols, so they don't need the full module.h header file. Previously they were getting access to EXPORT_SYMBOL implicitly via overuse of module.h from within other .h files, but that is being cleaned up. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* sparc: fix implicit use of uaccess.h header in mdesc.cPaul Gortmaker2011-10-311-0/+1
| | | | | | | | | | | | Building sparc64 with the module.h cleanup reveals this implicit include being taken advantage of: arch/sparc/kernel/mdesc.c: In function 'mdesc_read': arch/sparc/kernel/mdesc.c:900: error: implicit declaration of function 'copy_to_user' Fix it up before the implicit module.h presence is removed. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* sparc: fix implicit use of spitfire.h in pcr.c and of_device_64.cPaul Gortmaker2011-10-312-0/+2
| | | | | | | | | | | | | | To resolve these on 64bit allnoconfig builds: CC arch/sparc/kernel/pcr.o arch/sparc/kernel/pcr.c: In function 'register_perf_hsvc': arch/sparc/kernel/pcr.c:102: error: 'tlb_type' undeclared (first use in this function) CC arch/sparc/kernel/of_device_64.o arch/sparc/kernel/of_device_64.c: In function 'build_device_resources': arch/sparc/kernel/of_device_64.c:406: error: 'tlb_type' undeclared (first use in this function) Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* arm: Add moduleparam.h to arch/arm files as requiredPaul Gortmaker2011-10-311-0/+1
| | | | | | | | | Things like module_param and core_param come from the header moduleparam.h -- these files were relying on the fact that module.h is implicitly present everywhere and it in turn includes the moduleparam header. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* arm: fix implicit module.h users by adding it to arch/arm as required.Paul Gortmaker2011-10-316-0/+6
| | | | | | | These files will fail to compile if we dont clean them up in advance and have them include the appropriate headers they need. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* arm: Add export.h to ARM specific files as required.Paul Gortmaker2011-10-3134-0/+34
| | | | | | | These files all make use of one of the EXPORT_SYMBOL variants or the THIS_MODULE macro. So they will need <linux/export.h> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* arm: convert core files from module.h to export.hPaul Gortmaker2011-10-3114-14/+14
| | | | | | | | | | | | Many of the core ARM kernel files are not modules, but just including module.h for exporting symbols. Now these files can use the lighter footprint export.h for this role. There are probably lots more, but ARM files of mach-* and plat-* don't get coverage via a simple yesconfig build. They will have to be cleaned up and tested via using their respective configs. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* arm: remove several unnecessary module.h include instancesPaul Gortmaker2011-10-315-5/+0
| | | | | | | | | | | | Building these files does not reveal a hidden need for any of these. Since module.h brings in the whole kitchen sink, it just needlessly adds 30k+ lines to the cpp burden. There are probably lots more, but ARM files of mach-* and plat-* don't get coverage via a simple yesconfig build. They will have to be cleaned up and tested via using their respective configs. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* arm: add slab.h to plat-samsung files for GFP_KERNELPaul Gortmaker2011-10-312-0/+2
| | | | | | | | | | | | | To fix messages like this: CC arch/arm/plat-samsung/platformdata.o arch/arm/plat-samsung/platformdata.c: In function 's3c_set_platdata': arch/arm/plat-samsung/platformdata.c:29: error: 'GFP_KERNEL' undeclared (first use in this function) arch/arm/plat-samsung/platformdata.c:29: error: (Each undeclared identifier is reported only once arch/arm/plat-samsung/platformdata.c:29: error: for each function it appears in.) make[3]: *** [arch/arm/plat-samsung/platformdata.o] Error 1 Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* arm: fix implicit use of sched.h in bcmring/dma.cPaul Gortmaker2011-10-311-0/+1
| | | | | | | | | | To fix this: arch/arm/mach-bcmring/dma.c: In function 'dma_request_channel_dbg': arch/arm/mach-bcmring/dma.c:1022: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function) arch/arm/mach-bcmring/dma.c:1022: error: (Each undeclared identifier is reported only once Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* arm: fix implicit use of moduleparam in mach-mx31*.cPaul Gortmaker2011-10-313-0/+3
| | | | | | To get the definition of core_param() they need this header. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* arm: fix implicit use of page.h in several arch/arm filesPaul Gortmaker2011-10-313-0/+3
| | | | | | | | | | Add the include to fix things like this: arch/arm/mach-sa1100/jornada720.c:278: error: 'PAGE_SHIFT' undeclared here (not in a function) arch/arm/mach-bcmring/mm.c:32: error: 'PAGE_SHIFT' undeclared here (not in a function) arch/arm/mach-sa1100/collie.c:361: error: 'PAGE_SHIFT' undeclared here (not in a function) Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* arm: fix implicit memset/string.h usage in various arch/arm filesPaul Gortmaker2011-10-315-0/+5
| | | | | | | | | | | | | | To fix things like this: arch/arm/mach-omap2/usb-tusb6010.c:58: error: implicit declaration of function 'memset' arch/arm/kernel/leds.c:40: error: implicit declaration of function 'strcspn' arch/arm/kernel/leds.c:40: warning: incompatible implicit declaration of built-in function 'strcspn' arch/arm/kernel/leds.c:45: error: implicit declaration of function 'strncmp' arch/arm/kernel/leds.c:55: error: implicit declaration of function 'strlen' arch/arm/kernel/leds.c:55: warning: incompatible implicit declaration of built-in function 'strlen' arch/arm/mach-omap2/clockdomain.c:52: error: implicit declaration of function 'strcmp' Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* arm: add elf.h to arch/arm/kernel/ptrace.cPaul Gortmaker2011-10-311-0/+1
| | | | | | | | | | | It was implicitly getting it via an implicit presence of module.h but when we clean that up, we'll get a bunch of lines like this: arch/arm/kernel/ptrace.c:764: error: 'NT_PRSTATUS' undeclared here (not in a function) arch/arm/kernel/ptrace.c:765: error: 'ELF_NGREG' undeclared here (not in a function) arch/arm/kernel/ptrace.c:776: error: 'NT_PRFPREG' undeclared here (not in a function) Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* powerpc: remove non-required uses of include <linux/module.h>Paul Gortmaker2011-10-3128-32/+0
| | | | | | | | | | | None of the files touched here are modules, and they are not exporting any symbols either -- so there is no need to be including the module.h. Builds of all the files remains successful. Even kernel/module.c does not need to include it, since it includes linux/moduleloader.h instead. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* powerpc: various straight conversions from module.h --> export.hPaul Gortmaker2011-10-3161-61/+61
| | | | | | | | | All these files were including module.h just for the basic EXPORT_SYMBOL infrastructure. We can shift them off to the export.h header which is a way smaller footprint and thus realize some compile time gains. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* powerpc: convert hvconsole.c to export.h ; fix implicit use of errno.hPaul Gortmaker2011-10-311-1/+2
| | | | | | | | | | | | This file is only exporting symbols and so should use export.h and not module.h header. But in doing the conversion, we will uncover that it was implicitly using errno.h via module.h: CC arch/powerpc/platforms/pseries/hvconsole.o arch/powerpc/platforms/pseries/hvconsole.c: In function 'hvc_put_chars': arch/powerpc/platforms/pseries/hvconsole.c:77: error: 'EIO' undeclared (first use in this function) Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* powerpc: fix two implicit header uses in pseries/plpar_wrappers.hPaul Gortmaker2011-10-311-0/+3
| | | | | | | | | | | Removing the implicit presence of module.h from almost everywhere will reveal this implicit usage of paca.h and string.h headers as follows: arch/powerpc/platforms/pseries/plpar_wrappers.h:22: error: implicit declaration of function 'get_lppaca' arch/powerpc/platforms/pseries/plpar_wrappers.h:208: error: implicit declaration of function 'memcpy' Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* powerpc: fix implicit use of mutex.h by include/asm/spu.hPaul Gortmaker2011-10-311-0/+1
| | | | | | | | | | | | We've been getting the header implicitly via module.h in the past but when we clean that up, we'll get this failure: CC arch/powerpc/platforms/cell/beat_spu_priv1.o In file included from arch/powerpc/platforms/cell/beat_spu_priv1.c:22: arch/powerpc/include/asm/spu.h:190: error: field 'list_mutex' has incomplete type make[2]: *** [arch/powerpc/platforms/cell/beat_spu_priv1.o] Error 1 Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* powerpc: fix implicit use of cache.h in kernel/firmware.cPaul Gortmaker2011-10-311-1/+2
| | | | | | | | | | | | This file only needs export.h to get EXPORT_SYMBOL, but in doing so, it uncovers an implicit use of linux/cache.h as follows: CC arch/powerpc/kernel/firmware.o arch/powerpc/kernel/firmware.c:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__read_mostly' arch/powerpc/kernel/firmware.c:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__used' make[2]: *** [arch/powerpc/kernel/firmware.o] Error 1 Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* powerpc: fix implicit notifier use in converting to export.hPaul Gortmaker2011-10-311-1/+2
| | | | | | | | | | | | | | | We can convert this file to using export.h since it only wants to export symbols, but when we do we'll see also that it was implicitly getting notifier.h from module.h via this failure: CC arch/powerpc/platforms/cell/spu_notify.o arch/powerpc/platforms/cell/spu_notify.c:28: warning: type defaults to 'int' in declaration of 'BLOCKING_NOTIFIER_HEAD' arch/powerpc/platforms/cell/spu_notify.c:28: warning: parameter names (without types) in function declaration arch/powerpc/platforms/cell/spu_notify.c: In function 'spu_switch_notify': arch/powerpc/platforms/cell/spu_notify.c:32: error: implicit declaration of function 'blocking_notifier_call_chain' arch/powerpc/platforms/cell/spu_notify.c:32: error: 'spu_switch_notifier' undeclared (first use in this function) Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* powerpc: cell/beat_wrapper.h is implicitly using memcpy functionsPaul Gortmaker2011-10-311-0/+1
| | | | | | | | | | | | | | This has been relying on the fact that the parent file would have module.h (and thus nearly everything) present. But once we fix that, we'll get stuck with this failure: In file included from arch/powerpc/platforms/cell/beat_spu_priv1.c:26: arch/powerpc/platforms/cell/beat_wrapper.h: In function 'beat_eeprom_write': arch/powerpc/platforms/cell/beat_wrapper.h:160: error: implicit declaration of function 'memcpy' and many more instances of the same. Fix it in advance. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* powerpc: Fix up implicit sched.h usersPaul Gortmaker2011-10-318-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They are getting it through device.h --> module.h path, but we want to clean that up. This is a sample of what will happen if we don't: pseries/iommu.c: In function 'tce_build_pSeriesLP': pseries/iommu.c:136: error: implicit declaration of function 'show_stack' pseries/eeh.c: In function 'eeh_token_to_phys': pseries/eeh.c:359: error: 'init_mm' undeclared (first use in this function) pseries/eeh_event.c: In function 'eeh_event_handler': pseries/eeh_event.c:63: error: implicit declaration of function 'daemonize' pseries/eeh_event.c:64: error: implicit declaration of function 'set_current_state' pseries/eeh_event.c:64: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function) pseries/eeh_event.c:64: error: (Each undeclared identifier is reported only once pseries/eeh_event.c:64: error: for each function it appears in.) pseries/eeh_event.c: In function 'eeh_thread_launcher': pseries/eeh_event.c:109: error: 'CLONE_KERNEL' undeclared (first use in this function) hotplug-cpu.c: In function 'pseries_mach_cpu_die': hotplug-cpu.c:115: error: implicit declaration of function 'idle_task_exit' kernel/swsusp_64.c: In function 'do_after_copyback': kernel/swsusp_64.c:17: error: implicit declaration of function 'touch_softlockup_watchdog' cell/spufs/context.c: In function 'alloc_spu_context': cell/spufs/context.c:60: error: implicit declaration of function 'get_task_mm' cell/spufs/context.c:60: warning: assignment makes pointer from integer without a cast cell/spufs/context.c: In function 'spu_forget': cell/spufs/context.c:127: error: implicit declaration of function 'mmput' pasemi/dma_lib.c: In function 'pasemi_dma_stop_chan': pasemi/dma_lib.c:332: error: implicit declaration of function 'cond_resched' sysdev/fsl_lbc.c: In function 'fsl_lbc_ctrl_irq': sysdev/fsl_lbc.c:247: error: 'TASK_NORMAL' undeclared (first use in this function) Add in sched.h so these get the definitions they are looking for. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* powerpc: Fix up implicit stat.h usersPaul Gortmaker2011-10-316-0/+6
| | | | | | | | | | | | They get it via module.h (via device.h) but we want to clean that up. When we do, we'll get things like: ibmebus.c:314: error: 'S_IWUSR' undeclared here (not in a function) vio.c:972: error: 'S_IWUSR' undeclared here (not in a function) so add in the stat header it is using explicitly in advance. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* powerpc: Fix up modules that should be including module.hPaul Gortmaker2011-10-3113-0/+13
| | | | | | | So that we can clean up the header files and not be relying on implicit includes from device.h ---> module.h Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* powerpc: include export.h for files using EXPORT_SYMBOL/THIS_MODULEPaul Gortmaker2011-10-3113-0/+13
| | | | | | | | | | | | | | | | Fix failures in powerpc associated with the previously allowed implicit module.h presence that now lead to things like this: arch/powerpc/mm/mmu_context_hash32.c:76:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/powerpc/mm/tlb_hash32.c:48:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' arch/powerpc/kernel/pci_32.c:51:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' arch/powerpc/kernel/iomap.c:36:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' arch/powerpc/platforms/44x/canyonlands.c:126:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' arch/powerpc/kvm/44x.c:168:59: error: 'THIS_MODULE' undeclared (first use in this function) [with several contibutions from Stephen Rothwell <sfr@canb.auug.org.au>] Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* powerpc: add export.h to files making use of EXPORT_SYMBOLPaul Gortmaker2011-10-3142-0/+42
| | | | | | | | | With module.h being implicitly everywhere via device.h, the absence of explicitly including something for EXPORT_SYMBOL went unnoticed. Since we are heading to fix things up and clean module.h from the device.h file, we need to explicitly include these files now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* powerpc: io-workarounds.c was implicitly getting init_mmPaul Gortmaker2011-10-311-0/+1
| | | | | | | | It was coming in via device.h --> module.h etc. but we want to clean that up. So explicitly include the header where init_mm is being declared. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* x86: efi_32.c is implicitly getting asm/desc.h via module.hPaul Gortmaker2011-10-311-0/+1
| | | | | | | | | | | | | | | We want to clean up the chain of includes stumbling through module.h, and when we do that, we'll see: CC arch/x86/platform/efi/efi_32.o efi/efi_32.c: In function ‘efi_call_phys_prelog’: efi/efi_32.c:80: error: implicit declaration of function ‘get_cpu_gdt_table’ efi/efi_32.c:82: error: implicit declaration of function ‘load_gdt’ make[4]: *** [arch/x86/platform/efi/efi_32.o] Error 1 Include asm/desc.h so that there are no implicit include assumptions. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* x86: fix up files really needing to include module.hPaul Gortmaker2011-10-313-0/+3
| | | | | | | These files aren't just exporting symbols -- they are also defining a MODULE_LICENSE etc. so give them the full module.h file. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* x86: Fix files explicitly requiring export.h for EXPORT_SYMBOL/THIS_MODULEPaul Gortmaker2011-10-3124-2/+25
| | | | | | | | | | | | | | | | These files were implicitly getting EXPORT_SYMBOL via device.h which was including module.h, but that will be fixed up shortly. By fixing these now, we can avoid seeing things like: arch/x86/kernel/rtc.c:29: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’ arch/x86/kernel/pci-dma.c:20: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’ arch/x86/kernel/e820.c:69: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL_GPL’ [ with input from Randy Dunlap <rdunlap@xenotime.net> and also from Stephen Rothwell <sfr@canb.auug.org.au> ] Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* x86: fix implicit include of <linux/topology.h> in vsyscall_64Paul Gortmaker2011-10-311-0/+1
| | | | | | | | | | | | | | In removing the presence of <linux/module.h> from some of the more common <linux/something.h> files, this implict include of <linux/topology.h> was uncovered. CC arch/x86/kernel/vsyscall_64.o arch/x86/kernel/vsyscall_64.c: In function ‘vsyscall_set_cpu’: arch/x86/kernel/vsyscall_64.c:259: error: implicit declaration of function ‘cpu_to_node’ Explicitly call it out so the cleanup can take place. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommuLinus Torvalds2011-10-3012-2515/+92
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (33 commits) iommu/core: Remove global iommu_ops and register_iommu iommu/msm: Use bus_set_iommu instead of register_iommu iommu/omap: Use bus_set_iommu instead of register_iommu iommu/vt-d: Use bus_set_iommu instead of register_iommu iommu/amd: Use bus_set_iommu instead of register_iommu iommu/core: Use bus->iommu_ops in the iommu-api iommu/core: Convert iommu_found to iommu_present iommu/core: Add bus_type parameter to iommu_domain_alloc Driver core: Add iommu_ops to bus_type iommu/core: Define iommu_ops and register_iommu only with CONFIG_IOMMU_API iommu/amd: Fix wrong shift direction iommu/omap: always provide iommu debug code iommu/core: let drivers know if an iommu fault handler isn't installed iommu/core: export iommu_set_fault_handler() iommu/omap: Fix build error with !IOMMU_SUPPORT iommu/omap: Migrate to the generic fault report mechanism iommu/core: Add fault reporting mechanism iommu/core: Use PAGE_SIZE instead of hard-coded value iommu/core: use the existing IS_ALIGNED macro iommu/msm: ->unmap() should return order of unmapped page ... Fixup trivial conflicts in drivers/iommu/Makefile: "move omap iommu to dedicated iommu folder" vs "Rename the DMAR and INTR_REMAP config options" just happened to touch lines next to each other.
| *-----. Merge branches 'amd/fixes', 'debug/dma-api', 'arm/omap', 'arm/msm', 'core', ↵Joerg Roedel2011-10-2112-2515/+92
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'iommu/fault-reporting' and 'api/iommu-ops-per-bus' into next Conflicts: drivers/iommu/amd_iommu.c drivers/iommu/iommu.c
| | | | | * iommu/core: Convert iommu_found to iommu_presentJoerg Roedel2011-10-212-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With per-bus iommu_ops the iommu_found function needs to work on a bus_type too. This patch adds a bus_type parameter to that function and converts all call-places. The function is also renamed to iommu_present because the function now checks if an iommu is present for a given bus and does not check for a global iommu anymore. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | | | | *---. Merge branches 'debug/dma-api', 'arm/omap', 'arm/msm' and 'core' into api-2Joerg Roedel2011-09-0664-2822/+632
| | | | | |\ \ \ | | | | |_|/ / / | | | |/| | / / | | | |_|_|/ / | | |/| | | |
| | | | * | | iommu/omap: Migrate to the generic fault report mechanismOhad Ben-Cohen2011-09-141-2/+1
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Start using the generic fault report mechanism, as provided by the IOMMU core, and remove its now-redundant omap_iommu_set_isr API. Currently we're only interested in letting upper layers know about the fault, so in case the faulting device is a remote processor, they could restart it. Dynamic PTE/TLB loading is not supported. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | | * | | omap: iommu: omapify 'struct iommu' and exposed APIOhad Ben-Cohen2011-08-265-50/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepend 'omap_' to OMAP's 'struct iommu' and exposed API, to prevent namespace pollution and generally to improve readability of the code that still uses the driver directly. Update the users as needed as well. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | | * | | omap: iommu: remove unused exported APIOhad Ben-Cohen2011-08-261-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unused public APIs from OMAP's iommu driver. IOMMU functionality should be exposed only via the generic IOMMU API; this way drivers stay generic, and different IOMMU drivers don't need to duplicate similar functionalities. The rest of the API still exposed by OMAP's iommu will be evaluated and eventually either added to the generic IOMMU API (if relevant), or completely removed. The intention is that OMAP's iommu driver will eventually not expose any public API. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | | * | | omap: iovmm: remove unused functionalityOhad Ben-Cohen2011-08-261-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unused functionality from OMAP's iovmm module. The intention is to eventually completely replace iovmm with the generic DMA-API, so new code that'd need this iovmm functionality will have to extend the DMA-API instead. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | | * | | omap: iommu: stop exporting local functionsOhad Ben-Cohen2011-08-261-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop exporting functions that are used only within the iommu driver itself. Eventually OMAP's iommu driver should only expose API via the generic IOMMU framework. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | | * | | omap: iommu/iovmm: move to dedicated iommu folderOhad Ben-Cohen2011-08-266-2683/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move OMAP's iommu drivers to the dedicated iommu drivers folder. While OMAP's iovmm (virtual memory manager) driver does not strictly belong to the iommu drivers folder, move it there as well, because it's by no means OMAP-specific (in concept. technically it is still coupled with OMAP's iommu). Eventually, iovmm will be completely replaced with the generic, iommu-based, dma-mapping API. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
| | | * | | omap: iommu: migrate to the generic IOMMU APIOhad Ben-Cohen2011-08-266-105/+372
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate OMAP's iommu driver to the generic IOMMU API, so users can stay generic, and any generic IOMMU functionality can be developed once in the generic framework. Migrate omap's iovmm (virtual memory manager) to the generic IOMMU API, and adapt omap3isp as needed, so the latter won't break. The plan is to eventually remove iovmm completely by replacing it with the (upcoming) IOMMU-based DMA-API. Tested on OMAP3 (with omap3isp) and OMAP4 (with rpmsg/remoteproc). Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
* | | | | Merge branch 'kvm-updates/3.2' of ↵Linus Torvalds2011-10-3050-1232/+2155
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm * 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (75 commits) KVM: SVM: Keep intercepting task switching with NPT enabled KVM: s390: implement sigp external call KVM: s390: fix register setting KVM: s390: fix return value of kvm_arch_init_vm KVM: s390: check cpu_id prior to using it KVM: emulate lapic tsc deadline timer for guest x86: TSC deadline definitions KVM: Fix simultaneous NMIs KVM: x86 emulator: convert push %sreg/pop %sreg to direct decode KVM: x86 emulator: switch lds/les/lss/lfs/lgs to direct decode KVM: x86 emulator: streamline decode of segment registers KVM: x86 emulator: simplify OpMem64 decode KVM: x86 emulator: switch src decode to decode_operand() KVM: x86 emulator: qualify OpReg inhibit_byte_regs hack KVM: x86 emulator: switch OpImmUByte decode to decode_imm() KVM: x86 emulator: free up some flag bits near src, dst KVM: x86 emulator: switch src2 to generic decode_operand() KVM: x86 emulator: expand decode flags to 64 bits KVM: x86 emulator: split dst decode to a generic decode_operand() KVM: x86 emulator: move memop, memopp into emulation context ...
| * | | | | KVM: SVM: Keep intercepting task switching with NPT enabledJan Kiszka2011-10-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AMD processors apparently have a bug in the hardware task switching support when NPT is enabled. If the task switch triggers a NPF, we can get wrong EXITINTINFO along with that fault. On resume, spurious exceptions may then be injected into the guest. We were able to reproduce this bug when our guest triggered #SS and the handler were supposed to run over a separate task with not yet touched stack pages. Work around the issue by continuing to emulate task switches even in NPT mode. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | | | | KVM: s390: implement sigp external callChristian Ehrhardt2011-10-304-1/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement sigp external call, which might be required for guests that issue an external call instead of an emergency signal for IPI. This fixes an issue with "KVM: unknown SIGP: 0x02" when booting such an SMP guest. Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | | | | KVM: s390: fix register settingCarsten Otte2011-10-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KVM common code does vcpu_load prior to calling our arch ioctls and vcpu_put after we're done here. Via the kvm_arch_vcpu_load/put callbacks we do load the fpu and access register state into the processor, which saves us moving the state on every SIE exit the kernel handles. However this breaks register setting from userspace, because of the following sequence: 1a. vcpu load stores userspace register content 1b. vcpu load loads guest register content 2. kvm_arch_vcpu_ioctl_set_fpu/sregs updates saved guest register content 3a. vcpu put stores the guest registers and overwrites the new content 3b. vcpu put loads the userspace register set again This patch loads the new guest register state into the cpu, so that the correct (new) set of guest registers will be stored in step 3a. Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | | | | KVM: s390: fix return value of kvm_arch_init_vmCarsten Otte2011-10-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the return value of kvm_arch_init_vm in case a memory allocation goes wrong. Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * | | | | KVM: s390: check cpu_id prior to using itCarsten Otte2011-10-301-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use the cpu id provided by userspace as array index here. Thus we clearly need to check it first. Ooops. CC: <stable@vger.kernel.org> Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>