Commit Graph

229467 Commits (0378c4051a621303ae919f1cee832206a4c1aa68)

Author SHA1 Message Date
Mike Frysinger e15124c14c Blackfin: dpmc.h: pull in new pll.h
Any consumer of dpmc.h expects to use VR_CTL, so also pull in the new
mach/pll.h header for those functions.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:17 -05:00
Mike Frysinger 77c90e3d35 Blackfin: bf54x: add MMR layout for PINT
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:17 -05:00
Mike Frysinger ec5109e7ca Blackfin: bf561: SMP: add multicore pll handlers
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:16 -05:00
Mike Frysinger 10cdc1a78a Blackfin: unify pll.h headers
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:16 -05:00
Yi Li 73a400646b Blackfin: SMP: rewrite IPI handling to avoid memory allocation
Currently, sending an interprocessor interrupt (IPI) requires building up
a message dynamically which means memory allocation.  But often times, we
will want to send an IPI in low level contexts where allocation is not
possible which may lead to a panic().  So create a per-cpu static array
for the message queue and use that instead.

Further, while we have two supplemental interrupts, we are currently only
using one of them.  So use the second one for the most common IPI message
of all -- smp_send_reschedule().  This avoids ugly contention for locks
which in turn would require an IPI message ...

In general, this improves SMP performance, and in some cases allows the
SMP port to work in places it wouldn't before.  Such as the PREEMPT_RT
state where the slab is protected by a per-cpu spin lock.  If the slab
kmalloc/kfree were to put the task to sleep, and that task was actually
the IPI handler, then the system falls down yet again.

After running some various stress tests on the system, the static limit
of 5 messages seems to work.  On the off chance even this overflows, we
simply panic(), and we can review that scenario to see if the limit needs
to be increased a bit more.

Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:15 -05:00
Graf Yang 2c1657c29f Blackfin: SMP: relocate blackfin_core_id() definition
Since we're breaking apart some inter-header dependencies to avoid more
circular loops, move the blackfin_core_id() definition to the func that
it is based upon.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:15 -05:00
Mike Frysinger 05c3457ec2 Blackfin: SMP: fix build breakage in cache.h
The SMP code needs "asmlinkage" which linkage.h provides.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:14 -05:00
Graf Yang 54d756ed1a Blackfin: SMP: add missing arch_{read,write}_lock_flags helpers
Common code expects these to be defined for SMP ports, so add them.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:14 -05:00
Graf Yang 49fcc7b16f Blackfin: bf561: fix mem_map.h SMP overrides
The BF561 mem_map.h header has the __ASSEMBLY__/CONFIG_SMP checks out
of order which leads to build errors for assembly code that happens to
include this file.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:13 -05:00
Graf Yang 75734e6606 Blackfin: SMP: tweak platform_request_ipi() usage
This function takes an irq_handler_t function, but the prototype in
the header doesn't match the function definition.  This is due to the
smp headers needing to avoid circular dependencies.  So change the
function to take a simple pointer.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:13 -05:00
Mike Frysinger 71a516adb6 Blackfin: SMP: fix asm/bitops.h errors
The common asm-generic non-atomic bitops.h defines test_bit() for us, but
we need to use our own version.  So redirect the definition of this func
to avoid having to inline the rest of the asm-generic file.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:12 -05:00
Graf Yang 9c199b5965 Blackfin: SMP: fix cpumask misbehavior
The cpu maps are defines provided by common linux/cpumask.h, not local
variables.  So stop exporting them locally and include the right header
for their definition.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:12 -05:00
Graf Yang 71a66287d9 Blackfin: SMP: rename the arch_xxx lock funcs to __raw_xxx
The external functions are named __raw_xxx, not arch_xxx, so rename the
prototypes to match reality.  This fixes some simple build errors in the
bfin_ksyms.c code which exports these helpers to modules.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:11 -05:00
Sonic Zhang 57afb39935 serial: bfin_5xx: move resources into board files
Rather than maintain Kconfig entries where people have to enter raw
numbers and hardcode lists of addresses/pins in the driver itself,
push it all to platform resources.  This lets us simplify the driver,
the Kconfig, and gives board porters greater flexibility.

In the process, we need to also start supporting the early platform
interface.  Not a big deal, but it causes the patch to be bigger than
a simple resource relocation.

All the Blackfin boards already have their resources updated and in
place for this change.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:11 -05:00
Mike Frysinger 94a038c2e6 Blackfin: bf561: update a few more SIC_SYSCR locations
Looks like I missed a few new spots when renaming the SICA macros.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:10 -05:00
Mike Frysinger a2ce077ab3 Blackfin: drop asm/irq.h include from mach headers
These were only included because of the irq handling of the PLL funcs,
and those PLL funcs have been moved out into their own header now.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:10 -05:00
Mike Frysinger 53ee582654 Blackfin: bf51x/bf52x: drop redundant "base" def/cdef header
The defBF512.h header exists only to include defBF51x_base.h, and it is
the only place where defBF51x_base.h is included.  So move the contents
of the defBF51x_base.h header into the defBF512.h header.

Same situation for the other def/cdef pairs.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:09 -05:00
Mike Frysinger 1a5c226528 Blackfin: clean up mach header includes
The main asm/blackfin.h header will pull in mach/blackfin.h to get
all the fun Blackfin defines.  So having any of the sub-mach headers
trying to include asm/blackfin.h makes no sense -- punt it.

The mach/blackfin.h header takes care of including the part-specific
def headers which in turn will include any other needed def file.
Similarly, it takes care of pulling in the part-specific cdef header.
So move this logic out of the blackfin.h when necessary.

Further, make sure the cdef headers do not waste time including the
def headers again.

Since all parts need the common def/cdef headers, move this logic
out of the part-specific headers and into the mach/blackfin.h file.

Finally, we need to split the BF539 def header since the BF538 does
not have MXVR and we don't want to expose those MMRs.

So now all parts should have the same behavior:
	mach/blackfin.h
		asm/def_LPBlackfin.h
		part-specific def.h
		if ! asm
			asm/cdef_LPBlackfin.h
			part-specific cdef.h
And the sub def/cdef headers only tail into what they need.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:08 -05:00
Mike Frysinger 51946b10cf Blackfin: bf533: merge fio_flag back into normal mach headers
We don't want the BF533 to be different in terms of its MMR headers, so
merge the FIO_FLAG helpers back into the normal place.  To avoid circular
dependencies with headers, turn the inline C funcs into CPP defines.  Not
like there will be any code size differences.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:08 -05:00
Mike Frysinger c31b3f7385 Blackfin: bf561-ezkit: add SMP defconfig
Since the SMP code paths tend to compile fail a lot, start a SMP defconfig
so our nightly build tools will automatically test it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:07 -05:00
Mike Frysinger 30e9b95a82 Blackfin: bf533: convert boards to gpio framework
We don't want people banging on MMRs directly.  As for the ip0x board,
it shouldn't need to muck with the CS pin directly as the Blackfin SPI
bus master driver takes care of driving this.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:07 -05:00
Mike Frysinger 4de2bf8786 Blackfin: push gpio (port) defines into common headers
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:06 -05:00
Mike Frysinger 9887f41533 Blackfin: bf54x: drop unused legacy MMR names
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:06 -05:00
Mike Frysinger 5e3bcf30d6 Blackfin: dma: constify MMR pointer array
The array of pointers is never written, so constify it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:05 -05:00
Mike Frysinger 9346dba556 Blackfin: standardize DMAC traffic control MMRs & MDMA MMRs
Use the same naming convention for DMA traffic MMRs (most were legacy
anyways) so we can avoid useless ifdef trees.

Same goes for MDMA names -- this actually allows us to undo a bunch of
ifdef redirects that existed for this purpose alone.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:05 -05:00
Mike Frysinger 6c8e75a06c Blackfin: bfin_dma.h: start a header for DMA MMR layout
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:04 -05:00
Mike Frysinger cfbf1677a3 Blackfin: switch to asm-generic/io.h
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:04 -05:00
Mike Frysinger efb2d31c1c asm-generic/io.h: add reads[bwl]/writes[bwl] helpers
A bunch of arches define reads[bwl]/writes[bwl] helpers for accessing
memory mapped registers.  Since the Blackfin ones aren't specific to
Blackfin code, move them to the common asm-generic/io.h for people.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:03 -05:00
Mike Frysinger 21aa8ec362 net/irda: bfin_sir: back out transitional defines
Now that the common header is sane, we can drop the transitional cruft.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:03 -05:00
Mike Frysinger b1524e29e3 Blackfin: bfin_serial.h: unify heavily duplicated serial code
Each Blackfin port has been duplicating UART structures and defines when
there really is no need for it.  So start a new bfin_serial.h header to
unify all these pieces and give ourselves a fresh start.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:02 -05:00
Mike Frysinger 709465d6ea net/irda: bfin_sir: pull in serial headers for defines
We're in the process of cleaning up the global Blackfin namespace, so the
bfin_sir driver needs to pull in the serial header explicitly now.

This does add a little transitional cruft to keep things compiling, but a
follow up patch in this series will cull that.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:18:02 -05:00
Bob Liu 759a3f3f31 Blackfin: musb-boards: push clkin value to platform resources
In order to not touch the driver file for different xtal usage,
push the clkin value to board file and calculate the register
value instead of hardcoding it.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:10:13 -05:00
Graf Yang 1a314ad4b0 Blackfin: SMP: fix hotplug building after irq header shuffle
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-10 07:10:13 -05:00
Pierre Tardy 4aed89d6b5 x86, lapic-timer: Increase the max_delta to 31 bits
Latest atom socs(penwell) does not have hpet timer.

As their local APIC timer is clocked at 400KHZ, and the current
code limit their Initial Counter register to 23 bits, they
cannot sleep more than 1.34 seconds which leads to ~2 spurious
wakeup per second (1 per thread)

These SOCs support 32bit timer so we change the max_delta to at
least 31bits. So we can at least sleep for 300 seconds.

We could not find any previous chip errata where lapic would
only have 23 bit precision As powertop is suggesting to activate
HPET to "sleep longer", this could mean this problem is already
known.

Problem is here since very first implementation of lapic timer
as a clock event e9e2cdb [PATCH] clockevents: i386 drivers.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Adrian Bunk <bunk@stusta.de>
Cc: H. Peter Anvin <hpa@linux.intel.com>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Andi Kleen <ak@suse.de>
LKML-Reference: <1294327409-19426-1-git-send-email-pierre.tardy@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-01-10 09:36:49 +01:00
Ingo Molnar 9adcc4a127 Merge branch 'x86/numa' into x86/urgent
Merge reason: Topic is ready for upstream.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-01-10 09:36:07 +01:00
Ingo Molnar 30285c6f03 Merge branch 'x86/apic-cleanups' into x86/urgent
Merge reason: Topic is ready for upstream.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-01-10 09:34:50 +01:00
Amerigo Wang d15be32c30 microblaze: remove obsolete DEBUG_BOOTMEM
"git grep" shows this is the last piece of code using DEBUG_BOOTMEM,
so remove it.

Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-01-10 09:29:51 +01:00
Michal Simek 20c040ce21 Merge commit 'v2.6.37' into next 2011-01-10 09:29:29 +01:00
Alexander Duyck 45b9f509b7 ixgbe: update ntuple filter configuration
This change fixes several issues found in ntuple filtering while I was
doing the ATR refactor.

Specifically I updated the masks to work correctly with the latest version
of ethtool, I cleaned up the exception handling and added detailed error
output when a filter is rejected, and corrected several bits that were set
incorrectly in ixgbe_type.h.

The previous version of this patch included a printk that was left over from
me fixing the filter setup.  This patch does not include that printk.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-09 23:44:12 -08:00
Alexander Duyck 69830529b2 ixgbe: further flow director performance optimizations
This change adds a compressed input type for atr signature hash
computation.  It also drops the use of the set functions when setting up
the ATR input since we can then directly setup the hash input as two dwords
that can be stored and passed as registers.

With these changes the cost of computing the has is low enough that we can
perform a hash computation on each TCP SYN flagged packet allowing us to
drop the number of flow director misses considerably in tests such as
netperf TCP_CRR.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-09 23:44:11 -08:00
Alexander Duyck 905e4a4163 ixgbe: cleanup flow director hash computation to improve performance
This change cleans up the layout of the flow director data, and the
algorithm used to calculate the hash resulting in a 35x / 3500% performance
increase versus the old flow director hash computation.  The overall effect
is only a 1% increase in transactions per second though due to the fact
that only 1 packet in 20 are actually hashed upon.

TCP_RR before:
Socket Size   Request  Resp.   Elapsed  Trans.
Send   Recv   Size     Size    Time     Rate
bytes  Bytes  bytes    bytes   secs.    per sec

16384  87380  1        1       60.00    23059.27
16384  87380

TCP_RR after:
Socket Size   Request  Resp.   Elapsed  Trans.
Send   Recv   Size     Size    Time     Rate
bytes  Bytes  bytes    bytes   secs.    per sec

16384  87380  1        1       60.00    23239.98
16384  87380

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-09 23:44:11 -08:00
Yi Zou 2d39d576fa ixgbe: make sure per Rx queue is disabled before unmapping the receive buffer
When disable the Rx logic globally, we would also want to disable the per Rx
queue receive logic by per queue Rx control register RXDCTL so no more DMA is
happening from the packet buffer to the receive buffer associated with the Rx
ring, before we start unmapping Rx ring receive buffer. The hardware may take
max of 100us before the corresponding Rx queue is really disabled. Added
ixgbe_disable_rx_queue() for this purpose.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-09 23:44:10 -08:00
Dirk Brandewie 5377a4160b e1000: Add support for the CE4100 reference platform
This patch adds support for the gigabit phys present on the CE4100 reference
platforms.

Signed-off-by:  Dirk Brandewie <dirk.j.brandewie@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-09 23:44:10 -08:00
Bruce Allan 77996d1d4c e1000e: add custom set_d[0|3]_lplu_state function pointer for 82574
82574 needs to configure Low Power Link Up (or LPLU) differently than
the other parts in the 8257x family supported by the driver.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-09 23:44:09 -08:00
Bruce Allan 31dbe5b4ac e1000e: power off PHY after reset when interface is down
Some Phys supported by the driver do not remain powered off across a reset
of the device when the interface is down, e.g. on 82571, but not on 82574.
This patch powers down (only when WoL is disabled) the PHY after a reset if
the interface is down and the ethtool diagnostics are not currently running.

The ethtool diagnostic function required a minor re-factor as a result, and
the e1000_[get|put]_hw_control() functions are renamed since they are no
longer static to netdev.c as they are needed by the ethtool diagnostics.
A couple minor whitespace issues were cleaned up, too.

Reported-by: Arthur Jones <ajones@riverbed.com>
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-09 23:44:09 -08:00
Bruce Allan fe46f58fa6 e1000e: use either_crc_le() rather than re-write it
For the 82579 jumbo frame workaround, there is no need to re-write the CRC
calculation functionality already found in the kernel's ether_crc_le().

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-09 23:44:08 -08:00
Bruce Allan e0dc4f1254 e1000e: properly bounds-check string functions
Use string functions with bounds checking rather than their non-bounds
checking counterparts, and do not hard code these boundaries.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-09 23:44:08 -08:00
Bruce Allan 482fed85e6 e1000e: convert calls of ops.[read|write]_reg to e1e_[r|w]phy
Cleans up the code a bit by using the driver-specific e1e_rphy and
e1e_wphy macros instead of the full function pointer variants.  Fix
a couple whitespace issue with two already existing calls to e1e_wphy.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-09 23:44:07 -08:00
Bruce Allan dd93f95e92 e1000e: cleanup variables set but not used
The ICR register is clear on read and we don't care what the returned value
is when resetting the hardware so the icr variable(s) can be removed.  We
should not ignore the return from e1000_lv_jumbo_workaround_ich8lan() and
from e1000_get_phy_id_82571() (dump a debug message when it fails and when
an unknown Phy id is returned).

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-09 23:44:06 -08:00
Jesse Gross 0363466866 net offloading: Convert checksums to use centrally computed features.
In order to compute the features for other offloads (primarily
scatter/gather), we need to first check the ability of the NIC to
offload the checksum for the packet.  Since we have already computed
this, we can directly use the result instead of figuring it out
again.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-09 23:35:35 -08:00