Archived
14
0
Fork 0
Commit graph

439 commits

Author SHA1 Message Date
Yinghai Lu
0b0f0b1c2c sparseirq: use kstat_irqs_cpu on non-x86 architectures too
so we could move kstat_irqs array to irq_desc struct.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-12 20:01:12 +01:00
Linus Torvalds
57c44c5f6f 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: (24 commits)
  trivial: chack -> check typo fix in main Makefile
  trivial: Add a space (and a comma) to a printk in 8250 driver
  trivial: Fix misspelling of "firmware" in docs for ncr53c8xx/sym53c8xx
  trivial: Fix misspelling of "firmware" in powerpc Makefile
  trivial: Fix misspelling of "firmware" in usb.c
  trivial: Fix misspelling of "firmware" in qla1280.c
  trivial: Fix misspelling of "firmware" in a100u2w.c
  trivial: Fix misspelling of "firmware" in megaraid.c
  trivial: Fix misspelling of "firmware" in ql4_mbx.c
  trivial: Fix misspelling of "firmware" in acpi_memhotplug.c
  trivial: Fix misspelling of "firmware" in ipw2100.c
  trivial: Fix misspelling of "firmware" in atmel.c
  trivial: Fix misspelled firmware in Kconfig
  trivial: fix an -> a typos in documentation and comments
  trivial: fix then -> than typos in comments and documentation
  trivial: update Jesper Juhl CREDITS entry with new email
  trivial: fix singal -> signal typo
  trivial: Fix incorrect use of "loose" in event.c
  trivial: printk: fix indentation of new_text_line declaration
  trivial: rtc-stk17ta8: fix sparse warning
  ...
2009-01-07 11:31:52 -08:00
Linus Torvalds
ce519e2327 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (237 commits)
  Staging: android: binder: fix build errors
  Staging: android: add lowmemorykiller driver
  Staging: android: remove dummy android.c driver
  Staging: android: timed_gpio: Rename android_timed_gpio to timed_gpio
  Staging: android: add timed_gpio driver
  Staging: android: add ram_console driver
  Staging: android: add logging driver
  staging: android: binder: Fix use of euid
  Staging: android: binder: Fix gcc warnings about improper format specifiers for size_t in printk
  Staging: android: add binder driver
  Staging: add android framework
  Staging: epl: fix netdev->priv b0rkage
  Staging: epl: hr timers all run in hard irq context now
  Staging: epl: run Lindent on *.c files
  Staging: epl: run Lindent on *.h files
  Staging: epl: run Lindent on all user/*.h files
  Staging: epl: run Lindent on all kernel/*.h files
  Staging: add epl stack
  Staging: frontier: fix compiler warnings
  Staging: frontier: remove unused alphatrack_sysfs.c file
  ...
2009-01-06 17:04:29 -08:00
Linus Torvalds
40d7ee5d16 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (60 commits)
  uio: make uio_info's name and version const
  UIO: Documentation for UIO ioport info handling
  UIO: Pass information about ioports to userspace (V2)
  UIO: uio_pdrv_genirq: allow custom irq_flags
  UIO: use pci_ioremap_bar() in drivers/uio
  arm: struct device - replace bus_id with dev_name(), dev_set_name()
  libata: struct device - replace bus_id with dev_name(), dev_set_name()
  avr: struct device - replace bus_id with dev_name(), dev_set_name()
  block: struct device - replace bus_id with dev_name(), dev_set_name()
  chris: struct device - replace bus_id with dev_name(), dev_set_name()
  dmi: struct device - replace bus_id with dev_name(), dev_set_name()
  gadget: struct device - replace bus_id with dev_name(), dev_set_name()
  gpio: struct device - replace bus_id with dev_name(), dev_set_name()
  gpu: struct device - replace bus_id with dev_name(), dev_set_name()
  hwmon: struct device - replace bus_id with dev_name(), dev_set_name()
  i2o: struct device - replace bus_id with dev_name(), dev_set_name()
  IA64: struct device - replace bus_id with dev_name(), dev_set_name()
  i7300_idle: struct device - replace bus_id with dev_name(), dev_set_name()
  infiniband: struct device - replace bus_id with dev_name(), dev_set_name()
  ISDN: struct device - replace bus_id with dev_name(), dev_set_name()
  ...
2009-01-06 17:02:07 -08:00
Matthew Wilcox
ea43546750 atomic_t: unify all arch definitions
The atomic_t type cannot currently be used in some header files because it
would create an include loop with asm/atomic.h.  Move the type definition
to linux/types.h to break the loop.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 15:59:10 -08:00
F. Duncan M. Haldane
6e38a2ba79 Staging: Kconfig for ARCH=arm,8300, cris
The new Kconfig option to build "staging" drivers (code in
drivers/staging/) is seen in all except three architectures (arm, h8300,
cris), because in these cases arch/$ARCH/Kconfig does NOT source
drivers/Kconfig.

This patch adds the source "drivers/staging/Kconfig" to
arch/$ARCH/Kconfig for these three exceptional cases.

Signed-off-by: Duncan Haldane <duncan_h@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:38 -08:00
Kay Sievers
4383fc3d9a chris: struct device - replace bus_id with dev_name(), dev_set_name()
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:42 -08:00
Frederik Schwarzer
c03264a790 trivial: fix singal -> signal typo
Typo fix.

Signed-off-by: Frederik Schwarzer <schwarzerf@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-06 11:28:06 +01:00
Linus Torvalds
7d3b56ba37 Merge branch 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (77 commits)
  x86: setup_per_cpu_areas() cleanup
  cpumask: fix compile error when CONFIG_NR_CPUS is not defined
  cpumask: use alloc_cpumask_var_node where appropriate
  cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t
  x86: use cpumask_var_t in acpi/boot.c
  x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids
  sched: put back some stack hog changes that were undone in kernel/sched.c
  x86: enable cpus display of kernel_max and offlined cpus
  ia64: cpumask fix for is_affinity_mask_valid()
  cpumask: convert RCU implementations, fix
  xtensa: define __fls
  mn10300: define __fls
  m32r: define __fls
  h8300: define __fls
  frv: define __fls
  cris: define __fls
  cpumask: CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
  cpumask: zero extra bits in alloc_cpumask_var_node
  cpumask: replace for_each_cpu_mask_nr with for_each_cpu in kernel/time/
  cpumask: convert mm/
  ...
2009-01-03 12:04:39 -08:00
Rusty Russell
0999769e6c cris: define __fls
Like fls, but can't be handed 0 and returns the bit number.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-01-03 15:37:14 +10:30
Linus Torvalds
b840d79631 Merge branch 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (66 commits)
  x86: export vector_used_by_percpu_irq
  x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and()
  sched: nominate preferred wakeup cpu, fix
  x86: fix lguest used_vectors breakage, -v2
  x86: fix warning in arch/x86/kernel/io_apic.c
  sched: fix warning in kernel/sched.c
  sched: move test_sd_parent() to an SMP section of sched.h
  sched: add SD_BALANCE_NEWIDLE at MC and CPU level for sched_mc>0
  sched: activate active load balancing in new idle cpus
  sched: bias task wakeups to preferred semi-idle packages
  sched: nominate preferred wakeup cpu
  sched: favour lower logical cpu number for sched_mc balance
  sched: framework for sched_mc/smt_power_savings=N
  sched: convert BALANCE_FOR_xx_POWER to inline functions
  x86: use possible_cpus=NUM to extend the possible cpus allowed
  x86: fix cpu_mask_to_apicid_and to include cpu_online_mask
  x86: update io_apic.c to the new cpumask code
  x86: Introduce topology_core_cpumask()/topology_thread_cpumask()
  x86: xen: use smp_call_function_many()
  x86: use work_on_cpu in x86/kernel/cpu/mcheck/mce_amd_64.c
  ...

Fixed up trivial conflict in kernel/time/tick-sched.c manually
2009-01-02 11:44:09 -08:00
Al Viro
18d8fda7c3 take init_fs to saner place
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-12-31 18:07:42 -05:00
Rusty Russell
0de26520c7 cpumask: make irq_set_affinity() take a const struct cpumask
Impact: change existing irq_chip API

Not much point with gentle transition here: the struct irq_chip's
setaffinity method signature needs to change.

Fortunately, not widely used code, but hits a few architectures.

Note: In irq_select_affinity() I save a temporary in by mangling
irq_desc[irq].affinity directly.  Ingo, does this break anything?

(Folded in fix from KOSAKI Motohiro)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Grant Grundler <grundler@parisc-linux.org>
Acked-by: Ingo Molnar <mingo@redhat.com>
Cc: ralf@linux-mips.org
Cc: grundler@parisc-linux.org
Cc: jeremy@xensource.com
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
2008-12-13 21:20:26 +10:30
Rusty Russell
98a79d6a50 cpumask: centralize cpu_online_map and cpu_possible_map
Impact: cleanup

Each SMP arch defines these themselves.  Move them to a central
location.

Twists:
1) Some archs (m32, parisc, s390) set possible_map to all 1, so we add a
   CONFIG_INIT_ALL_POSSIBLE for this rather than break them.

2) mips and sparc32 '#define cpu_possible_map phys_cpu_present_map'.
   Those archs simply have phys_cpu_present_map replaced everywhere.

3) Alpha defined cpu_possible_map to cpu_present_map; this is tricky
   so I just manipulate them both in sync.

4) IA64, cris and m32r have gratuitous 'extern cpumask_t cpu_possible_map'
   declarations.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Grant Grundler <grundler@parisc-linux.org>
Tested-by: Tony Luck <tony.luck@intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Mike Travis <travis@sgi.com>
Cc: ink@jurassic.park.msu.ru
Cc: rmk@arm.linux.org.uk
Cc: starvik@axis.com
Cc: tony.luck@intel.com
Cc: takata@linux-m32r.org
Cc: ralf@linux-mips.org
Cc: grundler@parisc-linux.org
Cc: paulus@samba.org
Cc: schwidefsky@de.ibm.com
Cc: lethal@linux-sh.org
Cc: wli@holomorphy.com
Cc: davem@davemloft.net
Cc: jdike@addtoit.com
Cc: mingo@redhat.com
2008-12-13 21:19:41 +10:30
Jesper Nilsson
c5ec6fb08d [CRIS] Remove links from CRIS build
Remove the links to architecture and machine dependent directories
(boot, lib, drivers, arch, mach)

The links were created and used mostly from the arch/cris/Makefile,
so why not dispense with them altogether?
Changed $(ARCH) to "cris" in Makefile, it is easier to read this way.

The CRISv32 head.S common files for the kernel and compressed images
needed to be modified to use ifdefs instead of using the now removed
mach link. Since there are only two versions, this is not a huge loss
in readability.

The link to vmlinux.lds.S is also replaced with a merged version
which uses ifdefs to select the correct layout.
System.map before and after are identical.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
2008-10-31 23:37:57 +01:00
Jesper Nilsson
0365f707c9 [CRIS] Merge asm-offsets.c for both arches into one file.
Eliminates the link to arch specific asm-offsets.c from CRIS
architecture build system.

Resulting asm-offsets.s are identical before and after change
for both arch-v10 and arch-v32.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
2008-10-31 23:37:00 +01:00
Jesper Nilsson
556dcee7b8 [CRIS] Move header files from include to arch/cris/include.
Change all users of header files to correct path.
Remove some unneeded headers for arch-v32.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-10-29 17:29:44 +01:00
Linus Torvalds
9779a8325a Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb: (47 commits)
  uwb: wrong sizeof argument in mac address compare
  uwb: don't use printk_ratelimit() so often
  uwb: use kcalloc where appropriate
  uwb: use time_after() when purging stale beacons
  uwb: add credits for the original developers of the UWB/WUSB/WLP subsystems
  uwb: add entries in the MAINTAINERS file
  uwb: depend on EXPERIMENTAL
  wusb: wusb-cbaf (CBA driver) sysfs ABI simplification
  uwb: document UWB and WUSB sysfs files
  uwb: add symlinks in sysfs between radio controllers and PALs
  uwb: dont tranmit identification IEs
  uwb: i1480/GUWA100U: fix firmware download issues
  uwb: i1480: remove MAC/PHY information checking function
  uwb: add Intel i1480 HWA to the UWB RC quirk table
  uwb: disable command/event filtering for D-Link DUB-1210
  uwb: initialize the debug sub-system
  uwb: Fix handling IEs with empty IE data in uwb_est_get_size()
  wusb: fix bmRequestType for Abort RPipe request
  wusb: fix error path for wusb_set_dev_addr()
  wusb: add HWA host controller driver
  ...
2008-10-23 08:20:34 -07:00
Adrian Bunk
4110a0d620 cris: use bcd2bin/bin2bcd
Change cris to use the new bcd2bin/bin2bcd functions instead of the
obsolete BCD_TO_BIN/BIN_TO_BCD macros.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Chris Zankel <zankel@tensilica.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20 08:52:41 -07:00
Matt Helsley
dc52ddc0e6 container freezer: implement freezer cgroup subsystem
This patch implements a new freezer subsystem in the control groups
framework.  It provides a way to stop and resume execution of all tasks in
a cgroup by writing in the cgroup filesystem.

The freezer subsystem in the container filesystem defines a file named
freezer.state.  Writing "FROZEN" to the state file will freeze all tasks
in the cgroup.  Subsequently writing "RUNNING" will unfreeze the tasks in
the cgroup.  Reading will return the current state.

* Examples of usage :

   # mkdir /containers/freezer
   # mount -t cgroup -ofreezer freezer  /containers
   # mkdir /containers/0
   # echo $some_pid > /containers/0/tasks

to get status of the freezer subsystem :

   # cat /containers/0/freezer.state
   RUNNING

to freeze all tasks in the container :

   # echo FROZEN > /containers/0/freezer.state
   # cat /containers/0/freezer.state
   FREEZING
   # cat /containers/0/freezer.state
   FROZEN

to unfreeze all tasks in the container :

   # echo RUNNING > /containers/0/freezer.state
   # cat /containers/0/freezer.state
   RUNNING

This is the basic mechanism which should do the right thing for user space
task in a simple scenario.

It's important to note that freezing can be incomplete.  In that case we
return EBUSY.  This means that some tasks in the cgroup are busy doing
something that prevents us from completely freezing the cgroup at this
time.  After EBUSY, the cgroup will remain partially frozen -- reflected
by freezer.state reporting "FREEZING" when read.  The state will remain
"FREEZING" until one of these things happens:

	1) Userspace cancels the freezing operation by writing "RUNNING" to
		the freezer.state file
	2) Userspace retries the freezing operation by writing "FROZEN" to
		the freezer.state file (writing "FREEZING" is not legal
		and returns EIO)
	3) The tasks that blocked the cgroup from entering the "FROZEN"
		state disappear from the cgroup's set of tasks.

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: export thaw_process]
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Acked-by: Serge E. Hallyn <serue@us.ibm.com>
Tested-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20 08:52:34 -07:00
David Vrabel
61e0e79ee3 Merge branch 'master' into for-upstream
Conflicts:

	Documentation/ABI/testing/sysfs-bus-usb
	drivers/Makefile
2008-10-20 16:07:19 +01:00
Linus Torvalds
b73b636e89 Merge branch 'for-linus' of git://www.jni.nu/cris
* 'for-linus' of git://www.jni.nu/cris:
  CRIS: proper defconfig setup
  [CRIS] Rename boot-linkscripts and fix the path to them.
2008-10-17 09:09:48 -07:00
Dominik Brodowski
459fc208ab cpufreq: remove policy->governor setting in drivers initialization
As policy->governor is already set to CPUFREQ_DEFAULT_GOVERNOR in the
(always built-in) cpufreq core, we do not need to set it in the drivers.
This fixes the sparc64 allmodconfig build failure.

Also, remove a totally useles setting of ->policy in cpufreq-pxa3xx.c.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-15 16:42:47 -07:00
Adrian Bunk
8f808417fe CRIS: proper defconfig setup
This patch moves the cris defconfigs to arch/cris/configs/ where they
belong.

As a side effect they can now be used directly through e.g.
  make ARCH=cris artpec_3_defconfig

The default defconfig is set through KBUILD_DEFCONFIG.

Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-10-13 21:34:55 +02:00
David Woodhouse
e758936e02 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	include/asm-x86/statfs.h
2008-10-13 17:13:56 +01:00
Greg Kroah-Hartman
2f86c3e67d uwb: add the UWB stack (build system)
The Kbuild and Kconfig files.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17 16:54:25 +01:00
Manfred Spraul
e545a6140b kernel/cpu.c: create a CPU_STARTING cpu_chain notifier
Right now, there is no notifier that is called on a new cpu, before the new
cpu begins processing interrupts/softirqs.
Various kernel function would need that notification, e.g. kvm works around
by calling smp_call_function_single(), rcu polls cpu_online_map.

The patch adds a CPU_STARTING notification. It also adds a helper function
that sends the message to all cpu_chain handlers.

Tested on x86-64.
All other archs are untested. Especially on sparc, I'm not sure if I got
it right.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-09-08 19:25:24 +02:00
Adrian Bunk
9d5a9e7465 Remove asm/a.out.h files for all architectures without a.out support.
This patch also includes the required removal of (unused) inclusion of
<asm/a.out.h> <linux/a.out.h>'s in the arch/ code for these
architectures.

[dwmw2: updated for 2.6.27-rc]
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-06 19:30:24 +01:00
Adrian Bunk
7a8fc9b248 removed unused #include <linux/version.h>'s
This patch lets the files using linux/version.h match the files that
#include it.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-23 12:14:12 -07:00
Ingo Molnar
cb28a1bbdb Merge branch 'linus' into core/generic-dma-coherent
Conflicts:

	arch/x86/Kconfig

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-29 00:07:55 +02:00
Johannes Weiner
a4074d93dd cris: use generic show_mem()
Remove arch-specific show_mem() in favor of the generic version.

This also removes the following redundant information display:

	- free pages, printed by show_free_areas()
	- pages in swapcache, printed by show_swap_cache_info()

where show_mem() calls show_free_areas(), which calls
show_swap_cache_info().

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Acked-by: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-26 12:00:11 -07:00
Harvey Harrison
42a9a58361 cris: use the common ascii hex helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-26 12:00:05 -07:00
Thomas Petazzoni
2d6ffcca62 inflate: refactor inflate malloc code
Inflate requires some dynamic memory allocation very early in the boot
process and this is provided with a set of four functions:
malloc/free/gzip_mark/gzip_release.

The old inflate code used a mark/release strategy rather than implement
free.  This new version instead keeps a count on the number of outstanding
allocations and when it hits zero, it resets the malloc arena.

This allows removing all the mark and release implementations and unifying
all the malloc/free implementations.

The architecture-dependent code must define two addresses:
 - free_mem_ptr, the address of the beginning of the area in which
   allocations should be made
 - free_mem_end_ptr, the address of the end of the area in which
   allocations should be made. If set to 0, then no check is made on
   the number of allocations, it just grows as much as needed

The architecture-dependent code can also provide an arch_decomp_wdog()
function call.  This function will be called several times during the
decompression process, and allow to notify the watchdog that the system is
still running.  If an architecture provides such a call, then it must
define ARCH_HAS_DECOMP_WDOG so that the generic inflate code calls
arch_decomp_wdog().

Work initially done by Matt Mackall, updated to a recent version of the
kernel and improved by me.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-25 10:53:28 -07:00
Akinobu Mita
ed62f77bb6 cris: use simple_read_from_buffer()
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:24 -07:00
Johannes Weiner
9109fb7b35 mm: drop unneeded pgdat argument from free_area_init_node()
free_area_init_node() gets passed in the node id as well as the node
descriptor.  This is redundant as the function can trivially get the node
descriptor itself by means of NODE_DATA() and the node's id.

I checked all the users and NODE_DATA() seems to be usable everywhere
from where this function is called.

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:16 -07:00
Linus Torvalds
3a53337428 Merge branch 'for-linus' of git://www.jni.nu/cris
* 'for-linus' of git://www.jni.nu/cris:
  [CRISv10] Clean up compressed/misc.c
  [CRISv10] Correct whitespace damage.
  [CRIS] Correct definition of subdirs for install_headers.
  [CRIS] Correct image makefiles to allow using a separate OBJ-directory.
  [CRIS] Build fixes for compressed and rescue images for v10 and v32:
  It looks at least odd to apply spin_unlock to a mutex.
  cris: compile fixes for 2.6.26-rc5
2008-07-20 17:37:46 -07:00
Dmitry Baryshkov
8fa8b9fbab Cris: convert to using generic dma-coherent mem allocator
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-20 21:21:59 +02:00
Ingo Molnar
1a781a777b Merge branch 'generic-ipi' into generic-ipi-for-linus
Conflicts:

	arch/powerpc/Kconfig
	arch/s390/kernel/time.c
	arch/x86/kernel/apic_32.c
	arch/x86/kernel/cpu/perfctr-watchdog.c
	arch/x86/kernel/i8259_64.c
	arch/x86/kernel/ldt.c
	arch/x86/kernel/nmi_64.c
	arch/x86/kernel/smpboot.c
	arch/x86/xen/smp.c
	include/asm-x86/hw_irq_32.h
	include/asm-x86/hw_irq_64.h
	include/asm-x86/mach-default/irq_vectors.h
	include/asm-x86/mach-voyager/irq_vectors.h
	include/asm-x86/smp.h
	kernel/Makefile

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-15 21:55:59 +02:00
Jonathan Corbet
2fceef397f Merge commit 'v2.6.26' into bkl-removal 2008-07-14 15:29:34 -06:00
Jesper Nilsson
404571525d [CRIS] Rename boot-linkscripts and fix the path to them.
This makes the CRIS-port directories follow the same naming
convention as the rest of the kernel.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-07-14 08:59:48 +02:00
Jesper Nilsson
d17ffb4c9d Merge branch 'cris_debug_port_fix' into cris 2008-07-01 00:14:13 +02:00
Jesper Nilsson
fea72637c6 Merge branch 'build_fix' into cris 2008-07-01 00:13:54 +02:00
Jesper Nilsson
f3c4b53d5e [CRISv10] Clean up compressed/misc.c
Many minor fixes in whitespace and formatting.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-06-30 23:57:25 +02:00
Jesper Nilsson
bd451d5ed2 [CRISv10] Correct whitespace damage.
The previous patch was whitespace damaged, correct to indent
using tabs.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-06-30 23:22:51 +02:00
Jesper Nilsson
7dd071058f [CRIS] Correct image makefiles to allow using a separate OBJ-directory.
Make compile succeed when building with O= (srctree != objtree).

Signed-off-by: Hinko Kocevar <hinko.kocevar@cetrtapot.si>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-06-30 20:38:06 +02:00
Jesper Nilsson
53e43d014c Merge branch 'pcf8563_mutex_spinlock' into cris 2008-06-29 23:38:42 +02:00
Jesper Nilsson
dc1493aff0 Merge branch 'cris_debug_port_fix' into cris 2008-06-29 23:38:38 +02:00
Jesper Nilsson
bdb144b67a [CRIS] Build fixes for compressed and rescue images for v10 and v32:
- Use the normal cross gcc instead of using an elf specific cris toolchain.
  This removes the dependency of this second toolchain.

- Use the normal cross objcopy instead of overriding it to use elf-toolchain.
  This allows compiling using "CROSS_COMPILE=$CRIS_GCC/cris-axis-linux-gnu-"
  instead of just "CROSS_COMPILE=$CRIS_GCC/cris-axis-linux-gnu/bin/"

- Remove redundant rules for compiling, the implicit rules are sufficient.

- Convert the arch/cris/arch-v10/boot/compressed/head.S to format
  accepted by the cris-axis-linux-gnu-gcc (registers must be prefixed
  with '$', remove explicit underscore on exported symbols)

- Remove a number of unused (and duplicated) prototypes from
  arch/cris/arch-v10/boot/compressed/misc.c.

- Correct memcpy and memset return values (actually return them!)

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-06-29 23:15:19 +02:00
Julia Lawall
9be48a94b8 It looks at least odd to apply spin_unlock to a mutex.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@def@
declarer DEFINE_MUTEX;
identifier m;
@@

DEFINE_MUTEX(m);

@@
identifier def.m;
@@

(
- spin_lock(&m)
+ mutex_lock(&m)
|
- spin_unlock(&m)
+ mutex_unlock(&m)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-06-29 22:50:56 +02:00
Hinko Kocevar
3aa30df3d0 cris: compile fixes for 2.6.26-rc5
Add dummy ops for serial debug port.
Add setting of c_ispeed/c_ospeed as suggested by Alan Cox.

Signed-off-by: Hinko Kocevar <hinko.kocevar@cetrtapot.si>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-06-29 22:48:14 +02:00
Jens Axboe
8691e5a8f6 smp_call_function: get rid of the unused nonatomic/retry argument
It's never used and the comments refer to nonatomic and retry
interchangably. So get rid of it.

Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-06-26 11:24:35 +02:00
Jonathan Corbet
f2b9857eee Add a bunch of cycle_kernel_lock() calls
All of the open() functions which don't need the BKL on their face may
still depend on its acquisition to serialize opens against driver
initialization.  So make those functions acquire then release the BKL to be
on the safe side.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-20 14:05:53 -06:00
Jonathan Corbet
d21c95c569 Add "no BKL needed" comments to several drivers
This documents the fact that somebody looked at the relevant open()
functions and concluded that, due to their trivial nature, no locking was
needed.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-20 14:05:50 -06:00
Jonathan Corbet
0c401df37e cris: cdev lock_kernel() pushdown
Push the cdev lock_kernel() call into cris drivers.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-05-18 15:43:40 -06:00
Al Viro
f52111b154 [PATCH] take init_files to fs/file.c
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-05-16 17:22:20 -04:00
Christoph Hellwig
41d88d55b2 cris: kill sys_pipe implementation
The cris implementation of sys_pipe only differs from the generic one
by taking the BKL before calling do_pipe which isn't not nessecary.

Just kill the cris implementation and use the generic one.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-09 08:03:03 -07:00
Ulrich Drepper
ba719baeab sys_pipe(): fix file descriptor leaks
Remember to close the files if copy_to_user() failed.

Spotted by dm.n9107@gmail.com.

Signed-off-by: Ulrich Drepper <drepper@redhat.com>
Cc: DM <dm.n9107@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-08 10:46:56 -07:00
Denis V. Lunev
c293819a3c cris: use non-racy method for /proc/system_profile creation
Use proc_create() to make sure that ->proc_fops be setup before gluing PDE to
main tree.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29 08:06:21 -07:00
Johannes Weiner
5fd284fd97 cris: remove redundant display of free swap space in show_mem()
show_mem() has no need to print the amount of free swap space manually because
show_free_areas() does this already and is called by the former.

The two outputs only differ in text formatting:

  printk("Free swap  = %lukB\n", ...);
  printk("Free swap:       %6ldkB\n", ...);

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28 08:58:28 -07:00
Matthew Wilcox
64ac24e738 Generic semaphore implementation
Semaphores are no longer performance-critical, so a generic C
implementation is better for maintainability, debuggability and
extensibility.  Thanks to Peter Zijlstra for fixing the lockdep
warning.  Thanks to Harvey Harrison for pointing out that the
unlikely() was unnecessary.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 10:42:34 -04:00
Jesper Nilsson
07f2402b4a cris: correct usage of __user for copy to and from user space in lib/usercopy and uaccess.h
Function __copy_user_zeroing in arch/lib/usercopy.c had the wrong parameter
set as __user, and in include/asm-cris/uaccess.h, it was not set at all for
some of the calling functions.

This will cut the number of warnings quite dramatically when using sparse.

While we're here, remove useless CVS log and correct confusing typo.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-04 16:35:16 -08:00
Jesper Nilsson
9fe3fd03a1 CRIS: Import string.c (memcpy) from newlib: fixes compile error with gcc 4
Adrian Bunk reported another compile error with a SVN head GCC:

...
  CC      arch/cris/arch-v10/lib/string.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:138:
error: lvalue required as increment operand
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:138:
error: lvalue required as increment operand
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:139:
error: lvalue required as increment operand
...

This is due to the use of the construct:

	*((long*)dst)++ = lc;

Which isn't legal since casts don't return an lvalue.

The solution is to import the implementation from newlib,
which is continually autotested together with GCC mainline,
and uses the construct:

	*(long *) dst = lc; dst += 4;

Since this is an import of a file from newlib, I'm not touching
the formatting or correcting any checkpatch errors.

As for the earlier fix for memset.c, even if the two files for
CRIS v10 and CRIS v32 are identical at the moment, it might
be possible to tweak the CRIS v32 version.
Thus, I'm not yet folding them into the same file, at least not
until we've done some research on it.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-04 16:35:13 -08:00
Jesper Nilsson
a10568733c CRIS v10: Include mm.h instead of vmstat.h in kernel/time.c
Commit 2f569afd9c
(CONFIG_HIGHPTE vs. sub-page page tables) introduced use of
inc_zone_page_state and dec_zone_page_state in include/linux/mm.h.

Those are defined in include/linux/vmstat.h, but after it includes
mm.h, making it impossible to include vmstat.h since inc_zone_page_state
and dec_zone_page_state then would be undefined.

arch/cris/arch-v10/kernel/time.c does just this, which makes the
CRIS v10 build break with the following error:

...
  CC      arch/cris/arch-v10/kernel/time.o
In file included from include/linux/vmstat.h:7,
                 from arch/cris/arch-v10/kernel/time.c:17:
include/linux/mm.h: In function 'pgtable_page_ctor':
include/linux/mm.h:902: error: implicit declaration of function 'inc_zone_page_state'
include/linux/mm.h: In function 'pgtable_page_dtor':
include/linux/mm.h:908: error: implicit declaration of function 'dec_zone_page_state'
make[2]: *** [arch/cris/arch-v10/kernel/time.o] Error 1
make[1]: *** [arch/cris/arch-v10/kernel] Error 2
make: *** [sub-make] Error 2
...

By changing kernel/time.c to include linux/mm.h, the build succeeds.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-04 16:35:09 -08:00
Jesper Nilsson
77a746cec5 cris: import memset.c from newlib: fixes compile error with newer (pre4.3) gcc
Adrian Bunk reported the following compile error with a SVN head GCC:

...
CC arch/cris/arch-v10/lib/memset.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c: In function 'memset':
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:164: error: lvalue required as increment operand
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:165: error: lvalue required as increment operand
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:166: error: lvalue required as increment operand
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:167: error: lvalue required as increment operand
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:185: error: lvalue required as increment operand
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:189: error: lvalue required as increment operand
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:192: error: lvalue required as increment operand
... etc ...

This is due to the use of the construct:

	*((long*)dst)++ = lc;

Which is no longer legal since casts don't return an lvalue.

The solution is to import the implementation from newlib,
which is continually autotested together with GCC mainline,
and uses the construct:

	*(long *) dst = lc; dst += 4;

With this change, the generated code actually shrinks 76 bytes
since gcc notices that it can use autoincrement for the move
instruction in CRIS.

   text    data     bss     dec     hex filename
    304       0       0     304     130 memset.old.o
   text    data     bss     dec     hex filename
    228       0       0     228      e4 memset.o

Since this is an import of a file from newlib, I'm not touching
the formatting or correcting any checkpatch errors.

Note also that even if the two files for the CRIS v10 and CRIS v32
are identical at the moment, it might be possible to tweak the
CRIS v32 version. Thus, I'm not yet folding them into the same file,
at least not until we've done some research on it.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-14 20:58:04 -08:00
Sam Ravnborg
ec7748b59e ide: introduce HAVE_IDE
To allow flexible configuration of IDE introduce HAVE_IDE.
All archs except arm, um and s390 unconditionally select it.
For arm the actual configuration determine if IDE is supported.

This is a step towards introducing drivers/Kconfig for arm.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Russell King - ARM Linux <linux@arm.linux.org.uk>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-09 10:46:40 +01:00
Linus Torvalds
0cf975e169 Merge branch 'cris' of git://www.jni.nu/cris
* 'cris' of git://www.jni.nu/cris: (158 commits)
  CRIS v32: Remove hwregs/timer_defs.h, it is now architecture specific.
  CRIS v32: Change drivers/i2c.c locking.
  CRIS v32: Rewrite ARTPEC-3 gpio driver to avoid volatiles and general cleanup.
  CRIS: Add new timerfd syscall entries.
  MAINTAINERS: Add my information for the CRIS port.
  CRIS v32: Correct spelling of bandwidth in function name.
  CRIS v32: Clean up nandflash.c for ARTPEC-3 and ETRAX FS.
  CRIS v10: Cleanup of drivers/gpio.c
  CRIS v10: drivers/net/cris/eth_v10.c rename LED defines to CRIS_LED to avoid name clash.
  CRIS: Make io_pwm_set_period members unsigned in etraxgpio.h
  CRIS: Move ETRAX_AXISFLASHMAP to common Kconfig file.
  CRIS: Drop regs parameter from call to profile_tick in kernel/time.c
  CRIS v32: Fix minor formatting issue in mach-a3/io.c
  CRIS v32: Initialize GIO even if we're rambooting in kernel/head.S
  CRIS v32: Remove kernel/arbiter.c, it now exists in machine dependent directory.
  CRIS v32: Minor changes to avoid errors in asm-cris/arch-v32/hwregs/reg_rdwr.h
  CRIS v32: arch-v32/hwregs/intr_vect_defs.h moved to machine dependent directory.
  CRIS v32: Correct offset for TASK_pid in asm-cris/arch-v32/offset.h
  CRIS v32: Move register map header to machine dependent directory.
  CRIS v32: Let compiler know that memory is clobbered after a break op.
  ...
2008-02-08 10:01:28 -08:00
H. Peter Anvin
bdc807871d avoid overflows in kernel/time.c
When the conversion factor between jiffies and milli- or microseconds is
not a single multiply or divide, as for the case of HZ == 300, we currently
do a multiply followed by a divide.  The intervening result, however, is
subject to overflows, especially since the fraction is not simplified (for
HZ == 300, we multiply by 300 and divide by 1000).

This is exposed to the user when passing a large timeout to poll(), for
example.

This patch replaces the multiply-divide with a reciprocal multiplication on
32-bit platforms.  When the input is an unsigned long, there is no portable
way to do this on 64-bit platforms there is no portable way to do this
since it requires a 128-bit intermediate result (which gcc does support on
64-bit platforms but may generate libgcc calls, e.g.  on 64-bit s390), but
since the output is a 32-bit integer in the cases affected, just simplify
the multiply-divide (*3/10 instead of *300/1000).

The reciprocal multiply used can have off-by-one errors in the upper half
of the valid output range.  This could be avoided at the expense of having
to deal with a potential 65-bit intermediate result.  Since the intent is
to avoid overflow problems and most of the other time conversions are only
semiexact, the off-by-one errors were considered an acceptable tradeoff.

At Ralf Baechle's suggestion, this version uses a Perl script to compute
the necessary constants.  We already have dependencies on Perl for kernel
compiles.  This does, however, require the Perl module Math::BigInt, which
is included in the standard Perl distribution starting with version 5.8.0.
In order to support older versions of Perl, include a table of canned
constants in the script itself, and structure the script so that
Math::BigInt isn't required if pulling values from said table.

Running the script requires that the HZ value is available from the
Makefile.  Thus, this patch also adds the Kconfig variable CONFIG_HZ to the
architectures which didn't already have it (alpha, cris, frv, h8300, m32r,
m68k, m68knommu, sparc, v850, and xtensa.) It does *not* touch the sh or
sh64 architectures, since Paul Mundt has dealt with those separately in the
sh tree.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
Cc: Sam Ravnborg <sam@ravnborg.org>,
Cc: Paul Mundt <lethal@linux-sh.org>,
Cc: Richard Henderson <rth@twiddle.net>,
Cc: Michael Starvik <starvik@axis.com>,
Cc: David Howells <dhowells@redhat.com>,
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>,
Cc: Hirokazu Takata <takata@linux-m32r.org>,
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Cc: Roman Zippel <zippel@linux-m68k.org>,
Cc: William L. Irwin <sparclinux@vger.kernel.org>,
Cc: Chris Zankel <chris@zankel.net>,
Cc: H. Peter Anvin <hpa@zytor.com>,
Cc: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 09:22:39 -08:00
Jan Engelhardt
03a44825be procfs: constify function pointer tables
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-By: David Howells <dhowells@redhat.com>
Acked-by: Bryan Wu <bryan.wu@analog.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 09:22:38 -08:00
Jesper Nilsson
69b06c15e7 CRIS v32: Change drivers/i2c.c locking.
- Change spin_lock + local_irq_save into spin_lock_irqsave
- Change spin_unlock + local_irq_restore into spin_unlock_irqrestore
- Return ENOTTY if ioctl is not recognized as a cris ioctl.
- Make init functions static.
2008-02-08 17:00:25 +01:00
Jesper Nilsson
a34d24425e CRIS v32: Rewrite ARTPEC-3 gpio driver to avoid volatiles and general cleanup.
Changes as suggested by Andrew Morton, plus general cleanup to
ease later consolidation of driver into machine common driver.

- Correct parameter type of gpio_write to const char __user *
- Remove volatile from the arrays of machine dependent registers, use
  readl and writel to access them instead.
- Remove useless casts of void.
- Use spin_lock_irqsave for locking.
- Break gpio_write into smaller sub-functions.
- Remove useless breaks after returns.
- Don't perform any change in IO_CFG_WRITE_MODE if values are invalid.
  (previously values were set and then set to zero)
- Change cast for copy_to_user to (void __user *)
- Make file_operations gpio_fops static and const.
- Make setget_output static. (However, it's still inline since the CRIS
  architecture is still not SMP, which makes the function small enough
  to inline)
2008-02-08 16:28:36 +01:00
Jesper Nilsson
7800029df3 CRIS: Add new timerfd syscall entries. 2008-02-08 11:54:30 +01:00
Jesper Nilsson
eb090473a7 CRIS v32: Correct spelling of bandwidth in function name. 2008-02-08 11:16:46 +01:00
Jesper Nilsson
9f68ff9ee9 CRIS v32: Clean up nandflash.c for ARTPEC-3 and ETRAX FS.
Clean up issues noticed by Andrew Morton:

- Use a combined struct for allocating the mtd_info and nand_chip structs
  instead of using anonymous memory as the example in
  Documentation/DocBook/mtdnand.tmpl
- Use kzalloc instead of using kmalloc/memset(0)
- Make crisv32_device_ready static.
2008-02-08 11:16:45 +01:00
Jesper Nilsson
ad433f2368 CRIS v10: Cleanup of drivers/gpio.c
- Change parameters of gpio_write (const char * buf -> const char __user *buf)
- Don't initialize static variables to zero.
- Remove useless casts from void.
- Change name of interrupt routine (gpio_pa_interrupt -> gpio_interrupt)
- Use kzmalloc instead of allocating memory and zeroing it manually.
- Correct casts for copy_to_user and copy_from_user to (void __user *)
- Make file_operations gpio_fops static.
- Make ioif_watcher static, not used outside this file.
2008-02-08 11:16:45 +01:00
Jesper Nilsson
79e04fdbb3 CRIS: Move ETRAX_AXISFLASHMAP to common Kconfig file. 2008-02-08 11:08:06 +01:00
Jesper Nilsson
c261038108 CRIS: Drop regs parameter from call to profile_tick in kernel/time.c 2008-02-08 11:06:40 +01:00
Jesper Nilsson
ac17e82a87 CRIS v32: Fix minor formatting issue in mach-a3/io.c 2008-02-08 11:06:39 +01:00
Jesper Nilsson
f8e47cb058 CRIS v32: Initialize GIO even if we're rambooting in kernel/head.S 2008-02-08 11:06:39 +01:00
Jesper Nilsson
a87434b04f CRIS v32: Remove kernel/arbiter.c, it now exists in machine dependent directory. 2008-02-08 11:06:39 +01:00
Jesper Nilsson
daa00b9caf CRIS: Add sched_clock to kernel/time.c
Also, clean up some whitespace errors.
2008-02-08 11:06:37 +01:00
Jesper Nilsson
60dead5a8c CRIS: Register cpus in kernel/setup.c
Also, fix some white space errors, and constify cpuinfo_op.
2008-02-08 11:06:37 +01:00
Jesper Nilsson
3ae8d8baab CRIS: Remove include of linux/init.h, not needed anymore. 2008-02-08 11:06:37 +01:00
Jesper Nilsson
6e0b688034 CRIS: Remove CONFIG_NO_IOMEM from ARTPEC-3 default config. 2008-02-08 11:06:37 +01:00
Jesper Nilsson
1b7e7da364 CRIS: Remove useless CVS log from kernel/ptrace.c
Also, fix some whitespace errors.
2008-02-08 11:06:37 +01:00
Jesper Nilsson
f32bb79c97 CRIS: Remove useless CVS id and log from kernel/process.c 2008-02-08 11:06:37 +01:00
Jesper Nilsson
08cfeacb6b CRIS: Add configuration possibility for using kmalloc for modules.
Using kmalloc instead of vmalloc solves the stability problems
experienced by some 100 LX products.
2008-02-08 11:06:36 +01:00
Jesper Nilsson
b4945a90d0 CRIS: Remove CONFIG_NO_IOMEM from default configs. 2008-02-08 11:06:36 +01:00
Jesper Nilsson
baa69b121a CRIS v32: Fix startup oops and replace hardcoded pagesize in vmlinux.lds.S
- Move alignment of init data to page size outside define CONFIG_BLK_DEV_INITRD
  This avoids oops due to memory on the same page as init data being freed.
- Change hardcoded page size to use macro from asm/page.h
- Add reserved memory via CONFIG_ETRAX_VMEM_SIZE.
- Use available defines for TEXT_TEXT and INITCALLS.
- Cleanup whitespace.
2008-02-08 11:06:36 +01:00
Jesper Nilsson
52d82ef12a CRIS v32: Avoid work when switching between tasks with shared memory descriptors in mm/tlb.c
There is no need to do all this work if they share memory descriptors.
Also, fix some minor whitespace and long lines.
2008-02-08 11:06:36 +01:00
Jesper Nilsson
3d44305abe CRIS v32: Add workaround for MMU hardware bug for ETRAX FS in mm/mmu.S 2008-02-08 11:06:36 +01:00
Jesper Nilsson
108ecfbc31 CRIS v32: Fix bug in internal memory allocator mm/intmem.c
- Fix bug where allocated memory didn't account for alignment.
- Add support for ARTPEC-3
- Add module_init for crisv32_intmem_init.
2008-02-08 11:06:36 +01:00
Jesper Nilsson
0836c6d26f CRIS v32: Change name of simulator config to CONFIG_ETRAX_VCS_SIM in mm/init.c
- Remove unneded code for ETRAX FS and ARTPEC-3
2008-02-08 11:06:36 +01:00
Jesper Nilsson
ea0af95b1c CRIS v32: Change lib/spinlock.S to use byte operations instead of dwords. 2008-02-08 11:06:36 +01:00
Jesper Nilsson
ea402db97f CRIS v32: Move hw_settings.S to machine specific directories for ETRAX FS and ARTPEC-3 2008-02-08 11:06:35 +01:00
Jesper Nilsson
41f9412b20 CRIS v32: Update lib/checksum.S and lib/checksumcopy.S
- Slight tweaks, use $acr + addoq to propagate carry across the loop boundary.
- Better use of latency cycles.
- Remove duplicate folding of carry, it is not needed.
2008-02-08 11:06:35 +01:00
Jesper Nilsson
7674464cb3 CRIS v32: Add lib/delay to build. 2008-02-08 11:06:35 +01:00
Jesper Nilsson
48c87a4483 CRIS v32: Add precise delay loops for ETRAX FS and ARTPEC-3.
Implements cris_delay10ns.
2008-02-08 11:06:35 +01:00
Jesper Nilsson
a474de0a02 CRIS v32: Update vcs_hook.c for ETRAX FS.
- Clean up some formatting and whitespace.
2008-02-08 11:06:35 +01:00
Jesper Nilsson
09160d7cc3 CRIS v32: Move vcs_hook to machine specific directory.
These files are different for ETRAX FS and ARTPEC-3.
2008-02-08 11:06:35 +01:00
Jesper Nilsson
538380da1a CRIS v32: Update kernel/smp.c for CRIS v32.
- Change include paths to machine specific headers (asm/arch/hwregs -> hwregs)
- Add cpu_possible_map as cpumask_t and export it.
- Drop struct pt_regs parameter from crisv32_ipi_interrupt.
- timer -> timer0
2008-02-08 11:06:35 +01:00
Jesper Nilsson
574852a2a5 CRIS v32: Update signal handling in kernel/signal.c
- do_signal now returns void, and does not have the previous signal set
  as a parameter.
- Remove sys_rt_sigsuspend, we can use the common one instead.
- Change sys_sigsuspend to be more like x86, don't call do_signal here.
- handle_signal, setup_frame and setup_rt_frame now return -EFAULT
  if we've delivered a segfault, which is used by callers to perform
  necessary cleanup.
- Break long lines, correct whitespace and formatting errors.
2008-02-08 11:06:35 +01:00
Jesper Nilsson
14e61bebb4 CRIS v32: Update boot/rescue/rescue.ld
- Update to work for ETRAX FS and ARTPEC-3
2008-02-08 11:06:35 +01:00
Jesper Nilsson
45a4127c10 CRIS v10: Update drivers/gpio.c, fix locking and general improvements.
- Change all spin_lock/local_irq_save to spin_lock_irqsave.
- Change multiple returns in functions where we have a lock to goto out.
- Correct number of arguments to gpio_poll_timer_interrupt, gpio_pa_interrupt.
- Break out gpio_write logic to smaller functions to make it readable.
- In setget_input and setget_output, avoid extra if-indent level.
- Change name LED_* -> CRIS_LED_* to avoid name clash.
- Don't use braces around single statement ifs.
- Fix whitespace errors.
- Remove useless CVS id and log.
2008-02-08 11:06:34 +01:00
Jesper Nilsson
f2bbc96a40 CRIS v32: Change names of config variable and register field for data available.
- CONFIG_ETRAXFS_SIM -> CONFIG_ETRAX_VCS_SIM
- ser_intr_mask.data_avail -> ser_intr_mask.dav
2008-02-08 11:06:34 +01:00
Jesper Nilsson
f64dd2191d CRIS v32: Change debug and formatting in kernel/fasttimer.c
- Don't use SANITYCHECK(x) as a macro, test FAST_TIMER_SANITY_CHECKS with
  ifdef. This makes it possible for automatic indent etc to work.
- Correct some whitespace errors.
- Don't initialize static variable.
2008-02-08 11:06:34 +01:00
Jesper Nilsson
43e6bd6aa8 CRIS v32: Update kernel/crisksyms.c
- Include pinmux.h from machine specific directory.
- Add some more symbols: crisv32_pinmux_alloc, crisv32_pinmux_dealloc_fixed,
  crisv32_io_get_name and crisv32_io_get
2008-02-08 11:06:34 +01:00
Jesper Nilsson
cbca663488 CRIS v32: Remove config ifdef around init function for drivers/sync_serial.c
The init function should be defined always.
2008-02-08 11:06:34 +01:00
Jesper Nilsson
5adb5c873f CRIS v32: Remove drivers/gpio.c, now exists as machine specific file. 2008-02-08 11:06:34 +01:00
Jesper Nilsson
7edf744053 CRIS v32: Update driver for RTC chip pcf8563.
- Moved all calls to register_chrdev to a function called by module_init.
- Added mutex locking.
- Added better error handling at start up.
- Added BIN_TO_BCD of the month value before it is saved to the RTC.
- Corrected the month value returned by pcf8563_readreg.
- Cache the voltage low value at driver init so the battery status
  information does not get 'accidentally' cleared when setting the RTC time.
- Removed obsolete CONFIG_ETRAX_RTC_READONLY
- Voltage low ioctl():s RTC_VLOW_RD -> RTC_VL_READ, RTC_VLOW_SET -> RTC_VL_CLR
2008-02-08 11:06:34 +01:00
Jesper Nilsson
d8ac17a0ee CRIS v32: Remove drivers/nandflash.h, now exists as machine specific file. 2008-02-08 11:06:34 +01:00
Jesper Nilsson
2c30da7175 CRIS v32: ETRAX FS Change name of LED macros in drivers/mach-fs/gpio.c to avoid collision. 2008-02-08 11:06:33 +01:00
Jesper Nilsson
cacc0cc83f CRIS v32: Change name of LED macros in drivers/mach-a3/gpio.c to avoid collision. 2008-02-08 11:06:33 +01:00
Jesper Nilsson
935a847b98 CRIS v32: Change include path for hwregs in drivers/iop_fw_load.c
Also, remove useless CVS id tag.
2008-02-08 11:06:33 +01:00
Jesper Nilsson
635c45c195 CRIS v32: Rewrite of stream co-processor driver for ETRAX FS and ARTPEC-3
- Workaround for cachebug (Guinness TR 106).
- Add ARTPEC-3 support.
2008-02-08 11:06:33 +01:00
Jesper Nilsson
a77dba6a4d CRIS v32: Replace build flags in boot/rescue/Makefile
- Change AFLAGS to asflags-y, LDFLAGS to ldflags-y and EXTRA_CFLAGS
  to ccflags-y. We only need the flags in this Makefile.
2008-02-08 11:06:33 +01:00
Jesper Nilsson
111e3b1aba CRIS v32: Replace build flags in boot/compressed/Makefile
- Change AFLAGS to asflags-y, LDFLAGS to ldflags-y and KBUILD_CFLAGS
  to ccflags-y. We only need the flags in this Makefile.
2008-02-08 11:06:33 +01:00
Jesper Nilsson
8f2972529f CRIS v10: Change name of low voltage read and set macros. 2008-02-08 11:06:33 +01:00
Jesper Nilsson
a9d13fad8c CRIS v32: Remove useless CVS id tag from boot/compressed/README 2008-02-08 11:06:33 +01:00
Jesper Nilsson
9bf79539ed CRIS v10: Remove duplicated folding of carry from lib/checksum.S, it is not needed.
Also, remove useless CVS id tag.
2008-02-08 11:06:32 +01:00
Jesper Nilsson
ab59284eae CRIS v10: Remove duplicated folding of carry from lib/checksumcopy.S, it is not needed.
Also, remove useless CVS id tag.
2008-02-08 11:06:32 +01:00
Jesper Nilsson
2afab729f5 CRIS v10: Clear TIF_SYSCALL_TRACE flag in ptrace_disable in kernel/ptrace.c 2008-02-08 11:06:32 +01:00
Jesper Nilsson
b1220e2e7f CRIS v10: Update kernel/io_interface_mux.c
Fixed a bug where two interfaces using pins in the same pin group could
not be allocated at the same time even if there where no pin collisions.

Change all restore and returns into goto exit pattern.

Also, remove useless CVS id and correct chapter reference for ETRAX100LX
Designer's Reference in comment.
2008-02-08 11:06:32 +01:00
Jesper Nilsson
5f526d1467 CRIS v10: Setup serial port 2 to avoid accidental TXD pulse on startup.
If serial port 2 is used, select it in R_GEN_CONFIG.
If serial port 2 is used, setup the control registers for the port.
This is done to avoid a pulse on the TXD line during start up,
which could disturb some units.

Also, remove useless CVS id and log.
2008-02-08 11:06:31 +01:00
Jesper Nilsson
c974a9e5a3 CRIS v10: Add synchronous serial port driver for CRIS v10. 2008-02-08 11:06:31 +01:00
Jesper Nilsson
4f073eff3f CRIS v10: Don't call get_mmu_context when switching between tasks with shared memory descriptors
Also, cleanup formatting and fix whitespace errors.
2008-02-08 11:06:31 +01:00
Jesper Nilsson
40316c1fad CRIS v10: Fix bug where error returns didn't restore irqs in mm/fault.c
Don't return when we're inside local_irq_disable(), use goto exit instead.
Also, cleanup some whitespace errors.
2008-02-08 11:06:31 +01:00
Jesper Nilsson
5712e4dfc6 CRIS v10: Remove useless CVS id tag from lib/old_checksum.c 2008-02-08 11:06:31 +01:00
Jesper Nilsson
f12bb5c04a CRIS v10: Remove useless CVS id and log from lib/dram_init.S 2008-02-08 11:06:31 +01:00
Jesper Nilsson
da4d091348 CRIS v10: Remove useless CVS id from kernel/shadows.c 2008-02-08 11:06:31 +01:00
Jesper Nilsson
b2d0814258 CRIS v10: Reformat drivers/makefile using tabs. 2008-02-08 11:06:31 +01:00
Jesper Nilsson
c3d6ddddb0 CRIS: Move common Kconfig variable ETRAX_RTC to arch independet Kconfig. 2008-02-08 11:06:30 +01:00
Jesper Nilsson
5062969d77 CRIS: Remove NO_IOMEM config, we have IO memory. 2008-02-08 11:06:30 +01:00
Jesper Nilsson
10f9f9c857 CRIS v10: Remove CVS id from kernel/process.c 2008-02-08 11:06:30 +01:00
Jesper Nilsson
c8acccc959 CRIS v10: Remove CVS log and id from kernel/kgdb.c 2008-02-08 11:06:30 +01:00
Jesper Nilsson
8d67bca55c CRIS v10: Cleanup kernel/irq.c
- Remove useless CVS id tag.
- Remove no longer needed extern declarations for kgdb.
2008-02-08 11:06:30 +01:00
Jesper Nilsson
4200c35d20 CRIS v10: Cleanup kernel/fasttimer.c
- Change C99 comment style to C89.
- Remove superfluous SANITYCHECK macro, test FAST_TIMER_SANITY_CHECKS instead.
2008-02-08 11:06:30 +01:00
Jesper Nilsson
72af70cfec CRIS v10: Cleanup kernel/entry.S CVS log and id. 2008-02-08 11:06:30 +01:00
Jesper Nilsson
028a731f98 CRIS v10: Remove CVS id tag from kernel/dma.c 2008-02-08 11:06:30 +01:00
Jesper Nilsson
99bb22bd28 CRIS v10: Break long lines in boot/rescue/head.S 2008-02-08 11:06:30 +01:00
Jesper Nilsson
7cda012685 CRIS v10: Remove CVS tag from boot/compressed/misc.c 2008-02-08 11:06:29 +01:00
Jesper Nilsson
18b0f34616 CRIS v10: Update and fix bug in kernel/debugport.
- Move local_irq_save to after possible return in console_write_direct.
- Remove old raw_printk hack, not needed anymore.
- Add watchdog handling.
- Make serial_driver use depend on CONFIG_ETRAX_SERIAL.
- Remove useless CVS log.
2008-02-08 11:06:29 +01:00
Jesper Nilsson
34a8e501fe CRIS v10: Update driver for pcf8563
- Use mutex instead of spinlock, fixes kernel bugzilla report 8339.
- Make sure that pcf8563_init can be called multiple times but only setup once.
- Change RTC_VLOW_RD -> RTC_VL_READ, RTC_VLOW_SET -> RTC_VL_CLR
- Cache the voltage low value at driver init so the battery status
  information does not get 'accidentally' cleared when setting the RTC time.
- Add weekday handling.
- Correct leapyear handling to include 100 and 400 year exceptions.
- Correct whitespace and formatting errors.
- Remove useless CVS id tag.
2008-02-08 11:06:29 +01:00
Jesper Nilsson
e5d5cf2442 CRIS v10: Fix bugs in i2c_init and i2c_readreg
- Set the variable first to zero after first setup, so we can
  stop multiple calls to i2c_init from trying to setup i2c.

- The last byte read by the master in an i2c transfer needs to
  be NACKed, not ACKed.

- Also, remove useless CVS log and CVS id tags.
2008-02-08 11:06:29 +01:00
Jesper Nilsson
3d6c03fc22 CRIS v10: Cleanup drivers/eeprom.c to avoid import conflicts.
- Remove useless CVS log and CVS id tags.
- Whitespace fix and remove C++ comment.
2008-02-08 11:06:29 +01:00
Jesper Nilsson
d207cf5bb9 CRIS v10: Correct and cleanup boot/rescue/testrescue.S
- Correct include path for sv_addr_ag.h, should be asm/arch/
- Fix some whitespace errors.
- Remove useless CVS id tag.
2008-02-08 11:06:29 +01:00
Jesper Nilsson
ef8028a7ab CRIS v10: Correct and cleanup boot/rescue/kimagerescue.S
- Correct include path for sv_addr_ag.h, should be included from asm/arch/
- Remove useless CVS id tag.
- Correct whitespace errors and some formatting.
2008-02-08 11:06:29 +01:00
Jesper Nilsson
546cc14862 CRIS v10: Change boot/rescue/Makefile to use ccflags-y, asflags-y and ldflags-y.
Replace EXTRA_CFLAGS with ccflags-y.
Change ASFLAGS and LDFLAGS into asflags-y and ldflags-y, we only need
these flags in this makefile.
2008-02-08 11:06:29 +01:00
Jesper Nilsson
3c9547a504 CRIS v10: Update boot/compressed/Makefile to use ccflags-y and ldflags-y
Replace use of EXTRA_CFLAGS with ccflags-y and LDFLAGS with ldflags-y,
(we only need to change linker flags for this makefile)
2008-02-08 11:06:28 +01:00
Jesper Nilsson
fbdb5f865b CRIS v32: Update and improve kernel/time.c
- Shorten include paths to machine dependent header files.
- Register name for first timer is now regi_timer0.
- Remove raw_printk hack, use oops_in_progress instead.
- Add handling of CPU frequency scaling for CRIS.
- Remove regs parameter to timer_interrupt, get them from get_irq_regs instead.
- Whitespace and formatting changes.
2008-02-08 11:06:28 +01:00
Jesper Nilsson
bd1c8c54b9 CRIS v10: New default config. 2008-02-08 11:06:28 +01:00