]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years ago[SCSI] lpfc 8.2.8 : Add kernel-doc function headers
James Smart [Mon, 25 Aug 2008 01:49:00 +0000 (21:49 -0400)]
[SCSI] lpfc 8.2.8 : Add kernel-doc function headers

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17 years ago[SCSI] modify scsi to handle new fail fast flags.
Mike Christie [Tue, 19 Aug 2008 23:45:31 +0000 (18:45 -0500)]
[SCSI] modify scsi to handle new fail fast flags.

This checks the errors the scsi-ml determined were retryable
and returns if we should fast fail it based on the request
fail fast flags.

Without the patch, drivers like lpfc, qla2xxx and fcoe would return
DID_ERROR for what it determines is a temporary communication problem.
There is no loss of connectivity at that time and the driver thinks
that it would be fast to retry at the driver level. SCSI-ml will however
sees fast fail on the request and DID_ERROR and will fast fail the io.
This will then cause dm-multipath to fail the path and possibley switch
target controllers when we should be retrying at the scsi layer.

We also were fast failing device errors to dm multiapth when
unless the scsi_dh modules think otherwis we want to retry at
the scsi layer because multipath can only retry the IO like scsi
should have done. multipath is a little dumber though because it
does not what the error was for and assumes that it should fail
the paths.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17 years ago[SCSI] block: separate failfast into multiple bits.
Mike Christie [Tue, 19 Aug 2008 23:45:30 +0000 (18:45 -0500)]
[SCSI] block: separate failfast into multiple bits.

Multipath is best at handling transport errors. If it gets a device
error then there is not much the multipath layer can do. It will just
access the same device but from a different path.

This patch breaks up failfast into device, transport and driver errors.
The multipath layers (md and dm mutlipath) only ask the lower levels to
fast fail transport errors. The user of failfast, read ahead, will ask
to fast fail on all errors.

Note that blk_noretry_request will return true if any failfast bit
is set. This allows drivers that do not support the multipath failfast
bits to continue to fail on any failfast error like before. Drivers
like scsi that are able to fail fast specific errors can check
for the specific fail fast type. In the next patch I will convert
scsi.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17 years ago[SCSI] qla2xxx: use new host byte transport errors.
Mike Christie [Tue, 19 Aug 2008 23:45:29 +0000 (18:45 -0500)]
[SCSI] qla2xxx: use new host byte transport errors.

This has qla2xxx use the new transport error values instead of
DID_BUS_BUSY. I am not sure if all the errors
in qla_isr.c I changed are transport related. We end up blocking/deleting
the rport for all of them so it is better to use the new transport error since
the fc classs will decide when to fail the IO.

With this patch if I pull a cable then IO that had reached
the driver, will be failed with DID_TRANSPORT_DISRUPTED (not including
tape). The fc class will then fail the IO when the fast io fail tmo
has fired, and the driver will flush any other commands running.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17 years ago[SCSI] fc class: Add support for new transport errors
Mike Christie [Tue, 19 Aug 2008 23:45:27 +0000 (18:45 -0500)]
[SCSI] fc class: Add support for new transport errors

If the target is blocked and fast io fail tmo has not fired
then we requeue with DID_TRANSPORT_DISRUPTED. Once that
tmo fires we fail with DID_TRANSPORT_FAILFAST.

v2
- seperate from
"fc class: unblock target after calling terminate callback"
to make it easier to review.
- Add JamesS's ack from list.
v2
- initial patch

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17 years ago[SCSI] iscsi class, libiscsi and qla4xxx: convert to new transport host byte values
Mike Christie [Tue, 19 Aug 2008 23:45:26 +0000 (18:45 -0500)]
[SCSI] iscsi class, libiscsi and qla4xxx: convert to new transport host byte values

This patch converts the iscsi drivers to the new host byte values.

v2
Drop some conversions. Want to avoid conflicts with other patches.
v1
initial patch.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17 years ago[SCSI] scsi: add transport host byte errors (v3)
Mike Christie [Tue, 19 Aug 2008 23:45:25 +0000 (18:45 -0500)]
[SCSI] scsi: add transport host byte errors (v3)

Currently, if there is a transport problem the iscsi drivers will return
outstanding commands (commands being exeucted by the driver/fw/hw) with
DID_BUS_BUSY and block the session so no new commands can be queued.
Commands that are caught between the failure handling and blocking are
failed with DID_IMM_RETRY or one of the scsi ml queuecommand return values.
When the recovery_timeout fires, the iscsi drivers then fail IO with
DID_NO_CONNECT.

For fcp, some drivers will fail some outstanding IO (disk but possibly not
tape) with DID_BUS_BUSY or DID_ERROR or some other value that causes a retry
and hits the scsi_error.c failfast check, block the rport, and commands
caught in the race are failed with DID_IMM_RETRY. Other drivers, may
hold onto all IO and wait for the terminate_rport_io or dev_loss_tmo_callbk
to be called.

The following patches attempt to unify what upper layers will see drivers
like multipath can make a good guess. This relies on drivers being
hooked into their transport class.

This first patch just defines two new host byte errors so drivers can
return the same value for when a rport/session is blocked and for
when the fast_io_fail_tmo fires.

The idea is that if the LLD/class detects a problem and is going to block
a rport/session, then if the LLD wants or must return the command to scsi-ml,
then it can return it with DID_TRANSPORT_DISRUPTED. This will requeue
the IO into the same scsi queue it came from, until the fast io fail timer
fires and the class decides what to do.

When using multipath and the fast_io_fail_tmo fires then the class
can fail commands with DID_TRANSPORT_FAILFAST or drivers can use
DID_TRANSPORT_FAILFAST in their terminate_rport_io callbacks or
the equivlent in iscsi if we ever implement more advanced recovery methods.
A LLD, like lpfc, could continue to return DID_ERROR and then it will hit
the normal failfast path, so drivers do not have fully be ported to
work better. The point of the patches is that upper layers will
not see a failure that could be recovered from while the rport/session is
blocked until fast_io_fail_tmo/recovery_timeout fires.

V3
Remove some comments.
V2
Fixed patch/diff errors and renamed DID_TRANSPORT_BLOCKED to
DID_TRANSPORT_DISRUPTED.
V1
initial patch.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17 years ago[SCSI] ibmvfc, qla2xxx, lpfc: remove scsi_target_unblock calls in terminate callbacks
Mike Christie [Tue, 19 Aug 2008 23:45:24 +0000 (18:45 -0500)]
[SCSI] ibmvfc, qla2xxx, lpfc: remove scsi_target_unblock calls in terminate callbacks

The fc class now calls scsi_target_unblock after calling the
terminate callback, so this patch removes the calls from the
drivers.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17 years ago[SCSI] fc class: unblock target after calling terminate callback (take 2)
Mike Christie [Tue, 19 Aug 2008 23:45:23 +0000 (18:45 -0500)]
[SCSI] fc class: unblock target after calling terminate callback (take 2)

When we block a rport and the driver implements the terminate
callback we will fail IO that was running quickly. However
IO that was in the scsi_device/block queue sits there until
the dev_loss_tmo fires, and this can make it look like IO is
lost because new IO will get executed but that IO stuck in
the blocked queue sits there for some time longer.

With this patch when the fast io fail tmo fires, we will
fail the blocked IO and any new IO. This patch also allows
all drivers to partially support the fast io fail tmo. If the
terminate io callback is not implemented, we will still fail blocked
IO and any new IO, so multipath can handle that.

This patch also allows the fc and iscsi classes to implement the
same behavior. The timers are just unfornately named differently.

This patch also fixes the problem where drivers were unblocking
the target in their terminate callback, which was needed for
rport removal, but for fast io fail timeout it would cause
IO to bounce arround the scsi/block layer and the LLD queuecommand.
And it for drivers that could have IO stuck but did not have
a terminate callback the unblock calls in the class will fix
them.

v2.
- fix up bit setting style to meet JamesS's pref.
- Broke out new host byte error changes to make it easier to read.
- added JamesS's ack from list.
v1
- initial patch

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17 years ago[SCSI] lpfc: use SCSI_MLQUEUE_TARGET_BUSY when catching the rport transition race
Mike Christie [Sun, 17 Aug 2008 20:24:41 +0000 (15:24 -0500)]
[SCSI] lpfc: use SCSI_MLQUEUE_TARGET_BUSY when catching the rport transition race

We do want to call right back into the queuecommand during the race,
so we can just use SCSI_MLQUEUE_TARGET_BUSY.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: James Smart <James.Smart@Emulex.Com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17 years ago[SCSI] libiscsi: Use SCSI_MLQUEUE_TARGET_BUSY
Mike Christie [Sun, 17 Aug 2008 20:24:43 +0000 (15:24 -0500)]
[SCSI] libiscsi: Use SCSI_MLQUEUE_TARGET_BUSY

For the conditions below we do not want the queuecommand
function to call us right back, so return SCSI_MLQUEUE_TARGET_BUSY.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17 years ago[SCSI] qla2xxx: return SCSI_MLQUEUE_TARGET_BUSY when driver has detected rport error...
Mike Christie [Sun, 17 Aug 2008 20:24:40 +0000 (15:24 -0500)]
[SCSI] qla2xxx: return SCSI_MLQUEUE_TARGET_BUSY when driver has detected rport error or race

If the fcport is not online then we do not want to block IO to all ports on
the host. We just want to stop IO on port not online, so we should be using
the SCSI_MLQUEUE_TARGET_BUSY return value.

For the case where we race with the rport memset initialization
we do not want the queuecommand to be called again so we can just use
SCSI_MLQUEUE_TARGET_BUSY for this.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17 years ago[SCSI] qla4xxx: return SCSI_MLQUEUE_TARGET_BUSY when driver has detected session...
Mike Christie [Sun, 17 Aug 2008 20:24:39 +0000 (15:24 -0500)]
[SCSI] qla4xxx: return SCSI_MLQUEUE_TARGET_BUSY when driver has detected session error

When qla4xxx begins recovery and the iscsi class is firing up to handle
it, we need to retrn SCSI_MLQUEUE_TARGET_BUSY from the driver instead
of host busy, because the session recovery only affects the one target.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: David C Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17 years ago[SCSI] Add helper code so transport classes/driver can control queueing (v3)
Mike Christie [Sun, 17 Aug 2008 20:24:38 +0000 (15:24 -0500)]
[SCSI] Add helper code so transport classes/driver can control queueing (v3)

SCSI-ml manages the queueing limits for the device and host, but
does not do so at the target level. However something something similar
can come in userful when a driver is transitioning a transport object to
the the blocked state, becuase at that time we do not want to queue
io and we do not want the queuecommand to be called again.

The patch adds code similar to the exisiting SCSI_ML_*BUSY handlers.
You can now return SCSI_MLQUEUE_TARGET_BUSY when we hit
a transport level queueing issue like the hw cannot allocate some
resource at the iscsi session/connection level, or the target has temporarily
closed or shrunk the queueing window, or if we are transitioning
to the blocked state.

bnx2i, when they rework their firmware according to netdev
developers requests, will also need to be able to limit queueing at this
level. bnx2i will hook into libiscsi, but will allocate a scsi host per
netdevice/hba, so unlike pure software iscsi/iser which is allocating
a host per session, it cannot set the scsi_host->can_queue and return
SCSI_MLQUEUE_HOST_BUSY to reflect queueing limits on the transport.

The iscsi class/driver can also set a scsi_target->can_queue value which
reflects the max commands the driver/class can support. For iscsi this
reflects the number of commands we can support for each session due to
session/connection hw limits, driver limits, and to also reflect the
session/targets's queueing window.

Changes:
v1 - initial patch.
v2 - Fix scsi_run_queue handling of multiple blocked targets.
Previously we would break from the main loop if a device was added back on
the starved list. We now run over the list and check if any target is
blocked.
v3 - Rediff for scsi-misc.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17 years agoALSA: ASoC: Fix compile-time warning for tlv320aic23.c
Arun KS [Mon, 13 Oct 2008 10:17:25 +0000 (15:47 +0530)]
ALSA: ASoC: Fix compile-time warning for tlv320aic23.c

Fixes this warning:

sound/soc/codecs/tlv320aic23.c: In function 'tlv320aic23_write':
sound/soc/codecs/tlv320aic23.c:104: warning: passing argument 2 of
'codec->hw_write' makes pointer from integer without a cast

Replaces i2c smbus write function with standard i2c write function

Signed-off-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agoMerge branches 'oprofile-v2' and 'timers/hpet' into x86/core-v4
Ingo Molnar [Mon, 13 Oct 2008 12:18:42 +0000 (14:18 +0200)]
Merge branches 'oprofile-v2' and 'timers/hpet' into x86/core-v4

17 years agoV4L/DVB (9168): Add support for MSI TV@nywhere Plus remote
Brian Rogers [Mon, 13 Oct 2008 11:37:06 +0000 (08:37 -0300)]
V4L/DVB (9168): Add support for MSI TV@nywhere Plus remote

The IR controller has a couple quirks. It won't respond until some other
device on the bus is probed. To work around that, probe 0x50 first.
Then, since it won't respond to a zero-byte read, probe with a one-byte
read.

Signed-off-by: Brian Rogers <brian_rogers@comcast.net>
[mchehab.redhat.com: Fix merge conflicts and remove an unused var]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB: v4l2-dev: remove duplicated #include
Huang Weiyi [Sun, 12 Oct 2008 12:23:29 +0000 (09:23 -0300)]
V4L/DVB: v4l2-dev: remove duplicated #include

Removed duplicated include "media/cx2341x.h" in
drivers/media/video/cx23885/cx23885-417.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9166): ivtv - Fix potential race condition in yuv handler
Ian Armstrong [Thu, 9 Oct 2008 15:04:23 +0000 (12:04 -0300)]
V4L/DVB (9166): ivtv - Fix potential race condition in yuv handler

Modified yuv register update handling to remove a potential race condition
which could occur with the first video frame.

Also removed a forced yuv position update, since changing the source video
dimensions or interlace settings doesn't affect the frame already being
displayed.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9165): ivtv: V4L2_FBUF_FLAG_OVERLAY status fix
Ian Armstrong [Mon, 6 Oct 2008 06:06:08 +0000 (03:06 -0300)]
V4L/DVB (9165): ivtv: V4L2_FBUF_FLAG_OVERLAY status fix

When the framebuffer format was queried via VIDIOC_G_FBUF,
V4L2_FBUF_FLAG_OVERLAY would only be correctly returned for certain screen
depths.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9164): ivtvfb: a small cosmetic change
Ian Armstrong [Mon, 6 Oct 2008 06:03:18 +0000 (03:03 -0300)]
V4L/DVB (9164): ivtvfb: a small cosmetic change

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9163): ivtvfb: fix sparse warnings and improve write function
Ian Armstrong [Sat, 4 Oct 2008 13:28:24 +0000 (10:28 -0300)]
V4L/DVB (9163): ivtvfb: fix sparse warnings and improve write function

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9162): ivtv: fix raw/sliced VBI mixup
Hans Verkuil [Sat, 4 Oct 2008 11:05:30 +0000 (08:05 -0300)]
V4L/DVB (9162): ivtv: fix raw/sliced VBI mixup

The service_set field was used in saa7115 and cx25840 to determine
whether raw or sliced VBI was desired. This is incorrect since it is
perfectly valid to select sliced VBI with a service_set of 0.

Instead these drivers should checked on VIDIOC_S_FMT whether the type
field matches the raw or sliced VBI type.

Updated ivtv accordingly.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9160): v4l: remove vidioc_enum_fmt_vbi_cap
Hans Verkuil [Fri, 3 Oct 2008 14:42:07 +0000 (11:42 -0300)]
V4L/DVB (9160): v4l: remove vidioc_enum_fmt_vbi_cap

Remove the vidioc_enum_fmt_vbi_cap ops: it was scheduled for removal in
2.6.28 since the v4l2 specification says that V4L2_BUF_TYPE_VBI_CAPTURE should
not support VIDIOC_ENUM_FMT. It's also pretty pointless.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9159): saa5249: fix compile errors
Hans Verkuil [Tue, 30 Sep 2008 06:14:02 +0000 (03:14 -0300)]
V4L/DVB (9159): saa5249: fix compile errors

Add missing include.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9157): cx18/ivtv: add 'PCI:' prefix to bus_info.
Hans Verkuil [Mon, 8 Sep 2008 19:59:02 +0000 (16:59 -0300)]
V4L/DVB (9157): cx18/ivtv: add 'PCI:' prefix to bus_info.

Suggested by Martin Dauskardt. This is conform what the other drivers do.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoavr32: Add support for EVKLCD10X addon boards
Hans-Christian Egtvedt [Tue, 1 Jul 2008 08:29:27 +0000 (08:29 +0000)]
avr32: Add support for EVKLCD10X addon boards

This patch lets the user enable support for EVKLCD100 and EVKLCD101
(refered to by EVKLCD10X). By enabling EVKLCD10X support the LCD
controller and AC97 controller platform devices are added.

The user can also choose between the EVKLCD100 (QVGA display) and the
EVKLCD101 (VGA display), this is added to automagically select the
correct panel timing and resolution parameters.

Enabling support for EVKLCD10X addon board will cripple the MCI platform
device a bit since they share two GPIO lines (detect and write-protect).
These two lines are disabled when EVKLCD10X is enabled.

The default configurations are based upon ATNGW100, but with added AC97C
and LCDC driver. Virtual terminal is also enabled by default for
EVKLCD10X boards.

Verified on hardware with a NGW100 + EVKLCD100/101.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
17 years agoavr32: Kconfig: Remove pointless if around atstk1000 include
Haavard Skinnemoen [Mon, 13 Oct 2008 10:42:25 +0000 (12:42 +0200)]
avr32: Kconfig: Remove pointless if around atstk1000 include

The contents of the ATSTK1000 Kconfig file itself is completely
conditional, so including it conditionally makes no sense and only adds
clutter.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
17 years agoBlackfin arch: fix bug - some serial header files set RTS to an input when they shoul...
Sonic Zhang [Mon, 13 Oct 2008 09:42:12 +0000 (17:42 +0800)]
Blackfin arch: fix bug - some serial header files set RTS to an input when they should all be outputs

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
17 years agoV4L/DVB (9155): em28xx-dvb: dvb_init() code factorization
Thierry MERLE [Sat, 11 Oct 2008 19:56:13 +0000 (16:56 -0300)]
V4L/DVB (9155): em28xx-dvb: dvb_init() code factorization

In dvb_init(),
        case EM2880_BOARD_TERRATEC_HYBRID_XS:
        case EM2880_BOARD_KWORLD_DVB_310U:
can be put in the same case than EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
since they do the same thing.

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9152): radio-zoltrix: Add checking for frequency
Alexey Klimov [Thu, 9 Oct 2008 16:46:59 +0000 (13:46 -0300)]
V4L/DVB (9152): radio-zoltrix: Add checking for frequency

This patch adds printk messages, adds checking if frequency is set,
adds return -EINVAL in right places in zoltrix-radio.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9151): dsbr100: Add returns and fix codingstyle for vidioc_s_ctrl
Alexey Klimov [Thu, 9 Oct 2008 16:42:32 +0000 (13:42 -0300)]
V4L/DVB (9151): dsbr100: Add returns and fix codingstyle for vidioc_s_ctrl

Added return -EBUSY and fixed codingstyle issue

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9149): hvr950q: led feedback based on snr
Michael Krufky [Sat, 5 Apr 2008 23:55:14 +0000 (20:55 -0300)]
V4L/DVB (9149): hvr950q: led feedback based on snr

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9147): af9015: Add USB ID for MSI DIGIVOX mini III
Herbert Graeber [Tue, 7 Oct 2008 13:06:36 +0000 (10:06 -0300)]
V4L/DVB (9147): af9015: Add USB ID for MSI DIGIVOX mini III

- Add USB ID for MSI DIGIVOX mini III (1462:8807)

Signed-off-by: Herbert Graeber <herbert@graeber-clan.de>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9146): af901x: fix some compiler errors and warnings
Antti Palosaari [Mon, 6 Oct 2008 16:57:45 +0000 (13:57 -0300)]
V4L/DVB (9146): af901x: fix some compiler errors and warnings

- cast firmware data to u8
- remove cpu_to_le16 from switch-case label

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9145): af901x: clean-up
Antti Palosaari [Fri, 26 Sep 2008 14:40:53 +0000 (11:40 -0300)]
V4L/DVB (9145): af901x: clean-up

- remove unnecessary #undef's

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9144): af9015: enable Maxlinear mxl5005s tuner RSSI
Antti Palosaari [Mon, 22 Sep 2008 16:59:25 +0000 (13:59 -0300)]
V4L/DVB (9144): af9015: enable Maxlinear mxl5005s tuner RSSI

- enable Maxlinear mxl5005s tuner RSSI

Thaks to Jose Alberto for finding this setting.

Thanks-to: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9143): af9015: fix wrong GPIO
Antti Palosaari [Mon, 22 Sep 2008 16:48:26 +0000 (13:48 -0300)]
V4L/DVB (9143): af9015: fix wrong GPIO

- fix wrong GPIO that causes 2nd FE not to work ater warmboot

Thanks to Andrew Williams <andrew.williams@joratech.com> for reporting this.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9141): anysee: support for Anysee E30 Combo Plus
Antti Palosaari [Mon, 11 Aug 2008 13:54:16 +0000 (10:54 -0300)]
V4L/DVB (9141): anysee: support for Anysee E30 Combo Plus

- add module parameter for selecting DVB-T / DVB-C mode

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoV4L/DVB (9140): anysee: unlock I2C-mutex in error case
Antti Palosaari [Mon, 11 Aug 2008 13:36:43 +0000 (10:36 -0300)]
V4L/DVB (9140): anysee: unlock I2C-mutex in error case

- unlock I2C-mutex also in error case

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
17 years agoMerge branch 'linus' into oprofile-v2
Ingo Molnar [Mon, 13 Oct 2008 09:05:51 +0000 (11:05 +0200)]
Merge branch 'linus' into oprofile-v2

Conflicts:
arch/x86/kernel/apic_32.c
arch/x86/oprofile/nmi_int.c
include/linux/pci_ids.h

17 years agoMerge branch 'linus' into oprofile
Ingo Molnar [Mon, 13 Oct 2008 08:52:30 +0000 (10:52 +0200)]
Merge branch 'linus' into oprofile

Conflicts:
arch/x86/kernel/apic_32.c
include/linux/pci_ids.h

17 years agox86: change early_ioremap to use slots instead of nesting
Yinghai Lu [Sun, 14 Sep 2008 09:33:12 +0000 (02:33 -0700)]
x86: change early_ioremap to use slots instead of nesting

so we could remove the requirement that one needs to call
early_iounmap() in exactly reverse order of early_ioremap().

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: adjust dependencies for CONFIG_X86_CMOV
Jan Beulich [Fri, 29 Aug 2008 11:50:38 +0000 (12:50 +0100)]
x86: adjust dependencies for CONFIG_X86_CMOV

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agodumpstack: x86: various small unification steps, fix
Alexander van Heukelum [Sun, 5 Oct 2008 10:39:36 +0000 (12:39 +0200)]
dumpstack: x86: various small unification steps, fix

After "dumpstack: x86: various small unification steps", the
assembler gives the following compile error. The error is in
dumpstack_64.c.

{standard input}: Assembler messages:
{standard input}:720: Error: Incorrect register `%rbx' used with `l' suffix
{standard input}:1340: Error: Incorrect register `%r12' used with `l' suffix

Indeed the suffix in get_bp() was wrong.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: remove additional_cpus
Thomas Gleixner [Sun, 5 Oct 2008 15:51:52 +0000 (17:51 +0200)]
x86: remove additional_cpus

remove remainder of additional_cpus logic. We now just listen to the
disabled_cpus value like we did for years. disabled_cpus is always >=
0 so no need for an extra check.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: remove additional_cpus configurability
Ingo Molnar [Sun, 5 Oct 2008 15:12:36 +0000 (17:12 +0200)]
x86: remove additional_cpus configurability

additional_cpus=<x> parameter is dangerous and broken: for example
if we boot additional_cpus=-2 on a stock dual-core system it will
crash the box on bootup.

So reduce the maze of code a bit by removingthe user-configurability
angle.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: improve UP kernel when CPU-hotplug and SMP is enabled
Thomas Gleixner [Sun, 5 Oct 2008 14:52:24 +0000 (16:52 +0200)]
x86: improve UP kernel when CPU-hotplug and SMP is enabled

num_possible_cpus() can be > 1 when disabled CPUs have been accounted.

Disabled CPUs are not in the cpu_present_map, so we can use
num_present_cpus() as a safe indicator to switch to UP alternatives.

Reported-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agodumpstack: x86: various small unification steps
Alexander van Heukelum [Sat, 4 Oct 2008 21:12:46 +0000 (23:12 +0200)]
dumpstack: x86: various small unification steps

- define STACKSLOTS_PER_LINE and use it
 - define get_bp macro to hide the %%ebp/%%rbp difference
 - i386: check task==NULL in dump_trace, like x86_64
 - i386: show_trace(NULL, ...) uses current automatically
 - x86_64: use [#%d] for die_counter, like i386
 - whitespace and comments

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agodumpstack: i386: make kstack= an early boot-param and add oops=panic
Alexander van Heukelum [Sat, 4 Oct 2008 21:12:45 +0000 (23:12 +0200)]
dumpstack: i386: make kstack= an early boot-param and add oops=panic

- make kstack= and early_param
 - add oops=panic, setting panic_on_oops

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agodumpstack: x86: use log_lvl and unify trace formatting
Alexander van Heukelum [Sat, 4 Oct 2008 21:12:44 +0000 (23:12 +0200)]
dumpstack: x86: use log_lvl and unify trace formatting

- x86: Write log_lvl strings if available
 - start raw stack dumps on new line
 - i386: Remove extra indentation for raw stack dumps

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agodumptrace: x86: consistently include loglevel, print stack switch
Alexander van Heukelum [Sat, 4 Oct 2008 21:12:43 +0000 (23:12 +0200)]
dumptrace: x86: consistently include loglevel, print stack switch

- i386 and x86_64: always printk the 'data' parameter
 - i386: announce stack switch (irq -> normal)
 - i386: check if there is a stack switch before announcing it

There is a warning that 'context' might come out corrupt in early
boot. If this is true it should be fixed, not worked around.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agodumpstack: x86: add "end" parameter to valid_stack_ptr and print_context_stack
Alexander van Heukelum [Sat, 4 Oct 2008 21:12:42 +0000 (23:12 +0200)]
dumpstack: x86: add "end" parameter to valid_stack_ptr and print_context_stack

- Add "end" parameter to valid_stack_ptr and print_context_stack
 - use sizeof(long) as the size of a word on the stack

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agodumpstack: x86: make printk_address equal
Alexander van Heukelum [Sat, 4 Oct 2008 21:12:41 +0000 (23:12 +0200)]
dumpstack: x86: make printk_address equal

- x86_64: use %p to print an address
 - make i386-version the same as the above

The result should be the same on x86_64; on i386 the
output only changes if CONFIG_KALLSYMS is turned off,
in which case the address is printed twice.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agodumpstack: x86: move die_nmi to dumpstack_32.c
Alexander van Heukelum [Sat, 4 Oct 2008 21:12:40 +0000 (23:12 +0200)]
dumpstack: x86: move die_nmi to dumpstack_32.c

For some reason die_nmi is still defined in traps.c for
i386, but is found in dumpstack_64.c for x86_64. Move it
to dumpstack_32.c

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotraps: x86: finalize unification of traps.c
Alexander van Heukelum [Fri, 3 Oct 2008 20:00:40 +0000 (22:00 +0200)]
traps: x86: finalize unification of traps.c

traps_32.c and traps_64.c are now equal. Move one to traps.c,
delete the other one and change the Makefile

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotraps: x86: make traps_32.c and traps_64.c equal
Alexander van Heukelum [Fri, 3 Oct 2008 20:00:39 +0000 (22:00 +0200)]
traps: x86: make traps_32.c and traps_64.c equal

Use CONFIG_X86_64/CONFIG_X86_32 to condtionally compile the
parts needed for x86_64 or i386 only.

Runs a small userspace for a number of minimal configurations
and boots the defconfigs.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotraps: x86: various noop-changes preparing for unification of traps_xx.c
Alexander van Heukelum [Fri, 3 Oct 2008 21:17:11 +0000 (23:17 +0200)]
traps: x86: various noop-changes preparing for unification of traps_xx.c

- reordering include files
 - whitespace changes
 - comment changes
 - removed unused bad_intr()
 - make default_do_nmi static

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotraps: x86_64: use task_pid_nr(tsk) instead of tsk->pid in do_general_protection
Alexander van Heukelum [Fri, 3 Oct 2008 20:00:37 +0000 (22:00 +0200)]
traps: x86_64: use task_pid_nr(tsk) instead of tsk->pid in do_general_protection

Use task_pid_nr(tsk) instead of tsk->pid in do_general_protection.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotraps: i386: expand clear_mem_error and remove from mach_traps.h
Alexander van Heukelum [Fri, 3 Oct 2008 20:00:36 +0000 (22:00 +0200)]
traps: i386: expand clear_mem_error and remove from mach_traps.h

This is the last user of clear_mem_error, which is defined
only on i386. Expand the inline function and remove it from
include/asm-x86/mach-default/mach_traps.h

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotraps: x86_64: make io_check_error equal to the one on i386
Alexander van Heukelum [Fri, 3 Oct 2008 20:00:35 +0000 (22:00 +0200)]
traps: x86_64: make io_check_error equal to the one on i386

Make io_check_error equal to the one on i386.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotraps: i386: use preempt_conditional_sti/cli in do_int3
Alexander van Heukelum [Fri, 3 Oct 2008 20:00:34 +0000 (22:00 +0200)]
traps: i386: use preempt_conditional_sti/cli in do_int3

Use preempt_conditional_sti/cli in do_int3, like on x86_64.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotraps: x86_64: make math_state_restore more like i386
Alexander van Heukelum [Fri, 3 Oct 2008 21:16:12 +0000 (23:16 +0200)]
traps: x86_64: make math_state_restore more like i386

- rename variable me -> tsk
 - get thread and tsk like i386
 - expand used_math()
 - copy comment

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotraps: x86: converge trap_init functions
Alexander van Heukelum [Fri, 3 Oct 2008 20:00:32 +0000 (22:00 +0200)]
traps: x86: converge trap_init functions

- set_system_gate on i386 is really set_system_trap_gate
 - set_system_gate on x86_64 is really set_system_intr_gate
 - ist=0 means no special stack switch is done:
- introduce STACKFAULT_STACK, DOUBLEFAULT_STACK, NMI_STACK,
DEBUG_STACK and MCE_STACK as on x86_64.
- use the _ist variants with XXX_STACK set to zero
 - remove set_system_gate

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
traps: x86: correct copy/paste bug: a trap is a GATE_TRAP

Fix copy/paste/forgot-to-edit bug in desc.h.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, traps: converge do_debug handlers
Alexander van Heukelum [Tue, 30 Sep 2008 16:41:37 +0000 (18:41 +0200)]
x86, traps: converge do_debug handlers

Make the x86_64-version and the i386-version of do_debug
more similar.

 - introduce preempt_conditional_sti/cli to i386. The preempt-count
is now elevated during the trap handler, like on x86_64. It
does not run on a separate stack, however.
 - replace an open-coded "send_sigtrap"
 - copy some comments

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, traps: introduce dotraplinkage
Alexander van Heukelum [Tue, 30 Sep 2008 16:41:36 +0000 (18:41 +0200)]
x86, traps: introduce dotraplinkage

Mark the exception handlers with "dotraplinkage" to hide the
calling convention differences between i386 and x86_64.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, traps, i386: factor out lazy io-bitmap copy
Alexander van Heukelum [Tue, 30 Sep 2008 16:41:35 +0000 (18:41 +0200)]
x86, traps, i386: factor out lazy io-bitmap copy

x86_64 does not do the lazy io-bitmap dance. Putting it in
its own function makes i386's do_general_protection look
much more like x86_64's.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, traps: split out math_error and simd_math_error
Alexander van Heukelum [Tue, 30 Sep 2008 16:41:34 +0000 (18:41 +0200)]
x86, traps: split out math_error and simd_math_error

Split out math_error from do_coprocessor_error and simd_math_error
from do_simd_coprocessor_error, like on i386. While at it, add the
"error_code" parameter to do_coprocessor_error, do_simd_coprocessor_error
and do_spurious_interrupt_bug.

This does not change the generated code, but brings the declarations in
line with all the other trap handlers.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86_64: split out dumpstack code from traps_64.c
Alexander van Heukelum [Tue, 30 Sep 2008 11:12:15 +0000 (13:12 +0200)]
x86_64: split out dumpstack code from traps_64.c

The dumpstack code is logically quite independent from the
hardware traps. Split it out into its own file.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoi386: split out dumpstack code from traps_32.c
Alexander van Heukelum [Tue, 30 Sep 2008 11:12:14 +0000 (13:12 +0200)]
i386: split out dumpstack code from traps_32.c

The dumpstack code is logically quite independent from the
hardware traps. Split it out into its own file.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: fix virt_addr_valid() with CONFIG_DEBUG_VIRTUAL=y, v2
Vegard Nossum [Fri, 3 Oct 2008 15:54:25 +0000 (17:54 +0200)]
x86: fix virt_addr_valid() with CONFIG_DEBUG_VIRTUAL=y, v2

virt_addr_valid() calls __pa(), which calls __phys_addr(). With
CONFIG_DEBUG_VIRTUAL=y, __phys_addr() will kill the kernel if the
address *isn't* valid. That's clearly wrong for virt_addr_valid().

We also incorporate the debugging checks into virt_addr_valid().

Signed-off-by: Vegard Nossum <vegardno@ben.ifi.uio.no>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: allow number of additional hotplug CPUs to be set at compile time, V2
Chuck Ebbert [Thu, 2 Oct 2008 19:30:07 +0000 (15:30 -0400)]
x86: allow number of additional hotplug CPUs to be set at compile time, V2

x86: allow number of additional hotplug CPUs to be set at compile time, V2

The default number of additional CPU IDs for hotplugging is determined
by asking ACPI or mptables how many "disabled" CPUs there are in the
system, but many systems get this wrong so that e.g. a uniprocessor
machine gets an extra CPU allocated and never switches to single CPU
mode.

And sometimes CPU hotplugging is enabled only for suspend/hibernate
anyway, so the additional CPU IDs are not wanted. Allow the number
to be set to zero at compile time.

Also, force the number of extra CPUs to zero if hotplugging is disabled
which allows removing some conditional code.

Tested on uniprocessor x86_64 that ACPI claims has a disabled processor,
with CPU hotplugging configured.

("After" has the number of additional CPUs set to 0)
Before: NR_CPUS: 512, nr_cpu_ids: 2, nr_node_ids 1
After: NR_CPUS: 512, nr_cpu_ids: 1, nr_node_ids 1

[Changed the name of the option and the prompt according to Ingo's
 suggestion.]

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: do not allow to optimize flag_is_changeable_p() (rev. 2)
Krzysztof Helt [Tue, 30 Sep 2008 21:17:51 +0000 (23:17 +0200)]
x86: do not allow to optimize flag_is_changeable_p() (rev. 2)

The flag_is_changeable_p() is used by
has_cpuid_p() which can return different results
in the code sequence below:

 if (!have_cpuid_p())
      identify_cpu_without_cpuid(c);

  /* cyrix could have cpuid enabled via c_identify()*/
  if (!have_cpuid_p())
      return;

Otherwise, the gcc 3.4.6 optimizes these two calls
into one which make the code not working correctly.

Cyrix cpus have the CPUID instruction enabled before
the second call to the have_cpuid_p() but
it is not detected due to the gcc optimization.
Thus the ARR registers (mtrr like) are not detected
on such a cpu.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: __show_registers() and __show_regs() API unification
Pekka Enberg [Thu, 3 Apr 2008 13:40:48 +0000 (16:40 +0300)]
x86: __show_registers() and __show_regs() API unification

Currently the low-level function to dump user-passed registers on i386 is
called __show_registers() whereas on x86-64 it's called __show_regs(). Unify
the API to simplify porting of kmemcheck to x86-64.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, UV: new UV genapic functions for x2apic
Jack Steiner [Mon, 29 Sep 2008 13:45:29 +0000 (08:45 -0500)]
x86, UV: new UV genapic functions for x2apic

Add functions that use the infrastructure added by the x2apic code. These
functions were originally stubbed out since the UV code went into the
tree prior to the x2apic code.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: move prefill_possible_map calling early, fix, V2
Chuck Ebbert [Mon, 29 Sep 2008 22:29:42 +0000 (18:29 -0400)]
x86: move prefill_possible_map calling early, fix, V2

Commit 4a701737 ("x86: move prefill_possible_map calling early, fix")
is the wrong fix: prefill_possible_map() needs to be available
even when CONFIG_HOTPLUG_CPU is not set. A followon patch will do that.

Fix this correctly by making prefill_possible_map() available even when
CONFIG_HOTPLUG_CPU is not set. The function is needed so that
the number of possible CPUs can be determined.

Tested on uniprocessor machine with CPU hotplug disabled.

From boot log:
  Before: NR_CPUS: 512, nr_cpu_ids: 512, nr_node_ids 1
  After: NR_CPUS: 512, nr_cpu_ids: 1, nr_node_ids 1

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: merge winchip-2 and winchip-2a cpu choices
Krzysztof Helt [Sun, 28 Sep 2008 19:28:15 +0000 (21:28 +0200)]
x86: merge winchip-2 and winchip-2a cpu choices

The Winchip-2 and Winchip-2A cpu choices select the
same options for kernel and compiler.

Merge them to save few bytes and reduce confusion.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, uv: fix for size of hub mappings
Jack Steiner [Thu, 25 Sep 2008 12:52:10 +0000 (07:52 -0500)]
x86, uv: fix for size of hub mappings

Fix the size of the mappings of UV hub registers. Size must
be a function of the maximum node number within the SSI.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: cleanup, remove extra ifdef
Yinghai Lu [Fri, 26 Sep 2008 05:22:12 +0000 (22:22 -0700)]
x86: cleanup, remove extra ifdef

also change two functions to static.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotraps: i386: make do_trap more like x86_64
Alexander van Heukelum [Fri, 26 Sep 2008 12:03:08 +0000 (14:03 +0200)]
traps: i386: make do_trap more like x86_64

This patch hardcodes which traps should be forwarded to
handle_vm86_trap in do_trap. This allows to remove the
vm86 parameter from the i386-version of do_trap, which
makes the DO_VM86_ERROR and DO_VM86_ERROR_INFO macros
unnecessary.

x86_64 part is whitespace only.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotraps: x86: remove trace_hardirqs_fixup from pagefault handler
Alexander van Heukelum [Fri, 26 Sep 2008 12:03:07 +0000 (14:03 +0200)]
traps: x86: remove trace_hardirqs_fixup from pagefault handler

The last use of trace_hardirqs_fixup is unnecessary, because the
trap is taken with interrupt off on i386 as well as x86_64, and
the irq-tracer is notified of this from the assembly code.

trace_hardirqs_fixup and trace_hardirqs_fixup_flags are removed
from include/asm-x86/irqflags.h as they are no longer used.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotraps: x86_64: remove trace_hardirqs_fixup from debug handler
Alexander van Heukelum [Fri, 26 Sep 2008 12:03:06 +0000 (14:03 +0200)]
traps: x86_64: remove trace_hardirqs_fixup from debug handler

All exceptions are taken via interrupt gates. TRACE_IRQS_OFF
is called just before entering the C code, so the irq state
is known to the irq tracer at this point. No need to call
trace_hardirqs_fixup.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotraps: x86_64: remove trace_hardirqs_fixup from int3 handler
Alexander van Heukelum [Fri, 26 Sep 2008 12:03:05 +0000 (14:03 +0200)]
traps: x86_64: remove trace_hardirqs_fixup from int3 handler

All exceptions are taken via interrupt gates. TRACE_IRQS_OFF
is called just before entering the C code, so the irq state
is known to the irq tracer at this point. No need to call
trace_hardirqs_fixup.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotraps: x86_64: remove trace_hardirqs_fixup from DO_ERROR_INFO macro
Alexander van Heukelum [Fri, 26 Sep 2008 12:03:04 +0000 (14:03 +0200)]
traps: x86_64: remove trace_hardirqs_fixup from DO_ERROR_INFO macro

All exceptions are taken via interrupt gates. TRACE_IRQS_OFF
is called just before entering the C code, so the irq state
is known to the irq tracer at this point. No need to call
trace_hardirqs_fixup.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotraps: x86_64: add TRACE_IRQS_OFF in paranoidentry macro
Alexander van Heukelum [Fri, 26 Sep 2008 12:03:03 +0000 (14:03 +0200)]
traps: x86_64: add TRACE_IRQS_OFF in paranoidentry macro

Add TRACE_IRQS_OFF just before entering the C code.

All exceptions are taken via interrupt gates. If irq tracing is
enabled, it should be notified as soon as possible. Interrupts
are only (conditionally) re-enabled in C code.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotraps: x86_64: add TRACE_IRQS_OFF in error_entry
Alexander van Heukelum [Fri, 26 Sep 2008 12:03:02 +0000 (14:03 +0200)]
traps: x86_64: add TRACE_IRQS_OFF in error_entry

Add TRACE_IRQS_OFF just before entering the C code.

All exceptions are taken via interrupt gates. If irq tracing is
enabled, it should be notified as soon as possible. Interrupts
are only (conditionally) re-enabled in C code.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86, uv: add early detection of UV system types
Jack Steiner [Tue, 23 Sep 2008 20:37:13 +0000 (15:37 -0500)]
x86, uv: add early detection of UV system types

Portions of the ACPI code needs to know if a system is a UV system prior
to genapic initialization. This patch adds a call early_acpi_boot_init()
so that the apic type is discovered earlier.

V2 of the patch adding fixes from Yinghai Lu.
Much cleaner and smaller.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: move vgetcpu mode probing to cpu detection
Glauber Costa [Mon, 22 Sep 2008 17:35:08 +0000 (14:35 -0300)]
x86: move vgetcpu mode probing to cpu detection

Take it out of time initialization and move it to
cpu detection time.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: wrap MCA_bus test around an ifdef
Glauber Costa [Mon, 21 Jul 2008 21:42:52 +0000 (18:42 -0300)]
x86: wrap MCA_bus test around an ifdef

Only test for MCA_bus if support for MCA is compiled in.
Also, for x86_64, write the code inside the conditional
for consistency with i386. It won't bite us, since it'll
probably never select CONFIG_MCA anyway.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: replace hardcoded number
Glauber Costa [Fri, 11 Jul 2008 19:06:40 +0000 (16:06 -0300)]
x86: replace hardcoded number

Replace "4" in time_32.c code by sizeof(long).
This way, it can work on x86_64 too.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: rename timer_event_interrupt to timer_interrupt
Glauber Costa [Fri, 11 Jul 2008 18:25:13 +0000 (15:25 -0300)]
x86: rename timer_event_interrupt to timer_interrupt

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: make init_ISA_irqs nonstatic
Glauber Costa [Fri, 11 Jul 2008 18:12:39 +0000 (15:12 -0300)]
x86: make init_ISA_irqs nonstatic

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: factor out irq initialization for x86_64
Glauber Costa [Fri, 11 Jul 2008 18:08:39 +0000 (15:08 -0300)]
x86: factor out irq initialization for x86_64

Provide apic_intr_init and smp_intr_init functions.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: bind irq0 irq data to cpu0
Glauber Costa [Fri, 11 Jul 2008 17:21:29 +0000 (14:21 -0300)]
x86: bind irq0 irq data to cpu0

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: use user_mode_vm instead of user_mode
Glauber Costa [Fri, 11 Jul 2008 17:10:13 +0000 (14:10 -0300)]
x86: use user_mode_vm instead of user_mode

For x86_64, it does not really matter. But makes the
code equal to i386.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: remove SEGMENT_IS_FLAT_CODE
Glauber Costa [Fri, 11 Jul 2008 17:00:14 +0000 (14:00 -0300)]
x86: remove SEGMENT_IS_FLAT_CODE

There are no users in the kernel.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: use frame pointer information on x86_64 profile_pc
Glauber Costa [Fri, 11 Jul 2008 16:53:43 +0000 (13:53 -0300)]
x86: use frame pointer information on x86_64 profile_pc

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: set bp field in pt_regs properly
Glauber Costa [Thu, 14 Aug 2008 20:33:12 +0000 (17:33 -0300)]
x86: set bp field in pt_regs properly

Save rbp twice: One is for marking the stack frame, as usual (already
there), and the other, to fill pt_regs properly. This is because bx
comes right before the last saved register in that structure, and not
bp. If the base pointer were in the place bx is today, this would not
be needed.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: coalesce tests
Glauber Costa [Fri, 11 Jul 2008 16:48:07 +0000 (13:48 -0300)]
x86: coalesce tests

Coalesce v8086_mode and user_mode into a single
user_mode_vm() test.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agox86: use user_mode macro
Glauber Costa [Fri, 11 Jul 2008 16:45:46 +0000 (13:45 -0300)]
x86: use user_mode macro

Instead of using SEGMENT_IS_KERNEL_CODE, use the
"user_mode" macro, which can play the same role. Delete
the former, since it now lacks any user.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>