GitHub/LineageOS/android_kernel_samsung_universal7580.git
14 years agoV4L/DVB (13782): [Mantis] Temporarily disable FRDA irq
Manu Abraham [Fri, 4 Dec 2009 08:31:45 +0000 (05:31 -0300)]
V4L/DVB (13782): [Mantis] Temporarily disable FRDA irq

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13781): [Mantis CA] Bug: Fix wrong usage of HIFRDWRN
Manu Abraham [Fri, 4 Dec 2009 08:31:21 +0000 (05:31 -0300)]
V4L/DVB (13781): [Mantis CA] Bug: Fix wrong usage of HIFRDWRN

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13780): [Mantis] HIF I/O: Enable Interrupts for Read
Sigmund Augdal [Fri, 4 Dec 2009 08:30:59 +0000 (05:30 -0300)]
V4L/DVB (13780): [Mantis] HIF I/O: Enable Interrupts for Read

Signed-off-by: Sigmund Augdal <sigmund@snap.tv>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13779): [Mantis] Missing wakeup for write queue
Manu Abraham [Fri, 4 Dec 2009 08:30:33 +0000 (05:30 -0300)]
V4L/DVB (13779): [Mantis] Missing wakeup for write queue

Thanks to Sigmund for pointing it out

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13778): [Mantis] Wr ACK is already handled in the fast path,
Manu Abraham [Fri, 4 Dec 2009 08:30:11 +0000 (05:30 -0300)]
V4L/DVB (13778): [Mantis] Wr ACK is already handled in the fast path,

do not use the event manager to handle the fast events

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13777): [Mantis] Use a Write wait queue for Write events
Manu Abraham [Fri, 4 Dec 2009 08:29:48 +0000 (05:29 -0300)]
V4L/DVB (13777): [Mantis] Use a Write wait queue for Write events

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13776): [Mantis] Use a simple timeout instead, interruptible
Manu Abraham [Fri, 4 Dec 2009 08:29:25 +0000 (05:29 -0300)]
V4L/DVB (13776): [Mantis] Use a simple timeout instead, interruptible

timeouts sleep unnecessarily too long

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13775): [Mantis] Remove unnecessary job queues
Manu Abraham [Fri, 4 Dec 2009 08:29:03 +0000 (05:29 -0300)]
V4L/DVB (13775): [Mantis] Remove unnecessary job queues

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13774): [Mantis] Remove redundant wait for Burst Reads, wakeup the HIF event
Sigmund Augdal [Fri, 4 Dec 2009 08:28:24 +0000 (05:28 -0300)]
V4L/DVB (13774): [Mantis] Remove redundant wait for Burst Reads, wakeup the HIF event

Signed-off-by: Sigmund Augdal <sigmund@snap.tv>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13773): [Mantis] Enable all interrupts
Manu Abraham [Fri, 4 Dec 2009 08:27:53 +0000 (05:27 -0300)]
V4L/DVB (13773): [Mantis] Enable all interrupts

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13772): [Mantis] Do not enable Common Memory Access
Manu Abraham [Fri, 4 Dec 2009 08:27:26 +0000 (05:27 -0300)]
V4L/DVB (13772): [Mantis] Do not enable Common Memory Access

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13771): [Mantis] Reset Flags at the earliest possible
Manu Abraham [Fri, 4 Dec 2009 08:26:46 +0000 (05:26 -0300)]
V4L/DVB (13771): [Mantis] Reset Flags at the earliest possible

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13770): [Mantis] Bug Do not trigger FR/DA IRQ from SBUF OPDONE
Manu Abraham [Fri, 4 Dec 2009 08:26:18 +0000 (05:26 -0300)]
V4L/DVB (13770): [Mantis] Bug Do not trigger FR/DA IRQ from SBUF OPDONE

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13769): [Mantis] Smart Buffer Burst Read Ready cannot flag FR/DA Irq
Manu Abraham [Fri, 4 Dec 2009 08:25:45 +0000 (05:25 -0300)]
V4L/DVB (13769): [Mantis] Smart Buffer Burst Read Ready cannot flag FR/DA Irq

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13768): [Mantis] Enable WRACK
Manu Abraham [Fri, 4 Dec 2009 08:25:18 +0000 (05:25 -0300)]
V4L/DVB (13768): [Mantis] Enable WRACK

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13767): [Mantis/VP-1041] Bug: Add in missing Master clock settings
Manu Abraham [Fri, 4 Dec 2009 08:24:47 +0000 (05:24 -0300)]
V4L/DVB (13767): [Mantis/VP-1041] Bug: Add in missing Master clock settings

Thanks to Ershov and Igor for pointing it out.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13766): [Mantis] Bug: Fix wrong exit condition
Sigmund Augdal [Fri, 4 Dec 2009 08:24:01 +0000 (05:24 -0300)]
V4L/DVB (13766): [Mantis] Bug: Fix wrong exit condition

Signed-off-by: Sigmund Augdal <sigmund@snap.tv>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13765): [Mantis] HIF I/O: Add some debug statements
Manu Abraham [Fri, 4 Dec 2009 08:23:38 +0000 (05:23 -0300)]
V4L/DVB (13765): [Mantis] HIF I/O: Add some debug statements

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13764): [Mantis CA] SLOT: Add some debug status
Manu Abraham [Fri, 4 Dec 2009 08:23:17 +0000 (05:23 -0300)]
V4L/DVB (13764): [Mantis CA] SLOT: Add some debug status

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13763): [Mantis] HIF I/O: trim delays a bit appropriately
Manu Abraham [Fri, 4 Dec 2009 08:22:57 +0000 (05:22 -0300)]
V4L/DVB (13763): [Mantis] HIF I/O: trim delays a bit appropriately

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13762): [Mantis CA] CA_MODULE: Look for the module status on driver unload...
Manu Abraham [Fri, 4 Dec 2009 08:22:33 +0000 (05:22 -0300)]
V4L/DVB (13762): [Mantis CA] CA_MODULE: Look for the module status on driver unload as well

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13761): [Mantis] HIF I/O: Temporary workaround, use SBUF_OPDONE flag instead
Manu Abraham [Fri, 4 Dec 2009 08:21:51 +0000 (05:21 -0300)]
V4L/DVB (13761): [Mantis] HIF I/O: Temporary workaround, use SBUF_OPDONE flag instead

Dnumgis got hit with this bug, using a temporary workaround
for the time being rather than digging deep at this point.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13760): [Mantis CA] CA_MODULE: Look for module status on driver load
Sigmund Augdal [Fri, 4 Dec 2009 08:21:27 +0000 (05:21 -0300)]
V4L/DVB (13760): [Mantis CA] CA_MODULE: Look for module status on driver load

Signed-off-by: Sigmund Augdal <sigmund@snap.tv>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13759): [Mantis] HIF I/O: Use the LSB octet only
Manu Abraham [Fri, 4 Dec 2009 08:21:05 +0000 (05:21 -0300)]
V4L/DVB (13759): [Mantis] HIF I/O: Use the LSB octet only

Thanks to Abylai Ospan for pointing this out.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13758): [Mantis CA] CAM_CONTROL: Use CAMREADY_IRQ event
Manu Abraham [Fri, 4 Dec 2009 08:20:44 +0000 (05:20 -0300)]
V4L/DVB (13758): [Mantis CA] CAM_CONTROL: Use CAMREADY_IRQ event

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13757): [Mantis CA] CAM_CONTROL: Use FRDA_IRQ Events
Manu Abraham [Fri, 4 Dec 2009 08:20:14 +0000 (05:20 -0300)]
V4L/DVB (13757): [Mantis CA] CAM_CONTROL: Use FRDA_IRQ Events

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13756): [Mantis CA] CAM_CONTROL: Use CAMCHANGE_IRQ events
Manu Abraham [Fri, 4 Dec 2009 08:19:26 +0000 (05:19 -0300)]
V4L/DVB (13756): [Mantis CA] CAM_CONTROL: Use CAMCHANGE_IRQ events

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13755): [Mantis CA] CAM_CONTROL: Use appropriate flags
Manu Abraham [Fri, 4 Dec 2009 08:18:53 +0000 (05:18 -0300)]
V4L/DVB (13755): [Mantis CA] CAM_CONTROL: Use appropriate flags

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13754): [Mantis] CAM_CONTROL: Implement TS control
Manu Abraham [Fri, 4 Dec 2009 08:18:27 +0000 (05:18 -0300)]
V4L/DVB (13754): [Mantis] CAM_CONTROL: Implement TS control

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13753): [Mantis CA] SLOT_CONTROL: Implement Slot RESET
Manu Abraham [Fri, 4 Dec 2009 08:17:46 +0000 (05:17 -0300)]
V4L/DVB (13753): [Mantis CA] SLOT_CONTROL: Implement Slot RESET

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13752): [Mantis CA] CAM_CONTROL: All CAM control operations now handled...
Manu Abraham [Fri, 4 Dec 2009 08:17:14 +0000 (05:17 -0300)]
V4L/DVB (13752): [Mantis CA] CAM_CONTROL: All CAM control operations now handled by the worker thread

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13751): [Mantis] GPIO_CONTROL: Do not toggle GPIO CW's on HIF operations
Manu Abraham [Fri, 4 Dec 2009 08:16:24 +0000 (05:16 -0300)]
V4L/DVB (13751): [Mantis] GPIO_CONTROL: Do not toggle GPIO CW's on HIF operations

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13750): [Mantis] GPIO_CONTROL: Cache a given GPIO Bit Setup for a given...
Manu Abraham [Fri, 4 Dec 2009 08:15:38 +0000 (05:15 -0300)]
V4L/DVB (13750): [Mantis] GPIO_CONTROL: Cache a given GPIO Bit Setup for a given event

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13749): [Mantis CA] CA_SLAVE: Do not change Slave Configuration setup
Manu Abraham [Fri, 4 Dec 2009 08:15:10 +0000 (05:15 -0300)]
V4L/DVB (13749): [Mantis CA] CA_SLAVE: Do not change Slave Configuration setup

(Need to sanitize this cleanly for different Slaves)

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13748): [Mantis/VP-2040] Add support for VP-2040 (TDA10023 frontend based)
Magnus Horlin [Fri, 4 Dec 2009 08:14:34 +0000 (05:14 -0300)]
V4L/DVB (13748): [Mantis/VP-2040] Add support for VP-2040 (TDA10023 frontend based)

Signed-off-by: Magnus Horlin <magnus@alefors.se>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13747): [Mantis] Bug Fix!: Use Register Address rather than register field
Sigmund Augdal [Fri, 4 Dec 2009 08:13:21 +0000 (05:13 -0300)]
V4L/DVB (13747): [Mantis] Bug Fix!: Use Register Address rather than register field

Signed-off-by: Sigmund Augdal <sigmund@snap.tv>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13746): [Mantis CA] Bug: Remove duplicated symbol
Manu Abraham [Fri, 4 Dec 2009 08:12:51 +0000 (05:12 -0300)]
V4L/DVB (13746): [Mantis CA] Bug: Remove duplicated symbol

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13745): [Mantis CA] Add some debug statements
Manu Abraham [Fri, 4 Dec 2009 08:12:16 +0000 (05:12 -0300)]
V4L/DVB (13745): [Mantis CA] Add some debug statements

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13744): [Mantis CA] Use Module status to signal Slot events
Manu Abraham [Fri, 4 Dec 2009 08:11:41 +0000 (05:11 -0300)]
V4L/DVB (13744): [Mantis CA] Use Module status to signal Slot events

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13743): [Mantis CA] Use DVB_CA Tuple parser
Manu Abraham [Fri, 4 Dec 2009 08:11:14 +0000 (05:11 -0300)]
V4L/DVB (13743): [Mantis CA] Use DVB_CA Tuple parser

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13742): [Mantis] Implement PCMCIA I/O Rd/Wr operations
Manu Abraham [Fri, 4 Dec 2009 08:10:25 +0000 (05:10 -0300)]
V4L/DVB (13742): [Mantis] Implement PCMCIA I/O Rd/Wr operations

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13741): [Mantis] Implement HIF Mem Read/Write operations
Manu Abraham [Fri, 4 Dec 2009 08:09:47 +0000 (05:09 -0300)]
V4L/DVB (13741): [Mantis] Implement HIF Mem Read/Write operations

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13740): [Mantis] Schedule the work instead of handling the task directly
Manu Abraham [Fri, 4 Dec 2009 08:09:04 +0000 (05:09 -0300)]
V4L/DVB (13740): [Mantis] Schedule the work instead of handling the task directly

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13739): [Mantis] Event Manager: Handle Masked events only
Manu Abraham [Fri, 4 Dec 2009 08:08:25 +0000 (05:08 -0300)]
V4L/DVB (13739): [Mantis] Event Manager: Handle Masked events only

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13738): [Mantis] Enable IRQ0 events
Manu Abraham [Fri, 4 Dec 2009 08:07:41 +0000 (05:07 -0300)]
V4L/DVB (13738): [Mantis] Enable IRQ0 events

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13737): [Mantis] Register the CA device, dummy functions for now
Manu Abraham [Fri, 4 Dec 2009 08:06:38 +0000 (05:06 -0300)]
V4L/DVB (13737): [Mantis] Register the CA device, dummy functions for now

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13736): [Mantis] Implement CAM Plug IN and Unplug events
Manu Abraham [Fri, 4 Dec 2009 08:06:00 +0000 (05:06 -0300)]
V4L/DVB (13736): [Mantis] Implement CAM Plug IN and Unplug events

Sigh! how i wish things were simpler ...

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13735): [Mantis] Implement the Event Manager tasklet
Manu Abraham [Fri, 4 Dec 2009 08:05:19 +0000 (05:05 -0300)]
V4L/DVB (13735): [Mantis] Implement the Event Manager tasklet

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13734): [Mantis] Initial go at an Event Manager
Manu Abraham [Fri, 4 Dec 2009 08:04:18 +0000 (05:04 -0300)]
V4L/DVB (13734): [Mantis] Initial go at an Event Manager

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13733): [Mantis] Start with the PCMCIA interface
Manu Abraham [Fri, 4 Dec 2009 08:03:35 +0000 (05:03 -0300)]
V4L/DVB (13733): [Mantis] Start with the PCMCIA interface

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13732): [Mantis] Add in some Link Layer definitions
Manu Abraham [Fri, 4 Dec 2009 08:00:30 +0000 (05:00 -0300)]
V4L/DVB (13732): [Mantis] Add in some Link Layer definitions

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13731): [Mantis] Add in a license header
Manu Abraham [Fri, 4 Dec 2009 07:59:44 +0000 (04:59 -0300)]
V4L/DVB (13731): [Mantis] Add in a license header

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13730): [Mantis] Add in some UART definitions
Manu Abraham [Fri, 4 Dec 2009 07:59:05 +0000 (04:59 -0300)]
V4L/DVB (13730): [Mantis] Add in some UART definitions

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13729): [Mantis] Add in a license header
Manu Abraham [Fri, 4 Dec 2009 07:53:07 +0000 (04:53 -0300)]
V4L/DVB (13729): [Mantis] Add in a license header

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13728): [Mantis] Add in some Host Interface definitions
Manu Abraham [Fri, 4 Dec 2009 07:52:23 +0000 (04:52 -0300)]
V4L/DVB (13728): [Mantis] Add in some Host Interface definitions

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13727): [Mantis/VP-1041] Bugfix: Sigh! Don't look for the STOP bit
Manu Abraham [Fri, 4 Dec 2009 07:48:03 +0000 (04:48 -0300)]
V4L/DVB (13727): [Mantis/VP-1041] Bugfix: Sigh! Don't look for the STOP bit

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13726): [Mantis/Skystar HD2] Add support for the Technisat Skystar HD2
Manu Abraham [Fri, 4 Dec 2009 07:47:30 +0000 (04:47 -0300)]
V4L/DVB (13726): [Mantis/Skystar HD2] Add support for the Technisat Skystar HD2

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13725): [Mantis/VP-1041] Revert to old register initialization parameters...
Manu Abraham [Fri, 4 Dec 2009 07:44:55 +0000 (04:44 -0300)]
V4L/DVB (13725): [Mantis/VP-1041] Revert to old register initialization parameters, for now.

Thanks to eso46 for pointing it out

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13724): [Mantis/VP-1041] Initial support for Mantis VP-1041
Manu Abraham [Fri, 4 Dec 2009 07:43:04 +0000 (04:43 -0300)]
V4L/DVB (13724): [Mantis/VP-1041] Initial support for Mantis VP-1041

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13723): [Mantis/VP-2040, Terratec Cinergy C] Add support for the Cinergy...
Manu Abraham [Fri, 4 Dec 2009 07:42:22 +0000 (04:42 -0300)]
V4L/DVB (13723): [Mantis/VP-2040, Terratec Cinergy C] Add support for the Cinergy C, VP-2040 clone

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13722): [Mantis] Revert 13560
Manu Abraham [Fri, 4 Dec 2009 07:40:50 +0000 (04:40 -0300)]
V4L/DVB (13722): [Mantis] Revert 13560

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13721): [Mantis] Bug! Before bailing out, Unlock
Manu Abraham [Fri, 4 Dec 2009 07:40:16 +0000 (04:40 -0300)]
V4L/DVB (13721): [Mantis] Bug! Before bailing out, Unlock

Thanks to hotwings <user.vdr@gmail.com> for pointing out the bug

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13720): [Mantis/Terratec Cinergy C] Add support for the Terratec Cinergy...
Manu Abraham [Fri, 4 Dec 2009 07:39:48 +0000 (04:39 -0300)]
V4L/DVB (13720): [Mantis/Terratec Cinergy C] Add support for the Terratec Cinergy C PCI

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13719): [Mantis/VP-2033] Initial test switch to the tda10021, from the cu1216
Manu Abraham [Fri, 4 Dec 2009 07:39:14 +0000 (04:39 -0300)]
V4L/DVB (13719): [Mantis/VP-2033] Initial test switch to the tda10021, from the cu1216

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13718): [Mantis] Use gpio_set_bits to turn OFF the bits as well
Marko Ristola [Fri, 4 Dec 2009 07:35:35 +0000 (04:35 -0300)]
V4L/DVB (13718): [Mantis] Use gpio_set_bits to turn OFF the bits as well

Signed-off-by: Marko Ristola <marko.ristola@kolumbus.fi>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13717): [MB86A16] Statistics Updates
Manu Abraham [Thu, 3 Dec 2009 08:48:13 +0000 (05:48 -0300)]
V4L/DVB (13717): [MB86A16] Statistics Updates

* Demodulator status check made reliable
* Code simplification for Viterbi Sync check, makes
  acquisition more reliable

* Implement a BER monitor
* Implement a Signal strength monitor
* Implement a "simple" UCB monitor, no real UCB monitor

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13716): [Mantis] Bug: incorrect byte swap
David Woodhouse [Thu, 3 Dec 2009 08:47:11 +0000 (05:47 -0300)]
V4L/DVB (13716): [Mantis] Bug: incorrect byte swap

You know, the worst endianness errors are not the cases where
people forget to byte-swap, but the cases where they either byte-swap
with the wrong size, or byte-swap when they shouldn't have done so at
all. Those ones defeat the casual reader of the code.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13715): [Mantis] Kernel I2C changes: use PCI parent device
Manu Abraham [Thu, 3 Dec 2009 08:46:06 +0000 (05:46 -0300)]
V4L/DVB (13715): [Mantis] Kernel I2C changes: use PCI parent device

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13714): [MB86A16] FIX/Code simplification: use hwconfig->ts_size instead...
Manu Abraham [Thu, 3 Dec 2009 08:44:38 +0000 (05:44 -0300)]
V4L/DVB (13714): [MB86A16] FIX/Code simplification: use hwconfig->ts_size instead of ts_size

thanks to Marko Ristola for pointing it out

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13713): [MB86A16] Fix: Initialize SNR/STATUS
Sigmund Augdal [Thu, 3 Dec 2009 08:44:00 +0000 (05:44 -0300)]
V4L/DVB (13713): [MB86A16] Fix: Initialize SNR/STATUS

Signed-off-by: Sigmund Augdal <sigmund@snap.tv>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13712): [Mantis] Add locking for concurrent access
Manu Abraham [Thu, 3 Dec 2009 08:42:10 +0000 (05:42 -0300)]
V4L/DVB (13712): [Mantis] Add locking for concurrent access

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13711): [Mantis] FIX: Do nor toggle GPIF status
Marko Ristola [Thu, 3 Dec 2009 08:39:22 +0000 (05:39 -0300)]
V4L/DVB (13711): [Mantis] FIX: Do nor toggle GPIF status

Signed-off-by: Marko Ristola <marko.ristola@kolumbus.fi>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13710): [Mantis] FIX: Use swfilter (188/204) accordingly
Manu Abraham [Thu, 3 Dec 2009 08:38:33 +0000 (05:38 -0300)]
V4L/DVB (13710): [Mantis] FIX: Use swfilter (188/204) accordingly

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13709): [Mantis/VP-1034] Switch 13/18v for the VP-1034 properly
Manu Abraham [Thu, 3 Dec 2009 08:37:51 +0000 (05:37 -0300)]
V4L/DVB (13709): [Mantis/VP-1034] Switch 13/18v for the VP-1034 properly

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13708): [Mantis] Remove some dead code
Manu Abraham [Thu, 3 Dec 2009 01:11:00 +0000 (22:11 -0300)]
V4L/DVB (13708): [Mantis] Remove some dead code

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13707): [Mantis] Whitespace cleanup
Manu Abraham [Thu, 3 Dec 2009 01:09:53 +0000 (22:09 -0300)]
V4L/DVB (13707): [Mantis] Whitespace cleanup

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13706): [MB86A16] Overhaul
Manu Abraham [Thu, 3 Dec 2009 01:07:24 +0000 (22:07 -0300)]
V4L/DVB (13706): [MB86A16] Overhaul

 * better ISR handling
 * I2C fixes
 * better handling of configurations

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13705): [Mantis] FIX: Do not return IRQ_HANDLED in the unlikely case
Manu Abraham [Thu, 3 Dec 2009 01:06:15 +0000 (22:06 -0300)]
V4L/DVB (13705): [Mantis] FIX: Do not return IRQ_HANDLED in the unlikely case

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13704): [MB86A16] FIX: Don't loop again, if we have SYNC
Manu Abraham [Thu, 3 Dec 2009 01:02:19 +0000 (22:02 -0300)]
V4L/DVB (13704): [MB86A16] FIX: Don't loop again, if we have SYNC

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13703): [MB86A16] Fix wrong message printed out
Manu Abraham [Thu, 3 Dec 2009 01:01:39 +0000 (22:01 -0300)]
V4L/DVB (13703): [MB86A16] Fix wrong message printed out

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13702): [MB86A16] need to wait a bit more than the computed time for a Facto...
Manu Abraham [Thu, 3 Dec 2009 01:00:50 +0000 (22:00 -0300)]
V4L/DVB (13702): [MB86A16] need to wait a bit more than the computed time for a Factor of safety

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13701): [MB86A16] Reduce Carrier Recovery range to 3Mhz
Manu Abraham [Thu, 3 Dec 2009 00:59:20 +0000 (21:59 -0300)]
V4L/DVB (13701): [MB86A16] Reduce Carrier Recovery range to 3Mhz

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13700): [MB86A16] Need a bit of settling time
Manu Abraham [Thu, 3 Dec 2009 00:58:38 +0000 (21:58 -0300)]
V4L/DVB (13700): [MB86A16] Need a bit of settling time

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13699): [Mantis, MB86A16] Initial checkin: Mantis, MB86A16
Manu Abraham [Thu, 3 Dec 2009 00:57:10 +0000 (21:57 -0300)]
V4L/DVB (13699): [Mantis, MB86A16] Initial checkin: Mantis, MB86A16

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agopage allocator: update NR_FREE_PAGES only when necessary
KOSAKI Motohiro [Sat, 16 Jan 2010 01:01:18 +0000 (17:01 -0800)]
page allocator: update NR_FREE_PAGES only when necessary

commit f2260e6b (page allocator: update NR_FREE_PAGES only as necessary)
made one minor regression.  if __rmqueue() was failed, NR_FREE_PAGES stat
go wrong.  this patch fixes it.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Reported-by: Huang Shijie <shijie8@gmail.com>
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Sat, 16 Jan 2010 20:34:56 +0000 (12:34 -0800)]
Merge branch 'i2c-for-linus' of git://git./linux/kernel/git/jdelvare/staging

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c: Do not use device name after device_unregister
  i2c/pca: Don't use *_interruptible
  i2c-ali1563: Remove sparse warnings
  i2c: Test off by one in {piix4,vt596}_transaction()
  i2c-core: Storage class should be before const qualifier

14 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 16 Jan 2010 20:31:42 +0000 (12:31 -0800)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, uv: Ensure hub revision set for all ACPI modes.
  x86, uv: Add function retrieving node controller revision number
  x86: xen: 64-bit kernel RPL should be 0
  x86: kernel_thread() -- initialize SS to a known state
  x86/agp: Fix agp_amd64_init and agp_amd64_cleanup
  x86: SGI UV: Fix mapping of MMIO registers
  x86: mce.h: Fix warning in header checks

14 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 16 Jan 2010 20:31:30 +0000 (12:31 -0800)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  futexes: Remove rw parameter from get_futex_key()

14 years agoMerge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 16 Jan 2010 20:27:47 +0000 (12:27 -0800)]
Merge branch 'perf-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf tools: Check if /dev/null can be used as the -o gcc argument
  perf tools: Move QUIET_STDERR def to before first use
  perf: Stop stack frame walking off kernel addresses boundaries

14 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 16 Jan 2010 20:27:25 +0000 (12:27 -0800)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  tracing/filters: Add comment for match callbacks
  tracing/filters: Fix MATCH_FULL filter matching for PTR_STRING
  tracing/filters: Fix MATCH_MIDDLE_ONLY filter matching
  lib: Introduce strnstr()
  tracing/filters: Fix MATCH_END_ONLY filter matching
  tracing/filters: Fix MATCH_FRONT_ONLY filter matching
  ftrace: Fix MATCH_END_ONLY function filter
  tracing/x86: Derive arch from bits argument in recordmcount.pl
  ring-buffer: Add rb_list_head() wrapper around new reader page next field
  ring-buffer: Wrap a list.next reference with rb_list_head()

14 years agorevert "drivers/video/s3c-fb.c: fix clock setting for Samsung SoC Framebuffer"
Mark Brown [Sat, 16 Jan 2010 01:01:40 +0000 (17:01 -0800)]
revert "drivers/video/s3c-fb.c: fix clock setting for Samsung SoC Framebuffer"

Fix divide by zero and broken output.  Commit 600ce1a0fa ("fix clock
setting for Samsung SoC Framebuffer") introduced a mandatory refresh
parameter to the platform data for the S3C framebuffer but did not
introduce any validation code, causing existing platforms (none of which
have refresh set) to divide by zero whenever the framebuffer is
configured, generating warnings and unusable output.

Ben Dooks noted several problems with the patch:

 - The platform data supplies the pixclk directly and should already
   have taken care of the refresh rate.
 - The addition of a window ID parameter doesn't help since only the
   root framebuffer can control the pixclk.
 - pixclk is specified in picoseconds (rather than Hz) as the patch
   assumed.

and suggests reverting the commit so do that.  Without fixing this no
mainline user of the driver will produce output.

[akpm@linux-foundation.org: don't revert the correct bit]
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Kyungmin Park <kmpark@infradead.org>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agonommu: fix shared mmap after truncate shrinkage problems
David Howells [Sat, 16 Jan 2010 01:01:39 +0000 (17:01 -0800)]
nommu: fix shared mmap after truncate shrinkage problems

Fix a problem in NOMMU mmap with ramfs whereby a shared mmap can happen
over the end of a truncation.  The problem is that
ramfs_nommu_check_mappings() checks that the reduced file size against the
VMA tree, but not the vm_region tree.

The following sequence of events can cause the problem:

fd = open("/tmp/x", O_RDWR|O_TRUNC|O_CREAT, 0600);
ftruncate(fd, 32 * 1024);
a = mmap(NULL, 32 * 1024, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
b = mmap(NULL, 16 * 1024, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
munmap(a, 32 * 1024);
ftruncate(fd, 16 * 1024);
c = mmap(NULL, 32 * 1024, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);

Mapping 'a' creates a vm_region covering 32KB of the file.  Mapping 'b'
sees that the vm_region from 'a' is covering the region it wants and so
shares it, pinning it in memory.

Mapping 'a' then goes away and the file is truncated to the end of VMA
'b'.  However, the region allocated by 'a' is still in effect, and has
_not_ been reduced.

Mapping 'c' is then created, and because there's a vm_region covering the
desired region, get_unmapped_area() is _not_ called to repeat the check,
and the mapping is granted, even though the pages from the latter half of
the mapping have been discarded.

However:

d = mmap(NULL, 16 * 1024, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);

Mapping 'd' should work, and should end up sharing the region allocated by
'a'.

To deal with this, we shrink the vm_region struct during the truncation,
lest do_mmap_pgoff() take it as licence to share the full region
automatically without calling the get_unmapped_area() file op again.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agonommu: fix race between ramfs truncation and shared mmap
David Howells [Sat, 16 Jan 2010 01:01:36 +0000 (17:01 -0800)]
nommu: fix race between ramfs truncation and shared mmap

Fix the race between the truncation of a ramfs file and an attempt to make
a shared mmap of region of that file.

The problem is that do_mmap_pgoff() calls f_op->get_unmapped_area() to
verify that the file region is made of contiguous pages and to find its
base address - but there isn't any locking to guarantee this region until
vma_prio_tree_insert() is called by add_vma_to_mm().

Note that moving the functionality into f_op->mmap() doesn't help as that
is also called before vma_prio_tree_insert().

Instead make ramfs_nommu_check_mappings() grab nommu_region_sem whilst it
does its checks.  This means that this function will wait whilst mmaps
take place.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agonommu: don't need get_unmapped_area() for NOMMU
David Howells [Sat, 16 Jan 2010 01:01:35 +0000 (17:01 -0800)]
nommu: don't need get_unmapped_area() for NOMMU

get_unmapped_area() is unnecessary for NOMMU as no-one calls it.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agonommu: remove a superfluous check of vm_region::vm_usage
David Howells [Sat, 16 Jan 2010 01:01:34 +0000 (17:01 -0800)]
nommu: remove a superfluous check of vm_region::vm_usage

In split_vma(), there's no need to check if the VMA being split has a
region that's in use by more than one VMA because:

 (1) The preceding test prohibits splitting of non-anonymous VMAs and regions
     (eg: file or chardev backed VMAs).

 (2) Anonymous regions can't be mapped multiple times because there's no handle
     by which to refer to the already existing region.

 (3) If a VMA has previously been split, then the region backing it has also
     been split into two regions, each of usage 1.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agonommu: struct vm_region's vm_usage count need not be atomic
David Howells [Sat, 16 Jan 2010 01:01:33 +0000 (17:01 -0800)]
nommu: struct vm_region's vm_usage count need not be atomic

The vm_usage count field in struct vm_region does not need to be atomic as
it's only even modified whilst nommu_region_sem is write locked.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agonommu: fix SYSV SHM for NOMMU
David Howells [Sat, 16 Jan 2010 01:01:32 +0000 (17:01 -0800)]
nommu: fix SYSV SHM for NOMMU

Commit c4caa778157dbbf04116f0ac2111e389b5cd7a29 ("file
->get_unmapped_area() shouldn't duplicate work of get_unmapped_area()")
broke SYSV SHM for NOMMU by taking away the pointer to
shm_get_unmapped_area() from shm_file_operations.

Put it back conditionally on CONFIG_MMU=n.

file->f_ops->get_unmapped_area() is used to find out the base address for a
mapping of a mappable chardev device or mappable memory-based file (such as a
ramfs file).  It needs to be called prior to file->f_ops->mmap() being called.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosysdev: fix prototype for memory_sysdev_class show/store functions
Wu Fengguang [Sat, 16 Jan 2010 01:01:32 +0000 (17:01 -0800)]
sysdev: fix prototype for memory_sysdev_class show/store functions

The function prototype mismatches in call stack:

                [<ffffffff81494268>] print_block_size+0x58/0x60
                [<ffffffff81487e3f>] sysdev_class_show+0x1f/0x30
                [<ffffffff811d629b>] sysfs_read_file+0xcb/0x1f0
                [<ffffffff81176328>] vfs_read+0xc8/0x180

Due to prototype mismatch, print_block_size() will sprintf() into
*attribute instead of *buf, hence user space will read the initial
zeros from *buf:
$ hexdump /sys/devices/system/memory/block_size_bytes
0000000 0000 0000 0000 0000
0000008

After patch:
cat /sys/devices/system/memory/block_size_bytes
0x8000000

This complements commits c29af9636 and 4a0b2b4dbe.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: "Zheng, Shaohui" <shaohui.zheng@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomemory-hotplug: add 0x prefix to HEX block_size_bytes
Wu Fengguang [Sat, 16 Jan 2010 01:01:31 +0000 (17:01 -0800)]
memory-hotplug: add 0x prefix to HEX block_size_bytes

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomemcg: ensure list is empty at rmdir
Daisuke Nishimura [Sat, 16 Jan 2010 01:01:30 +0000 (17:01 -0800)]
memcg: ensure list is empty at rmdir

Current mem_cgroup_force_empty() only ensures mem->res.usage == 0 on
success.  But this doesn't guarantee memcg's LRU is really empty, because
there are some cases in which !PageCgrupUsed pages exist on memcg's LRU.

For example:
- Pages can be uncharged by its owner process while they are on LRU.
- race between mem_cgroup_add_lru_list() and __mem_cgroup_uncharge_common().

So there can be a case in which the usage is zero but some of the LRUs are not empty.

OTOH, mem_cgroup_del_lru_list(), which can be called asynchronously with
rmdir, accesses the mem_cgroup, so this access can cause a problem if it
races with rmdir because the mem_cgroup might have been freed by rmdir.

Actually, I saw a bug which seems to be caused by this race.

[1530745.949906] BUG: unable to handle kernel NULL pointer dereference at 0000000000000230
[1530745.950651] IP: [<ffffffff810fbc11>] mem_cgroup_del_lru_list+0x30/0x80
[1530745.950651] PGD 3863de067 PUD 3862c7067 PMD 0
[1530745.950651] Oops: 0002 [#1] SMP
[1530745.950651] last sysfs file: /sys/devices/system/cpu/cpu7/cache/index1/shared_cpu_map
[1530745.950651] CPU 3
[1530745.950651] Modules linked in: configs ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge stp nfsd nfs_acl auth_rpcgss exportfs autofs4 hidp rfcomm l2cap crc16 bluetooth lockd sunrpc ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp bnx2i cnic uio ipv6 cxgb3i cxgb3 mdio libiscsi_tcp libiscsi scsi_transport_iscsi dm_mirror dm_multipath scsi_dh video output sbs sbshc battery ac lp kvm_intel kvm sg ide_cd_mod cdrom serio_raw tpm_tis tpm tpm_bios acpi_memhotplug button parport_pc parport rtc_cmos rtc_core rtc_lib e1000 i2c_i801 i2c_core pcspkr dm_region_hash dm_log dm_mod ata_piix libata shpchp megaraid_mbox sd_mod scsi_mod megaraid_mm ext3 jbd uhci_hcd ohci_hcd ehci_hcd [last unloaded: freq_table]
[1530745.950651] Pid: 19653, comm: shmem_test_02 Tainted: G   M       2.6.32-mm1-00701-g2b04386 #3 Express5800/140Rd-4 [N8100-1065]
[1530745.950651] RIP: 0010:[<ffffffff810fbc11>]  [<ffffffff810fbc11>] mem_cgroup_del_lru_list+0x30/0x80
[1530745.950651] RSP: 0018:ffff8803863ddcb8  EFLAGS: 00010002
[1530745.950651] RAX: 00000000000001e0 RBX: ffff8803abc02238 RCX: 00000000000001e0
[1530745.950651] RDX: 0000000000000000 RSI: ffff88038611a000 RDI: ffff8803abc02238
[1530745.950651] RBP: ffff8803863ddcc8 R08: 0000000000000002 R09: ffff8803a04c8643
[1530745.950651] R10: 0000000000000000 R11: ffffffff810c7333 R12: 0000000000000000
[1530745.950651] R13: ffff880000017f00 R14: 0000000000000092 R15: ffff8800179d0310
[1530745.950651] FS:  0000000000000000(0000) GS:ffff880017800000(0000) knlGS:0000000000000000
[1530745.950651] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[1530745.950651] CR2: 0000000000000230 CR3: 0000000379d87000 CR4: 00000000000006e0
[1530745.950651] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[1530745.950651] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[1530745.950651] Process shmem_test_02 (pid: 19653, threadinfo ffff8803863dc000, task ffff88038612a8a0)
[1530745.950651] Stack:
[1530745.950651]  ffffea00040c2fe8 0000000000000000 ffff8803863ddd98 ffffffff810c739a
[1530745.950651] <0> 00000000863ddd18 000000000000000c 0000000000000000 0000000000000000
[1530745.950651] <0> 0000000000000002 0000000000000000 ffff8803863ddd68 0000000000000046
[1530745.950651] Call Trace:
[1530745.950651]  [<ffffffff810c739a>] release_pages+0x142/0x1e7
[1530745.950651]  [<ffffffff810c778f>] ? pagevec_move_tail+0x6e/0x112
[1530745.950651]  [<ffffffff810c781e>] pagevec_move_tail+0xfd/0x112
[1530745.950651]  [<ffffffff810c78a9>] lru_add_drain+0x76/0x94
[1530745.950651]  [<ffffffff810dba0c>] exit_mmap+0x6e/0x145
[1530745.950651]  [<ffffffff8103f52d>] mmput+0x5e/0xcf
[1530745.950651]  [<ffffffff81043ea8>] exit_mm+0x11c/0x129
[1530745.950651]  [<ffffffff8108fb29>] ? audit_free+0x196/0x1c9
[1530745.950651]  [<ffffffff81045353>] do_exit+0x1f5/0x6b7
[1530745.950651]  [<ffffffff8106133f>] ? up_read+0x2b/0x2f
[1530745.950651]  [<ffffffff8137d187>] ? lockdep_sys_exit_thunk+0x35/0x67
[1530745.950651]  [<ffffffff81045898>] do_group_exit+0x83/0xb0
[1530745.950651]  [<ffffffff810458dc>] sys_exit_group+0x17/0x1b
[1530745.950651]  [<ffffffff81002c1b>] system_call_fastpath+0x16/0x1b
[1530745.950651] Code: 54 53 0f 1f 44 00 00 83 3d cc 29 7c 00 00 41 89 f4 75 63 eb 4e 48 83 7b 08 00 75 04 0f 0b eb fe 48 89 df e8 18 f3 ff ff 44 89 e2 <48> ff 4c d0 50 48 8b 05 2b 2d 7c 00 48 39 43 08 74 39 48 8b 4b
[1530745.950651] RIP  [<ffffffff810fbc11>] mem_cgroup_del_lru_list+0x30/0x80
[1530745.950651]  RSP <ffff8803863ddcb8>
[1530745.950651] CR2: 0000000000000230
[1530745.950651] ---[ end trace c3419c1bb8acc34f ]---
[1530745.950651] Fixing recursive fault but reboot is needed!

The problem here is pages on LRU may contain pointer to stale memcg.  To
make res->usage to be 0, all pages on memcg must be uncharged or moved to
another(parent) memcg.  Moved page_cgroup have already removed from
original LRU, but uncharged page_cgroup contains pointer to memcg withou
PCG_USED bit.  (This asynchronous LRU work is for improving performance.)
If PCG_USED bit is not set, page_cgroup will never be added to memcg's
LRU.  So, about pages not on LRU, they never access stale pointer.  Then,
what we have to take care of is page_cgroup _on_ LRU list.  This patch
fixes this problem by making mem_cgroup_force_empty() visit all LRUs
before exiting its loop and guarantee there are no pages on its LRU.

Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>