pandora-kernel.git
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jk/spufs
Paul Mackerras [Wed, 30 Apr 2008 06:53:17 +0000 (16:53 +1000)]
Merge git://git./pub/scm/linux/kernel/git/jk/spufs

15 years ago[POWERPC] spufs: add .gitignore for spu_save_dump.h & spu_restore_dump.h
Kumar Gala [Fri, 25 Apr 2008 01:03:03 +0000 (11:03 +1000)]
[POWERPC] spufs: add .gitignore for spu_save_dump.h & spu_restore_dump.h

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years ago[POWERPC] spufs: trace spu_acquire_saved events
Julio M. Merino Vidal [Wed, 30 Apr 2008 05:21:17 +0000 (15:21 +1000)]
[POWERPC] spufs: trace spu_acquire_saved events

The sputrace module contained a trace entry for spu_acquire_saved, but
this marker was not placed anywhere. Fix this by adding a marker to the
routine.

Signed-off-by: Julio M. Merino Vidal <jmerino@ac.upc.edu>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years ago[POWERPC] spufs: fix marker name for find_victim
Julio M. Merino Vidal [Wed, 30 Apr 2008 05:16:14 +0000 (15:16 +1000)]
[POWERPC] spufs: fix marker name for find_victim

Fix a typo in the marker for the find_victim function, which prevented
it from being traced. It previously read find_vitim.

Signed-off-by: Julio M. Merino Vidal <jmerino@ac.upc.edu>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years ago[POWERPC] spufs: add marker for destroy_spu_context
Julio M. Merino Vidal [Wed, 30 Apr 2008 05:12:30 +0000 (15:12 +1000)]
[POWERPC] spufs: add marker for destroy_spu_context

The sputrace module contained a reference to a marker for
destroy_spu_context, but this marker did not appear in the code. Fix
this by adding a marker in the function.

Signed-off-by: Julio M. Merino Vidal <jmerino@ac.upc.edu>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years ago[POWERPC] spufs: add sputrace marker parameter names
Julio M. Merino Vidal [Wed, 30 Apr 2008 05:06:39 +0000 (15:06 +1000)]
[POWERPC] spufs: add sputrace marker parameter names

The markers facility defines the marker parameters to be of the form
'name %format'. Add parameter names to sputrace, to specify the context
and %spu paramerters,  instead of just specifying the '%format' part.

Signed-off-by: Julio M. Merino Vidal <jmerino@ac.upc.edu>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years ago[POWERPC] spufs: add context switch notification log
Christoph Hellwig [Tue, 29 Apr 2008 07:08:38 +0000 (17:08 +1000)]
[POWERPC] spufs: add context switch notification log

There are userspace instrumentation tools that need to monitor spu
context switches. This patch adds a new file called 'switch_log' to
each spufs context directory that can be used to monitor the context
switches.

Context switch in/out and exit from spu_run are monitored after the
file was first opened and can be read from it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years ago[POWERPC] mpc5200: defconfigs for CM5200, Lite5200B, Motion-PRO and TQM5200
Bartlomiej Sieka [Tue, 15 Apr 2008 10:36:36 +0000 (20:36 +1000)]
[POWERPC] mpc5200: defconfigs for CM5200, Lite5200B, Motion-PRO and TQM5200

Board-specific defconfigs based on current mpc5200_defconfig, archival
lite5200_defconfig, and [cm5200|motionpro|tqm5200]_defconfig from the
linux-2.6-denx tree. Kernels build using these defconfigs were verified
to boot with root filesystem mounted over NFS on Motion-PRO, TQM5200
and Lite5200B boards. CM5200 target was not tested due to hardware
unavailability.

Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years ago[POWERPC] mpc5200: Switch mpc5200 dts files to dts-v1 format
Grant Likely [Tue, 29 Apr 2008 13:19:07 +0000 (07:19 -0600)]
[POWERPC] mpc5200: Switch mpc5200 dts files to dts-v1 format

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years ago[POWERPC] mpc5200: Fix FEC error handling on FIFO errors
Sascha Hauer [Tue, 15 Apr 2008 15:44:39 +0000 (01:44 +1000)]
[POWERPC] mpc5200: Fix FEC error handling on FIFO errors

The error handling for the mpc5200 fec interrupt is broken. The intended
behaviour is like this:

* If one of FEC_IEVENT_RFIFO_ERROR and FEC_IEVENT_XFIFO_ERROR happens,
  the datasheet says (MPC5200B User's Guide R1.2, p. 14-13): "When this
  occurs, software must ensure both the FIFO Controller and BestComm are
  soft-reset".

* On any other error (non-TFINT) interrupt, just issue a debug message.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years ago[POWERPC] mpc5200: add Phytec pcm030 board support
s.hauer@pengutronix.de [Fri, 25 Apr 2008 13:48:05 +0000 (23:48 +1000)]
[POWERPC] mpc5200: add Phytec pcm030 board support

Add board support for the Phytec pcm030 mpc5200b based board. It
does not need any platform specific fixups and as such is handled
as a mpc5200 simple platform.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years ago[POWERPC] mpc5200: add gpiolib support for mpc5200
s.hauer@pengutronix.de [Fri, 25 Apr 2008 10:56:04 +0000 (20:56 +1000)]
[POWERPC] mpc5200: add gpiolib support for mpc5200

This patch adds gpiolib support for mpc5200 SOCs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years ago[POWERPC] mpc5200: add interrupt type function
Sascha Hauer [Tue, 15 Apr 2008 15:29:54 +0000 (01:29 +1000)]
[POWERPC] mpc5200: add interrupt type function

Add a set_type function for external (GPIO) interrupts.

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years ago[POWERPC] mpc5200: Fix unterminated of_device_id table
Grant Likely [Tue, 29 Apr 2008 12:40:37 +0000 (06:40 -0600)]
[POWERPC] mpc5200: Fix unterminated of_device_id table

If CONFIG_PPC_MPC5121 is not set, then the of_device_id table for the
mpc5200 serial driver will not get terminated with a NULL entry.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years ago[RAPIDIO] Change RapidIO doorbell source and target ID field to 16-bit
Zhang Wei [Fri, 18 Apr 2008 20:33:48 +0000 (13:33 -0700)]
[RAPIDIO] Change RapidIO doorbell source and target ID field to 16-bit

Change RapidIO doorbell source and target ID field to 16-bit for
support large system size, which max rio devid is 65535.

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[RAPIDIO] Add RapidIO connection info print out and re-training for broken connections
Zhang Wei [Fri, 18 Apr 2008 20:33:44 +0000 (13:33 -0700)]
[RAPIDIO] Add RapidIO connection info print out and re-training for broken connections

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[RAPIDIO] Add serial RapidIO controller support, which includes MPC8548, MPC8641
Zhang Wei [Fri, 18 Apr 2008 20:33:44 +0000 (13:33 -0700)]
[RAPIDIO] Add serial RapidIO controller support, which includes MPC8548, MPC8641

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[RAPIDIO] Add RapidIO node probing into MPC86xx_HPCN board id table
Zhang Wei [Fri, 18 Apr 2008 20:33:43 +0000 (13:33 -0700)]
[RAPIDIO] Add RapidIO node probing into MPC86xx_HPCN board id table

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[RAPIDIO] Add RapidIO node into MPC8641HPCN dts file
Zhang Wei [Fri, 18 Apr 2008 20:33:42 +0000 (13:33 -0700)]
[RAPIDIO] Add RapidIO node into MPC8641HPCN dts file

This adds properties describing the RapidIO controller to the
device-tree source for the MPC8641HPCN board.

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[RAPIDIO] Auto-probe the RapidIO system size
Zhang Wei [Fri, 18 Apr 2008 20:33:42 +0000 (13:33 -0700)]
[RAPIDIO] Auto-probe the RapidIO system size

The RapidIO system size will auto probe in RIO setup.  The route table
and rionet_active in rionet.c are changed to be allocated dynamically
according to the size of the system.

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[RAPIDIO] Add OF-tree support to RapidIO controller driver
Zhang Wei [Fri, 18 Apr 2008 20:33:41 +0000 (13:33 -0700)]
[RAPIDIO] Add OF-tree support to RapidIO controller driver

This initializes the RapidIO controller driver using addresses and
interrupt numbers obtained from the firmware device tree, rather than
using hardcoded constants.

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[RAPIDIO] Add RapidIO multi mport support
Zhang Wei [Fri, 18 Apr 2008 20:33:41 +0000 (13:33 -0700)]
[RAPIDIO] Add RapidIO multi mport support

The original RapidIO driver suppose there is only one mpc85xx RIO controller
in system.  So, some data structures are defined as mpc85xx_rio global, such
as 'regs_win', 'dbell_ring', 'msg_tx_ring'.  Now, I changed them to mport's
private members.  And you can define multi RIO OF-nodes in dts file for multi
RapidIO controller in one processor, such as PCI/PCI-Ex host controllers in
Freescale's silicon.  And the mport operation function declaration should be
changed to know which RapidIO controller is target.

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[RAPIDIO] Move include/asm-ppc/rio.h to asm-powerpc
Zhang Wei [Fri, 18 Apr 2008 20:33:40 +0000 (13:33 -0700)]
[RAPIDIO] Move include/asm-ppc/rio.h to asm-powerpc

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[RAPIDIO] Add RapidIO option to kernel configuration
Zhang Wei [Fri, 18 Apr 2008 20:33:39 +0000 (13:33 -0700)]
[RAPIDIO] Add RapidIO option to kernel configuration

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[RAPIDIO] Change RIO function mpc85xx_ to fsl_
Zhang Wei [Fri, 18 Apr 2008 20:33:38 +0000 (13:33 -0700)]
[RAPIDIO] Change RIO function mpc85xx_ to fsl_

The driver is suitable for the Freescale MPC8641 processor as well as
85xx processors, so this changes the mpc85xx prefix to fsl.

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[POWERPC] Provide walk_memory_resource() for powerpc
Badari Pulavarty [Fri, 18 Apr 2008 20:33:53 +0000 (13:33 -0700)]
[POWERPC] Provide walk_memory_resource() for powerpc

Provide walk_memory_resource() for 64-bit powerpc.  PowerPC maintains
logical memory region mapping in the lmb.memory structure.  Walk
through these structures and do the callbacks for the contiguous
chunks.

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[POWERPC] Update lmb data structures for hotplug memory add/remove
Badari Pulavarty [Fri, 18 Apr 2008 20:33:52 +0000 (13:33 -0700)]
[POWERPC] Update lmb data structures for hotplug memory add/remove

The powerpc kernel maintains information about logical memory blocks
in the lmb.memory structure, which is initialized and updated at boot
time, but not when memory is added or removed while the kernel is
running.

This adds a hotplug memory notifier which updates lmb.memory when
memory is added or removed.  This information is useful for eHEA
driver to find out the memory layout and holes.

NOTE: No special locking is needed for lmb_add() and lmb_remove().
Calls to these are serialized by caller. (pSeries_reconfig_chain).

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[POWERPC] Hotplug memory remove notifications for powerpc
Badari Pulavarty [Fri, 18 Apr 2008 20:33:50 +0000 (13:33 -0700)]
[POWERPC] Hotplug memory remove notifications for powerpc

Hotplug memory remove notifier for 64-bit powerpc.  This gets invoked
by writing to /proc/ppc64/ofdt the string "remove_node " followed by
the firmware device tree pathname of the node that needs to be removed.

In response, this adjusts the sections and removes sysfs entries by
calling __remove_pages().  Then it calls arch-specific code to get rid
of the hardware MMU mappings for the section of memory.

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Reviewed-by: Michael Ellerman <michael@ellerman.id.au>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[POWERPC] windfarm: Add PowerMac 12,1 support
Étienne Bersac [Tue, 29 Apr 2008 05:39:55 +0000 (15:39 +1000)]
[POWERPC] windfarm: Add PowerMac 12,1 support

This implements a new driver named windfarm_pm121, which drives the
fans on PowerMac 12,1 machines : iMac G5 iSight (rev C) 17" and
20".  It's based on the windfarm_pm81 driver from Benjamin
Herrenschmidt.

This includes fixes from David Woodhouse correcting the names of some
of the sensors.

Signed-off-by: Étienne Bersac <bersace@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[POWERPC] Fix building of pmac32 when CONFIG_NVRAM=m
Tony Breeds [Tue, 29 Apr 2008 01:42:32 +0000 (11:42 +1000)]
[POWERPC] Fix building of pmac32 when CONFIG_NVRAM=m

Kamalesh Babulal (kamalesh@linux.vnet.ibm.com) reports that CONFIG_NVRAM=m
is valid in terms of Kconfig but fails to build with:
  Building modules, stage 2.
  MODPOST 1401 modules
ERROR: "pmac_newworld" [arch/powerpc/platforms/powermac/nvram.ko] undefined!
ERROR: "__alloc_bootmem" [arch/powerpc/platforms/powermac/nvram.ko] undefined!
make[1]: *** [__modpost] Error

The arch/powerpc/platforms/powermac/nvram.c code really needs to be
builtin, but as its compilation is dependent on a generic Kconfig
symbol we force nvram.c to be builtin if CONFIG_NVRAM is 'y' or 'm'.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[POWERPC] Add IRQSTACKS support on ppc32
Kumar Gala [Mon, 28 Apr 2008 06:21:22 +0000 (16:21 +1000)]
[POWERPC] Add IRQSTACKS support on ppc32

This makes it possible to use separate stacks for hard and soft IRQs
on 32-bit powerpc as well as on 64-bit.  The code for 32-bit is just
the 32-bit analog of the 64-bit code.

* Added allocation and initialization of the irq stacks.  We limit the
  stacks to be in lowmem for ppc32.
* Implemented ppc32 versions of call_do_softirq() and call_handle_irq()
  to switch the stack pointers
* Reworked how we do stack overflow detection.  We now keep around the
  limit of the stack in the thread_struct and compare against the limit
  to see if we've overflowed.  We can now use this on ppc64 if desired.

[ paulus@samba.org: Fixed bug on 6xx where we need to reload r9 with the
  thread_info pointer. ]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[POWERPC] Use __always_inline for xchg* and cmpxchg*
Paul Mackerras [Mon, 28 Apr 2008 04:44:08 +0000 (14:44 +1000)]
[POWERPC] Use __always_inline for xchg* and cmpxchg*

This changes the definitions of the xchg and cmpxchg families of
functions in include/asm-powerpc/system.h to be marked __always_inline
rather than __inline__.  The reason for doing this is that we rely on
the compiler inlining them in order to eliminate the references to
__xchg_called_with_bad_pointer and __cmpxchg_called_with_bad_pointer,
which are deliberately left undefined.  Thus this change will enable
us to make the inline keyword be just a hint rather than a directive.

Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years ago[POWERPC] Add fast little-endian switch system call
Paul Mackerras [Mon, 28 Apr 2008 03:52:31 +0000 (13:52 +1000)]
[POWERPC] Add fast little-endian switch system call

This adds a system call on 64-bit platforms for switching between
little-endian and big-endian modes that is much faster than doing a
prctl call.  This system call is handled as a special case right at
the start of the system call entry code, and because it is a special
case, it uses a system call number which is out of the range of
normal system calls, namely 0x1ebe.

Measurements with lmbench on a 4.2GHz POWER6 showed no measurable
change in the speed of normal system calls with this patch.

Switching endianness with this new system call takes around 60ns on a
4.2GHz POWER6, compared with around 300ns to switch endian mode with a
prctl.  This can provide a significant performance advantage for
emulators for little-endian architectures that want to switch between
big-endian and little-endian mode frequently, e.g. because they are
generating instructions sequences on the fly and they want to run
those sequences in little-endian mode.

The other thing about this system call is that it doesn't clobber as
many registers as a normal system call.  It only clobbers r12.

Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agodrivers: fix integer as NULL pointer warnings
Harvey Harrison [Mon, 28 Apr 2008 23:50:04 +0000 (16:50 -0700)]
drivers: fix integer as NULL pointer warnings

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomedia: fix integer as NULL pointer warnings
Harvey Harrison [Mon, 28 Apr 2008 23:50:03 +0000 (16:50 -0700)]
media: fix integer as NULL pointer warnings

drivers/media/video/v4l2-common.c:719:16: warning: Using plain integer as NULL pointer
drivers/media/video/au0828/au0828-dvb.c:122:19: warning: Using plain integer as NULL pointer
drivers/media/video/ivtv/ivtv-yuv.c:1101:22: warning: Using plain integer as NULL pointer
drivers/media/video/ivtv/ivtv-yuv.c:1102:23: warning: Using plain integer as NULL pointer
drivers/media/video/pvrusb2/pvrusb2-audio.c:78:39: warning: Using plain integer as NULL pointer
drivers/media/video/pvrusb2/pvrusb2-video-v4l.c:84:39: warning: Using plain integer as NULL pointer
drivers/media/video/pvrusb2/pvrusb2-v4l2.c:1264:9: warning: Using plain integer as NULL pointer
drivers/media/video/pvrusb2/pvrusb2-context.c:197:28: warning: Using plain integer as NULL pointer
drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c:126:39: warning: Using plain integer as NULL pointer
drivers/media/video/pvrusb2/pvrusb2-dvb.c:133:32: warning: Using plain integer as NULL pointer
drivers/media/video/pvrusb2/pvrusb2-dvb.c:145:31: warning: Using plain integer as NULL pointer
drivers/media/video/pvrusb2/pvrusb2-dvb.c:177:55: warning: Using plain integer as NULL pointer
drivers/media/video/videobuf-core.c:100:9: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoscsi: fix integer as NULL pointer warnings
Harvey Harrison [Mon, 28 Apr 2008 23:50:03 +0000 (16:50 -0700)]
scsi: fix integer as NULL pointer warnings

drivers/scsi/aic7xxx/aic7770_osm.c:53:58: warning: Using plain integer as NULL pointer
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c:355:47: warning: Using plain integer as NULL pointer
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c:372:55: warning: Using plain integer as NULL pointer
drivers/scsi/aha152x.c:997:28: warning: Using plain integer as NULL pointer
drivers/scsi/aha152x.c:1003:28: warning: Using plain integer as NULL pointer
drivers/scsi/aha152x.c:1165:46: warning: Using plain integer as NULL pointer
drivers/scsi/fdomain.c:1446:40: warning: Using plain integer as NULL pointer
drivers/scsi/sym53c8xx_2/sym_hipd.c:1650:51: warning: Using plain integer as NULL pointer
drivers/scsi/sym53c8xx_2/sym_hipd.c:3171:42: warning: Using plain integer as NULL pointer
drivers/scsi/sym53c8xx_2/sym_hipd.c:5732:52: warning: Using plain integer as NULL pointer
drivers/scsi/ncr53c8xx.c:8189:31: warning: Using plain integer as NULL pointer
drivers/scsi/ncr53c8xx.c:8225:34: warning: Using plain integer as NULL pointer
drivers/scsi/dpt_i2o.c:156:32: warning: Using plain integer as NULL pointer
drivers/scsi/ultrastor.c:954:42: warning: Using plain integer as NULL pointer
drivers/scsi/ultrastor.c:1104:18: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Tue, 29 Apr 2008 00:30:26 +0000 (17:30 -0700)]
Merge git://git./linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (35 commits)
  siimage: coding style cleanup (take 2)
  ide-cd: clean up cdrom_analyze_sense_data()
  ide-cd: fix test unsigned var < 0
  ide: add TSSTcorp CDDVDW SH-S202H to ivb_list[]
  piix: add Asus Eee 701 controller to short cable list
  ARM: always select HAVE_IDE
  remove the broken ETRAX_IDE driver
  ide: remove ->dma_prdtable field from ide_hwif_t
  ide: remove ->dma_vendor{1,3} fields from ide_hwif_t
  scc_pata: add ->dma_host_set and ->dma_start methods
  ide: skip "VLB sync" if host uses MMIO
  ide: add ide_pad_transfer() helper
  ide: remove ->INW and ->OUTW methods
  ide: use IDE I/O helpers directly in ide_tf_{load,read}()
  ns87415: add ->tf_read method
  scc_pata: add ->tf_{load,read} methods
  ide-h8300: add ->tf_{load,read} methods
  ide-cris: add ->tf_{load,read} methods
  ide: add ->tf_load and ->tf_read methods
  ide: move ide_tf_{load,read} to ide-iops.c
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Linus Torvalds [Tue, 29 Apr 2008 00:29:43 +0000 (17:29 -0700)]
Merge git://git./linux/kernel/git/sam/kbuild

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kconfig: add named choice group
  kconfig: fix choice dependency check
  kconifg: 'select' considered less evil
  dontdiff: ignore timeconst.h
  dontdiff: add modules.order
  kbuild: fix unportability in gen_initramfs_list.sh
  kbuild: fix help output to show correct arch
  kbuild: show defconfig subdirs in make help
  kconfig: reversed borderlines in inputbox

15 years agodrivers: atm, char fix integer as NULL pointer warnings
Harvey Harrison [Mon, 28 Apr 2008 21:13:20 +0000 (14:13 -0700)]
drivers: atm, char fix integer as NULL pointer warnings

drivers/atm/nicstar.c:418:25: warning: Using plain integer as NULL pointer
drivers/char/drm/r128_cce.c:820:25: warning: Using plain integer as NULL pointer
drivers/char/tty_io.c:1183:10: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomm: fix integer as NULL pointer warnings
Harvey Harrison [Mon, 28 Apr 2008 21:13:19 +0000 (14:13 -0700)]
mm: fix integer as NULL pointer warnings

mm/hugetlb.c:207:11: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agokernel: fix integer as NULL pointer warnings
Harvey Harrison [Mon, 28 Apr 2008 21:13:19 +0000 (14:13 -0700)]
kernel: fix integer as NULL pointer warnings

kernel/cpuset.c:1268:52: warning: Using plain integer as NULL pointer
kernel/pid_namespace.c:95:24: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Reviewed-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoinit: fix integer as NULL pointer warnings
Harvey Harrison [Mon, 28 Apr 2008 21:13:14 +0000 (14:13 -0700)]
init: fix integer as NULL pointer warnings

init/do_mounts_rd.c:215:13: warning: Using plain integer as NULL pointer
init/do_mounts_md.c:136:45: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosiimage: coding style cleanup (take 2)
Sergei Shtylyov [Mon, 28 Apr 2008 21:44:44 +0000 (23:44 +0200)]
siimage: coding style cleanup (take 2)

Fix 18 errors and several warnings given by checkpatch.pl:

- use of C99 // comments;

- trailing whitespace;

- 'switch' and 'case' not at the same indentation level;

- no space before the open parenthesis of the 'if' and 'switch' statements;

- space between function name and open parenthesis (though I have introduced
  such warnins in some places since the code looks prettier with the spaces);

- including <asm/io.h> instead of <linux/io.h>;

- line over 80 characters.

In addition to these changes, also do the following:

- make the arrays in sil_set_pio_mode() 'static', and make the arrays in
  sil_set_dma_mode() 'static const';

- change the string of the 'if' statements into the 'switch' statement in
  sil_pata_udma_filter();

- drop the needless '==' operators from the 'if' statements where a condition
  is a mere bit test;

- remove needless initializer for the 'tmp' variable in init_chipset_siimage();

- beautify groups of the variable initializers and assignment operators;

- add new line after variable definitions;

- remove new line between the comment and the statements it refers to;

- remove needless curly braces and parentheses;

- fix typos, capitalize acronyms, etc. in the comments...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-cd: clean up cdrom_analyze_sense_data()
Roel Kluin [Mon, 28 Apr 2008 21:44:43 +0000 (23:44 +0200)]
ide-cd: clean up cdrom_analyze_sense_data()

[bart: fix handling of bio_sectors(failed_command->bio) == 0]

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-cd: fix test unsigned var < 0
Roel Kluin [Mon, 28 Apr 2008 21:44:43 +0000 (23:44 +0200)]
ide-cd: fix test unsigned var < 0

valid is unsigned and cannot be below 0.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add TSSTcorp CDDVDW SH-S202H to ivb_list[]
Alexander Smal [Mon, 28 Apr 2008 21:44:43 +0000 (23:44 +0200)]
ide: add TSSTcorp CDDVDW SH-S202H to ivb_list[]

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agopiix: add Asus Eee 701 controller to short cable list
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:43 +0000 (23:44 +0200)]
piix: add Asus Eee 701 controller to short cable list

Based on ata_piix patch by Dan McGee.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoARM: always select HAVE_IDE
Adrian Bunk [Mon, 28 Apr 2008 21:44:43 +0000 (23:44 +0200)]
ARM: always select HAVE_IDE

It's plain wrong for PCMCIA to select HAVE_IDE that implies e.g. the
availability of an asm/ide.h

It turns out this was done for ARM, and we can simply always select
HAVE_IDE on ARM instead of manually tracking which platforms might
possible have an IDE controller directly or indirectly.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoremove the broken ETRAX_IDE driver
Adrian Bunk [Mon, 28 Apr 2008 21:44:42 +0000 (23:44 +0200)]
remove the broken ETRAX_IDE driver

ETRAX_IDE was marked as broken last year with the comment
"it doesn't even compile currently".

Remove it since it won't get fixed in the near future.

On Mon, Apr 14, 2008 at 02:50:19PM +0200, Mikael Starvik wrote:
> You can remove it for now and we will resubmit a new if/when we get around
> to fix it.

[bart: ported it over IDE tree]

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Mikael Starvik <mikael.starvik@axis.com>
Cc: Jesper Nilsson <Jesper.Nilsson@axis.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: remove ->dma_prdtable field from ide_hwif_t
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:42 +0000 (23:44 +0200)]
ide: remove ->dma_prdtable field from ide_hwif_t

* Use 'hwif->dma_base + {4,8}' instead of hwif->dma_prdtable in
  {ide,scc}_dma_setup().

* Remove no longer needed ->dma_prdtable field from ide_hwif_t.

While at it:

* Use ATA_DMA_TABLE_OFS define.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: remove ->dma_vendor{1,3} fields from ide_hwif_t
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:42 +0000 (23:44 +0200)]
ide: remove ->dma_vendor{1,3} fields from ide_hwif_t

* Use 'hwif->dma_base + {1,3}' instead of hwif->dma_vendor{1,3} in
  pdc202xx_new host driver.

* Remove no longer needed ->dma_vendor{1,3} fields from ide_hwif_t.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoscc_pata: add ->dma_host_set and ->dma_start methods
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:41 +0000 (23:44 +0200)]
scc_pata: add ->dma_host_set and ->dma_start methods

Add ->dma_host_set and ->dma_start methods (+ __scc_dma_end() helper)
so scc_ide_{in,out}b() can be used directly.

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: skip "VLB sync" if host uses MMIO
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:41 +0000 (23:44 +0200)]
ide: skip "VLB sync" if host uses MMIO

* Skip "VLB sync" in ata_{in,out}put_data() if host uses MMIO.

* Use I/O ops directly in ata_vlb_sync() an drop no longer needed
  'ide_drive_t *drive' argument.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add ide_pad_transfer() helper
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:41 +0000 (23:44 +0200)]
ide: add ide_pad_transfer() helper

* Add ide_pad_transfer() helper (which uses ->{in,out}put_data methods
  internally so the transfer is also padded to drive+host requirements)
  and use it instead of ide_atapi_{write_zeros,discard_data}().

* Remove no longer needed ide_atapi_{write_zeros,discard_data}().

Cc: Borislav Petkov <petkovbb@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: remove ->INW and ->OUTW methods
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:41 +0000 (23:44 +0200)]
ide: remove ->INW and ->OUTW methods

* Remove no longer used ->INW and ->OUTW methods.

While at it:

* scc_pata.c: scc_ide_{out,in}w() is called only in scc_tf_{load,read}()
  so inline it there.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: use IDE I/O helpers directly in ide_tf_{load,read}()
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:41 +0000 (23:44 +0200)]
ide: use IDE I/O helpers directly in ide_tf_{load,read}()

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agons87415: add ->tf_read method
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:40 +0000 (23:44 +0200)]
ns87415: add ->tf_read method

Add ->tf_read method so out{b,w}(), in{b,w}() and superio_ide_inb()
can be used directly.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoscc_pata: add ->tf_{load,read} methods
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:40 +0000 (23:44 +0200)]
scc_pata: add ->tf_{load,read} methods

Add ->tf_{load,read} methods so scc_ide_{outb,outw,inb,inw}()
can be used directly.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-h8300: add ->tf_{load,read} methods
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:40 +0000 (23:44 +0200)]
ide-h8300: add ->tf_{load,read} methods

Add ->tf_{load,read} methods so outb()/inb() and mm_outw()/mm_inw()
can be used directly.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-cris: add ->tf_{load,read} methods
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:40 +0000 (23:44 +0200)]
ide-cris: add ->tf_{load,read} methods

Add ->tf_{load,read} methods so cris_ide_{outb,outw,inb,inw}()
can be used directly.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add ->tf_load and ->tf_read methods
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:40 +0000 (23:44 +0200)]
ide: add ->tf_load and ->tf_read methods

* Add ->tf_load and ->tf_read methods to ide_hwif_t and set the default
  methods in default_hwif_transport().

* Use ->tf_{load,read} instead o calling ide_tf_{load,read}() directly.

* Make ide_tf_{load,read}() static.

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: move ide_tf_{load,read} to ide-iops.c
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:39 +0000 (23:44 +0200)]
ide: move ide_tf_{load,read} to ide-iops.c

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: factor out debugging code from ide_tf_load()
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:39 +0000 (23:44 +0200)]
ide: factor out debugging code from ide_tf_load()

Factor out debugging code from ide_tf_load() to ide_tf_dump() helper
and update ide_tf_load() users accordingly.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add ide_execute_pkt_cmd() helper
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:39 +0000 (23:44 +0200)]
ide: add ide_execute_pkt_cmd() helper

Add ide_execute_pkt_cmd() helper for executing PACKET command,
then convert ATAPI device drivers to use it.

As a nice side-effect this fixes ide-{floppy,tape,scsi} w.r.t.
ide_lock taking (ide-cd was OK).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-{floppy,tape,scsi}: 400ns delay is required after executing the command
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:39 +0000 (23:44 +0200)]
ide-{floppy,tape,scsi}: 400ns delay is required after executing the command

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: always use ->OUTBSYNC method for executing commands
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:38 +0000 (23:44 +0200)]
ide: always use ->OUTBSYNC method for executing commands

Always use ->OUTBSYNC method for executing commands so the posting is done
if needed (this affects only pmac and scc_pata host drivers at the moment).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agosiimage: remove proc_reports_siimage()
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:38 +0000 (23:44 +0200)]
siimage: remove proc_reports_siimage()

* proc_reports_siimage() is now only called by init_chipset_siimage()
  so inline it there.

* Use array instead of switch statement for reporting clock modes.

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agosiimage: add sil_* I/O ops
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:38 +0000 (23:44 +0200)]
siimage: add sil_* I/O ops

Add sil_iowrite{8,16,32}() and sil_ioread{8,16}() helpers, then use them to
merge code accessing configuration registers through PCI and MMIO together.

[ because of this SATA initialization bits from setup_mmio_siimage() are
  moved to init_chipset_siimage() ]

This also cuts code size a bit:

   text    data     bss     dec     hex filename
   4437     164       0    4601    11f9 drivers/ide/pci/siimage.o.before
   3979     164       0    4143    102f drivers/ide/pci/siimage.o.after

While at it:

* Use I/O ops directly instead of using ->IN{B,W} and ->OUT{B,W}.

* Fixup CodingStyle in setup_mmio_siimage().

* Rename 'tmpbyte' variable to 'tmp' in init_chipset_siimage().

There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agosiimage: do clocking register posting earlier in setup_mmio_siimage()
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:38 +0000 (23:44 +0200)]
siimage: do clocking register posting earlier in setup_mmio_siimage()

Do clocking register posting earlier in setup_mmio_siimage()
to match code in init_chipset_siimage().

This is a preparation for the next patch which merges PCI and MMIO
code paths together.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: remove ->INS{W,L} and ->OUTS{W,L} methods
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:37 +0000 (23:44 +0200)]
ide: remove ->INS{W,L} and ->OUTS{W,L} methods

* Use ins{w,l}()/outs{w,l}() and __ide_mm_ins{w,l}()/__ide_mm_outs{w,l}()
  directly in ata_{in,out}put_data() (by using IDE_HFLAG_MMIO host flag to
  decide which I/O ops are required).

* Remove no longer needed ->INS{W,L} and ->OUTS{W,L} methods (ide-h8300,
  au1xxx-ide and scc_pata implement their own ->{in,out}put_data methods).

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add IDE_HFLAG_MMIO host flag (take 2)
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:37 +0000 (23:44 +0200)]
ide: add IDE_HFLAG_MMIO host flag (take 2)

* Add IDE_HFLAG_MMIO host flag and set it for hosts which use
  default_hwif_mmiops().

v2:
* Fix kernel panic in pmac host driver (',' should be '|').

  Thanks to Kamalesh for reporting it + testing the fix
  and to Andrew for hinting me about the source of the issue.

Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-h8300: add ->{in,out}put_data methods (take 2)
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:37 +0000 (23:44 +0200)]
ide-h8300: add ->{in,out}put_data methods (take 2)

v2:

* Update ->{in,out}_data methods to take 'struct request *rq' argument.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoau1xxx-ide: add ->{in,out}put_data methods (take 2)
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:37 +0000 (23:44 +0200)]
au1xxx-ide: add ->{in,out}put_data methods (take 2)

v2:

* Update ->{in,out}_data methods to take 'struct request *rq' argument.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoscc_pata: add ->{in,out}put_data methods (take 2)
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:36 +0000 (23:44 +0200)]
scc_pata: add ->{in,out}put_data methods (take 2)

v2:

* Update ->{in,out}_data methods to take 'struct request *rq' argument
  (thanks to Stephen Rothwell for catching it).

There should be no functional changes caused by this patch.

Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Cc: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: merge ->atapi_*put_bytes and ->ata_*put_data methods
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:36 +0000 (23:44 +0200)]
ide: merge ->atapi_*put_bytes and ->ata_*put_data methods

* Merge ->atapi_{in,out}put_bytes and ->ata_{in,out}put_data methods
  into new ->{in,out}put_data methods which take number of bytes to
  transfer as an argument and always do padding.

While at it:

* Use 'hwif' or 'drive->hwif' instead of 'HWIF(drive)'.

There should be no functional changes caused by this patch (all users
of ->ata_{in,out}put_data methods were using multiply-of-4 word counts).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agofalconide/q40ide: add ->atapi_*put_bytes and ->ata_*put_data methods (take 2)
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:36 +0000 (23:44 +0200)]
falconide/q40ide: add ->atapi_*put_bytes and ->ata_*put_data methods (take 2)

* Add ->atapi_{in,out}put_bytes and ->ata_{in,out}put_data methods to
  falconide and q40ide host drivers (->ata_* methods are implemented on
  top of ->atapi_* methods so they also do byte-swapping now).

* Cleanup atapi_{in,out}put_bytes().

v2:
* Add 'struct request *rq' argument to ->ata_{in,out}put_data methods
  and don't byte-swap disk fs requests (we shouldn't un-swap fs requests
  because fs itself is stored byte-swapped on the disk) - this is how
  things were done before the patch (ideally device mapper should be
  used instead but it would break existing setups and would have some
  performance impact).

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Richard Zidlicky <rz@linux-m68k.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: fix au1xxx-ide breakage
Bartlomiej Zolnierkiewicz [Mon, 28 Apr 2008 21:44:35 +0000 (23:44 +0200)]
ide: fix au1xxx-ide breakage

On Monday 28 April 2008, Sergei Shtylyov wrote:
> Hello, I wrote:
>
> > Fix these warnings emitted when compiling drivers/ide/mips/au1xxx-ide.c:
>
> > include/asm/mach-au1x00/au1xxx_ide.h:137: warning: 'auide_tune_drive' declared
> > `static' but never defined
> > include/asm/mach-au1x00/au1xxx_ide.h:138: warning: 'auide_tune_chipset' declared
> >  `static' but never defined
>
> > by wiping out the whole "function prototyping" section from the header file
> > <asm-mips/mach-au1x00/au1xxx_ide.h> as it mostly declared functions that are
> > already dead in the IDE driver; move the only useful prototype into the driver.
> >
> > Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>
> > ---
> > I'm not sure thru which tree this should go -- probably thru Linux/MIPS one...
>
> > Bart, au1xxx-ide-fix-mwdma-support.patch will probably need to be updated to
> > remove that added prototype since it won't be needed anymore...
>
>     Which you haven't done either in that patch or in
> au1xxx-ide-use-init_dma-method.patch. So, face the consequences:
>
> drivers/ide/mips/au1xxx-ide.c:456: error: conflicting types for 'auide_ddma_init'
> drivers/ide/mips/au1xxx-ide.c:51: error: previous declaration of
> 'auide_ddma_init' was here
> drivers/ide/mips/au1xxx-ide.c:456: error: conflicting types for 'auide_ddma_init'
> drivers/ide/mips/au1xxx-ide.c:51: error: previous declaration of
> 'auide_ddma_init' was here
> drivers/ide/mips/au1xxx-ide.c:51: warning: 'auide_ddma_init' used but never
> defined

Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoptrace: conditionalize compat_ptrace_request
Roland McGrath [Mon, 28 Apr 2008 20:57:19 +0000 (13:57 -0700)]
ptrace: conditionalize compat_ptrace_request

My recent additions to compat_ptrace_request made it mandatory
for CONFIG_COMPAT arch's to define copy_siginfo_from_user32.
This broke some builds, though they all really should get cleaned
up in that way.

Since all the arch's that actually call compat_ptrace_request have
now been cleaned up to use the generic compat_sys_ptrace, we can
avoid the build problems on the crufty arch's by changing the
conditionals on the definition.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Mon, 28 Apr 2008 21:08:56 +0000 (14:08 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/penberg/slab-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
  slub: pack objects denser
  slub: Calculate min_objects based on number of processors.
  slub: Drop DEFAULT_MAX_ORDER / DEFAULT_MIN_OBJECTS
  slub: Simplify any_slab_object checks
  slub: Make the order configurable for each slab cache
  slub: Drop fallback to page allocator method
  slub: Fallback to minimal order during slab page allocation
  slub: Update statistics handling for variable order slabs
  slub: Add kmem_cache_order_objects struct
  slub: for_each_object must be passed the number of objects in a slab
  slub: Store max number of objects in the page struct.
  slub: Dump list of objects not freed on kmem_cache_close()
  slub: free_list() cleanup
  slub: improve kmem_cache_destroy() error message
  slob: fix bug - when slob allocates "struct kmem_cache", it does not force alignment.

15 years agokconfig: add named choice group
Roman Zippel [Fri, 29 Feb 2008 04:11:50 +0000 (05:11 +0100)]
kconfig: add named choice group

As choice dependency are now fully checked, it's quite easy to add support
for named choices. This lifts the restriction that a choice value can only
appear once, although it still has to be within the same group,
but multiple choices can be joined by giving them a name.
While at it I cleaned up a little the choice type logic to simplify it a
bit.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokconfig: fix choice dependency check
Roman Zippel [Fri, 29 Feb 2008 04:10:24 +0000 (05:10 +0100)]
kconfig: fix choice dependency check

Properly check the dependency of choices as a group.
Also fix that sym_check_deps() correctly terminates the dependency loop
error check (otherwise it would continue printing the dependency chain).

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokconifg: 'select' considered less evil
Matthew Wilcox [Sat, 19 Apr 2008 20:45:11 +0000 (14:45 -0600)]
kconifg: 'select' considered less evil

While select should be used with care, it is not actually evil.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agodontdiff: ignore timeconst.h
Ben Dooks [Fri, 18 Apr 2008 15:28:35 +0000 (16:28 +0100)]
dontdiff: ignore timeconst.h

Ignore the autobuilt kernel/timeconst.h when
using diff on an built kernel tree.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agodontdiff: add modules.order
Ben Dooks [Fri, 18 Apr 2008 15:18:16 +0000 (16:18 +0100)]
dontdiff: add modules.order

Add modules.order to the list of files that
shoud be ignored when using diff on a built
kernel tree.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokbuild: fix unportability in gen_initramfs_list.sh
Felix Fietkau [Wed, 2 Apr 2008 12:50:05 +0000 (14:50 +0200)]
kbuild: fix unportability in gen_initramfs_list.sh

On a Mac OS X machine the output of ls -l is different from a standard
Linux machine. Use readlink instead of parsing a hardcoded field number
from the ls output.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agox86_64 vDSO: use initdata
Roland McGrath [Mon, 28 Apr 2008 01:45:38 +0000 (18:45 -0700)]
x86_64 vDSO: use initdata

The 64-bit vDSO image is in a special ".vdso" section for no reason
I can determine.  Furthermore, the location of the vdso_end symbol
includes some wrongly-calculated padding space in the image, which
is then (correctly) rounded to page size, resulting in an extra page
of zeros in the image mapped in to user processes.

This changes it to put the vdso.so image into normal initdata as we
have always done for the 32-bit vDSO images.  The extra padding is
gone, so the user VMA is one page instead of two.  The image that
was already copied around at boot time is now in initdata, so we
recover that wasted space after boot.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
Linus Torvalds [Mon, 28 Apr 2008 20:47:21 +0000 (13:47 -0700)]
Merge git://git./linux/kernel/git/davej/cpufreq

* git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] Make acpi-cpufreq more robust against BIOS freq changes behind our back.
  [CPUFREQ] change cpu freq tables to per_cpu variables
  [CPUFREQ] fix show_trans_table
  [CPUFREQ] Warn when cpufreq_register_notifier called before pure initcalls
  [CPUFREQ] Refactor locking in cpufreq_add_dev
  [CPUFREQ] more CodingStyle
  [CPUFREQ] CodingStyle
  [CPUFREQ] Slightly shorten the error paths of cpufreq_suspend/cpufreq_resume

15 years agokbuild: fix help output to show correct arch
Andres Salomon [Sat, 26 Apr 2008 02:34:58 +0000 (22:34 -0400)]
kbuild: fix help output to show correct arch

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agomm/memory_hotplug.c must #include "internal.h"
Adrian Bunk [Mon, 28 Apr 2008 17:40:08 +0000 (20:40 +0300)]
mm/memory_hotplug.c must #include "internal.h"

This patch fixes the following compile error caused by commit
04753278769f3b6c3b79a080edb52f21d83bf6e2 ("memory hotplug: register
section/node id to free"):

    CC      mm/memory_hotplug.o
  /home/bunk/linux/kernel-2.6/git/linux-2.6/mm/memory_hotplug.c: In function ‘put_page_bootmem’:
  /home/bunk/linux/kernel-2.6/git/linux-2.6/mm/memory_hotplug.c:82: error: implicit declaration of function ‘__free_pages_bootmem’
  /home/bunk/linux/kernel-2.6/git/linux-2.6/mm/memory_hotplug.c: At top level:
  /home/bunk/linux/kernel-2.6/git/linux-2.6/mm/memory_hotplug.c:87: warning: no previous prototype for ‘register_page_bootmem_info_section’
  make[2]: *** [mm/memory_hotplug.o] Error 1

[ Andrew: "Argh.  The -mm-only memory-hotplug-add-removable-to-sysfs-
  to-show-memblock-removability.patch debugging patch adds that include
  so nobody hit this before. ]

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agokbuild: show defconfig subdirs in make help
Segher Boessenkool [Sun, 6 Apr 2008 20:16:07 +0000 (22:16 +0200)]
kbuild: show defconfig subdirs in make help

PowerPC will start moving board defconfigs into subarch-specific
subdirs soon.  "make help" currently does not look in subdirs to
find the defconfigs to show.  This is partially a good thing,
since there are way too many defconfigs for one list.

This patch makes the main "make help" display something like

  help-40x         - Show 40x-specific targets
  help-44x         - Show 44x-specific targets
  help-boards      - Show all of the above

and wires up stuff so those new help-* commands actually work.

[sam: fixed it up to display x86 defconfigs too]
Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokconfig: reversed borderlines in inputbox
Roel Kluin [Thu, 20 Mar 2008 20:30:32 +0000 (21:30 +0100)]
kconfig: reversed borderlines in inputbox

Fix reversal of dlg.border.atr and dlg.dialog.atr for draw_box()
Makes the inputbox look like expected

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agohrtimer: raise softirq unlocked to avoid circular lock dependency
Thomas Gleixner [Mon, 28 Apr 2008 07:23:24 +0000 (09:23 +0200)]
hrtimer: raise softirq unlocked to avoid circular lock dependency

The scheduler hrtimer bits in 2.6.25 introduced a circular lock
dependency in a rare code path:

=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.25-sched-devel.git-x86-latest.git #19
-------------------------------------------------------
X/2980 is trying to acquire lock:
 (&rq->rq_lock_key#2){++..}, at: [<ffffffff80230146>] task_rq_lock+0x56/0xa0

but task is already holding lock:
 (&cpu_base->lock){++..}, at: [<ffffffff80257ae1>] lock_hrtimer_base+0x31/0x60

which lock already depends on the new lock.

The scenario which leads to this is:

posix-timer signal is delivered
 -> posix-timer is rearmed
    timer is already expired in hrtimer_enqueue()
     -> softirq is raised

To prevent this we need to move the raise of the softirq out of the
base->lock protected code path.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
15 years ago[CPUFREQ] Make acpi-cpufreq more robust against BIOS freq changes behind our back.
Venkatesh Pallipadi [Mon, 28 Apr 2008 19:13:43 +0000 (15:13 -0400)]
[CPUFREQ] Make acpi-cpufreq more robust against BIOS freq changes behind our back.

We checked the hardware freq with OS cached freq value in get_cur_freqon_cpu().

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ] change cpu freq tables to per_cpu variables
Mike Travis [Wed, 5 Mar 2008 16:31:29 +0000 (08:31 -0800)]
[CPUFREQ] change cpu freq tables to per_cpu variables

Change cpufreq tables from arrays to per_cpu variables in
drivers/acpi/processor_thermal.c

Based on git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Dave Jones <davej@codemonkey.org.uk>
15 years ago[CPUFREQ] fix show_trans_table
Cesar Eduardo Barros [Sat, 16 Feb 2008 10:41:25 +0000 (08:41 -0200)]
[CPUFREQ] fix show_trans_table

Fix show_trans_table when it overflows PAGE_SIZE.

* Not all snprintf calls were protected against being passed a negative
length.
* When show_trans_table overflows, len might be > PAGE_SIZE. In that case,
returns PAGE_SIZE.

Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
Signed-off-by: Dave Jones <davej@codemonkey.org.uk>
15 years ago[CPUFREQ] Warn when cpufreq_register_notifier called before pure initcalls
Cesar Eduardo Barros [Sat, 16 Feb 2008 10:41:24 +0000 (08:41 -0200)]
[CPUFREQ] Warn when cpufreq_register_notifier called before pure initcalls

If cpufreq_register_notifier is called before pure initcalls,
init_cpufreq_transition_notifier_list will overwrite whatever it did,
causing notifiers to be ignored.

Print some noise to the kernel log if that happens.

Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
Signed-off-by: Dave Jones <davej@codemonkey.org.uk>
15 years ago[CPUFREQ] Refactor locking in cpufreq_add_dev
Dave Jones [Wed, 5 Mar 2008 19:07:34 +0000 (14:07 -0500)]
[CPUFREQ] Refactor locking in cpufreq_add_dev

Simplify this by moving the unlocking out of the error
paths into the exit path.

Signed-off-by: Dave Jones <davej@codemonkey.org.uk>
15 years ago[CPUFREQ] more CodingStyle
Dave Jones [Wed, 5 Mar 2008 19:28:32 +0000 (14:28 -0500)]
[CPUFREQ] more CodingStyle

void * p   ->  void *p
no space between function parameters
removed excess whitespace

Signed-off-by: Dave Jones <davej@codemonkey.org.uk>
15 years ago[CPUFREQ] CodingStyle
Dave Jones [Thu, 7 Feb 2008 21:33:49 +0000 (16:33 -0500)]
[CPUFREQ] CodingStyle

return is not a function.

Signed-off-by: Dave Jones <davej@redhat.com>
15 years ago[CPUFREQ] Slightly shorten the error paths of cpufreq_suspend/cpufreq_resume
Dave Jones [Thu, 7 Feb 2008 21:32:18 +0000 (16:32 -0500)]
[CPUFREQ] Slightly shorten the error paths of cpufreq_suspend/cpufreq_resume

Signed-off-by: Dave Jones <davej@redhat.com>