]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agoext4: Renumber EXT4_IOC_MIGRATE
Theodore Ts'o [Sat, 13 Sep 2008 23:54:35 +0000 (19:54 -0400)]
ext4: Renumber EXT4_IOC_MIGRATE

Pick an ioctl number for EXT4_IOC_MIGRATE that won't conflict with
other ext4 ioctl's.  Since there haven't been any major userspace
users of this ioctl, we can afford to change this now, to avoid
potential problems later.

Also, reorder the ioctl numbers in ext4.h to avoid this sort of
mistake in the future.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoext4: hook the ext3 migration interface to the EXT4_IOC_SETFLAGS ioctl
Aneesh Kumar K.V [Thu, 9 Oct 2008 03:34:06 +0000 (23:34 -0400)]
ext4: hook the ext3 migration interface to the EXT4_IOC_SETFLAGS ioctl

This patch hooks the ext3 to ext4 migrate interface to
EXT4_IOC_SETFLAGS ioctl. The userspace interface is via chattr +e.  We
only allow setting extent flags.  Clearing extent flag (migrating from
ext4 to ext3) is not supported.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoMerge branch 'for-rmk' of git://pasiphae.extern.pengutronix.de/git/imx/linux-2.6.git
Russell King [Sat, 13 Sep 2008 19:10:59 +0000 (20:10 +0100)]
Merge branch 'for-rmk' of git://pasiphae.extern.pengutronix.de/git/imx/linux-2.6.git

17 years ago[ARM] 5247/1: tosa: SW_EAR_IN support
Dmitry Baryshkov [Thu, 11 Sep 2008 00:28:51 +0000 (01:28 +0100)]
[ARM] 5247/1: tosa: SW_EAR_IN support

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 5246/1: tosa: add proper clock alias for tc6393xb clock
Dmitry Baryshkov [Wed, 10 Sep 2008 09:30:37 +0000 (10:30 +0100)]
[ARM] 5246/1: tosa: add proper clock alias for tc6393xb clock

Add clock alias for clock that is used by tc6393xb device on tosa.
As that chip plays pretty major part in tosa life and is currently
disabled, this is 2.4.27 material.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 5245/1: Fix warning about unused return value in drivers/pcmcia
Jürgen Schindele [Mon, 8 Sep 2008 21:06:29 +0000 (22:06 +0100)]
[ARM] 5245/1: Fix warning about unused return value in drivers/pcmcia

Fix warning when compiling "drivers/pcmcia/soc-common.c"
The return value of the function "device_create_file"
was not used / assigned.

Signed-off-by: Jrgen Schindele <linux@schindele.name>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[SCSI] qla2xxx: Defer enablement of RISC interrupts until ISP initialization completes.
Andrew Vasquez [Fri, 12 Sep 2008 05:19:45 +0000 (22:19 -0700)]
[SCSI] qla2xxx: Defer enablement of RISC interrupts until ISP initialization completes.

Josip Rodin noted
(http://article.gmane.org/gmane.linux.ports.sparc/10152) the
driver oopsing during registration of an rport to the
FC-transport layer with a backtrace indicating a dereferencing of
an shost->shost_data equal to NULL.  David Miller identified a
small window in driver logic where this could happen:

    > Look at how the driver registers the IRQ handler before the host has
    > been registered with the SCSI layer.
    >
    > That leads to a window of time where the shost hasn't been setup
    > fully, yet ISRs can come in and trigger DPC thread events, such as
    > loop resyncs, which expect the transport area to be setup.
    >
    > But it won't be setup, because scsi_add_host() hasn't finished yet.
    >
    > Note that in Josip's crash log, we don't even see the
    >
    >         qla_printk(KERN_INFO, ha, "\n"
    >             " QLogic Fibre Channel HBA Driver: %s\n"
    >             "  QLogic %s - %s\n"
    >             "  ISP%04X: %s @ %s hdma%c, host#=%ld, fw=%s\n",
    >  ...
    >
    > message yet.
    >
    > Which means that the crash occurs between qla2x00_request_irqs()
    > and printing that message.

Close this window by enabling RISC interrupts after the host has
been registered with the SCSI midlayer.

Reported-by: Josip Rodin <joy@entuzijast.net>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
17 years agoext4: elevate write count for migrate ioctl
Aneesh Kumar K.V [Sat, 13 Sep 2008 16:52:26 +0000 (12:52 -0400)]
ext4: elevate write count for migrate ioctl

The migrate ioctl writes to the filsystem, so we need to elevate the
write count.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agonet: ip_vs_proto_{tcp,udp} build fix
Stephen Rothwell [Sat, 13 Sep 2008 06:23:50 +0000 (23:23 -0700)]
net: ip_vs_proto_{tcp,udp} build fix

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agomultiq: Further multiqueue cleanup
Alexander Duyck [Sat, 13 Sep 2008 00:57:23 +0000 (17:57 -0700)]
multiq: Further multiqueue cleanup

This patch resolves a few issues found with multiq including wording
suggestions and a problem seen in the allocation of queues.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoskbedit: Fix a typo in the documentation
Alexander Duyck [Sat, 13 Sep 2008 00:56:50 +0000 (17:56 -0700)]
skbedit: Fix a typo in the documentation

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoARM: OMAP2: Fix definition of SGX clock register bits
Daniel Stone [Wed, 27 Aug 2008 01:31:59 +0000 (04:31 +0300)]
ARM: OMAP2: Fix definition of SGX clock register bits

The GFX/SGX functional and interface clocks have different masks, for
some unknown reason, so split EN_SGX_SHIFT into one each for fclk and
iclk.

Correct according to the TRM and the far more important 'does this
actually work at all?' metric.

Signed-off-by: Daniel Stone <daniel.stone@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoASoC: OMAP: Fix Gumstix Overo machine driver by using snd_soc_dai struct (rev 2)
Jarkko Nikula [Fri, 12 Sep 2008 20:52:19 +0000 (13:52 -0700)]
ASoC: OMAP: Fix Gumstix Overo machine driver by using snd_soc_dai struct (rev 2)

Structs snd_soc_codec_dai and snd_soc_cpu_dai are obsolete and are merged to
snd_soc_dai by the commit 8687eb8bded8c3c5842a85bd0c30e43fc5a3e0e0.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoomap: usb: ehci: fix use of hcd->regs
Felipe Balbi [Fri, 12 Sep 2008 18:22:56 +0000 (21:22 +0300)]
omap: usb: ehci: fix use of hcd->regs

From 818dc8ebd261cdc59670fe1580248ad47f18a1de Mon Sep 17 00:00:00 2001
From: Felipe Balbi <felipe.balbi@nokia.com>
Date: Fri, 12 Sep 2008 21:07:09 +0300
Subject: [PATCH] omap: usb: ehci: fix usb of hcd->regs

hcd->regs should be initialized by ioremaping hcd->rsrc_start and
hcd->rsrc_len. Fix it for ehci-omap.c.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoomapfb: use proper bits per pixel for beagleboard.
Felipe Contreras [Fri, 12 Sep 2008 22:28:20 +0000 (01:28 +0300)]
omapfb: use proper bits per pixel for beagleboard.

This was suggested by Mans Rullgard, otherwise it doesn't work.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP: Fix cpu detection
Tony Lindgren [Fri, 12 Sep 2008 23:32:15 +0000 (16:32 -0700)]
ARM: OMAP: Fix cpu detection

At some point while adding omap2 support, IS_OMAP_CLASS broke as pointed out
by Russell King. Fix this to work as it used to work, and modify omap24xx and
omap34xx detection to work accordingly.

Also rename OMAP3430_REV_ES2_2 to OMAP3430_REV_ES3_0.

Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP: Split omap2 cpu detection into 24xx and 34xx specific functions
Tony Lindgren [Fri, 12 Sep 2008 23:25:39 +0000 (16:25 -0700)]
ARM: OMAP: Split omap2 cpu detection into 24xx and 34xx specific functions

Also add omap_type() to detect between GP/EMU/HS omap, and remove
unnecessary variable class.

This is to make room for further clean-up of omap processor detection.

Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoPCI: re-add debug prints for unmodified BARs
Yinghai Lu [Tue, 9 Sep 2008 19:27:52 +0000 (12:27 -0700)]
PCI: re-add debug prints for unmodified BARs

Print out for device BAR values before the kernel tries to update them.
Also make related output use KERN_DEBUG.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
17 years agopkt_action: add new action skbedit
Alexander Duyck [Fri, 12 Sep 2008 23:30:20 +0000 (16:30 -0700)]
pkt_action: add new action skbedit

This new action will have the ability to change the priority and/or
queue_mapping fields on an sk_buff.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agopkt_sched: Add multiqueue scheduler support
Alexander Duyck [Fri, 12 Sep 2008 23:29:34 +0000 (16:29 -0700)]
pkt_sched: Add multiqueue scheduler support

This patch is intended to add a qdisc to support the new tx multiqueue
architecture by providing a band for each hardware queue.  By doing
this it is possible to support a different qdisc per physical hardware
queue.

This qdisc uses the skb->queue_mapping to select which band to place
the traffic onto.  It then uses a round robin w/ a check to see if the
subqueue is stopped to determine which band to dequeue the packet from.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoAdd missing variable to twl4030-power.c
Tony Lindgren [Fri, 12 Sep 2008 23:24:54 +0000 (16:24 -0700)]
Add missing variable to twl4030-power.c

As pointed out by Felipe Balbi.

Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agotcp_ipv6: fix use of uninitialized memory
Vegard Nossum [Fri, 12 Sep 2008 23:17:43 +0000 (16:17 -0700)]
tcp_ipv6: fix use of uninitialized memory

inet6_rsk() is called on a struct request_sock * before we
have checked whether the socket is an ipv6 socket or a ipv6-
mapped ipv4 socket. The access that triggers this is the
inet_rsk(rsk)->inet6_rsk_offset dereference in inet6_rsk().

This is arguably not a critical error as the inet6_rsk_offset
is only used to compute a pointer which is never really used
(in the code path in question) anyway. But it might be a
latent error, so let's fix it.

Spotted by kmemcheck.

Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonet: fix scheduling of dst_gc_task by __dst_free
Benjamin Thery [Fri, 12 Sep 2008 23:16:37 +0000 (16:16 -0700)]
net: fix scheduling of dst_gc_task by __dst_free

The dst garbage collector dst_gc_task() may not be scheduled as we
expect it to be in __dst_free().

Indeed, when the dst_gc_timer was replaced by the delayed_work
dst_gc_work, the mod_timer() call used to schedule the garbage
collector at an earlier date was replaced by a schedule_delayed_work()
(see commit 86bba269d08f0c545ae76c90b56727f65d62d57f).

But, the behaviour of mod_timer() and schedule_delayed_work() is
different in the way they handle the delay.

mod_timer() stops the timer and re-arm it with the new given delay,
whereas schedule_delayed_work() only check if the work is already
queued in the workqueue (and queue it (with delay) if it is not)
BUT it does NOT take into account the new delay (even if the new delay
is earlier in time).
schedule_delayed_work() returns 0 if it didn't queue the work,
but we don't check the return code in __dst_free().

If I understand the code in __dst_free() correctly, we want dst_gc_task
to be queued after DST_GC_INC jiffies if we pass the test (and not in
some undetermined time in the future), so I think we should add a call
to cancel_delayed_work() before schedule_delayed_work(). Patch below.

Or we should at least test the return code of schedule_delayed_work(),
and reset the values of dst_garbage.timer_inc and dst_garbage.timer_expires
back to their former values if schedule_delayed_work() failed.
Otherwise the subsequent calls to __dst_free will test the wrong values
and assume wrong thing about when the garbage collector is supposed to
be scheduled.

dst_gc_task() also calls schedule_delayed_work() without checking
its return code (or calling cancel_scheduled_work() first), but it
should fine there: dst_gc_task is the routine of the delayed_work, so
no dst_gc_work should be pending in the queue when it's running.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Acked-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoniu: panic on reset
Santwona Behera [Fri, 12 Sep 2008 23:04:26 +0000 (16:04 -0700)]
niu: panic on reset

The reset_task function in the niu driver does not reset the tx and rx
buffers properly. This leads to panic on reset. This patch is a
modified implementation of the previously posted fix.

Signed-off-by: Santwona Behera <santwona.behera@sun.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc: Fix user_regset 'n' field values.
David S. Miller [Fri, 12 Sep 2008 22:01:31 +0000 (15:01 -0700)]
sparc: Fix user_regset 'n' field values.

As noticed by Russell King, we were not setting this properly
to the number of entries, but rather the total size.

This results in the core dumping code allocating waayyyy too
much memory.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Fix PCI error interrupt registry on PSYCHO.
David S. Miller [Fri, 12 Sep 2008 22:13:15 +0000 (15:13 -0700)]
sparc64: Fix PCI error interrupt registry on PSYCHO.

We need to pass IRQF_SHARED, otherwise we get things like:

IRQ handler type mismatch for IRQ 33
current handler: PSYCHO_UE
Call Trace:
 [000000000048394c] request_irq+0xac/0x120
 [00000000007c5f6c] psycho_scan_bus+0x98/0x158
 [00000000007c2bc0] pcibios_init+0xdc/0x12c
 [0000000000426a5c] do_one_initcall+0x1c/0x160
 [00000000007c0180] kernel_init+0x9c/0xfc
 [0000000000427050] kernel_thread+0x30/0x60
 [00000000006ae1d0] rest_init+0x10/0x60

on e3500 and similar systems.

On a single board, the UE interrupts of two Psycho nodes
are funneled through the same interrupt, from of_debug=3
dump:

/pci@b,4000: direct translate 2ee --> 21
 ...
/pci@b,2000: direct translate 2ee --> 21

Decimal "33" mentioned above is the hex "21" mentioned here.

Thanks to Meelis Roos for dumps and testing.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc: Fix user_regset 'n' field values.
David S. Miller [Fri, 12 Sep 2008 22:01:31 +0000 (15:01 -0700)]
sparc: Fix user_regset 'n' field values.

As noticed by Russell King, we were not setting this properly
to the number of entries, but rather the total size.

This results in the core dumping code allocating waayyyy too
much memory.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoOMAP2/3 clock: warn if clock is missing clockdomain
Paul Walmsley [Wed, 10 Sep 2008 16:48:10 +0000 (10:48 -0600)]
OMAP2/3 clock: warn if clock is missing clockdomain

At this point, all OMAP2/3 clocks should be associated with a clockdomain.
Warn in clk_register() if any are missing a clockdomain

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoOMAP3 clock: remove duplicate call to omap2_init_clk_clkdm()
Paul Walmsley [Wed, 10 Sep 2008 16:48:07 +0000 (10:48 -0600)]
OMAP3 clock: remove duplicate call to omap2_init_clk_clkdm()

The OMAP3 arch clock init code already calls omap2_init_clk_clkdm(), so there
is no reason to call it again in the per-clock init.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoOMAP2 clockdomain: add virt_opp_clkdm
Paul Walmsley [Wed, 10 Sep 2008 16:48:04 +0000 (10:48 -0600)]
OMAP2 clockdomain: add virt_opp_clkdm

Every OMAP2/3 clock will need to be associated with a clockdomain.
However, the "virt_prcm_set" clock has no clockdomain, since it is a
virtual clock without any hardware referents.  So, create a new
clockdomain, "virt_clkdm", for this clock.  This clockdomain should be
reusable for OMAP3 virtual clock nodes.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoOMAP2/3 clock: note clockdomains for remaining clocks
Paul Walmsley [Wed, 10 Sep 2008 16:48:01 +0000 (10:48 -0600)]
OMAP2/3 clock: note clockdomains for remaining clocks

Fill in clockdomains for all remaining clocks.  On OMAP2, these mostly
involve IVA and DSP clocks; on OMAP3, these mostly involve some core_l4_clkdm
devices and the secure peripherals.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoOMAP3 clock: mark DPLL clocks with their DPLLx clockdomains
Paul Walmsley [Wed, 10 Sep 2008 16:47:58 +0000 (10:47 -0600)]
OMAP3 clock: mark DPLL clocks with their DPLLx clockdomains

Mark each DPLL clock as belonging to their respective DPLL clockdomain.
cf. 34xx TRM Table 4-27 (among other references).

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoOMAP3 PRCM: add DPLL1-5 powerdomains, clockdomains
Paul Walmsley [Wed, 10 Sep 2008 16:47:55 +0000 (10:47 -0600)]
OMAP3 PRCM: add DPLL1-5 powerdomains, clockdomains

Each DPLL exists in its own powerdomain (cf 34xx TRM figure 4-18) and
clockdomain; so, create powerdomain and clockdomain structures for them.
These are used in a following patch for DPLL-related clocks.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoOMAP2/3 clockdomain: remove wkup_clkdm
Paul Walmsley [Wed, 10 Sep 2008 16:47:52 +0000 (10:47 -0600)]
OMAP2/3 clockdomain: remove wkup_clkdm

Remove wkup_clkdm, as it has been completely replaced by prm_clkdm and
cm_clkdm.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoOMAP2/3 clock: mark the rest of the CM clocks as belonging to cm_clkdm
Paul Walmsley [Wed, 10 Sep 2008 16:47:49 +0000 (10:47 -0600)]
OMAP2/3 clock: mark the rest of the CM clocks as belonging to cm_clkdm

Mark CM clocks with no clockdomain as belonging to the CM clockdomain.

References for the OMAP3xxx clocks:

OMAP34xx Multimedia Device Silicon Revision 3.0 Version I TRM
  Figure 4-13:
     - sys_ck
  Figure 4-35:
     - sys_clkout2
  Figure 4-37:
     - corex2_fck, core_ck, dss_tv_fck
  Figure 4-38:
     - omap_96m_alwon_fck
  Figure 4-39:
     - corex2_fck, cm_96m_fck, omap_96m_fck, omap_54m_fck, omap_12m_fck,
       dpll1_fck, dpll2_fck, rm_ick, dss_tv_fck
  Section 4.7.3.2:
     - omap_96m_alwon_fck, omap_96m_fck, omap_48m_fck

OMAP34xx Multimedia High Security (HS) Device Silicon Revision 3.0 Security
Addendum Version B TRM
  Figure 3-19:
     - cpefuse_fck
  Table 3-57:
     - dss_tv_fck

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoOMAP2/3 clock: convert wkup_clkdm CM clocks to cm_clkdm
Paul Walmsley [Wed, 10 Sep 2008 16:47:46 +0000 (10:47 -0600)]
OMAP2/3 clock: convert wkup_clkdm CM clocks to cm_clkdm

Convert existing wkup_clkdm clocks that should be in the CM clockdomain
to cm_clkdm.  (A later patch will add CM clockdomain associations for
unassociated clocks.)

References:

OMAP2420 Multimedia Processor Silicon Revision 2.1.1, 2.2 TRM Version Q
   Figure 5-9
      - func_54m_ck, core_ck, func_96m_ck, func_48m_ck, func_12m_ck

OMAP34xx Multimedia Device Silicon Revision 3.0 Version I TRM
   Figure 4-35
      - sys_clkout2

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoOMAP2/3 clock: annotate PRM clocks that are missing clockdomains
Paul Walmsley [Wed, 10 Sep 2008 16:47:43 +0000 (10:47 -0600)]
OMAP2/3 clock: annotate PRM clocks that are missing clockdomains

Some PRM clocks are missing clockdomain assignments; add them.

Also, in OMAP2xxx clock tree, standardize the name for wdt1_osc_ck.

References for the OMAP2xxx clocks:

OMAP2420 Multimedia Processor Silicon Revision 2.1.1, 2.2 TRM Version Q
  Table 18-41:
      - wdt1_osc_ck

References for the OMAP3xxx clocks:

OMAP34xx Multimedia Device Silicon Revision 3.0 Version I TRM
  Figure 4-13:
      - sys_clkout1,
  Table 4-37:
      - sys_ck
  Table 4-38:
      - omap_32k_fck, osc_sys_ck,
  Figure 4-56:
      - sr1_fck, sr2_fck
  Figure 4-57:
      - omap_96m_alwon_fck
  Section 4.7.7.13:
      - sr1_fck, sr2_fck

OMAP34xx Multimedia High Security (HS) Device Silicon Revision 3.0 Security
Addendum Version B TRM
  Table 2-5:
      - usim_fck
  Figure 3-29:
      - secure_32k_fck, gpt12_fck, wdt1_fck

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoOMAP2/3 clock: convert wkup_clkdm PRM clocks to prm_clkdm
Paul Walmsley [Wed, 10 Sep 2008 16:47:39 +0000 (10:47 -0600)]
OMAP2/3 clock: convert wkup_clkdm PRM clocks to prm_clkdm

Convert existing wkup_clkdm clocks that should be in the PRM clockdomain
to prm_clkdm.  (A later patch will add PRM clockdomain associations for
unassociated clocks.)

References for the OMAP2xxx clocks:

OMAP2420 Multimedia Processor Silicon Revision 2.1.1, 2.2 TRM Version Q
  Figure 4-11:
      - alt_ck
  Figure 5-7:
      - func_32k_ck, osc_ck, sys_ck
  Figure 5-8 (assumes that "Level 0" = PRM)
      - dpll_ck, apll96_ck, apll54_ck, func_54m_ck
  Section 5.4.1.1:
      - sys_clkout_src, sys_clkout
  Section 29.3.1.1:
      - gpios_fck, mpu_wdt_fck, mpu_wdt_ick

References for the OMAP3xxx clocks:

OMAP34xx Multimedia Device Silicon Revision 3.0 Version I TRM
  Figure 4-54:
      - gpt1_fck, wkup_32k_fck, wdt2_fck, wkup_l4_fck, omap_32ksync_ick,
        gpt1_ick
  Section 25.3.1.1.3:
      - gpio1_fck, gpio1_ick

OMAP34xx Multimedia High Security (HS) Device Silicon Revision 3.0 Security
Addendum Version B TRM
  Table 2-5:
      - usim_ick
  Figure 3-29:
      - wdt1_ick, gpt12_ick

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoOMAP2/3 clockdomains: add CM and PRM clkdms
Paul Walmsley [Wed, 10 Sep 2008 16:47:36 +0000 (10:47 -0600)]
OMAP2/3 clockdomains: add CM and PRM clkdms

Add clockdomains for the CM and PRM.  These will ultimately replace the
"wkup_clkdm", which appears to not actually exist on the hardware.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agolowmem: Remove the possibility to stack the module
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:42 +0000 (19:20 +0300)]
lowmem: Remove the possibility to stack the module

The mod_reg_security() function that is used to stack modules has been removed:
"LSMs wishing to stack capability as a secondary module should do so
explicitly". Thus, let's remove the possibility to stack in the init function.
The functionality could probably be reintroduced later if somebody has time to
implement it.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agolowmem: Fix split of ptrace
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:41 +0000 (19:20 +0300)]
lowmem: Fix split of ptrace

A previous commit split the ptrace member into two. Thus we need to update the
lowmem module accordingly.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agolowmem: add compatibility code
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:40 +0000 (19:20 +0300)]
lowmem: add compatibility code

This is a patch that will reintroduce the old sysctl lowmem variables as read
only values in /proc/sys/vm. Some parts of the userland (at least libosso) are
reading these and it would probably greatly ease the transition to the new
scheme with memory limits in pages. We can revert this ugly patch when userland
has moved to the new scheme.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agolowmem: Security modules can no longer be removed.
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:39 +0000 (19:20 +0300)]
lowmem: Security modules can no longer be removed.

The unregister_security() and mod_unreg_security() functions were removed
because the upstream developers believe that it should not be possible to remove
security modules, "It is used only by out-of-tree modules, which are often
binary-only, illegal, abusive of the API and dangerous, e.g.  silently
re-vectoring SELinux."

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agolowmem: update memory management functions for the new kernel
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:38 +0000 (19:20 +0300)]
lowmem: update memory management functions for the new kernel

These functions now require an additional argument, so let's add it.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agolowmem: sysfs has changed
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:37 +0000 (19:20 +0300)]
lowmem: sysfs has changed

Currently, the lowmem module doesn't even compile because the kernel API has
changed. This patch will unbreak the sysfs related code.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agolowmem: remove an unecessary local variable
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:36 +0000 (19:20 +0300)]
lowmem: remove an unecessary local variable

This "changed" variable is kind of deprecated. We used to have a spinlock
[which was later deemed unecessary] around the first if clause in the
*_watermark_state() functions; the variable was needed in order to move the
operation in the second if clause out of the lock section.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agolowmem: get rid of the percentages
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:35 +0000 (19:20 +0300)]
lowmem: get rid of the percentages

The purpose of this patch is to get rid of the lame percentage calculations in
lowmem.c. Currently, the limits (measured in pages) are calculated from
percentages every time somebody from userspace requests some memory. With this
patch, the limits are in pages and furthermore, they are specified as minimum
amount of "free pages", instead of as maximum amount of "used pages". "Free"
means free pages or such pages that can easily be freed by the VM system.

This patch changes the names of the lowmem sysctl limits in /proc/sys/vm:
lowmem_deny_watermark        => lowmem_deny_watermark_pages
lowmem_notify_low      => lowmem_notify_low_pages
lowmem_notify_high       => lowmem_notify_high_pages

The following read only value disappears:
lowmem_used_pages

The following read only value is introduced:
lowmem_free_pages

The old value can be calculated from userspace with the following pseudocode:

if lowmem_free_pages < lowmem_allowed_pages
   lowmem_used_pages = lowmem_allowed_pages - lowmem_free_pages
else
   lowmem_used_pages = 0;

Note that the value of lowmem_free_pages is only accurate when the system is
rather low on memory (otherwise it's a bit too pessimistic), this was true also
for the lowmem_used_pages metric.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agolowmem: remove unecessary usage of proc_dointvec_minmax()
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:34 +0000 (19:20 +0300)]
lowmem: remove unecessary usage of proc_dointvec_minmax()

As far as I can understand, using proc_dointvec_minmax() instead of
proc_dointvec only makes sense if you supply the min and/or max values in the
extra1 and extra2 fields of the struct.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoSecurity: Kernel OOM-killer and allocation denial use different rules
Henrik Saari [Thu, 11 Sep 2008 16:20:33 +0000 (19:20 +0300)]
Security: Kernel OOM-killer and allocation denial use different rules

Security: Kernel OOM-killer and allocation denial use different rules

Original patch created by Leonid Moiseichuk <leonid.moiseichuk@nokia.com>

Fixes the issue with the oom killer and lowmem module being inconsistent;
processes that are important enough to be protected from the oom killer should
not be denied memory either.

Signed-off-by: Henrik Saari <henrik.saari@nokia.com>
Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agotwl4030: improve rtc device setup
David Brownell [Thu, 11 Sep 2008 09:48:39 +0000 (02:48 -0700)]
twl4030: improve rtc device setup

Make the twl4030 RTC initialization follow the driver model better.
The platform device is created (if needed) as part of twl4030 setup
instead of as a board-specific thing, and fits properly into the
driver model tree.

The only minor glitch here is on boards using platform_data to pass
MSECURE initialization hooks to the RTC driver.  The right solution
probably just removes that platform_data, and might even make Linux
follow the principle of "least privilege" (at the hardware level!)
instead of always holding this signal high.

Pending better handling of MSECURE, this patch just does what the
RTC init does, but earlier:  MSECURE is always high, so the RTC time
and calendar registers can be updated (and presumably a bunch of
non-RTC privileged operations will be allowed too).

Yet to be done:  set up the IRQ resource; make the rtc driver use
that IRQ resource; and properly issue wakeup alarms.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agomach-omap2: fix more arch_initcall() breakage
David Brownell [Thu, 11 Sep 2008 06:01:24 +0000 (23:01 -0700)]
mach-omap2: fix more arch_initcall() breakage

Remove more bogus arch_initcall() logic in mach-omap2/board-xyx.c files.
They broke a multi-OMAP build I did, at *RUN TIME* not build time, since
it tried to do the i2c init for every board linked in the kernel.

Remember, init_machine() entries run at arch_initcall() time; that's
where any board-specific init logic should normally go.  Any initcalls
in the mach-*/*c files should normally be guarded by tests to make sure
they only run on the relevant hardware (board, cpu).  Better yet, get
rid of the initcalls; init_machine() can *explicitly* call the right
version of that code, and pass in board-specific config data; and there
are hooks that can handle cpu-specific stuff too.

A quick glance suggests most of the remaining initcall logic in the
mach-omap2 directory is similarly broken... this patch gets rid of
one frequently-cloned idiom, it should help.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoFix build for beagleboard
Peter 'p2' De Schrijver [Fri, 12 Sep 2008 10:32:36 +0000 (13:32 +0300)]
Fix build for beagleboard

Also add missing u8 data as noted by Felipe Balbi.

Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agosh: latencytop support.
Paul Mundt [Fri, 12 Sep 2008 16:44:03 +0000 (01:44 +0900)]
sh: latencytop support.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Tidy up ELF core dumps.
Paul Mundt [Fri, 12 Sep 2008 14:27:46 +0000 (23:27 +0900)]
sh: Tidy up ELF core dumps.

These have been using overrides for ELF_CORE_COPY_TASK_REGS and
ELF_CORE_COPY_FPREGS while the generic versions can be used instead.
Presently the pt_regs are also duplicated across elf_core_copy_regs()
and elf_core_copy_task_regs(), this switches to simply copying out
through elf_core_copy_regs() instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Check SR.DSP bit for DSP regset validity.
Paul Mundt [Fri, 12 Sep 2008 13:56:35 +0000 (22:56 +0900)]
sh: Check SR.DSP bit for DSP regset validity.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Add missing task_user_regset_view() definition.
Paul Mundt [Fri, 12 Sep 2008 13:42:43 +0000 (22:42 +0900)]
sh: Add missing task_user_regset_view() definition.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Add DSP registers to regset interface.
Paul Mundt [Fri, 12 Sep 2008 13:42:10 +0000 (22:42 +0900)]
sh: Add DSP registers to regset interface.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix up NUMA build error with se7722_defconfig.
Paul Mundt [Fri, 12 Sep 2008 13:41:30 +0000 (22:41 +0900)]
sh: Fix up NUMA build error with se7722_defconfig.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Enable HAVE_ARCH_TRACEHOOK.
Paul Mundt [Fri, 12 Sep 2008 13:13:36 +0000 (22:13 +0900)]
sh: Enable HAVE_ARCH_TRACEHOOK.

Now that the rest of the support requirements are out of the way, finally
enable support for tracehook.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Provide the asm/syscall.h interface, needed by tracehook.
Paul Mundt [Fri, 12 Sep 2008 13:13:13 +0000 (22:13 +0900)]
sh: Provide the asm/syscall.h interface, needed by tracehook.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: provide user_stack_pointer(), needed for tracehook support.
Paul Mundt [Fri, 12 Sep 2008 13:11:36 +0000 (22:11 +0900)]
sh: provide user_stack_pointer(), needed for tracehook support.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Flag T-bit for syscall restart.
Paul Mundt [Fri, 12 Sep 2008 13:08:20 +0000 (22:08 +0900)]
sh: Flag T-bit for syscall restart.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: ioremap_prot support.
Paul Mundt [Fri, 12 Sep 2008 11:41:05 +0000 (20:41 +0900)]
sh: ioremap_prot support.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: ptrace: Introduce user_regset interface for gp regs.
Paul Mundt [Fri, 12 Sep 2008 10:52:36 +0000 (19:52 +0900)]
sh: ptrace: Introduce user_regset interface for gp regs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agox86, microcode rework, v2
Dmitry Adamushko [Thu, 11 Sep 2008 21:27:52 +0000 (23:27 +0200)]
x86, microcode rework, v2

this is a rework of the microcode splitup in tip/x86/microcode

(1) I think this new interface is cleaner (look at the changes
    in 'struct microcode_ops' in microcode.h);

(2) it's -64 lines of code;

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosh: Provide a fixed UTS_MACHINE definition for sh64.
Paul Mundt [Fri, 12 Sep 2008 09:58:28 +0000 (18:58 +0900)]
sh: Provide a fixed UTS_MACHINE definition for sh64.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agox86: fix possible x86_64 and EFI regression
Jeremy Fitzhardinge [Thu, 11 Sep 2008 23:42:00 +0000 (16:42 -0700)]
x86: fix possible x86_64 and EFI regression

Russ Anderson reported a boot crash with EFI and latest mainline:

 BIOS-e820: 00000000fffa0000 - 00000000fffac000 (reserved)
Pid: 0, comm: swapper Not tainted 2.6.27-rc5-00100-gec0c15a-dirty #5

Call Trace:
 [<ffffffff80849195>] early_idt_handler+0x55/0x69
 [<ffffffff80313e52>] __memcpy+0x12/0xa4
 [<ffffffff80859015>] efi_init+0xce/0x932
 [<ffffffff80869c83>] setup_early_serial8250_console+0x2d/0x36a
 [<ffffffff80238688>] __insert_resource+0x18/0xc8
 [<ffffffff8084f6de>] setup_arch+0x3a7/0x632
 [<ffffffff808499ed>] start_kernel+0x91/0x367
 [<ffffffff80849393>] x86_64_start_kernel+0xe3/0xe7
 [<ffffffff808492b0>] x86_64_start_kernel+0x0/0xe7

 RIP 0x10

Such a crash is possible if the CPU in this system is a 64-bit
processor which doesn't support NX (ie, old Intel P4 -based64-bit
processors).

Certainly, if we support such processors, then we should start with
_PAGE_NX initially clear in __supported_pte_flags, and then set it once
we've established that the processor does indeed support NX.  That will
prevent early_ioremap - or anything else - from trying to set it.

The simple fix is to simply call check_efer() earlier.

Reported-by: Russ Anderson <rja@sgi.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agolock debug: sit tight when we are already in a panic
Andrew Morton [Fri, 12 Sep 2008 00:02:58 +0000 (17:02 -0700)]
lock debug: sit tight when we are already in a panic

in:

  > http://bugzilla.kernel.org/show_bug.cgi?id=11543

The panic code called the kexec code which called mutex_trylock() which
called spin_lock_mutex() which then stupidly went and blurted a load of
debug stuff because of in_interrupt().

Keep the lock debug code from escallating an already crappy situation.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agosh: update edosk7760 defconfig for physmap-flash.
Luca Santini [Fri, 12 Sep 2008 09:08:01 +0000 (18:08 +0900)]
sh: update edosk7760 defconfig for physmap-flash.

Signed-off-by: Luca Santini <luca.santini@spesonline.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: edosk7760 physmap-flash support.
Luca Santini [Fri, 12 Sep 2008 09:07:16 +0000 (18:07 +0900)]
sh: edosk7760 physmap-flash support.

Signed-off-by: Luca Santini <luca.santini@spesonline.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosparc64: Fix sparse warnings in chmc.c
David S. Miller [Fri, 12 Sep 2008 07:22:42 +0000 (00:22 -0700)]
sparc64: Fix sparse warnings in chmc.c

Several constants are larger than 32-bit and need "UL" markers.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Kill sparse warnings in mm/init.h
David S. Miller [Fri, 12 Sep 2008 07:19:21 +0000 (00:19 -0700)]
sparc64: Kill sparse warnings in mm/init.h

1) Several exported symbols need extern decls, they are exported
   not for C code but for assembler routines.

2) PAGE_EXEC isn't used, delete

3) Several larger than 32-bit constants need "UL" markers

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Fix sparse warnings in fault.c
David S. Miller [Fri, 12 Sep 2008 07:10:32 +0000 (00:10 -0700)]
sparc64: Fix sparse warnings in fault.c

1) set_brkpt() is referenced by nothing and hasn't been used by anyone
   to my knowledge for many many years.  So just delete it.

2) add extern decl for do_sparc64_fault() in asm/pgtable_64.h

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Remove explicit initialization of mmu_gathers
David S. Miller [Fri, 12 Sep 2008 07:06:58 +0000 (00:06 -0700)]
sparc64: Remove explicit initialization of mmu_gathers

This was just needed to work around an ancient gcc bug that
we don't care about any more.

It was also causing a sparse warnings:

arch/sparc64/mm/tlb.c:22:52: warning: Using plain integer as NULL pointer

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Fix sparse warnings in vio.c
David S. Miller [Fri, 12 Sep 2008 07:04:33 +0000 (00:04 -0700)]
sparc64: Fix sparse warnings in vio.c

Several variables should be marked static.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Fix sparse warnings in pci_sun4v.c
David S. Miller [Fri, 12 Sep 2008 07:01:03 +0000 (00:01 -0700)]
sparc64: Fix sparse warnings in pci_sun4v.c

'err' variable shadowing in pci_sun4v_probe()

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Fix sparse warnings in pci.c
David S. Miller [Fri, 12 Sep 2008 06:57:40 +0000 (23:57 -0700)]
sparc64: Fix sparse warnings in pci.c

1) Declare pci_poke_* in pci_impl.h
2) of_create_pci_dev() should be static
3) ->setup_msi_irq() wants an unsigned int pointer not a plain
   int one
4) void value expression return in arch_teardown_msi_irq()

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Fix sparse warnings in of_device.c
David S. Miller [Fri, 12 Sep 2008 06:53:41 +0000 (23:53 -0700)]
sparc64: Fix sparse warnings in of_device.c

Passing unsigned int pointer where plain int pointer is
expected.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Fix sparse warnings in prom.c
David S. Miller [Fri, 12 Sep 2008 06:52:35 +0000 (23:52 -0700)]
sparc64: Fix sparse warnings in prom.c

1) Testing null with '0'
2) returning void-valued expression

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Fix sparse warnings in visemul.c
David S. Miller [Fri, 12 Sep 2008 06:46:40 +0000 (23:46 -0700)]
sparc64: Fix sparse warnings in visemul.c

1) edge8 tables should be static
2) add vis_emul() extern decl. to asm/visasm.h

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Fix sparse warnings in kernel/time.c
David S. Miller [Fri, 12 Sep 2008 06:39:11 +0000 (23:39 -0700)]
sparc64: Fix sparse warnings in kernel/time.c

1) Using "clock" as a local variable shadows a global variable of
   the same name declared in linux/clocksource.h

2) rtc_cmos_resource should be static

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Define WANT_PAGE_VIRTUAL
David S. Miller [Fri, 12 Sep 2008 06:36:32 +0000 (23:36 -0700)]
sparc64: Define WANT_PAGE_VIRTUAL

As sparse warns, without this struct page pointer subtraction is
extremely expensive, and this is a pretty common operation in
fast paths.

With this define struct page becomes 64 bytes which makes for a
simple subtract and shift, instead of a costly divide or reciprocol
multiply.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosysctl: Use header file for sysctl knob declarations on sparc.
David S. Miller [Fri, 12 Sep 2008 06:33:53 +0000 (23:33 -0700)]
sysctl: Use header file for sysctl knob declarations on sparc.

This also takes care of a sparse warning as scons_pwroff's definition
point.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosysctl: Use CONFIG_SPARC instead of __sparc__ for ifdef tests.
David S. Miller [Fri, 12 Sep 2008 06:29:54 +0000 (23:29 -0700)]
sysctl: Use CONFIG_SPARC instead of __sparc__ for ifdef tests.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Fix sparse warnings in global reg snapshotting.
David S. Miller [Fri, 12 Sep 2008 06:19:22 +0000 (23:19 -0700)]
sparc64: Fix sparse warnings in global reg snapshotting.

Lots of shadowed local variables and global_reg_snapshot[] needs
an extern declaration in asm/ptrace_64.h.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Add __arch64__ to CHECKFLAGS
David S. Miller [Fri, 12 Sep 2008 06:14:52 +0000 (23:14 -0700)]
sparc64: Add __arch64__ to CHECKFLAGS

Otherwise sparse doesn't work.  The 32 vs. 64 header ifdef
used under arch/sparc/include/asm/ is:

#if defined(__sparc__) && defined(__arch64__)

And that doesn't work for sparse unless we give it __arch64__

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agovlan: vlan device not reading gso max size of parent.
Alexander Duyck [Fri, 12 Sep 2008 03:17:05 +0000 (20:17 -0700)]
vlan: vlan device not reading gso max size of parent.

The vlan devices are not reading the gso max size of the parent device.  As
a result devices that do not support 64K max gso size are currently
failing.

This issue is seen on 2.6.26 kernels as well and the same patch should be
able to be applied without any issues.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluet...
David S. Miller [Fri, 12 Sep 2008 02:11:50 +0000 (19:11 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6

17 years agonetlink: fix overrun in attribute iteration
Vegard Nossum [Fri, 12 Sep 2008 02:05:29 +0000 (19:05 -0700)]
netlink: fix overrun in attribute iteration

kmemcheck reported this:

  kmemcheck: Caught 16-bit read from uninitialized memory (f6c1ba30)
  0500110001508abf050010000500000002017300140000006f72672e66726565
   i i i i i i i i i i i i i u u u u u u u u u u u u u u u u u u u
                                   ^

  Pid: 3462, comm: wpa_supplicant Not tainted (2.6.27-rc3-00054-g6397ab9-dirty #13)
  EIP: 0060:[<c05de64a>] EFLAGS: 00010296 CPU: 0
  EIP is at nla_parse+0x5a/0xf0
  EAX: 00000008 EBX: fffffffd ECX: c06f16c0 EDX: 00000005
  ESI: 00000010 EDI: f6c1ba30 EBP: f6367c6c ESP: c0a11e88
   DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
  CR0: 8005003b CR2: f781cc84 CR3: 3632f000 CR4: 000006d0
  DR0: c0ead9bc DR1: 00000000 DR2: 00000000 DR3: 00000000
  DR6: ffff4ff0 DR7: 00000400
   [<c05d4b23>] rtnl_setlink+0x63/0x130
   [<c05d5f75>] rtnetlink_rcv_msg+0x165/0x200
   [<c05ddf66>] netlink_rcv_skb+0x76/0xa0
   [<c05d5dfe>] rtnetlink_rcv+0x1e/0x30
   [<c05dda21>] netlink_unicast+0x281/0x290
   [<c05ddbe9>] netlink_sendmsg+0x1b9/0x2b0
   [<c05beef2>] sock_sendmsg+0xd2/0x100
   [<c05bf945>] sys_sendto+0xa5/0xd0
   [<c05bf9a6>] sys_send+0x36/0x40
   [<c05c03d6>] sys_socketcall+0x1e6/0x2c0
   [<c020353b>] sysenter_do_call+0x12/0x3f
   [<ffffffff>] 0xffffffff

This is the line in nla_ok():

  /**
   * nla_ok - check if the netlink attribute fits into the remaining bytes
   * @nla: netlink attribute
   * @remaining: number of bytes remaining in attribute stream
   */
  static inline int nla_ok(const struct nlattr *nla, int remaining)
  {
          return remaining >= sizeof(*nla) &&
                 nla->nla_len >= sizeof(*nla) &&
                 nla->nla_len <= remaining;
  }

It turns out that remaining can become negative due to alignment in
nla_next(). But GCC promotes "remaining" to unsigned in the test
against sizeof(*nla) above. Therefore the test succeeds, and the
nla_for_each_attr() may access memory outside the received buffer.

A short example illustrating this point is here:

  #include <stdio.h>

  main(void)
  {
          printf("%d\n", -1 >= sizeof(int));
  }

...which prints "1".

This patch adds a cast in front of the sizeof so that GCC will make
a signed comparison and fix the illegal memory dereference. With the
patch applied, there is no kmemcheck report.

Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[Bluetooth] Fix regression from using default link policy
Marcel Holtmann [Fri, 12 Sep 2008 01:11:54 +0000 (03:11 +0200)]
[Bluetooth] Fix regression from using default link policy

To speed up the Simple Pairing connection setup, the support for the
default link policy has been enabled. This is in contrast to settings
the link policy on every connection setup. Using the default link policy
is the preferred way since there is no need to dynamically change it for
every connection.

For backward compatibility reason and to support old userspace the
HCISETLINKPOL ioctl has been switched over to using hci_request() to
issue the HCI command for setting the default link policy instead of
just storing it in the HCI device structure.

However the hci_request() can only be issued when the device is
brought up. If used on a device that is registered, but still down
it will timeout and fail. This is problematic since the command is
put on the TX queue and the Bluetooth core tries to submit it to
hardware that is not ready yet. The timeout for these requests is
10 seconds and this causes a significant regression when setting up
a new device.

The userspace can perfectly handle a failure of the HCISETLINKPOL
ioctl and will re-submit it later, but the 10 seconds delay causes
a problem. So in case hci_request() is called on a device that is
still down, just fail it with ENETDOWN to indicate what happens.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
17 years agoARM: OMAP: Clean-up MMC device init
Tony Lindgren [Fri, 12 Sep 2008 00:23:52 +0000 (17:23 -0700)]
ARM: OMAP: Clean-up MMC device init

Clean-up MMC device init:

- Initialize devices in mach-omap1/devices.c and mach-omap2/devices.c
  instead of plat-omap/devices.c

- Remove old struct omap_mmc_config, use struct omap_mmc_platform_data instead

Note that this removes the second omap-hsmmc controller init for overo.
This needs to be fixed properly by changing hsmmc_init() to accept
board specific struct omap_mmc_platform_data.

Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoSync MMC device code with arm devel branch
Tony Lindgren [Fri, 12 Sep 2008 00:05:32 +0000 (17:05 -0700)]
Sync MMC device code with arm devel branch

This is to sync with Russell's commit 7736c09c6cf9521f2413d78856a66f4a37046e84.

Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Thu, 11 Sep 2008 23:08:24 +0000 (16:08 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:

drivers/net/wireless/ath9k/beacon.c
drivers/net/wireless/ath9k/core.h

17 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Thu, 11 Sep 2008 22:46:02 +0000 (15:46 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6

17 years agotg3: Fix DMA mapping leak in tigon3_dma_hwbug_workaround().
David S. Miller [Thu, 11 Sep 2008 22:45:19 +0000 (15:45 -0700)]
tg3: Fix DMA mapping leak in tigon3_dma_hwbug_workaround().

Noticed by Michael Chan.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agolibertas: Improvements on automatic tx power control via SIOCSIWTXPOW.
Anna Neal [Thu, 11 Sep 2008 18:17:25 +0000 (11:17 -0700)]
libertas: Improvements on automatic tx power control via SIOCSIWTXPOW.

iwconfig txpower can now be used to set tx power to fixed or auto. If set to
auto the default firmware settings are used.

The command CMD_802_11_PA_CFG is only sent to older firmware, as Dan Williams
noted the command was no longer supported in firmware V9+.

Signed-off-by: Anna Neal <anna@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: Reorder debugfs calls during netdev deinit
Jouni Malinen [Tue, 9 Sep 2008 14:33:15 +0000 (16:33 +0200)]
mac80211: Reorder debugfs calls during netdev deinit

ieee80211_free_keys() must be called before
ieee80211_debugfs_remove_netdev() in order to make sure that the
possible default_key symlink is removed before attempting to
remove the netdev debugfs directory.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: move frame TX function
Johannes Berg [Tue, 9 Sep 2008 13:07:09 +0000 (15:07 +0200)]
mac80211: move frame TX function

The ieee80211_sta_tx function isn't MLME code any more,
it's getting used by a lot of code. Move it to utils and
rename it to ieee80211_tx_skb.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: make ieee80211_rx_h_mgmt more readable
Johannes Berg [Tue, 9 Sep 2008 12:55:09 +0000 (14:55 +0200)]
mac80211: make ieee80211_rx_h_mgmt more readable

That function isn't exactly easy to read especially since it
does something in an if branch that continues after the if
because the else returns. Express it in a more readable way.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: move spectrum management code out
Johannes Berg [Tue, 9 Sep 2008 12:49:03 +0000 (14:49 +0200)]
mac80211: move spectrum management code out

Like the HT code, this doesn't depend on the STA-mode implementation
and can be handled entirely independently. There's only stub code
for now, but when it gets filled having it in its own file will be
beneficial.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>