[POWERPC] spufs: don't requeue victim contex in find_victim if it's not in spu_run
We should not requeue the victim context in find_victim if the owner is
not in spu_run. It's first not needed because leaving the context on
the spu is an optimization and second is harmful because it means the
owner could re-enter spu_run when the context is on the runqueue and
trip the BUG_ON in __spu_update_sched_info.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
[POWERPC] spufs: spu_create should send inotify IM_CREATE event
Creating a spufs context or gand using spu_create should send an inotify
event so that things like performance monitors have an easy way to find
out about newly created contexts.
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Luke Browning [Mon, 28 Apr 2008 07:35:56 +0000 (17:35 +1000)]
[POWERPC] spufs: handle faults while the context switch pending flag is set
Currently, page fault handlers don't issue a mfc restart if the context
switch pending flag is set, which can leave us with a hanging DMA after
a context restore.
This patch introduces fault pending flag that is set by the fault
handler and read by the context switch code, so that the latter can add
the restart bit at the right spot, after it has successfuly saved the
state of the mfc control register.
Signed-off-by: Luke Browning <lukebr@linux.vnet.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Luke Browning [Mon, 28 Apr 2008 04:32:34 +0000 (14:32 +1000)]
[POWERPC] spufs: try to route SPU interrupts to local node
Currently, we re-route SPU interrupts to the current cpu, which may be
on a remote node. In the case of time slicing, all spu interrupts will
end up routed to the same cpu, where the spusched_tick occurs.
This change routes mfc interrupts to the cpu where the controlling
thread last ran, provided that cpu is on the same node as the spu
(otherwise don't reroute interrupts).
This should improve performance and provide a more predictable
environment for processing spu exceptions. In the past we have seen
concurrent delivery of spu exceptions to two cpus. This eliminates that
concern.
Signed-off-by: Luke Browning <lukebr@linux.vnet.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Luke Browning [Fri, 25 Apr 2008 04:00:00 +0000 (14:00 +1000)]
[POWERPC] spufs: set SPU_CONTEXT_SWITCH_PENDING before synchronising SPU irqs
synchronize_irq() provides the serialization for
SPU_CONTEXT_SWITCH_PENDING which is read with a simple load. This
routine guarantees that the relevant interrupt handlers are not running,
so that the next time they do run they will see the update
memory value.
This must be done correctly so that exception handling code does not
restart the mfc in the middle of a context switch while we are trying
to atomically stop it and save state.
Signed-off-by: Luke Browning <lukebr@linux.vnet.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Jeremy Kerr [Wed, 23 Apr 2008 06:02:10 +0000 (16:02 +1000)]
[POWERPC] spufs: don't acquire state_mutex interruptible while performing callback
There's currently no way to tell if spu_process_callback has
returned with the state mutex held, as -EINTR may be returned
by either the syscall or the spu_acquire fail case.
Instead, just do a non-interruptible mutex_lock here.
Jeremy Kerr [Wed, 23 Apr 2008 04:24:27 +0000 (14:24 +1000)]
[POWERPC] spufs: update master runcntl with context lock held
Currently, we update the SPU master run control bit (ie,
spu_enable_spu) in spufs_run_spu before we grab the context mutex. This
can result in races with other processes accessing this context's
resources.
This change moves the spu_enable_spu to after we have acquired the
context lock.
Jeremy Kerr [Thu, 24 Apr 2008 08:15:40 +0000 (18:15 +1000)]
[POWERPC] spufs: fix post-stopped update of MFC_CNTL register
We currently have two issues with the MFC save code:
* save_mfc_decr doesn't handle a transition of 1 -> 0 of the Ds bit
* The Q bit may be stale in the CSA
This change fixes the first issue by clearing the relevant bits from
the MFC_CNTL value in the CSA before or-ing in the updated status.
Also, we add the Q bit to the updated status.
Jeremy Kerr [Wed, 9 Apr 2008 05:24:22 +0000 (15:24 +1000)]
[POWERPC] spufs: fix save of mfc_cntl register
Currently, we can introduce invalid entries into the MFC queues:
1) context starts a DMA
2) context gets scheduled out during a DMA
- kernel saves MFC queue to CSA
- kernel saves 0x0 in csa->mfc_control_RW
3) context gets scheduled in
- csa->mfc_control[Q] ('queues empty') isn't set, so DMA queues are
restored from the CSA
4) context's DMA is completed
5) context gets scheduled out again, no DMA occuring this time
- kernel sees that MFC_CNTL[Q] ('queues empty') is set, so doesn't
touch saved queue data in CSA
- kernel saves 0x0 in csa->mfc_control_RW
6) context gets scheduled in
- csa->mfc_control[Q] ('queues empty') isn't set (we saved is as 0!),
so DMA queues are restored from the CSA
In this last restore, we've restored the queue status from step 2,
which are now invalid.
This change makes save_mfc_cntl() closer to the save/restore sequence,
as specified in the CBE handbook.
Jeremy Kerr [Fri, 4 Apr 2008 06:55:28 +0000 (17:55 +1100)]
[POWERPC] cell: Fix lost interrupts due to fasteoi handler
We may currently lose interrupts during SPE context switch, as we alter
the INT_Route register. Because the IIC uses a per-thread priority
status, changing the interrupt routing to a different thread means that
the IRQ is no longer masked by the priority status, so we end up with
two fasteoi IRQ handlers executing for the one irq_desc. The fasteoi
handler doesn't handle multiple IRQs, so drops the second one.
Fix this by using our own flow handler. This is based on
handle_edge_irq, but issues an eoi after IRQs are handled, and doesn't
do any mask/unmasking.
Paul Mackerras [Fri, 2 May 2008 04:29:12 +0000 (14:29 +1000)]
[POWERPC] Bolt in SLB entry for kernel stack on secondary cpus
This fixes a regression reported by Kamalesh Bulabel where a POWER4
machine would crash because of an SLB miss at a point where the SLB
miss exception was unrecoverable. This regression is tracked at:
http://bugzilla.kernel.org/show_bug.cgi?id=10082
SLB misses at such points shouldn't happen because the kernel stack is
the only memory accessed other than things in the first segment of the
linear mapping (which is mapped at all times by entry 0 of the SLB).
The context switch code ensures that SLB entry 2 covers the kernel
stack, if it is not already covered by entry 0. None of entries 0
to 2 are ever replaced by the SLB miss handler.
Where this went wrong is that the context switch code assumes it
doesn't have to write to SLB entry 2 if the new kernel stack is in the
same segment as the old kernel stack, since entry 2 should already be
correct. However, when we start up a secondary cpu, it calls
slb_initialize, which doesn't set up entry 2. This is correct for
the boot cpu, where we will be using a stack in the kernel BSS at this
point (i.e. init_thread_union), but not necessarily for secondary
cpus, whose initial stack can be allocated anywhere. This doesn't
cause any immediate problem since the SLB miss handler will just
create an SLB entry somewhere else to cover the initial stack.
In fact it's possible for the cpu to go quite a long time without SLB
entry 2 being valid. Eventually, though, the entry created by the SLB
miss handler will get overwritten by some other entry, and if the next
access to the stack is at an unrecoverable point, we get the crash.
This fixes the problem by making slb_initialize create a suitable
entry for the kernel stack, if we are on a secondary cpu and the stack
isn't covered by SLB entry 0. This requires initializing the
get_paca()->kstack field earlier, so I do that in smp_create_idle
where the current field is initialized. This also abstracts a bit of
the computation that mk_esid_data in slb.c does so that it can be used
in slb_initialize.
Other OS wakeup is not supported from the IR controller,
the bluetooth controller nor the RTC. Remove references
to these in the PS3 sys-manager source.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Arrange for a syntax check to always be done on the powerpc/mm/slb.c
DBG() macro by defining it to pr_debug() for non-debug builds.
Also, fix these related compile warnings:
slb.c:273: warning: format '%04x' expects type 'unsigned int', but argument 2 has type 'long unsigned int
slb.c:274: warning: format '%04x' expects type 'unsigned int', but argument 2 has type 'long unsigned int'
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Kumar Gala [Wed, 30 Apr 2008 15:24:44 +0000 (10:24 -0500)]
[POWERPC] Xilinx: Fix compile warnings
arch/powerpc/sysdev/xilinx_intc.c: In function 'xilinx_intc_init':
arch/powerpc/sysdev/xilinx_intc.c:111: warning: format '%08X' expects type 'unsigned int', but argument 2 has type 'resource_size_t'
drivers/char/xilinx_hwicap/xilinx_hwicap.c: In function 'hwicap_setup':
drivers/char/xilinx_hwicap/xilinx_hwicap.c:626: warning: cast to pointer from integer of different size
drivers/char/xilinx_hwicap/xilinx_hwicap.c:646: warning: format '%x' expects type 'unsigned int', but argument 6 has type 'resource_size_t'
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Randy Dunlap [Wed, 30 Apr 2008 23:45:58 +0000 (16:45 -0700)]
[RAPIDIO] fix current kernel-doc notation
Fix current (-git16) missing docbook/kernel-doc notation in RapidIO files.
Warning(linux-2.6.25-git16//include/linux/rio.h:187): No description found for parameter 'sys_size'
Warning(linux-2.6.25-git16//include/linux/rio.h:187): No description found for parameter 'phy_type'
Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:188): No description found for parameter 'mport'
Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:224): No description found for parameter 'mport'
Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:245): No description found for parameter 'mport'
Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:270): No description found for parameter 'mport'
Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:311): No description found for parameter 'mport'
Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:996): No description found for parameter 'dev'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
can potentially trigger a deadlock. To avoid this deadlock a fix
similar to that found in the 8250.c serial driver is applied. The
deadlock is avoided by releasing the lock before pushing a buffer
and reacquiring it when completed.
Signed-off-by: Andrew Liu <shengping.liu@windriver.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Grant Likely [Thu, 1 May 2008 17:05:58 +0000 (11:05 -0600)]
[POWERPC] mpc5200: Allow for fixed speed MII configurations
Various improvements for configuring the MPC5200 MII link from the
device tree:
* Look for 'current-speed' property for fixed speed MII links
* Look for 'fsl,7-wire-mode' property for boards using the 7 wire mode
* move definition of private data structure out of the header file
Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Michael Ellerman [Wed, 30 Apr 2008 04:47:12 +0000 (14:47 +1000)]
[POWERPC] Fix crashkernel= handling when no crashkernel= specified
Commit edd8ce67436851a62f99f1d9707b40ea6a8e5323 (Use extended crashkernel
command line on ppc64), changed the logic in reserve_crashkernel()
which deals with the crashkernel= command line option.
This introduced a bug in the case when there is no crashkernel= option,
or it is incorrect. We would fall through and calculate the crash_size
based on the existing values in crashk_res. If both start and end are 0,
the default, we calculate the crash_size as 1 byte - which is wrong.
Rework the logic so that we use crashk_res, regardless of whether it's
set by the command line or via the device tree (see prom.c). Then check
if we have an empty range (end == start), and if so make sure to set
both end and start to zero (this is checked in machine_kexec_64.c). Then
we calculate the crash_size once we know we have a non-zero range.
Finally we always want to warn the user if they specify a base != 32MB,
so remove the special case for that in the command line parsing case.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Michael Ellerman [Wed, 30 Apr 2008 03:21:45 +0000 (13:21 +1000)]
[POWERPC] Make emergency stack safe for current_thread_info() use
The current_thread_info() macro, used by preempt_count(), assumes the
base address and size of the stack are THREAD_SIZE aligned.
The emergency stack currently isn't either of these things, which
could potentially cause problems anytime we're running on the
emergency stack. That includes when we detect a bad kernel stack
pointer, and also during early_setup_secondary().
Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
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>
[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>
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>
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>
[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>
[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>
[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>
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>
[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>
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>
[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>
[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>
[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>
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>
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>
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>
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.
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.
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>
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>
* 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
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>
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>
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>
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>
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>
* 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}().
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>
* 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.