]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
13 years agoarm: fix implicit usage of string.h in kernel/leds.c
Paul Gortmaker [Fri, 22 Jul 2011 14:56:23 +0000 (10:56 -0400)]
arm: fix implicit usage of string.h in kernel/leds.c

The use of these string ops was implicitly hidden by the use
of module.h, but that is going away shortly.  When it does, this
will break as follows:

arch/arm/kernel/leds.c: In function 'leds_store':
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: In function '_clkdm_lookup':
arch/arm/mach-omap2/clockdomain.c:52: error: implicit declaration of function 'strcmp'

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoarm: fix implicit memset usage in mach-omap2 platform
Paul Gortmaker [Sun, 31 Jul 2011 14:52:44 +0000 (10:52 -0400)]
arm: fix implicit memset usage in mach-omap2 platform

To fix things like this:

arch/arm/mach-omap2/usb-tusb6010.c: In function 'tusb_set_async_mode':
arch/arm/mach-omap2/usb-tusb6010.c:58: error: implicit declaration of function 'memset'

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoarm: add elf.h to arch/arm/kernel/ptrace.c
Paul Gortmaker [Mon, 18 Jul 2011 16:03:53 +0000 (12:03 -0400)]
arm: add elf.h to arch/arm/kernel/ptrace.c

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>
13 years agopowerpc: remove non-required uses of include <linux/module.h>
Paul Gortmaker [Fri, 22 Jul 2011 18:24:04 +0000 (14:24 -0400)]
powerpc: remove non-required uses of include <linux/module.h>

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>
13 years agopowerpc: various straight conversions from module.h --> export.h
Paul Gortmaker [Fri, 22 Jul 2011 22:24:23 +0000 (18:24 -0400)]
powerpc: various straight conversions from module.h --> export.h

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>
13 years agopowerpc: convert hvconsole.c to export.h ; fix implicit use of errno.h
Paul Gortmaker [Fri, 22 Jul 2011 22:15:07 +0000 (18:15 -0400)]
powerpc: convert hvconsole.c to export.h ; fix implicit use of errno.h

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>
13 years agopowerpc: fix two implicit header uses in pseries/plpar_wrappers.h
Paul Gortmaker [Fri, 22 Jul 2011 22:04:33 +0000 (18:04 -0400)]
powerpc: fix two implicit header uses in pseries/plpar_wrappers.h

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>
13 years agopowerpc: fix implicit use of mutex.h by include/asm/spu.h
Paul Gortmaker [Fri, 22 Jul 2011 18:00:05 +0000 (14:00 -0400)]
powerpc: fix implicit use of mutex.h by include/asm/spu.h

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>
13 years agopowerpc: fix implicit use of cache.h in kernel/firmware.c
Paul Gortmaker [Fri, 22 Jul 2011 19:07:20 +0000 (15:07 -0400)]
powerpc: fix implicit use of cache.h in kernel/firmware.c

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>
13 years agopowerpc: fix implicit notifier use in converting to export.h
Paul Gortmaker [Fri, 22 Jul 2011 19:15:09 +0000 (15:15 -0400)]
powerpc: fix implicit notifier use in converting to export.h

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>
13 years agopowerpc: cell/beat_wrapper.h is implicitly using memcpy functions
Paul Gortmaker [Fri, 22 Jul 2011 17:52:47 +0000 (13:52 -0400)]
powerpc: cell/beat_wrapper.h is implicitly using memcpy functions

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>
13 years agopowerpc: Fix up implicit sched.h users
Paul Gortmaker [Fri, 27 May 2011 18:25:11 +0000 (14:25 -0400)]
powerpc: Fix up implicit sched.h users

They are getting it through device.h --> module.h path, but we want
to clean that up.  This is 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>
13 years agopowerpc: Fix up implicit stat.h users
Paul Gortmaker [Fri, 27 May 2011 17:27:45 +0000 (13:27 -0400)]
powerpc: Fix up implicit stat.h users

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>
13 years agopowerpc: Fix up modules that should be including module.h
Paul Gortmaker [Fri, 27 May 2011 17:23:32 +0000 (13:23 -0400)]
powerpc: Fix up modules that should be including module.h

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>
13 years agopowerpc: include export.h for files using EXPORT_SYMBOL/THIS_MODULE
Stephen Rothwell [Fri, 29 Jul 2011 06:19:31 +0000 (16:19 +1000)]
powerpc: include export.h for files using EXPORT_SYMBOL/THIS_MODULE

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>
13 years agopowerpc: add export.h to files making use of EXPORT_SYMBOL
Paul Gortmaker [Fri, 27 May 2011 14:46:24 +0000 (10:46 -0400)]
powerpc: add export.h to files making use of EXPORT_SYMBOL

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>
13 years agopowerpc: io-workarounds.c was implicitly getting init_mm
Paul Gortmaker [Fri, 27 May 2011 17:39:01 +0000 (13:39 -0400)]
powerpc: io-workarounds.c was implicitly getting init_mm

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>
13 years agox86: efi_32.c is implicitly getting asm/desc.h via module.h
Paul Gortmaker [Fri, 27 May 2011 18:46:07 +0000 (14:46 -0400)]
x86: efi_32.c is implicitly getting asm/desc.h via module.h

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>
13 years agox86: fix up files really needing to include module.h
Paul Gortmaker [Fri, 27 May 2011 16:33:10 +0000 (12:33 -0400)]
x86: fix up files really needing to include module.h

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>
13 years agox86: Fix files explicitly requiring export.h for EXPORT_SYMBOL/THIS_MODULE
Paul Gortmaker [Thu, 26 May 2011 16:22:53 +0000 (12:22 -0400)]
x86: Fix files explicitly requiring export.h for EXPORT_SYMBOL/THIS_MODULE

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’

[devicetree.c fix courtesy of Randy Dunlap <rdunlap@xenotime.net>]

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agox86: fix implicit include of <linux/topology.h> in vsyscall_64
Paul Gortmaker [Thu, 26 May 2011 16:33:18 +0000 (12:33 -0400)]
x86: fix implicit include of <linux/topology.h> in vsyscall_64

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>
13 years agoacpi: sysfs.c needs module.h and not just moduleparam.h
Paul Gortmaker [Fri, 1 Jul 2011 16:02:02 +0000 (12:02 -0400)]
acpi: sysfs.c needs module.h and not just moduleparam.h

If it doesn't get it then this line:

MODULE_PARM_DESC(aml_debug_output,
                 "To enable/disable the ACPI Debug Object output.");
will trigger:

drivers/acpi/sysfs.c:229: error: expected ‘)’ before string constant
make[3]: *** [drivers/acpi/sysfs.o] Error 1

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoacpi: revector aclinux.h from module.h to export.h
Paul Gortmaker [Thu, 26 May 2011 19:49:02 +0000 (15:49 -0400)]
acpi: revector aclinux.h from module.h to export.h

This file was only including linux/module.h for the
EXPORT_SYMBOL infrastructure, and nothing else.  Revector it
onto the isolated export header for faster compile times.

Doing the above shows that the ACPI hwsleep module was not
actually including <linux/module.h>, so add that in so that
it will continue to build successfully.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoacpi: add module.h to files implicitly using/relying on it.
Paul Gortmaker [Fri, 1 Jul 2011 18:30:49 +0000 (14:30 -0400)]
acpi: add module.h to files implicitly using/relying on it.

These files are using standard module API things like MODULE_AUTHOR
etc. and so should not be relying on an implicit presence of the
module.h header.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agofs: add module.h to files that were implicitly using it
Paul Gortmaker [Fri, 1 Jul 2011 18:23:34 +0000 (14:23 -0400)]
fs: add module.h to files that were implicitly using it

Some files were using the complete module.h infrastructure without
actually including the header at all.  Fix them up in advance so
once the implicit presence is removed, we won't get failures like this:

  CC [M]  fs/nfsd/nfssvc.o
fs/nfsd/nfssvc.c: In function 'nfsd_create_serv':
fs/nfsd/nfssvc.c:335: error: 'THIS_MODULE' undeclared (first use in this function)
fs/nfsd/nfssvc.c:335: error: (Each undeclared identifier is reported only once
fs/nfsd/nfssvc.c:335: error: for each function it appears in.)
fs/nfsd/nfssvc.c: In function 'nfsd':
fs/nfsd/nfssvc.c:555: error: implicit declaration of function 'module_put_and_exit'
make[3]: *** [fs/nfsd/nfssvc.o] Error 1

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agofs: add export.h to files using EXPORT_SYMBOL/THIS_MODULE macros
Paul Gortmaker [Thu, 26 May 2011 20:00:52 +0000 (16:00 -0400)]
fs: add export.h to files using EXPORT_SYMBOL/THIS_MODULE macros

These files were getting <linux/module.h> via an implicit include
path, but we want to crush those out of existence since they cost
time during compiles of processing thousands of lines of headers
for no reason.  Give them the lightweight header that just contains
the EXPORT_SYMBOL infrastructure.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agonet: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules
Paul Gortmaker [Fri, 15 Jul 2011 15:47:34 +0000 (11:47 -0400)]
net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules

These files are non modular, but need to export symbols using
the macros now living in export.h -- call out the include so
that things won't break when we remove the implicit presence
of module.h from everywhere.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agonet: rfkill/input.c explicitly needs to include module.h
Paul Gortmaker [Fri, 27 May 2011 13:12:25 +0000 (09:12 -0400)]
net: rfkill/input.c explicitly needs to include module.h

With calls to module_param_named() and similar, this file really
needs the full module.h header.  Call it out so some of the
cleanups of implicit and unrequired includes elsewhere can be
cleaned up.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agokernel: Fix files explicitly needing EXPORT_SYMBOL infrastructure
Paul Gortmaker [Thu, 26 May 2011 20:00:52 +0000 (16:00 -0400)]
kernel: Fix files explicitly needing EXPORT_SYMBOL infrastructure

These files were getting <linux/module.h> via a twisted and tormented
path, but we want to crush those out of existence since they cost
time during compiles of processing thousands of lines of headers
for no reason.  Give them the lightweight header that just contains
the EXPORT_SYMBOL infrastructure.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agokernel: params/rcutiny needs module.h not moduleparam.h
Paul Gortmaker [Fri, 27 May 2011 01:07:10 +0000 (21:07 -0400)]
kernel: params/rcutiny needs module.h not moduleparam.h

Through various other twisted include paths, these files were
getting the full module.h file, and hence living the illusion
that it really only needed moduleparam.h -- but the reality
is that once you remove module.h, you will get screenfulls of
things like:

kernel/params.c:583: warning: ‘struct module_kobject’ declared inside parameter list

The file really requires module.h so simply make it so.  As the
file module.h grabs moduleparam.h on the fly, all will be well.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agokernel: ksysfs.c is implicitly using stat.h
Paul Gortmaker [Thu, 28 Jul 2011 18:22:29 +0000 (14:22 -0400)]
kernel: ksysfs.c is implicitly using stat.h

With the module.h usage cleanup, we'll get this:

kernel/ksysfs.c:161: error: ‘S_IRUGO’ undeclared here (not in a function)
make[2]: *** [kernel/ksysfs.o] Error 1

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agokernel: sys.c implicitly relies on kmod.h for usermodehelper
Paul Gortmaker [Fri, 27 May 2011 00:59:13 +0000 (20:59 -0400)]
kernel: sys.c implicitly relies on kmod.h for usermodehelper

In preparation to clean up the pervasive module.h usage which
in turn brings in every header possible, testing reveals that
this file gets the usermodehelper functions via that path.

Explicitly include kmod.h so that we don't things like:

kernel/sys.c:317: error: implicit declaration of function ‘usermodehelper_disable’
kernel/sys.c:1816: error: implicit declaration of function ‘call_usermodehelper_setup’
kernel/sys.c:1822: error: implicit declaration of function ‘call_usermodehelper_setfns’
kernel/sys.c:1824: error: implicit declaration of function ‘call_usermodehelper_exec’

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agokernel: fix two implicit header assumptions in irq_work.c
Paul Gortmaker [Mon, 18 Jul 2011 17:03:04 +0000 (13:03 -0400)]
kernel: fix two implicit header assumptions in irq_work.c

Up until now, this file was getting percpu.h because nearly every
file was implicitly getting module.h (and all its sub-includes).
But we want to clean that up, so call out percpu.h explicitly.
Otherwise we'll get things like this on an ARM build:

kernel/irq_work.c:48: error: expected declaration specifiers or '...' before 'irq_work_list'
kernel/irq_work.c:48: warning: type defaults to 'int' in declaration of 'DEFINE_PER_CPU'

The same thing was happening for builds on ARM for asm/processor.h

kernel/irq_work.c: In function 'irq_work_sync':
kernel/irq_work.c:166: error: implicit declaration of function 'cpu_relax'

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agokernel: fix implicit use of kmod.h in power/suspend.c
Paul Gortmaker [Thu, 26 May 2011 16:48:41 +0000 (12:48 -0400)]
kernel: fix implicit use of kmod.h in power/suspend.c

File power/suspend.c was implicitly relying on <linux/kmod.h>
coming in via module.h, as without it we get:

kernel/power/suspend.c: In function ‘suspend_prepare’:
kernel/power/suspend.c:100: error: implicit declaration of function ‘usermodehelper_disable’
kernel/power/suspend.c:109: error: implicit declaration of function ‘usermodehelper_enable’

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agokernel: Add <linux/module.h> to files using it implicitly
Paul Gortmaker [Thu, 26 May 2011 21:53:52 +0000 (17:53 -0400)]
kernel: Add <linux/module.h> to files using it implicitly

These files are doing things like module_put and try_module_get
so they need to call out the module.h for explicit inclusion,
rather than getting it via <linux/device.h> which we ideally want
to remove the module.h inclusion from.

If we don't fix them in advance, we will get things like:

kernel/watchdog.c: In function ‘watchdog_timer_fn’:
kernel/watchdog.c:301: error: implicit declaration of function ‘print_modules’
make[2]: *** [kernel/watchdog.o] Error 1

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agokernel: Map most files to use export.h instead of module.h
Paul Gortmaker [Mon, 23 May 2011 18:51:41 +0000 (14:51 -0400)]
kernel: Map most files to use export.h instead of module.h

The changed files were only including linux/module.h for the
EXPORT_SYMBOL infrastructure, and nothing else.  Revector them
onto the isolated export header for faster compile times.

Nothing to see here but a whole lot of instances of:

  -#include <linux/module.h>
  +#include <linux/export.h>

This commit is only changing the kernel dir; next targets
will probably be mm, fs, the arch dirs, etc.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomm: Add export.h for EXPORT_SYMBOL to active symbol exporters
Paul Gortmaker [Thu, 26 May 2011 20:00:52 +0000 (16:00 -0400)]
mm: Add export.h for EXPORT_SYMBOL to active symbol exporters

These files were getting <linux/module.h> via an implicit include
path, but we want to crush those out of existence since they cost
time during compiles of processing thousands of lines of headers
for no reason.  Give them the lightweight header that just contains
the EXPORT_SYMBOL infrastructure.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomm: delete various needless include <linux/module.h>
Paul Gortmaker [Thu, 26 May 2011 19:58:15 +0000 (15:58 -0400)]
mm: delete various needless include <linux/module.h>

There is nothing modular in these files, and no reason to drag
in all the 357 headers that module.h brings with it, since
it just slows down compiles.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agovermagic: delete senseless include of <linux/module.h>
Paul Gortmaker [Thu, 26 May 2011 18:19:59 +0000 (14:19 -0400)]
vermagic: delete senseless include of <linux/module.h>

This file consists of nothing other than things like:

  #ifdef CONFIG_FOO
  #define ....

There is no reason for it to require module.h

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agorange: fix bogus misuse of module.h to get printk()
Paul Gortmaker [Wed, 25 May 2011 13:52:21 +0000 (09:52 -0400)]
range: fix bogus misuse of module.h to get printk()

This file isn't doing anything with modules and so it should
not be including <linux/module.h> just to get basic stuff
like printk() and min/max.  Revector it to <linux/kernel.h>.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomodule.h: split out the EXPORT_SYMBOL into export.h
Paul Gortmaker [Mon, 23 May 2011 18:11:39 +0000 (14:11 -0400)]
module.h: split out the EXPORT_SYMBOL into export.h

A lot of files pull in module.h when all they are really
looking for is the basic EXPORT_SYMBOL functionality. The
recent data from Ingo[1] shows that this is one of several
instances that has a significant impact on compile times,
and it should be targeted for factoring out (as done here).

Note that several commonly used header files in include/*
directly include <linux/module.h> themselves (some 34 of them!)
The most commonly used ones of these will have to be made
independent of module.h before the full benefit of this change
can be realized.

We also transition THIS_MODULE from module.h to export.h,
since there are lots of files with subsystem structs that
in turn will have a struct module *owner and only be doing:

.owner = THIS_MODULE;

and absolutely nothing else modular. So, we also want to have
the THIS_MODULE definition present in the lightweight header.

[1] https://lkml.org/lkml/2011/5/23/76

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Linus Torvalds [Sat, 30 Jul 2011 20:51:11 +0000 (10:51 -1000)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
  sungem: fix compile failure caused by trivial #include consolidation

13 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
Linus Torvalds [Sat, 30 Jul 2011 18:57:57 +0000 (08:57 -1000)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging: (24 commits)
  hwmon: (lm90) Refactor reading of config2 register
  hwmon: (lm90) Make SA56004 detection more robust
  hwmon: (lm90) Simplify handling of extended local temp register
  hwmon: (pmbus) Add client driver for LM25066, LM5064, and LM5066
  hwmon: (max34440) Add support for peak attributes
  hwmon: (max8688) Add support for peak attributes
  hwmon: (max16064) Add support for peak attributes
  hwmon: (adm1275) Add support for peak attributes
  hwmon: (pmbus) Add support for peak attributes
  hwmon: Add new attributes to sysfs ABI
  hwmon: (pmbus) Strengthen check for status register existence
  hwmon: (pmbus) Add support for virtual pages
  hwmon: (pmbus) Support reading and writing of word registers in device specific code
  hwmon: (pmbus) Increase attribute name size
  hwmon: (pmbus) Add ADP4000, NCP4200 and NCP4208 to list of supported devices
  hwmon: (pmbus) Add support for VID output voltage mode
  hwmon: (pmbus) Move PMBus drivers to drivers/hwmon/pmbus
  hwmon: (coretemp) Add core/pkg threshold support to Coretemp
  hwmon: (lm95241) Add support for LM95231
  hwmon: LM95245 driver
  ...

13 years agoshm: optimize locking and ipc_namespace getting
Vasiliy Kulikov [Thu, 28 Jul 2011 23:56:40 +0000 (03:56 +0400)]
shm: optimize locking and ipc_namespace getting

shm_lock() does a lookup of shm segment in shm_ids(ns).ipcs_idr, which
is redundant as we already know shmid_kernel address.  An actual lock is
also not required for reads until we really want to destroy the segment.

exit_shm() and shm_destroy_orphaned() may avoid the loop by checking
whether there is at least one segment in current ipc_namespace.

The check of nsproxy and ipc_ns against NULL is redundant as exit_shm()
is called from do_exit() before the call to exit_notify(), so the
dereferencing current->nsproxy->ipc_ns is guaranteed to be safe.

Reported-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoshm: handle separate PID namespaces case
Vasiliy Kulikov [Thu, 28 Jul 2011 23:55:31 +0000 (03:55 +0400)]
shm: handle separate PID namespaces case

shm_try_destroy_orphaned() and shm_try_destroy_current() didn't handle
the case of separate PID namespaces, but a single IPC namespace.  If
there are tasks with the same PID values using the same shmem object,
the wrong destroy decision could be reached.

On shm segment creation store the pointer to the creator task in
shmid_kernel->shm_creator field and zero it on task exit.  Then
use the ->shm_creator insread of shm_cprid in both functions.  As
shmid_kernel object is already locked at this stage, no additional
locking is needed.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Linus Torvalds [Sat, 30 Jul 2011 18:36:02 +0000 (08:36 -1000)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (71 commits)
  [SCSI] fcoe: cleanup cpu selection for incoming requests
  [SCSI] fcoe: add fip retry to avoid missing critical keep alive
  [SCSI] libfc: fix warn on in lport retry
  [SCSI] libfc: Remove the reference to FCP packet from scsi_cmnd in case of error
  [SCSI] libfc: cleanup sending SRR request
  [SCSI] libfc: two minor changes in comments
  [SCSI] libfc, fcoe: ignore rx frame with wrong xid info
  [SCSI] libfc: release exchg cache
  [SCSI] libfc: use FC_MAX_ERROR_CNT
  [SCSI] fcoe: remove unused ptype field in fcoe_rcv_info
  [SCSI] bnx2fc: Update copyright and bump version to 1.0.4
  [SCSI] bnx2fc: Tx BDs cache in write tasks
  [SCSI] bnx2fc: Do not arm CQ when there are no CQEs
  [SCSI] bnx2fc: hold tgt lock when calling cmd_release
  [SCSI] bnx2fc: Enable support for sequence level error recovery
  [SCSI] bnx2fc: HSI changes for tape
  [SCSI] bnx2fc: Handle REC_TOV error code from firmware
  [SCSI] bnx2fc: REC/SRR link service request and response handling
  [SCSI] bnx2fc: Support 'sequence cleanup' task
  [SCSI] dh_rdac: Associate HBA and storage in rdac_controller to support partitions in storage
  ...

13 years agoMerge branch 'slub/lockless' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Sat, 30 Jul 2011 18:21:48 +0000 (08:21 -1000)]
Merge branch 'slub/lockless' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6

* 'slub/lockless' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: (21 commits)
  slub: When allocating a new slab also prep the first object
  slub: disable interrupts in cmpxchg_double_slab when falling back to pagelock
  Avoid duplicate _count variables in page_struct
  Revert "SLUB: Fix build breakage in linux/mm_types.h"
  SLUB: Fix build breakage in linux/mm_types.h
  slub: slabinfo update for cmpxchg handling
  slub: Not necessary to check for empty slab on load_freelist
  slub: fast release on full slab
  slub: Add statistics for the case that the current slab does not match the node
  slub: Get rid of the another_slab label
  slub: Avoid disabling interrupts in free slowpath
  slub: Disable interrupts in free_debug processing
  slub: Invert locking and avoid slab lock
  slub: Rework allocator fastpaths
  slub: Pass kmem_cache struct to lock and freeze slab
  slub: explicit list_lock taking
  slub: Add cmpxchg_double_slab()
  mm: Rearrange struct page
  slub: Move page->frozen handling near where the page->freelist handling occurs
  slub: Do not use frozen page flag but a bit in the page counters
  ...

13 years agoMerge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
Linus Torvalds [Sat, 30 Jul 2011 07:17:06 +0000 (00:17 -0700)]
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: (25 commits)
  kconfig: Introduce IS_ENABLED(), IS_BUILTIN() and IS_MODULE()
  xconfig: Abort close if configuration cannot be saved
  kconfig: fix missing "0x" prefix from S_HEX symbol in autoconf.h
  kconfig/nconf: remove useless conditionnal
  kconfig/nconf: prevent segfault on empty menu
  kconfig/nconf: use the generic menu_get_ext_help()
  nconfig: Avoid Wunused-but-set warning
  kconfig/conf: mark xfgets() private
  kconfig: remove pending prototypes for kconfig_load()
  kconfig/conf: add command line options' description
  kconfig/conf: reduce the scope of `defconfig_file'
  kconfig: use calloc() for expr allocation
  kconfig: introduce specialized printer
  kconfig: do not overwrite symbol direct dependency in assignment
  kconfig/gconf: silent missing prototype warnings
  kconfig/gconf: kill deadcode
  kconfig: nuke LKC_DIRECT_LINK cruft
  kconfig: nuke reference to SWIG
  kconfig: add missing <stdlib.h> inclusion
  kconfig: add missing <ctype.h> inclusion
  ...

Fix up conflicts in scripts/kconfig/Makefile

13 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Sat, 30 Jul 2011 07:08:53 +0000 (00:08 -0700)]
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (430 commits)
  [media] ir-mce_kbd-decoder: include module.h for its facilities
  [media] ov5642: include module.h for its facilities
  [media] em28xx: Fix DVB-C maxsize for em2884
  [media] tda18271c2dd: Fix saw filter configuration for DVB-C @6MHz
  [media] v4l: mt9v032: Fix Bayer pattern
  [media] V4L: mt9m111: rewrite set_pixfmt
  [media] V4L: mt9m111: fix missing return value check mt9m111_reg_clear
  [media] V4L: initial driver for ov5642 CMOS sensor
  [media] V4L: sh_mobile_ceu_camera: fix Oops when USERPTR mapping fails
  [media] V4L: soc-camera: remove soc-camera bus and devices on it
  [media] V4L: soc-camera: un-export the soc-camera bus
  [media] V4L: sh_mobile_csi2: switch away from using the soc-camera bus notifier
  [media] V4L: add media bus configuration subdev operations
  [media] V4L: soc-camera: group struct field initialisations together
  [media] V4L: soc-camera: remove now unused soc-camera specific PM hooks
  [media] V4L: pxa-camera: switch to using standard PM hooks
  [media] NetUP Dual DVB-T/C CI RF: force card hardware revision by module param
  [media] Don't OOPS if videobuf_dvb_get_frontend return NULL
  [media] NetUP Dual DVB-T/C CI RF: load firmware according card revision
  [media] omap3isp: Support configurable HS/VS polarities
  ...

Fix up conflicts:
 - arch/arm/mach-omap2/board-rx51-peripherals.c:
     cleanup regulator supply definitions in mach-omap2
   vs
     OMAP3: RX-51: define vdds_csib regulator supply
 - drivers/staging/tm6000/tm6000-alsa.c (trivial)

13 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Sat, 30 Jul 2011 06:45:06 +0000 (23:45 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: Fix build breakage in xfs_iops.c when CONFIG_FS_POSIX_ACL is not set

13 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptf...
Linus Torvalds [Sat, 30 Jul 2011 06:43:50 +0000 (23:43 -0700)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6:
  ecryptfs: Make inode bdi consistent with superblock bdi
  eCryptfs: Unlock keys needed by ecryptfsd

13 years agoMerge branch 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 30 Jul 2011 06:43:32 +0000 (23:43 -0700)]
Merge branch 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

* 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/balloon: Fix compile errors - missing header files.
  xen/grant: Fix compile warning.
  xen/pciback: remove duplicated #include

13 years agofrv: remove unnecessary code
Greg Dietsche [Fri, 29 Jul 2011 15:46:16 +0000 (16:46 +0100)]
frv: remove unnecessary code

remove unnecessary code that matches this coccinelle pattern

if (...)
return ret;
return ret;

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoramoops: fix compile failure on parisc
James Bottomley [Fri, 29 Jul 2011 13:11:32 +0000 (17:11 +0400)]
ramoops: fix compile failure on parisc

Fixes this:

  drivers/char/ramoops.c: In function 'ramoops_init':
  drivers/char/ramoops.c:221: error: implicit declaration of function 'IS_ERR'
  drivers/char/ramoops.c:222: error: implicit declaration of function 'PTR_ERR'

If it actually builds on other platforms, it's probably getting
linux/err.h via some other #include.

Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Sat, 30 Jul 2011 06:35:05 +0000 (23:35 -0700)]
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6

* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: remove printks about disabled bridge windows
  PCI: fold pci_calc_resource_flags() into decode_bar()
  PCI: treat mem BAR type "11" (reserved) as 32-bit, not 64-bit, BAR
  PCI: correct pcie_set_readrq write size
  PCI: pciehp: change wait time for valid configuration access
  x86/PCI: Preserve existing pci=bfsort whitelist for Dell systems
  PCI: ARI is a PCIe v2 feature
  x86/PCI: quirks: Use pci_dev->revision
  PCI: Make the struct pci_dev * argument of pci_fixup_irqs const.
  PCI hotplug: cpqphp: use pci_dev->vendor
  PCI hotplug: cpqphp: use pci_dev->subsystem_{vendor|device}
  x86/PCI: config space accessor functions should not ignore the segment argument
  PCI: Assign values to 'pci_obff_signal_type' enumeration constants
  x86/PCI: reduce severity of host bridge window conflict warnings
  PCI: enumerate the PCI device only removed out PCI hieratchy of OS when re-scanning PCI
  PCI: PCIe AER: add aer_recover_queue
  x86/PCI: select direct access mode for mmconfig option
  PCI hotplug: Rename is_ejectable which also exists in dock.c

13 years agoMerge branch 'upstream/xen-tracing2' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 30 Jul 2011 06:33:40 +0000 (23:33 -0700)]
Merge branch 'upstream/xen-tracing2' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen

* 'upstream/xen-tracing2' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
  xen/tracing: fix compile errors when tracing is disabled.

13 years agoMerge branch 'at91/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Sat, 30 Jul 2011 06:32:53 +0000 (23:32 -0700)]
Merge branch 'at91/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc

* 'at91/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc:
  at91: add arch specific ioremap support
  at91: factorize sram init
  at91: move register clocks to soc generic init
  at91: move clock subsystem init to soc generic init
  at91: use structure to store the current soc
  at91: remove AT91_DBGU offset from dbgu register macro
  at91: factorize at91 interrupts init to soc
  at91: introduce commom AT91_BASE_SYS

13 years agoMerge branch 'next/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux...
Linus Torvalds [Sat, 30 Jul 2011 06:32:02 +0000 (23:32 -0700)]
Merge branch 'next/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc

* 'next/dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: (21 commits)
  arm/dt: tegra devicetree support
  arm/versatile: Add device tree support
  dt/irq: add irq_domain_generate_simple() helper
  irq: add irq_domain translation infrastructure
  dmaengine: imx-sdma: add device tree probe support
  dmaengine: imx-sdma: sdma_get_firmware does not need to copy fw_name
  dmaengine: imx-sdma: use platform_device_id to identify sdma version
  mmc: sdhci-esdhc-imx: add device tree probe support
  mmc: sdhci-pltfm: dt device does not pass parent to sdhci_alloc_host
  mmc: sdhci-esdhc-imx: get rid of the uses of cpu_is_mx()
  mmc: sdhci-esdhc-imx: do not reference platform data after probe
  mmc: sdhci-esdhc-imx: extend card_detect and write_protect support for mx5
  net/fec: add device tree probe support
  net: ibm_newemac: convert it to use of_get_phy_mode
  dt/net: add helper function of_get_phy_mode
  net/fec: gasket needs to be enabled for some i.mx
  serial/imx: add device tree probe support
  serial/imx: get rid of the uses of cpu_is_mx1()
  arm/dt: Add dtb make rule
  arm/dt: Add skeleton dtsi file
  ...

13 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc
Linus Torvalds [Sat, 30 Jul 2011 06:31:22 +0000 (23:31 -0700)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc:
  ARM: zynq: remove incorrectly deleted file
  ARM: tegra: only select MACH_HAS_SND_SOC_TEGRA_WM8903 if SND_SOC

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-watchdog
Linus Torvalds [Sat, 30 Jul 2011 06:28:47 +0000 (23:28 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-watchdog: (25 commits)
  watchdog: WatchDog Timer Driver Core - Add minimum and max timeout
  watchdog: WatchDog Timer Driver Core - Add ioctl call
  watchdog: WatchDog Timer Driver Core - Add nowayout feature
  watchdog: WatchDog Timer Driver Core - Add Magic Close feature
  watchdog: WatchDog Timer Driver Core - Add WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT ioctl
  watchdog: WatchDog Timer Driver Core - Add WDIOC_SETOPTIONS ioctl
  watchdog: WatchDog Timer Driver Core - Add WDIOC_KEEPALIVE ioctl
  watchdog: WatchDog Timer Driver Core - Add basic ioctl functionality
  watchdog: WatchDog Timer Driver Core - Add basic framework
  watchdog: hpwdt: add next gen HP servers
  watchdog: it8712f_wdt.c: improve includes
  watchdog: at91sam9/wdt: move register header to drivers
  watchdog: Add Xilinx watchdog timer driver
  watchdog: remove empty pm-functions
  watchdog: sp805: Flush posted writes in enable/disable.
  watchdog: sp805: Don't write 0 to the load value register.
  watchdog: imx2_wdt: add device tree probe support
  watchdog: s3c2410: Add support for device tree based probe
  watchdog: mpcore_wdt: Add suspend/resume support.
  watchdog: mtx1-wdt: use dev_{err,info} instead of printk()
  ...

13 years agoext2: remove duplicate 'ext2_get_acl()' define
Linus Torvalds [Sat, 30 Jul 2011 06:21:50 +0000 (23:21 -0700)]
ext2: remove duplicate 'ext2_get_acl()' define

When commit 4e34e719e457 ("fs: take the ACL checks to common code")
changed the xyz_check_acl() functions into the more natural
xyz_get_acl() interface, we grew two copies of the

  #define ext2_get_acl NULL

define for the non-acl case.

Remove the extra one.

Reported-by: Marco Stornelli <marco.stornelli@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agokconfig: Introduce IS_ENABLED(), IS_BUILTIN() and IS_MODULE()
Michal Marek [Wed, 20 Jul 2011 15:38:57 +0000 (17:38 +0200)]
kconfig: Introduce IS_ENABLED(), IS_BUILTIN() and IS_MODULE()

Replace the config_is_*() macros with a variant that allows for grepping
for usage of CONFIG_* options in the code. Usage:

  if (IS_ENABLED(CONFIG_NUMA))

or

  #if IS_ENABLED(CONFIG_NUMA)

The IS_ENABLED() macro evaluates to 1 if the argument is set (to either 'y'
or 'm'), IS_BUILTIN() tests if the option is 'y' and IS_MODULE() test if
the option is 'm'. Only boolean and tristate options are supported.

Reviewed-by: Arnaud Lacombe <lacombar@gmail.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
13 years agoxfs: Fix build breakage in xfs_iops.c when CONFIG_FS_POSIX_ACL is not set
Markus Trippelsdorf [Tue, 26 Jul 2011 09:15:20 +0000 (11:15 +0200)]
xfs: Fix build breakage in xfs_iops.c when CONFIG_FS_POSIX_ACL is not set

commit 4e34e719e45, that takes the ACL checks to common code,
accidentely broke the build when CONFIG_FS_POSIX_ACL is not set:

  CC      fs/xfs/linux-2.6/xfs_iops.o
fs/xfs/linux-2.6/xfs_iops.c:1025:14: error: ‘xfs_get_acl’ undeclared here (not in a function)

Fix this by declaring xfs_get_acl a static inline function.

Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years ago[media] ir-mce_kbd-decoder: include module.h for its facilities
Stephen Rothwell [Fri, 29 Jul 2011 05:41:45 +0000 (15:41 +1000)]
[media] ir-mce_kbd-decoder: include module.h for its facilities

drivers/media/rc/ir-mce_kbd-decoder.c:446:16: error: expected declaration specifiers or '...' before string constant
drivers/media/rc/ir-mce_kbd-decoder.c:446:1: warning: data definition has no type or storage class
drivers/media/rc/ir-mce_kbd-decoder.c:446:1: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/media/rc/ir-mce_kbd-decoder.c:446:16: warning: function declaration isn't a prototype
drivers/media/rc/ir-mce_kbd-decoder.c:447:15: error: expected declaration specifiers or '...' before string constant
drivers/media/rc/ir-mce_kbd-decoder.c:447:1: warning: data definition has no type or storage class
drivers/media/rc/ir-mce_kbd-decoder.c:447:1: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/media/rc/ir-mce_kbd-decoder.c:447:15: warning: function declaration isn't a prototype
drivers/media/rc/ir-mce_kbd-decoder.c:448:20: error: expected declaration specifiers or '...' before string constant
drivers/media/rc/ir-mce_kbd-decoder.c:448:1: warning: data definition has no type or storage class
drivers/media/rc/ir-mce_kbd-decoder.c:448:1: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
drivers/media/rc/ir-mce_kbd-decoder.c:448:20: warning: function declaration isn't a prototype

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] ov5642: include module.h for its facilities
Stephen Rothwell [Fri, 29 Jul 2011 05:30:00 +0000 (15:30 +1000)]
[media] ov5642: include module.h for its facilities

drivers/media/video/ov5642.c:985:1: warning: data definition has no type or storage class
drivers/media/video/ov5642.c:985:1: warning: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE'
drivers/media/video/ov5642.c:985:1: warning: parameter names (without types) in function declaration
drivers/media/video/ov5642.c: In function 'ov5642_mod_init':
drivers/media/video/ov5642.c:998:9: error: 'THIS_MODULE' undeclared (first use in this function)
drivers/media/video/ov5642.c:998:9: note: each undeclared identifier is reported only once for each function it appears in
drivers/media/video/ov5642.c: At top level:
drivers/media/video/ov5642.c:1009:20: error: expected declaration specifiers or '...' before string constant
drivers/media/video/ov5642.c:1009:1: warning: data definition has no type or storage class
drivers/media/video/ov5642.c:1009:1: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
drivers/media/video/ov5642.c:1009:20: warning: function declaration isn't a prototype
drivers/media/video/ov5642.c:1010:15: error: expected declaration specifiers or '...' before string constant
drivers/media/video/ov5642.c:1010:1: warning: data definition has no type or storage class
drivers/media/video/ov5642.c:1010:1: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/media/video/ov5642.c:1010:15: warning: function declaration isn't a prototype
drivers/media/video/ov5642.c:1011:16: error: expected declaration specifiers or '...' before string constant
drivers/media/video/ov5642.c:1011:1: warning: data definition has no type or storage class
drivers/media/video/ov5642.c:1011:1: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/media/video/ov5642.c:1011:16: warning: function declaration isn't a prototype
drivers/media/video/ov5642.c: In function 'ov5642_mod_init':
drivers/media/video/ov5642.c:999:1: warning: control reaches end of non-void function

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agosungem: fix compile failure caused by trivial #include consolidation
Jiri Kosina [Fri, 29 Jul 2011 15:31:16 +0000 (17:31 +0200)]
sungem: fix compile failure caused by trivial #include consolidation

Only Sparc and PPC actually have the asm/prom.h include and as such they
can't be moved outside of the ifdefs.

Reported-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
13 years agoecryptfs: Make inode bdi consistent with superblock bdi
Thieu Le [Tue, 26 Jul 2011 23:15:10 +0000 (16:15 -0700)]
ecryptfs: Make inode bdi consistent with superblock bdi

Make the inode mapping bdi consistent with the superblock bdi so that
dirty pages are flushed properly.

Signed-off-by: Thieu Le <thieule@chromium.org>
Cc: <stable@kernel.org> [2.6.39+]
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
13 years agoeCryptfs: Unlock keys needed by ecryptfsd
Tyler Hicks [Wed, 27 Jul 2011 00:47:08 +0000 (19:47 -0500)]
eCryptfs: Unlock keys needed by ecryptfsd

Fixes a regression caused by b5695d04634fa4ccca7dcbc05bb4a66522f02e0b

Kernel keyring keys containing eCryptfs authentication tokens should not
be write locked when calling out to ecryptfsd to wrap and unwrap file
encryption keys. The eCryptfs kernel code can not hold the key's write
lock because ecryptfsd needs to request the key after receiving such a
request from the kernel.

Without this fix, all file opens and creates will timeout and fail when
using the eCryptfs PKI infrastructure. This is not an issue when using
passphrase-based mount keys, which is the most widely deployed eCryptfs
configuration.

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Acked-by: Roberto Sassu <roberto.sassu@polito.it>
Tested-by: Roberto Sassu <roberto.sassu@polito.it>
Tested-by: Alexis Hafner1 <haf@zurich.ibm.com>
Cc: <stable@kernel.org> [2.6.39+]
13 years agohwmon: (lm90) Refactor reading of config2 register
Jean Delvare [Sun, 24 Jul 2011 18:37:05 +0000 (20:37 +0200)]
hwmon: (lm90) Refactor reading of config2 register

Several vendors implement a second configuration register, which we
check during device detection. Refactor the code to avoid duplication.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Stijn Devriendt <sdevrien@cisco.com>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
13 years agohwmon: (lm90) Make SA56004 detection more robust
Jean Delvare [Sun, 24 Jul 2011 18:36:15 +0000 (20:36 +0200)]
hwmon: (lm90) Make SA56004 detection more robust

With a device ID register value of 0, the SA56004 detection is rather
weak. Check several other register too to confirm the detection, as we
do for other supported devices.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Stijn Devriendt <sdevrien@cisco.com>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Stijn Devriendt <sdevrien@cisco.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
13 years agohwmon: (lm90) Simplify handling of extended local temp register
Jean Delvare [Thu, 28 Jul 2011 06:22:25 +0000 (23:22 -0700)]
hwmon: (lm90) Simplify handling of extended local temp register

The optional extended local temperature register can never have
address 0, as this address is already used by another register. Thus
we can get rid of flag LM90_HAVE_LOCAL_EXT and simply rely on
reg_local_ext being non-zero to determine if a given chip has this
extension or not. This makes the code more simple.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Stijn Devriendt <sdevrien@cisco.com>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
13 years agohwmon: (pmbus) Add client driver for LM25066, LM5064, and LM5066
Guenter Roeck [Fri, 8 Jul 2011 17:43:57 +0000 (10:43 -0700)]
hwmon: (pmbus) Add client driver for LM25066, LM5064, and LM5066

PMBus client driver supporting National Semiconductor LM25066, LM5064, and LM5066.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
13 years agohwmon: (max34440) Add support for peak attributes
Guenter Roeck [Sat, 9 Jul 2011 20:17:43 +0000 (13:17 -0700)]
hwmon: (max34440) Add support for peak attributes

Add support for voltage, current, and temperature peak (historic maximum)
attributes.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
13 years agohwmon: (max8688) Add support for peak attributes
Guenter Roeck [Sat, 9 Jul 2011 20:11:44 +0000 (13:11 -0700)]
hwmon: (max8688) Add support for peak attributes

Add support for voltage, current, and temperature peak (historic maximum)
attributes.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
13 years agohwmon: (max16064) Add support for peak attributes
Guenter Roeck [Sat, 9 Jul 2011 20:10:19 +0000 (13:10 -0700)]
hwmon: (max16064) Add support for peak attributes

Add support for voltage and temperature peak (historic maximum) attributes.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
13 years agohwmon: (adm1275) Add support for peak attributes
Guenter Roeck [Sat, 9 Jul 2011 18:17:33 +0000 (11:17 -0700)]
hwmon: (adm1275) Add support for peak attributes

Add support for voltage and current peak (historic maximum) attributes.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
13 years agohwmon: (pmbus) Add support for peak attributes
Guenter Roeck [Sat, 9 Jul 2011 15:30:26 +0000 (08:30 -0700)]
hwmon: (pmbus) Add support for peak attributes

Most PMBus devices provide manufacturer specific commands to read low and/or
high peak values for some or all of its sensors.

To support providing those values as lowest/highest attributes to the user,
introduce virtual PMBus commands. Those commands reside outside the normal
command set and have to be implemented in device specific code, which map the
virtual commands to device specific commands.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
13 years agohwmon: Add new attributes to sysfs ABI
Guenter Roeck [Sat, 9 Jul 2011 17:32:11 +0000 (10:32 -0700)]
hwmon: Add new attributes to sysfs ABI

Add the following attributes to the sysfs ABI.

in[0-*]_average
in[0-*]_lowest
in[0-*]_highest
in[0-*]_reset_history
in_reset_history

curr[1-*]_average
curr[1-*]_lowest
curr[1-*]_highest
curr[1-*]_reset_history
curr_reset_history

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
13 years agohwmon: (pmbus) Strengthen check for status register existence
Guenter Roeck [Sat, 9 Jul 2011 19:06:45 +0000 (12:06 -0700)]
hwmon: (pmbus) Strengthen check for status register existence

With virtual register page support, it is now possible that the status register
on virtual pages does not exist or is itself virtual. To take this into account
when creating alarm attributes, generate those attributes only if the status
register on the respective page is known to exist.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
13 years agohwmon: (pmbus) Add support for virtual pages
Guenter Roeck [Sat, 9 Jul 2011 14:41:01 +0000 (07:41 -0700)]
hwmon: (pmbus) Add support for virtual pages

Some PMBus chips have non-standard sensor registers. An easy way to
support such sensors is to introduce virtual pages and map the non-standard
registers into standard registers on an extra page.

For this to work, the code verifying if the configured number of pages exists
has to be removed. Since a wrong number of pages can only be configured in a
front-end driver, this should not have a practical impact since the resulting
errors should be found during development and testing.

Also, functions to read the chip status while checking if a command register
exists must be modified to no longer set the page register before reading the
status, since the physical page associated with the checked register may not
exist. This does not make a functional difference since the page was already set
when the attempt to read the register was made.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
13 years agohwmon: (pmbus) Support reading and writing of word registers in device specific code
Guenter Roeck [Fri, 8 Jul 2011 17:41:24 +0000 (10:41 -0700)]
hwmon: (pmbus) Support reading and writing of word registers in device specific code

Some PMBus devices use non-standard registers for some of the sensors and/or
limits. To support such devices, add code to support reading and writing of word
size registers in device specific code.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
13 years agohwmon: (pmbus) Increase attribute name size
Guenter Roeck [Sat, 9 Jul 2011 15:58:49 +0000 (08:58 -0700)]
hwmon: (pmbus) Increase attribute name size

Some hwmon sysfs attributes have a length of 20 bytes (plus terminating 0).
I2C_NAME_SIZE is defined as 20 and thus can not be used to define the length
of hwmon sysfs attributes. Replace it with PMBUS_NAME_SIZE, set to 24.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
13 years agohwmon: (pmbus) Add ADP4000, NCP4200 and NCP4208 to list of supported devices
Guenter Roeck [Sat, 25 Jun 2011 22:13:44 +0000 (15:13 -0700)]
hwmon: (pmbus) Add ADP4000, NCP4200 and NCP4208 to list of supported devices

Add ADP4000, NCP4200 and NCP4208 to the list of devices supported by the generic
PMBus driver, and add device IDs to enable explicit instantiation.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (pmbus) Add support for VID output voltage mode
Guenter Roeck [Sat, 25 Jun 2011 18:21:49 +0000 (11:21 -0700)]
hwmon: (pmbus) Add support for VID output voltage mode

In VID mode, output voltages are measured and reported as VID values, and
have to be converted to voltages using VID conversion tables or functions.
Support is added for VR11 only at this time.

This patch enables support for PMBus devices supporting VID VR11 based output
voltage selection such as NCP4200 and NCP4208.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
13 years ago[media] em28xx: Fix DVB-C maxsize for em2884
Mauro Carvalho Chehab [Thu, 28 Jul 2011 18:42:00 +0000 (15:42 -0300)]
[media] em28xx: Fix DVB-C maxsize for em2884

The logic at em28xx_isoc_dvb_max_packetsize() sucks, at least for newer
the needed packet size. Yet, it is better than nothing.

Rewrite the code in order to change the default to 752 for em2884 and
newer chips and provide a better way to handle per-chipset specifics.

For em2874, the current default should be enough, as the only em2874
board is currently a 1-seg ISDB-T board, so, it needs only a limited
amount of bandwidth.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years ago[media] tda18271c2dd: Fix saw filter configuration for DVB-C @6MHz
Mauro Carvalho Chehab [Thu, 28 Jul 2011 18:49:43 +0000 (15:49 -0300)]
[media] tda18271c2dd: Fix saw filter configuration for DVB-C @6MHz

Currently, the driver assumes that all QAM carriers are spaced with
8MHz. This is wrong, and may decrease QoS on Countries like Brazil,
that have DVB-C carriers with 6MHz-spaced.

Fortunately, both ITU-T J-83 and EN 300 429 specifies a way to
associate the symbol rate with the bandwidth needed for it.

For ITU-T J-83 2007 annex A, the maximum symbol rate for 6 MHz is:
6 MHz / 1.15 = 5217391 Bauds
For  ITU-T J-83 2007 annex C, the maximum symbol rate for 6 MHz is:
6 MHz / 1.13 = 5309735 Bauds.

As this tuner is currently used only for DRX-K, and it is currently
hard-coded to annex A, I've opted to use the roll-off factor of 0.15,
instead of 0.13.

If we ever support annex C, the better would be to add a DVB S2API
call to allow changing between Annex A and C, and add the 0.13 roll-off
factor to it.

This code is currently being used on other frontends, so I think we
should later add a core function with this code, to warrant that
it will be properly implemented everywhere.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agohwmon: (pmbus) Move PMBus drivers to drivers/hwmon/pmbus
Guenter Roeck [Tue, 12 Jul 2011 14:15:19 +0000 (07:15 -0700)]
hwmon: (pmbus) Move PMBus drivers to drivers/hwmon/pmbus

Since the number of PMBus drivers is getting large, move them into
directory drivers/hwmon/pmbus to improve readability and scalability.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
13 years agoARM: zynq: remove incorrectly deleted file
Arnd Bergmann [Thu, 28 Jul 2011 14:33:40 +0000 (14:33 +0000)]
ARM: zynq: remove incorrectly deleted file

My previous commit left the file empty and present in the
Makefile, which is a bit dirty and caused problems with
'make distclean', as pointed out by David Howells.
This hopefully cleans it up the right way.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: John Linn <john.linn@xilinx.com>
13 years agoMerge branch 'imx/dt' into next/dt
Arnd Bergmann [Thu, 28 Jul 2011 15:25:46 +0000 (15:25 +0000)]
Merge branch 'imx/dt' into next/dt

13 years agoat91: add arch specific ioremap support
Jean-Christophe PLAGNIOL-VILLARD [Sat, 7 May 2011 03:16:00 +0000 (11:16 +0800)]
at91: add arch specific ioremap support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
13 years agoat91: factorize sram init
Jean-Christophe PLAGNIOL-VILLARD [Mon, 9 May 2011 19:20:09 +0000 (03:20 +0800)]
at91: factorize sram init

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
13 years agoat91: move register clocks to soc generic init
Jean-Christophe PLAGNIOL-VILLARD [Sun, 24 Apr 2011 10:15:34 +0000 (18:15 +0800)]
at91: move register clocks to soc generic init

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
13 years agoat91: move clock subsystem init to soc generic init
Jean-Christophe PLAGNIOL-VILLARD [Sun, 24 Apr 2011 10:20:28 +0000 (18:20 +0800)]
at91: move clock subsystem init to soc generic init

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
13 years agoat91: use structure to store the current soc
Jean-Christophe PLAGNIOL-VILLARD [Sat, 23 Apr 2011 14:12:57 +0000 (22:12 +0800)]
at91: use structure to store the current soc

instead of reading the registers everytime

the current implementation respect the following constrain:
 - allow 1 to n soc to be enabled
 - allow to have a virtual cpu type and subtype
 - always detect the cpu type and subtype and report it
 - detect if the soc support is enabled
 - prepare for sysfs export support
 - drop soc specific code via compiler when the soc not enabled
   (via cpu_is_xxx)

Today if we read the exid we will have the same value for 9g35 and 9m11
and we will need to check the cidr too

with the new implementation we just need to check the soc subtype

this will also allow to have specific virtual subtype for rm9200 which the
board will have to specify via at91rm9200_set_type(int) as we have no way to
detect it.

this implementation is inspired by the SH cpu detection support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
13 years agoat91: remove AT91_DBGU offset from dbgu register macro
Jean-Christophe PLAGNIOL-VILLARD [Mon, 2 May 2011 17:11:25 +0000 (01:11 +0800)]
at91: remove AT91_DBGU offset from dbgu register macro

to make the soc base specified at runtime instead of compiled time

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
13 years agoat91: factorize at91 interrupts init to soc
Jean-Christophe PLAGNIOL-VILLARD [Sat, 23 Apr 2011 07:28:34 +0000 (15:28 +0800)]
at91: factorize at91 interrupts init to soc

they are the same except the default priority

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
13 years agoat91: introduce commom AT91_BASE_SYS
Jean-Christophe PLAGNIOL-VILLARD [Sat, 23 Apr 2011 07:28:34 +0000 (15:28 +0800)]
at91: introduce commom AT91_BASE_SYS

On all at91 except rm9200 and x40 have the System Controller starts
at address 0xffffc000 and has a size of 16KiB.

On rm9200 it's start at 0xfffe4000 of 111KiB with non reserved data starting
at 0xfffff000

This patch removes the individual definitions of AT91_BASE_SYS and
replaces them with a common version at base 0xfffffc000 and size 16KiB
and map the same memory space

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Thu, 28 Jul 2011 12:59:19 +0000 (05:59 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  n2_crypto: Attach on Niagara-T3.
  n2rng: Attach on Niagara-T3.
  sparc: Detect and handle UltraSPARC-T3 cpu types.
  sparc: Don't do expensive hypervisor PCR write unless necessary.
  sparc: Add T3 sun4v cpu type and hypervisor group defines.
  sparc: Don't leave sparc_pmu_type NULL on sun4v.

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Thu, 28 Jul 2011 12:58:19 +0000 (05:58 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (32 commits)
  tg3: Remove 5719 jumbo frames and TSO blocks
  tg3: Break larger frags into 4k chunks for 5719
  tg3: Add tx BD budgeting code
  tg3: Consolidate code that calls tg3_tx_set_bd()
  tg3: Add partial fragment unmapping code
  tg3: Generalize tg3_skb_error_unmap()
  tg3: Remove short DMA check for 1st fragment
  tg3: Simplify tx bd assignments
  tg3: Reintroduce tg3_tx_ring_info
  ASIX: Use only 11 bits of header for data size
  ASIX: Simplify condition in rx_fixup()
  Fix cdc-phonet build
  bonding: reduce noise during init
  bonding: fix string comparison errors
  net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
  net: add IFF_SKB_TX_SHARED flag to priv_flags
  net: sock_sendmsg_nosec() is static
  forcedeth: fix vlans
  gianfar: fix bug caused by 87c288c6e9aa31720b72e2bc2d665e24e1653c3e
  gro: Only reset frag0 when skb can be pulled
  ...

13 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Thu, 28 Jul 2011 12:50:27 +0000 (05:50 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md: (75 commits)
  md/raid10: handle further errors during fix_read_error better.
  md/raid10: Handle read errors during recovery better.
  md/raid10: simplify read error handling during recovery.
  md/raid10: record bad blocks due to write errors during resync/recovery.
  md/raid10:  attempt to fix read errors during resync/check
  md/raid10:  Handle write errors by updating badblock log.
  md/raid10: clear bad-block record when write succeeds.
  md/raid10: avoid writing to known bad blocks on known bad drives.
  md/raid10 record bad blocks as needed during recovery.
  md/raid10: avoid reading known bad blocks during resync/recovery.
  md/raid10 - avoid reading from known bad blocks - part 3
  md/raid10: avoid reading from known bad blocks - part 2
  md/raid10: avoid reading from known bad blocks - part 1
  md/raid10: Split handle_read_error out from raid10d.
  md/raid10: simplify/reindent some loops.
  md/raid5: Clear bad blocks on successful write.
  md/raid5.  Don't write to known bad block on doubtful devices.
  md/raid5: write errors should be recorded as bad blocks if possible.
  md/raid5: use bad-block log to improve handling of uncorrectable read errors.
  md/raid5: avoid reading from known bad blocks.
  ...