Larry Finger [Fri, 10 Oct 2008 00:38:52 +0000 (17:38 -0700)]
p54: Move rx_mtu to struct bootrec_desc
The patch entitled "[PATCH] p54: Fix sparse warnings" added the __le16
variable rx_mtu to struct bootrec, but it could equally well be placed
in the struct bootrec_desc, which overlays the 'data' section of bootrec.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Limit the number of "expensive" rfkill workqueue operations per second, in
order to not hog system resources too much when faced with a rogue source
of rfkill input events.
The old rfkill-input code (before it was refactored) had such a limit in
place. It used to drop new events that were past the rate limit. This
behaviour was not implemented as an anti-DoS measure, but rather as an
attempt to work around deficiencies in input device drivers which would
issue multiple KEY_FOO events too soon for a given key FOO (i.e. ones that
do not implement mechanical debouncing properly).
However, we can't really expect such issues to be worked around by every
input handler out there, and also by every userspace client of input
devices. It is the input device driver's responsability to do debouncing
instead of spamming the input layer with bogus events.
The new limiter code is focused only on anti-DoS behaviour, and tries to
not lose events (instead, it coalesces them when possible).
The transmitters are updated once every 200ms, maximum. Care is taken not
to delay a request to _enter_ rfkill transmitter Emergency Power Off (EPO)
mode.
If mistriggered (e.g. by a jiffies counter wrap), the code delays processing
*once* by 200ms.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Ivo van Doorn <IvDoorn@gmail.com> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
rfkill: honour EPO state when resuming a rfkill controller
rfkill_resume() would always restore the rfkill controller state to its
pre-suspend state.
Now that we know when we are under EPO, kick the rfkill controller to
SOFT_BLOCKED state instead of to its pre-suspend state when it is resumed
while EPO mode is active.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
rfkill: add master_switch_mode and EPO lock to rfkill and rfkill-input
Add of software-based sanity to rfkill and rfkill-input so that it can
reproduce what hardware-based EPO switches do, blocking all transmitters
and locking down any further attempts to unblock them until the switch is
deactivated.
rfkill-input is responsible for issuing the EPO control requests, like
before.
While an rfkill EPO is active, all transmitters are locked to one of the
BLOCKED states and all attempts to change that through the rfkill API
(userspace and kernel) will be either ignored or return -EPERM errors.
The lock will be released upon receipt of EV_SW SW_RFKILL_ALL ON by
rfkill-input, or should modular rfkill-input be unloaded.
This makes rfkill and rfkill-input extend the operation of an existing
wireless master kill switch to all wireless devices in the system, even
those that are not under hardware or firmware control.
Since the above is the expected operational behavior for the master rfkill
switch, the EPO lock functionality is not optional.
Also, extend rfkill-input to allow for three different behaviors when it
receives an EV_SW SW_RFKILL_ALL ON input event. The user can set which
behavior he wants through the master_switch_mode parameter:
master_switch_mode = 0: EV_SW SW_RFKILL_ALL ON just unlocks rfkill
controller state changes (so that the rfkill userspace and kernel APIs can
now be used to change rfkill controller states again), but doesn't change
any of their states (so they will all remain blocked). This is the safest
mode of operation, as it requires explicit operator action to re-enable a
transmitter.
master_switch_mode = 1: EV_SW SW_RFKILL_ALL ON causes rfkill-input to
attempt to restore the system to the state before the last EV_SW
SW_RFKILL_ALL OFF event, or to the default global states if no EV_SW
SW_RFKILL_ALL OFF ever happened. This is the recommended mode of
operation for laptops.
master_switch_mode = 2: tries to unblock all rfkill controllers (i.e.
enable all transmitters) when an EV_SW SW_RFKILL_ALL ON event is received.
This is the default mode of operation, as it mimics the previous behavior
of rfkill-input.
In order to implement these features in a clean way, the entire event
handling of rfkill-input was refactored into a single worker function.
Protection against input event DoS (repeatedly firing rfkill events for
rfkill-input to process) was removed during the code refactoring. It will
be added back in a future patch.
Note that with these changes, rfkill-input doesn't need to explicitly
handle any radio types for which KEY_<radio type> or SW_<radio type> events
do not exist yet.
Code to handle EV_SW SW_{WLAN,WWAN,BLUETOOTH,WIMAX,...} was added as it
might be needed in the future (and its implementation is not that obvious),
but is currently #ifdef'd out to avoid wasting resources.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Ivo van Doorn <IvDoorn@gmail.com> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Export the the global switch states to rfkill-input. This is needed to
properly implement KEY_* handling without disregarding the initial state.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
rfkill: use killable locks instead of interruptible
Apparently, many applications don't expect to get EAGAIN from fd read/write
operations, since POSIX doesn't mandate it.
Use mutex_lock_killable instead of mutex_lock_interruptible, which won't
cause issues.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 9 Oct 2008 10:13:49 +0000 (12:13 +0200)]
802.11: clean up/fix HT support
This patch cleans up a number of things:
* the unusable definition of the HT capabilities/HT information
information elements
* variable names that are hard to understand
* mac80211: move ieee80211_handle_ht to ht.c and remove the unused
enable_ht parameter
* mac80211: fix bug with MCS rate 32 in ieee80211_handle_ht
* mac80211: fix bug with casting the result of ieee80211_bss_get_ie
to an information element _contents_ rather than the
whole element, add size checking (another out-of-bounds
access bug fixed!)
* mac80211: remove some unused return values in favour of BUG_ON
checking
* a few minor other things
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
p54: honour bss_info_changed's short slot time settings
This patch was made on behalf of Johannes request.
"mac80211 and IEEE80211_CONF_SHORT_SLOT_TIME"
Of course, bss_info_changed provides some more useful data.
e.g.: basic_rates, dtim_period, beacon_int and maybe even more.
Everything can be hooked up if it's necessary.
Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rami Rosen [Wed, 8 Oct 2008 09:18:27 +0000 (11:18 +0200)]
mac80211: use HWSIM_STA_MAGIC in hwsim_check_sta_magic() and hwsim_set_sta_magic().
This patch fixes a typo in mac80211_hwsim.c:
use HWSIM_STA_MAGIC in hwsim_check_sta_magic() and hwsim_set_sta_magic()
instead of HWSIM_VIF_MAGIC.
Signed-off-by: Rami Rosen <ramirose@gmail.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Wed, 8 Oct 2008 01:37:30 +0000 (09:37 +0800)]
iwlwifi: refactor rxon time command
This patch refactors rxon time command. It removes the usage of union tsf
in favor of u64 value and hopefully makes code more readable. There are
no functional changes in this patch.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Wed, 8 Oct 2008 01:37:29 +0000 (09:37 +0800)]
iwlwifi: take a valid antenna upon rate scale init
This patch selects a valid antennae upon rate scale init. This solves a
SYSASSERT complaining that the driver is setting a non valid antenna in
the LQ CMD.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Wed, 8 Oct 2008 01:37:27 +0000 (09:37 +0800)]
iwlwifi: make initial calibration set configurable
This patch adds ability to configure initial calibration set. Not all HW
supported by iwlwifi use the same calibration set, XTAL is one example.
Some clean ups are also included in this patch.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rami Rosen [Tue, 7 Oct 2008 14:29:11 +0000 (16:29 +0200)]
mac80211: remove unused declaration of struct sta_attribute.
This patch removes unused definition of struct sta_attribute
in net/mac80211/ieee80211_i.h.
Signed-off-by: Rami Rosen <ramirose@gmail.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 8 Oct 2008 08:59:33 +0000 (10:59 +0200)]
mac80211: fix short slot handling
This patch makes mac80211 handle short slot requests from the AP
properly. Also warn about uses of IEEE80211_CONF_SHORT_SLOT_TIME
and optimise out the code since it cannot ever be hit anyway.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 7 Oct 2008 10:04:34 +0000 (12:04 +0200)]
mac80211: clean up ieee80211_hw_config errors
Warn when ieee80211_hw_config returns an error, it shouldn't
happen; remove a number of printks that would happen in such
a case and one printk that is user-triggerable.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 7 Oct 2008 10:04:31 +0000 (12:04 +0200)]
mac80211: remove writable debugs mesh parameters
These parameters shouldn't be configurable via debugfs, if they
need to be configurable nl80211 support has to be added, if not
then they don't need to be writable here either.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Javier Cardona <javier@cozybit.com> Cc: Luis Carlos Cobo <luisca@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jarek Poplawski [Fri, 31 Oct 2008 07:47:01 +0000 (00:47 -0700)]
pkt_sched: Add peek emulation for non-work-conserving qdiscs.
This patch adds qdisc_peek_dequeued() wrapper to emulate peek method
with qdisc->dequeue() and storing "peeked" skb in qdisc->gso_skb until
dequeuing. This is mainly for compatibility reasons not to break some
strange configs because peeking is expected for non-work-conserving
parent qdiscs to query work-conserving child qdiscs.
This implementation requires using qdisc_dequeue_peeked() wrapper
instead of directly calling qdisc->dequeue() for all qdiscs ever
querried with qdisc->ops->peek() or qdisc_peek_dequeued().
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jarek Poplawski [Fri, 31 Oct 2008 07:46:19 +0000 (00:46 -0700)]
pkt_sched: Use qdisc->ops->peek() instead of ->dequeue() & ->requeue()
Use qdisc->ops->peek() instead of ->dequeue() & ->requeue() pair.
After this patch the only remaining user of qdisc->ops->requeue() is
netem_enqueue(). Based on ideas of Herbert Xu, Patrick McHardy and
David S. Miller.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Fri, 31 Oct 2008 07:44:18 +0000 (00:44 -0700)]
pkt_sched: Add ->peek() methods for fifo, prio and SFQ qdiscs.
From: Patrick McHardy <kaber@trash.net>
Just as a demonstration how easy adding a peek operation to the
work-conserving qdiscs actually is. It doesn't need to keep or change
any internal state in many cases thanks to the guarantee that the
packet will either be dequeued or, if another packet arrives, the
upper qdisc will immediately ->peek again to reevaluate the state.
(This is only slightly modified Patrick's patch.)
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
I noticed that, under certain conditions, ESRCH can be leaked from the
xfrm layer to user space through sys_connect. In particular, this seems
to happen reliably when the kernel fails to resolve a template either
because the AF_KEY receive buffer being used by racoon is full or
because the SA entry we are trying to use is in XFRM_STATE_EXPIRED
state.
However, since this could be a transient issue it could be argued that
EAGAIN would be more appropriate. Besides this error code is not even
documented in the man page for sys_connect (as of man-pages 3.07).
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 31 Oct 2008 07:00:33 +0000 (00:00 -0700)]
net: Really remove all of LOOPBACK_TSO code.
As noticed by Saikiran Madugula, commit 7447ef63cf2dfdc444f4c72ae13f604350b2e25f
("loopback: Remove rest of LOOPBACK_TSO code.") got rid of
emulate_large_send_offload() but didn't get rid of the call
site as well.
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexey Dobriyan [Fri, 31 Oct 2008 06:55:44 +0000 (23:55 -0700)]
netfilter: nf_conntrack_proto_gre: switch to register_pernet_gen_subsys()
register_pernet_gen_device() can't be used is nf_conntrack_pptp module is
also used (compiled in or loaded).
Right now, proto_gre_net_exit() is called before nf_conntrack_pptp_net_exit().
The former shutdowns and frees GRE piece of netns, however the latter
absolutely needs it to flush keymap. Oops is inevitable.
Switch to shiny new register_pernet_gen_subsys() to get correct ordering in
netns ops list.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
netns ops which are registered with register_pernet_gen_device() are
shutdown strictly before those which are registered with
register_pernet_subsys(). Sometimes this leads to opposite (read: buggy)
shutdown ordering between two modules.
Add register_pernet_gen_subsys()/unregister_pernet_gen_subsys() for modules
which aren't elite enough for entry in struct net, and which can't use
register_pernet_gen_device(). PPTP conntracking module is such one.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Fri, 31 Oct 2008 06:54:35 +0000 (23:54 -0700)]
net: delete excess kernel-doc notation
Remove excess kernel-doc function parameters from networking header
& driver files:
Warning(include/net/sock.h:946): Excess function parameter or struct member 'sk' description in 'sk_filter_release'
Warning(include/linux/netdevice.h:1545): Excess function parameter or struct member 'cpu' description in 'netif_tx_lock'
Warning(drivers/net/wan/z85230.c:712): Excess function parameter or struct member 'regs' description in 'z8530_interrupt'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Trent Piepho [Fri, 31 Oct 2008 01:17:07 +0000 (18:17 -0700)]
gianfar: Don't reset TBI<->SerDes link if it's already up
The link may be up already via the chip's reset strapping, or though action
of U-Boot, or from the last time the interface was brought up. Resetting
the link causes it to go down for several seconds. This can significantly
increase the time from power-on to DHCP completion and a device being
accessible to the network.
Signed-off-by: Trent Piepho <tpiepho@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Trent Piepho [Fri, 31 Oct 2008 01:17:06 +0000 (18:17 -0700)]
gianfar: Fix race in TBI/SerDes configuration
The init_phy() function attaches to the PHY, then configures the
SerDes<->TBI link (in SGMII mode). The TBI is on the MDIO bus with the PHY
(sort of) and is accessed via the gianfar's MDIO registers, using the
functions gfar_local_mdio_read/write(), which don't do any locking.
The previously attached PHY will start a work-queue on a timer, and
probably an irq handler as well, which will talk to the PHY and thus use
the MDIO bus. This uses phy_read/write(), which have locking, but not
against the gfar_local_mdio versions.
The result is that PHY code will try to use the MDIO bus at the same time
as the SerDes setup code, corrupting the transfers.
Setting up the SerDes before attaching to the PHY will insure that there is
no race between the SerDes code and *our* PHY, but doesn't fix everything.
Typically the PHYs for all gianfar devices are on the same MDIO bus, which
is associated with the first gianfar device. This means that the first
gianfar's SerDes code could corrupt the MDIO transfers for a different
gianfar's PHY.
The lock used by phy_read/write() is contained in the mii_bus structure,
which is pointed to by the PHY. This is difficult to access from the
gianfar drivers, as there is no link between a gianfar device and the
mii_bus which shares the same MDIO registers. As far as the device layer
and drivers are concerned they are two unrelated devices (which happen to
share registers).
Generally all gianfar devices' PHYs will be on the bus associated with the
first gianfar. But this might not be the case, so simply locking the
gianfar's PHY's mii bus might not lock the mii bus that the SerDes setup
code is going to use.
We solve this by having the code that creates the gianfar platform device
look in the device tree for an mdio device that shares the gianfar's
registers. If one is found the ID of its platform device is saved in the
gianfar's platform data.
A new function in the gianfar mii code, gfar_get_miibus(), can use the bus
ID to search through the platform devices for a gianfar_mdio device with
the right ID. The platform device's driver data is the mii_bus structure,
which the SerDes setup code can use to lock the current bus.
Signed-off-by: Trent Piepho <tpiepho@freescale.com> CC: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Arjan van de Ven [Tue, 21 Oct 2008 04:42:39 +0000 (21:42 -0700)]
pci: use pci_ioremap_bar() in drivers/net
Use the newly introduced pci_ioremap_bar() function in drivers/net.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* Use the observation that it is sufficient to call pci_enable_wake()
once, unless it fails
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Tested-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: Frans Pop <elendil@planet.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Adrian Bunk [Wed, 29 Oct 2008 21:22:15 +0000 (14:22 -0700)]
The overdue eepro100 removal.
Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* Use device_set_wakeup_enable() and friends as needed
* Remove an open-coded reference to the standard PCI PM registers
* Use pci_prepare_to_sleep() and pci_back_from_sleep() in the
->suspend() and ->resume() callbacks
* Use the observation that it is sufficient to call pci_enable_wake()
once, unless it fails
Tested on Asus L5D (Yukon-Lite rev 7).
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This patch causes the VLAN tag to be stored in its proper location.
Tested-by: Ramon Casellas <ramon.casellas@cttc.es> Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Andy Gospodarek [Fri, 31 Oct 2008 00:41:16 +0000 (17:41 -0700)]
bonding: fix panic when taking bond interface down before removing module
A panic was discovered with bonding when using mode 5 or 6 and trying to
remove the slaves from the bond after the interface was taken down.
When calling 'ifconfig bond0 down' the following happens:
As you might guess we panic when trying to access a few entries into the
table that no longer exists.
I experimented with several options (like moving the calls to
tlb_deinitialize somewhere else), but it really makes the most sense to
be part of the bond_close routine. It also didn't seem logical move
tlb_clear_slave around too much, so the simplest option seems to add a
check in tlb_clear_slave to make sure we haven't already wiped the
tx_hashtbl away before searching for all the non-existent hash-table
entries that used to point to the slave as the output interface.
Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Jay Vosburgh [Fri, 31 Oct 2008 00:41:15 +0000 (17:41 -0700)]
bonding: Clean up resource leaks
This patch reworks the resource free logic performed at the time
a bonding device is released. This (a) closes two resource leaks, one
for workqueues and one for multicast lists, and (b) improves commonality
of code between the "destroy one" and "destroy all" paths by performing
final free activity via destructor instead of explicitly (and differently)
in each path.
"Sean E. Millichamp" <sean@bruenor.org> reported the workqueue
leak, and included a different patch.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
lguest: fix irq vectors.
lguest: fix early_ioremap.
lguest: fix example launcher compile after moved asm-x86 dir.
Linus Torvalds [Fri, 31 Oct 2008 01:32:03 +0000 (18:32 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched: remove sched-design.txt from 00-INDEX
sched: change sched_debug's mode to 0444
Linus Torvalds [Fri, 31 Oct 2008 01:31:42 +0000 (18:31 -0700)]
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/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:
ftrace: handle archs that do not support irqs_disabled_flags
Rusty Russell [Fri, 31 Oct 2008 16:24:27 +0000 (11:24 -0500)]
lguest: fix early_ioremap.
dmi_scan_machine breaks under lguest:
lguest: unhandled trap 14 at 0xc04edeae (0xffa00000)
This is because we use current_cr3 for the read_cr3() paravirt
function, and it isn't set until the first cr3 change. We got away
with it until this happened.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Ingo Molnar [Thu, 30 Oct 2008 23:43:03 +0000 (00:43 +0100)]
x86: cpu_index build fix
fix:
arch/x86/kernel/cpu/common.c: In function 'early_identify_cpu':
arch/x86/kernel/cpu/common.c:553: error: 'struct cpuinfo_x86' has no member named 'cpu_index'
James Bottomley [Thu, 30 Oct 2008 21:13:37 +0000 (16:13 -0500)]
x86/voyager: fix missing cpu_index initialisation
Impact: fix /proc/cpuinfo output on x86/Voyager
Ever since
| commit 92cb7612aee39642d109b8d935ad265e602c0563
| Author: Mike Travis <travis@sgi.com>
| Date: Fri Oct 19 20:35:04 2007 +0200
|
| x86: convert cpuinfo_x86 array to a per_cpu array
We've had an extra field in cpuinfo_x86 which is cpu_index.
Unfortunately, voyager has never initialised this, although the only
noticeable impact seems to be that /proc/cpuinfo shows all zeros for
the processor ids.
Anyway, fix this by initialising the boot CPU properly and setting the
index when the secondaries update.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| Author: Suresh Siddha <suresh.b.siddha@intel.com>
| Date: Tue Jul 29 10:29:19 2008 -0700
|
| x86, xsave: enable xsave/xrstor on cpus with xsave support
Which deliberately expose boot cpu dependence to pieces of the system,
I think it's time to explicitly have a variable for it to prevent this
continual misassumption that the boot CPU is zero.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Fri, 24 Oct 2008 13:42:59 +0000 (09:42 -0400)]
ftrace: handle archs that do not support irqs_disabled_flags
Impact: build fix on non-lockdep architectures
Some architectures do not support a way to read the irq flags that
is set from "local_irq_save(flags)" to determine if interrupts were
disabled or enabled. Ftrace uses this information to display to the user
if the trace occurred with interrupts enabled or disabled.
Besides the fact that those archs that do not support this will fail to
compile, unless they fix it, we do not want to have the trace simply
say interrupts were not disabled or they were enabled, without knowing
the real answer.
This patch adds a 'X' in the output to let the user know that the
architecture they are running on does not support a way for the tracer
to determine if interrupts were enabled or disabled. It also lets those
same archs compile with tracing enabled.
Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
x86: fix /dev/mem mmap breakage when PAT is disabled
Impact: allow /dev/mem mmaps on non-PAT CPUs/platforms
Fix mmap to /dev/mem when CONFIG_X86_PAT is off and CONFIG_STRICT_DEVMEM is
off
mmap to /dev/mem on kernel memory has been failing since the
introduction of PAT (CONFIG_STRICT_DEVMEM=n case). Seems like
the check to avoid cache aliasing with PAT is kicking in even
when PAT is disabled. The bug seems to have crept in 2.6.26.
This patch makes sure that the mmap to regular
kernel memory succeeds if CONFIG_STRICT_DEVMEM=n and
PAT is disabled, and the checks to avoid cache aliasing
still happens if PAT is enabled.
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org> Tested-by: Tim Sirianni <tim@scalemp.com> Cc: <stable@kernel.org> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
prefill_possible_mask() was hidden under CONFIG_HOTPLUG_CPU rendering
it invisitble to voyager. Since this commit it's exposed, but not
provided by the voyager subarch, so add a dummy stub to fix the link
breakage.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
James Bottomley [Thu, 30 Oct 2008 21:05:39 +0000 (16:05 -0500)]
x86: use CONFIG_X86_SMP instead of CONFIG_SMP
Impact: fix x86/Voyager boot
CONFIG_SMP is used for features which work on *all* x86 boxes.
CONFIG_X86_SMP is used for standard PC like x86 boxes (for things like
multi core and apics)
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
James Bottomley [Thu, 30 Oct 2008 21:08:38 +0000 (16:08 -0500)]
x86/voyager: fix boot breakage caused by x86: boot secondary cpus through initial_code
Impact: boot up secondary CPUs as well on x86/Voyager systems
This commit:
| commit 3e9704739daf46a8ba6593d749c67b5f7cd633d2
| Author: Glauber Costa <gcosta@redhat.com>
| Date: Wed May 28 13:01:54 2008 -0300
|
| x86: boot secondary cpus through initial_code
removed the use of initialize_secondary. However, it didn't update
voyager, so the secondary cpus no longer boot. Fix this by adding the
initial_code switch to voyager as well.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
Fix incompatibility with versions of Perl less than 5.6.0
kbuild: do not include arch/<ARCH>/include/asm in find-sources twice.
kbuild: tag with git revision when git describe is missing
kbuild: prevent modpost from looking for a .cmd file for a static library linked into a module
kbuild: fix KBUILD_EXTRA_SYMBOLS
adjust init section definitions
scripts/checksyscalls.sh: fix for non-gnu sed
scripts/package: don't break if %{_smp_mflags} isn't set
kbuild: setlocalversion: dont include svn change count
kbuild: improve check-symlink
kbuild: mkspec - fix build rpm
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
[PATCH] Switch all my contributions stuff to a single common address
[WATCHDOG] pci: use pci_ioremap_bar() in drivers/watchdog
Linus Torvalds [Thu, 30 Oct 2008 19:53:33 +0000 (12:53 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
CHAR: Delete old and now unused M48T35 RTC driver for SGI IP27.
CHAR: Delete old and now unused DS1286 driver.
MIPS: Sort out CPU type to name translation.
MIPS: Use the new byteorder headers
MIPS: Probe for watch registers on cores of all vendors, not just MTI.
MIPS: Switch FPU emulator trap to BREAK instruction.
MIPS: SMP: Do not initialize __cpu_number_map/__cpu_logical_map for CPU 0.
MIPS: Consider value of c0_ebase when computing value of exception base.
MIPS: Clean up MIPSxx-optimized bitop functions
MIPS: New feature test macro cpu_has_mips_r
MIPS: RBTX4927: Add GPIO-LED support
MIPS: TXx9: Fix RBTX4939 ethernet address initialization
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
fdomain_cs: Sort out modules with duplicate description
pcmcia: Whine harder about use of EXCLUSIVE
pcmcia: IRQ_TYPE_EXCLUSIVE is long obsoleted
Linus Torvalds [Thu, 30 Oct 2008 19:51:42 +0000 (12:51 -0700)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
SUNRPC: Fix potential race in put_rpccred()
SUNRPC: Fix rpcauth_prune_expired
NFS: Convert nfs_attr_generation_counter into an atomic_long
SUNRPC: Respond promptly to server TCP resets
Alan Cox [Thu, 30 Oct 2008 15:54:12 +0000 (15:54 +0000)]
tty: Fix USB kref leak
When we close we must clear the extra reference we got when we read
port->tty. Setting the port tty NULL will clear the kref held by the driver
but not the one we obtained ourselves while doing the lookup.
Linus Torvalds [Thu, 30 Oct 2008 19:07:25 +0000 (12:07 -0700)]
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
i2c-s3c2410: Correct use of ! and &
i2c: The i2c mailing list is moving
scx200_i2c: Add missing class parameter
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: prevent autosuspend during hub initialization
USB: Unusual dev for the "Kyocera / Contax SL300R T*" digital camera.
USB: usbtmc: Use explicit unsigned type for input buffer instead of char*
USB: fix crash when URBs are unlinked after the device is gone
Linus Torvalds [Thu, 30 Oct 2008 18:44:35 +0000 (11:44 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: ASoC: Fix WM9713 ALC Decay Time name
ALSA: ASoC: Fix some minor errors in mpc5200 psc i2s driver
ALSA: ASoC: Fix mono controls after conversion to support full int masks
ALSA: sound/ice1712: indentation & braces disagree - add braces
ALSA: usb - Add quirk for Edirol UA-25EX advanced modes
sound: struct device - replace bus_id with dev_name(), dev_set_name()
ALSA: hda - Add reboot notifier
ALSA: Warn when control names are truncated
ALSA: intel8x0 - add Dell Optiplex GX620 (AD1981B) to AC97 clock whitelist
ALSA: hda - Fix SPDIF mute on IDT/STAC codecs
ALSA: hda: Add HDA vendor ID for Wolfson Microelectronics
ALSA: hda - Add another HP model for AD1884A
Linus Torvalds [Thu, 30 Oct 2008 18:44:09 +0000 (11:44 -0700)]
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/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:
ftrace: fix trace_nop config select
ftrace: perform an initialization for ftrace to enable it
LD drivers/spi/built-in.o
CC [M] drivers/spi/spi_gpio.o
In file included from drivers/spi/spi_gpio.c:26:
include/linux/spi/spi_bitbang.h:23: error: field `work' has incomplete type
make[2]: *** [drivers/spi/spi_gpio.o] Error 1
make[1]: *** [drivers/spi] Error 2
make: *** [drivers] Error 2
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>