1. 01 11月, 2011 26 次提交
    • P
      arm: convert core files from module.h to export.h · ecea4ab6
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      ecea4ab6
    • P
      arm: remove several unnecessary module.h include instances · d91ef63b
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      d91ef63b
    • P
      arm: add slab.h to plat-samsung files for GFP_KERNEL · 3d46cceb
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      3d46cceb
    • P
      arm: fix implicit use of sched.h in bcmring/dma.c · 4cffaf73
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      4cffaf73
    • P
      arm: fix implicit use of moduleparam in mach-mx31*.c · 9e907416
      Paul Gortmaker 提交于
      To get the definition of core_param() they need this header.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      9e907416
    • P
      arm: fix implicit use of page.h in several arch/arm files · 9e54d33f
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      9e54d33f
    • P
      arm: fix implicit memset/string.h usage in various arch/arm files · d44b28c4
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      d44b28c4
    • P
      arm: add elf.h to arch/arm/kernel/ptrace.c · ce8b9d25
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      ce8b9d25
    • P
      powerpc: remove non-required uses of include <linux/module.h> · ead53f22
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      ead53f22
    • P
      powerpc: various straight conversions from module.h --> export.h · 4b16f8e2
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      4b16f8e2
    • P
      powerpc: convert hvconsole.c to export.h ; fix implicit use of errno.h · e9848d62
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      e9848d62
    • P
      powerpc: fix two implicit header uses in pseries/plpar_wrappers.h · 614f15b4
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      614f15b4
    • P
      powerpc: fix implicit use of mutex.h by include/asm/spu.h · e415372a
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      e415372a
    • P
      powerpc: fix implicit use of cache.h in kernel/firmware.c · cab2e052
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      cab2e052
    • P
      powerpc: fix implicit notifier use in converting to export.h · 2a7156b9
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      2a7156b9
    • P
      powerpc: cell/beat_wrapper.h is implicitly using memcpy functions · 08f1e55c
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      08f1e55c
    • P
      powerpc: Fix up implicit sched.h users · 62fe91bb
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      62fe91bb
    • P
      powerpc: Fix up implicit stat.h users · b56eade5
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      b56eade5
    • P
      powerpc: Fix up modules that should be including module.h · 7dfe293c
      Paul Gortmaker 提交于
      So that we can clean up the header files and not be relying
      on implicit includes from device.h ---> module.h
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      7dfe293c
    • P
      powerpc: include export.h for files using EXPORT_SYMBOL/THIS_MODULE · 93087948
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      93087948
    • P
      powerpc: add export.h to files making use of EXPORT_SYMBOL · 66b15db6
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      66b15db6
    • P
      powerpc: io-workarounds.c was implicitly getting init_mm · 333a1518
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      333a1518
    • P
      x86: efi_32.c is implicitly getting asm/desc.h via module.h · 783ac47c
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      783ac47c
    • P
      x86: fix up files really needing to include module.h · 7c52d551
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      7c52d551
    • P
      x86: Fix files explicitly requiring export.h for EXPORT_SYMBOL/THIS_MODULE · 69c60c88
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      69c60c88
    • P
      x86: fix implicit include of <linux/topology.h> in vsyscall_64 · 29574022
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      29574022
  2. 30 10月, 2011 5 次提交
  3. 29 10月, 2011 2 次提交
  4. 28 10月, 2011 1 次提交
    • E
      compat: sync compat_stats with statfs. · 1448c721
      Eric W. Biederman 提交于
      This was found by inspection while tracking a similar
      bug in compat_statfs64, that has been fixed in mainline
      since decemeber.
      
      - This fixes a bug where not all of the f_spare fields
        were cleared on mips and s390.
      - Add the f_flags field to struct compat_statfs
      - Copy f_flags to userspace in case someone cares.
      - Use __clear_user to copy the f_spare field to userspace
        to ensure that all of the elements of f_spare are cleared.
        On some architectures f_spare is has 5 ints and on some
        architectures f_spare only has 4 ints.  Which makes
        the previous technique of clearing each int individually
        broken.
      
      I don't expect anyone actually uses the old statfs system
      call anymore but if they do let them benefit from having
      the compat and the native version working the same.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      1448c721
  5. 27 10月, 2011 6 次提交