GitHub/exynos8895/android_kernel_samsung_universal8895.git
12 years agosparc32: Add ucmpdi2.o to obj-y instead of lib-y.
David S. Miller [Sat, 19 May 2012 22:27:01 +0000 (15:27 -0700)]
sparc32: Add ucmpdi2.o to obj-y instead of lib-y.

Otherwise if no references exist in the static kernel image,
we won't export the symbol properly to modules.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: add ucmpdi2
Sam Ravnborg [Sat, 19 May 2012 09:54:11 +0000 (11:54 +0200)]
sparc32: add ucmpdi2

Based on copy from microblaze add ucmpdi2 implementation.
This fixes build of niu driver which failed with:

drivers/built-in.o: In function `niu_get_nfc':
niu.c:(.text+0x91494): undefined reference to `__ucmpdi2'

This driver will never be used on a sparc32 system,
but patch added to fix build breakage with all*config builds.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc: introduce arch/sparc/Kbuild
Sam Ravnborg [Tue, 15 May 2012 19:27:15 +0000 (21:27 +0200)]
sparc: introduce arch/sparc/Kbuild

This allows us to do:

    make arch/sparc/

to build the core part of the sparc kernel.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc: remove obsolete documentation
Sam Ravnborg [Tue, 15 May 2012 20:10:22 +0000 (22:10 +0200)]
sparc: remove obsolete documentation

When we killed btfixup this readme no longer has any value.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc: clean up Makefile
Sam Ravnborg [Tue, 15 May 2012 19:21:55 +0000 (21:21 +0200)]
sparc: clean up Makefile

- delete unused variables
- align assignments
- drop stale comments
- kill use of "\" for line continuation

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: delete muldiv.o from Makefile
Sam Ravnborg [Tue, 15 May 2012 19:20:44 +0000 (21:20 +0200)]
sparc32: delete muldiv.o from Makefile

The source file is no more..

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Kill off software 32-bit multiply/divide routines.
David S. Miller [Tue, 15 May 2012 18:23:01 +0000 (11:23 -0700)]
sparc32: Kill off software 32-bit multiply/divide routines.

For the explicit calls to .udiv/.umul in assembler, I made a
mechanical (read as: safe) transformation.  I didn't attempt
to make any simplifications.

In particular, __ndelay and __udelay can be simplified significantly.
Some of the %y reads are unnecessary and these routines have no need
any longer for allocating a register window, they can be leaf
functions.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Build kernel with -mcpu=v8
David S. Miller [Tue, 15 May 2012 17:48:54 +0000 (10:48 -0700)]
sparc32: Build kernel with -mcpu=v8

With Cypress gone we can generate real hardware integer multiply
and divide instructions at will.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: cleanup mm/fault_32.c
Sam Ravnborg [Tue, 15 May 2012 17:02:08 +0000 (19:02 +0200)]
sparc32: cleanup mm/fault_32.c

- remove unused variables
- fix coding style issues that hurts my eyes

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Remove cypress cpu support.
David S. Miller [Tue, 15 May 2012 05:02:08 +0000 (22:02 -0700)]
sparc32: Remove cypress cpu support.

It's the one aberration in v8, the only cpu that
didn't actually have hardware multiply and divide
instructions.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
12 years agosparc64: Remove pointless assignment in floppy support.
David S. Miller [Tue, 15 May 2012 03:59:25 +0000 (20:59 -0700)]
sparc64: Remove pointless assignment in floppy support.

Reported-by: Josip Rodin <joy@entuzijast.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Kill unused hard_smp{4m,4d,leon}_processor_id() inlined.
David S. Miller [Mon, 14 May 2012 21:23:57 +0000 (14:23 -0700)]
sparc32: Kill unused hard_smp{4m,4d,leon}_processor_id() inlined.

Reported-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop build time btfixup patching
Sam Ravnborg [Mon, 14 May 2012 17:35:50 +0000 (19:35 +0200)]
sparc32: drop build time btfixup patching

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: remove runtime btfix support
Sam Ravnborg [Mon, 14 May 2012 15:58:57 +0000 (17:58 +0200)]
sparc32: remove runtime btfix support

- remove all uses of btfixup header
- remove the btfixup header
- remove the btfixup code

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: remove remaining users of btfixup
Sam Ravnborg [Mon, 14 May 2012 15:30:35 +0000 (17:30 +0200)]
sparc32: remove remaining users of btfixup

Use sparc_config to hold the last two function pointers.  There was no
point generating dedicated _ops structures only for these.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: move smp ipi to method ops
Sam Ravnborg [Mon, 14 May 2012 13:14:36 +0000 (15:14 +0200)]
sparc32: move smp ipi to method ops

I ended up renaming set_cpu_int to send_ipi to
be consistent all way around.
send_ipi was moved to the *_smp.c files so
we could call the relevant method direct,
without any _ops indirection.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Implement hard_smp_processor_id() via instruction patching.
David S. Miller [Mon, 14 May 2012 06:09:04 +0000 (23:09 -0700)]
sparc32: Implement hard_smp_processor_id() via instruction patching.

This is the last non-trivial user of btfixup.

Like sparc64, use a special patch section to resolve the various
implementations of how to read the current CPU's ID when we don't
have current_thread_info()->cpu necessarily available.

Signed-off-by: David S. Miller <davem@davemloft.net>
Tested-by: Sam Ravnborg <sam@ravnborg.org>
12 years agosparc32: Move cache and TLB flushes over to method ops.
David S. Miller [Mon, 14 May 2012 03:49:31 +0000 (20:49 -0700)]
sparc32: Move cache and TLB flushes over to method ops.

This eliminated most of the remaining users of btfixup.

There are some complications because of the special cases we
have for sun4d, leon, and some flavors of viking.

It was found that there are no cases where a flush_page_for_dma
method was not hooked up to something, so the "noflush" iommu
methods were removed.

Add some documentation to the viking_sun4d_smp_ops to describe exactly
the hardware bug which causes us to need special TLB flushing on
sun4d.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Remove unused declarations in srmmu.c
David S. Miller [Sun, 13 May 2012 22:27:09 +0000 (15:27 -0700)]
sparc32: Remove unused declarations in srmmu.c

Uses of these went away with the sun4c removal.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Convert mmu_* interfaces from btfixup to method ops.
David S. Miller [Sun, 13 May 2012 20:57:05 +0000 (13:57 -0700)]
sparc32: Convert mmu_* interfaces from btfixup to method ops.

This set of changes displays one major danger of btfixup, interface
signatures are not always type checked fully.  As seen here the iounit
variant of the map_dma_area routine had an incorrect type for one of
it's arguments.

It turns out to be harmless in this case, but just imagine trying to
debug something involving this kind of problem.  No thanks.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc: Kill mmu_{un,}lockarea().
David S. Miller [Sun, 13 May 2012 20:23:16 +0000 (13:23 -0700)]
sparc: Kill mmu_{un,}lockarea().

These were used on sun4c during floppy data transfers since on that
chip we had to lock the cpu mappings into the TLB because we cannot
take a TLB miss during the assembler floppy interrupt handler that
does the data transfer.

That is no longer necessary since we've removed sun4c support, thus
this stuff can disappear completely.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Un-btfixup update_mmu_cache().
David S. Miller [Sun, 13 May 2012 20:16:39 +0000 (13:16 -0700)]
sparc32: Un-btfixup update_mmu_cache().

The magic Swift SRMMU code in question has not been enabled for
something on the order of a decade, and it as well as it's comment
is there in the history in case we ever need it again.

Therefore all implementations are NOPs and we can kill this stuff
off.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Kill btfixup for xchg()'s 'swap' instruction.
David S. Miller [Sun, 13 May 2012 20:07:16 +0000 (13:07 -0700)]
sparc32: Kill btfixup for xchg()'s 'swap' instruction.

We always have this instruction available, so no need to use
btfixup for it any more.

This also eradicates the whole of atomic_32.S and thus the
__atomic_begin and __atomic_end symbols completely.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop unused clear_cpu_int
Sam Ravnborg [Sun, 13 May 2012 13:43:41 +0000 (15:43 +0200)]
sparc32: drop unused clear_cpu_int

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop unused set_irq_udt
Sam Ravnborg [Sun, 13 May 2012 13:29:09 +0000 (15:29 +0200)]
sparc32: drop unused set_irq_udt

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop btfixup in page_32.h
Sam Ravnborg [Sun, 13 May 2012 08:45:18 +0000 (10:45 +0200)]
sparc32: drop btfixup in page_32.h

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop unused prototype from timer_32.h
Sam Ravnborg [Sun, 13 May 2012 08:35:20 +0000 (10:35 +0200)]
sparc32: drop unused prototype from timer_32.h

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop btfixup in mmu_context_32.h
Sam Ravnborg [Sun, 13 May 2012 08:30:54 +0000 (10:30 +0200)]
sparc32: drop btfixup in mmu_context_32.h

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop btfixup in pgtable_32.h
Sam Ravnborg [Sun, 13 May 2012 08:21:25 +0000 (10:21 +0200)]
sparc32: drop btfixup in pgtable_32.h

Only one function left using btfixup.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop btfixup in pgalloc_32.h
Sam Ravnborg [Sun, 13 May 2012 06:40:27 +0000 (08:40 +0200)]
sparc32: drop btfixup in pgalloc_32.h

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Pass -mcpu=v7 explicitly to gcc.
David S. Miller [Sat, 12 May 2012 22:16:45 +0000 (15:16 -0700)]
sparc32: Pass -mcpu=v7 explicitly to gcc.

We should be agnostic to what gcc happens to be generating by default.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Un-btfixup more PTE constants and PTE ops.
David S. Miller [Sat, 12 May 2012 20:54:58 +0000 (13:54 -0700)]
sparc32: Un-btfixup more PTE constants and PTE ops.

pte_{filei,wrprotecti,mkcleani,mkoldi}
pte_{mkwrite,mkdirty,mkyoung}

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Un-btfixup pte_{write,dirty,young}i
David S. Miller [Sat, 12 May 2012 20:48:10 +0000 (13:48 -0700)]
sparc32: Un-btfixup pte_{write,dirty,young}i

And we can certainly get rid of the const function attributes, there
is no way that's needed any longer and no other arch uses this kind
of annotation here.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop unused code in process_32
Sam Ravnborg [Sat, 12 May 2012 20:40:45 +0000 (22:40 +0200)]
sparc32: drop unused code in process_32

It is commented out using #ifdef 0 / #endif,
and has been so for a long time.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Un-btfixup set_pte, pte_present, mk_pte{_phys,_io}().
David S. Miller [Sat, 12 May 2012 20:39:23 +0000 (13:39 -0700)]
sparc32: Un-btfixup set_pte, pte_present, mk_pte{_phys,_io}().

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop loadmmu
Sam Ravnborg [Sat, 12 May 2012 18:35:52 +0000 (20:35 +0200)]
sparc32: drop loadmmu

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Un-btfixup pmd_{bad,present}().
David S. Miller [Sat, 12 May 2012 20:30:28 +0000 (13:30 -0700)]
sparc32: Un-btfixup pmd_{bad,present}().

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Un-btfixup pgd_{none,bad,present}.
David S. Miller [Sat, 12 May 2012 20:13:16 +0000 (13:13 -0700)]
sparc32: Un-btfixup pgd_{none,bad,present}.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Un-btfixup PAGE_{NONE,COPY,READONLY,SHARED,KERNEL}.
David S. Miller [Sat, 12 May 2012 19:52:47 +0000 (12:52 -0700)]
sparc32: Un-btfixup PAGE_{NONE,COPY,READONLY,SHARED,KERNEL}.

That lets us also get rid of the run-time initialization of
protection_map[] and all the ugly module workarounds for
PAGE_KERNEL and PAGE_SHARED to deal with the fact that we
can't do btfixups for modular code.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Un-btfixup pmd_page and pte_pfn.
David S. Miller [Sat, 12 May 2012 19:33:08 +0000 (12:33 -0700)]
sparc32: Un-btfixup pmd_page and pte_pfn.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Un-btfixup {pte,pmd,pgd}_clear().
David S. Miller [Sat, 12 May 2012 19:26:47 +0000 (12:26 -0700)]
sparc32: Un-btfixup {pte,pmd,pgd}_clear().

Also we can remove BTFIXUPCALL_SWAPO0G0 as that is no longer
used.

This was rather amusing, we were setting the btfixup vectors
based upon cpu type but all to the same exact generic srmmu
routines.

Furthermore, we were inconsistently marking the fixup as
either BTFIXUPCALL_SWAPO0G0 or BTFIXUPCALL_NORM.

What a mess, glad we could untangle this stuff.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Un-btfixup PGDIR_{SHIFT,SIZE,MASK} {USER_,}PTRS_PER_{PGD,PMD}
David S. Miller [Sat, 12 May 2012 19:02:02 +0000 (12:02 -0700)]
sparc32: Un-btfixup PGDIR_{SHIFT,SIZE,MASK} {USER_,}PTRS_PER_{PGD,PMD}

Only one set of values exist, the SRMMU ones.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop unused type/extern
Sam Ravnborg [Sat, 12 May 2012 08:04:13 +0000 (08:04 +0000)]
sparc32: drop unused type/extern

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop btfixup for check_pgt_cache
Sam Ravnborg [Sat, 12 May 2012 08:04:12 +0000 (08:04 +0000)]
sparc32: drop btfixup for check_pgt_cache

It is a noop for srmmu - so use a define as sparc64 does.
And drop all sparc callers - no need to confuse our-self
be calling a noop function.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop btfixup for switch_mm
Sam Ravnborg [Sat, 12 May 2012 08:04:11 +0000 (08:04 +0000)]
sparc32: drop btfixup for switch_mm

This revealed that the implementation of switch_mm
had a bogus extra argument.
No harm as said argument was never used - but confusing.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: code cleanup in floppy glue
Sam Ravnborg [Sat, 12 May 2012 08:04:10 +0000 (08:04 +0000)]
sparc32: code cleanup in floppy glue

Small cleanup to improve readability.
Dropped one test for sparc_cpu_model -
we already know that only sun4m support floppy.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: fix warning in floopy glue
Sam Ravnborg [Sat, 12 May 2012 08:04:09 +0000 (08:04 +0000)]
sparc32: fix warning in floopy glue

Fix following warning:
arch/sparc/include/asm/floppy_32.h:342:5: warning: 'op' may be used uninitialized in this function

The warning are legitimite and we can end up using op uninitialized.
This fixes build with my gcc on UP.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: simpler cputype check in head_32.S
Sam Ravnborg [Sat, 12 May 2012 01:43:49 +0000 (01:43 +0000)]
sparc32: simpler cputype check in head_32.S

We know this is not a sun4/sun4c - as we checked earlier.
So no need to repeat the check.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop extra getprop call during boot
Sam Ravnborg [Sat, 12 May 2012 01:43:48 +0000 (01:43 +0000)]
sparc32: drop extra getprop call during boot

It was present only to support the sun4, sun4c boxes which
do not have the "compatible" property in the root-node
of the device tree.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop prom version check in head_32.S
Sam Ravnborg [Sat, 12 May 2012 01:43:47 +0000 (01:43 +0000)]
sparc32: drop prom version check in head_32.S

We already sorted out if we are a sun4/sun4c and halted.
So no need to check the prom version as we know this is
a v2 or v3 as sun4m, sun4d etc. does not use a v1 prom.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: remove sun4c specific variables from head_32.S
Sam Ravnborg [Sat, 12 May 2012 01:43:46 +0000 (01:43 +0000)]
sparc32: remove sun4c specific variables from head_32.S

This gives us back 7 pages...

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Add back early sun4/sun4c detection so we can warn properly.
David S. Miller [Sat, 12 May 2012 08:02:11 +0000 (01:02 -0700)]
sparc32: Add back early sun4/sun4c detection so we can warn properly.

We need to do the check before we try to remap the kernel using
SRMMU operations.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Trivial removal of sun4c references in comments.
David S. Miller [Sat, 12 May 2012 07:35:45 +0000 (00:35 -0700)]
sparc32: Trivial removal of sun4c references in comments.

I left some around, like the ones in the openprom headers, since
we need to think about which pieces of those datastructures and
code we can completely toss now.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Remove sun4 and sun4c from enum sparc_cpu.
David S. Miller [Sat, 12 May 2012 07:23:23 +0000 (00:23 -0700)]
sparc32: Remove sun4 and sun4c from enum sparc_cpu.

All the remaining references are trivially removed since we've
just eliminated the final reference to sparc_cpu_model from
assembler code in commit b7d96ce189564e661909fbf8df39d7358149885b
("sparc32: Remove sparc_cpu_model read from floppy interrupt handler.")

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Remove sparc_cpu_model read from floppy interrupt handler.
David S. Miller [Sat, 12 May 2012 07:13:32 +0000 (00:13 -0700)]
sparc32: Remove sparc_cpu_model read from floppy interrupt handler.

Since we no longer test the cpu model value, no need to load
it into a register any more.

It just gets overwritten in the next instruction anyways. :-)

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Kill unused defines from asm/head_32.h
David S. Miller [Sat, 12 May 2012 04:43:11 +0000 (21:43 -0700)]
sparc32: Kill unused defines from asm/head_32.h

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Remove some more sun4c code from floppy glue.
David S. Miller [Sat, 12 May 2012 04:39:48 +0000 (21:39 -0700)]
sparc32: Remove some more sun4c code from floppy glue.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Remove sun4c tlb/vac insn patching from entry.S
David S. Miller [Sat, 12 May 2012 04:35:36 +0000 (21:35 -0700)]
sparc32: Remove sun4c tlb/vac insn patching from entry.S

No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Remove ldXa and stXa defines, unused.
David S. Miller [Sat, 12 May 2012 04:31:49 +0000 (21:31 -0700)]
sparc32: Remove ldXa and stXa defines, unused.

These were for sharing some MMU code between sun4 and sun4c.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Remove sun4{,c} control reg definitions from contregs.h.
David S. Miller [Sat, 12 May 2012 04:29:17 +0000 (21:29 -0700)]
sparc32: Remove sun4{,c} control reg definitions from contregs.h.

No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Remove sparc_lvl15_nmi().
David S. Miller [Sat, 12 May 2012 04:27:04 +0000 (21:27 -0700)]
sparc32: Remove sparc_lvl15_nmi().

No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Restore SMP build and rectify sun4m NMI when non-SMP.
David S. Miller [Sat, 12 May 2012 04:23:05 +0000 (21:23 -0700)]
sparc32: Restore SMP build and rectify sun4m NMI when non-SMP.

The non-SMP sun4m NMI handler was still accessing SUN4C registers.

Fix that and share the sun4m NMI trap code between SMP and non-SMP
cases.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Kill asm/vac-ops.h
David S. Miller [Sat, 12 May 2012 04:07:50 +0000 (21:07 -0700)]
sparc32: Kill asm/vac-ops.h

All sun4/sun4c stuff and unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Stop warning about sun4/sun4c in SMP Kconfig option.
David S. Miller [Sat, 12 May 2012 04:01:47 +0000 (21:01 -0700)]
sparc32: Stop warning about sun4/sun4c in SMP Kconfig option.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Remove sun4c floppy assembler.
David S. Miller [Sat, 12 May 2012 03:59:57 +0000 (20:59 -0700)]
sparc32: Remove sun4c floppy assembler.

There were two blocks of code for the two ways to twiddle
the terminal count pin in the AUXIO register, one for
sun4c and one for sun4m.  Kill the former.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Put back SPARC_BRANCH.
David S. Miller [Sat, 12 May 2012 03:57:29 +0000 (20:57 -0700)]
sparc32: Put back SPARC_BRANCH.

It's needed for the floppy interrupt trap table patching.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Kill SUN4C_LOCK_{VADDR,END} and associated comment.
David S. Miller [Sat, 12 May 2012 03:51:51 +0000 (20:51 -0700)]
sparc32: Kill SUN4C_LOCK_{VADDR,END} and associated comment.

No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc: Clear out unused asm/machines.h values.
David S. Miller [Sat, 12 May 2012 03:45:18 +0000 (20:45 -0700)]
sparc: Clear out unused asm/machines.h values.

Remove sun4 and sun4c machine ID values from asm/machines.h

Also kill NUM_SUN_MACHINES, use ARRAY_SIZE instead.

Kill asm/machines.h include and sun4c checks from asm/floppy_32.h

Remove asm/machines.h include from setup_32.c and time_32.c, unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc: Convert some assembler over to linakge.h's ENTRY/ENDPROC
David S. Miller [Sat, 12 May 2012 03:33:22 +0000 (20:33 -0700)]
sparc: Convert some assembler over to linakge.h's ENTRY/ENDPROC

Use those, instead of doing it all by hand.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: Remove inline strncmp "optimization" for constant counts.
David S. Miller [Sat, 12 May 2012 02:53:29 +0000 (19:53 -0700)]
sparc32: Remove inline strncmp "optimization" for constant counts.

Let the compiler do stuff like this.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: use inline versions of pgprot_noncached, pte_to_pgoff and pgoff_to_pte
Sam Ravnborg [Fri, 11 May 2012 11:35:17 +0000 (11:35 +0000)]
sparc32: use inline versions of pgprot_noncached, pte_to_pgoff and pgoff_to_pte

We no longer have different versions of these so use a few simple
static inline functions.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop btfixup for alloc_thread_info_node/free_thread_info
Sam Ravnborg [Fri, 11 May 2012 11:35:16 +0000 (11:35 +0000)]
sparc32: drop btfixup for alloc_thread_info_node/free_thread_info

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop sun4c bits from head_32.S
Sam Ravnborg [Fri, 11 May 2012 11:35:15 +0000 (11:35 +0000)]
sparc32: drop sun4c bits from head_32.S

As we no longer support sun4c we can remove all the code to
support remapping the kernel in head_32.S.
We also try to tell the user that the machine is not support,
in case someone try to boot the kernel on a sun4c one day

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop test for sun4c in signal_32
Sam Ravnborg [Fri, 11 May 2012 11:35:14 +0000 (11:35 +0000)]
sparc32: drop test for sun4c in signal_32

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop sun4c user stack checking routine
Sam Ravnborg [Fri, 11 May 2012 11:35:13 +0000 (11:35 +0000)]
sparc32: drop sun4c user stack checking routine

With this we no longer do any run-time patchings of traps.
So drop the function + macro to support this.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop sun4c stack checking routine
Sam Ravnborg [Fri, 11 May 2012 11:35:12 +0000 (11:35 +0000)]
sparc32: drop sun4c stack checking routine

And drop run-time patching too.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop sun4c window overflow stack checking routine
Sam Ravnborg [Fri, 11 May 2012 11:35:11 +0000 (11:35 +0000)]
sparc32: drop sun4c window overflow stack checking routine

Also drop run-time patching for srmmu

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop sun4c specific stack validation
Sam Ravnborg [Fri, 11 May 2012 11:35:10 +0000 (11:35 +0000)]
sparc32: drop sun4c specific stack validation

This allows us to kill run-time patching for this function too

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: delete pgtsun4c.h
Sam Ravnborg [Thu, 10 May 2012 21:12:10 +0000 (23:12 +0200)]
sparc32: delete pgtsun4c.h

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: remove all uses of ARCH_SUN4C
Sam Ravnborg [Fri, 11 May 2012 11:35:08 +0000 (11:35 +0000)]
sparc32: remove all uses of ARCH_SUN4C

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop sun4c specific ___xchg32 implementation
Sam Ravnborg [Fri, 11 May 2012 11:35:07 +0000 (11:35 +0000)]
sparc32: drop sun4c specific ___xchg32 implementation

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: remove sun4c traps
Sam Ravnborg [Fri, 11 May 2012 11:35:06 +0000 (11:35 +0000)]
sparc32: remove sun4c traps

We used to runtime patch the trap table for srmmu.
With the removal of sun4c support this is no longer required.

With the sun4c trap removed we can remove all the referenced
trap handling which is sun4c specific.
This also allows us to get rid of the nosun4c.c file that
contained only dummy functions/data.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: remove calls to sun4c dummy mm inits functions
Sam Ravnborg [Fri, 11 May 2012 11:35:05 +0000 (11:35 +0000)]
sparc32: remove calls to sun4c dummy mm inits functions

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: drop sun4c support
Sam Ravnborg [Fri, 11 May 2012 11:35:04 +0000 (11:35 +0000)]
sparc32: drop sun4c support

Machines with sun4c support are very rare these days, and noone
is using them for any practical purposes.
The sun4c support has been know broken for quite some time too.

So rather than trying to keep it up-to-date, lets get rid of it.
This allows us to do some very welcome cleanup of sparc32 support.

Updated the former sun4c specifc nmi (which was also used
for sun4m UP) to be a generic UP NMI.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc: fix build fail in mm/init_64.c when NEED_MULTIPLE_NODES is off
Paul Gortmaker [Thu, 10 May 2012 00:44:29 +0000 (20:44 -0400)]
sparc: fix build fail in mm/init_64.c when NEED_MULTIPLE_NODES is off

Commit 625d693e9784f988371e69c2b41a2172c0be6c11 (linux-next)

    "sparc64: Convert over to NO_BOOTMEM."

causes the following compile failure for sparc64 allnoconfig:

  arch/sparc/mm/init_64.c:822:16: error: unused variable 'paddr'
  arch/sparc/mm/init_64.c:1759:7: error: unused variable 'node'
  arch/sparc/mm/init_64.c:809:12: error: 'memblock_nid_range' defined but not used

The paddr decl can easily be shuffled within the ifdef.  The
memblock_nid_range is just a stub function for when NEED_MULTIPLE_NODES
is off, but the only caller is within a NEED_MULTIPLE_NODES enabled
section, so we can simply delete it.

The unused "node" is slightly more interesting.  In the case of
"# CONFIG_NEED_MULTIPLE_NODES is not set" we no longer get the
definition of:

 #define NODE_DATA(nid)          (node_data[nid])

from arch/sparc/include/asm/mmzone.h - but instead we get:

 #define NODE_DATA(nid)          (&contig_page_data)

from include/linux/mmzone.h -- and since the arg is ignored,
the thing really is unused.  Rather than put in a confusing
looking __maybe_unused, simply splitting the declaration
from the assignment seemed to me to be the least offensive.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc64: Do not set max_mapnr.
David S. Miller [Fri, 27 Apr 2012 17:55:08 +0000 (10:55 -0700)]
sparc64: Do not set max_mapnr.

There is no need, since nothing relevant to sparc64 makes
use of this value.

Noticed by Sam Ravnborg.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc64: Use node local allocations for IRQ stacks.
David S. Miller [Fri, 27 Apr 2012 03:50:34 +0000 (20:50 -0700)]
sparc64: Use node local allocations for IRQ stacks.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc64: Convert over to NO_BOOTMEM.
David S. Miller [Wed, 25 Apr 2012 20:13:43 +0000 (13:13 -0700)]
sparc64: Convert over to NO_BOOTMEM.

With help from Sam Ravnborg.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
David S. Miller [Fri, 27 Apr 2012 03:00:35 +0000 (20:00 -0700)]
Merge git://git./linux/kernel/git/torvalds/linux

Conflicts:
arch/sparc/kernel/leon_smp.c

Merge mainline to get the nobootmem.c bug fix, for the sake
of the sparc64 NO_BOOTMEM conversion.

Resolve a small include line conflict in leon_smp.c

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux...
Linus Torvalds [Thu, 26 Apr 2012 22:36:27 +0000 (15:36 -0700)]
Merge branch 'stable' of git://git./linux/kernel/git/cmetcalf/linux-tile

Pull arch/tile fixes from Chris Metcalf:
 "One change fixes a platform-independent bug about environment var
  handling in the boot command line.  The other is a trivial
  tile-specific bug fix to avoid a link-time warning."

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  arch/tile: fix a couple of functions that should be __init
  init: fix bug where environment vars can't be passed via boot args

12 years agoMerge tag 'ib-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
Linus Torvalds [Thu, 26 Apr 2012 22:35:35 +0000 (15:35 -0700)]
Merge tag 'ib-fixes' of git://git./linux/kernel/git/roland/infiniband

Pull infiniband fixes from Roland Dreier:
 "A few fixes for regressions introduced in 3.4-rc1:
   - fix memory leak in mlx4
   - fix two problems with new MAD response generation code"

* tag 'ib-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mlx4: Fix memory leaks in ib_link_query_port()
  IB/mad: Don't send response for failed MADs
  IB/mad: Set 'D' bit in response for unhandled MADs

12 years agoMerge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Thu, 26 Apr 2012 22:33:36 +0000 (15:33 -0700)]
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma

Pull [GIT PULL] slave-dmaengine fixes from Vinod Koul.

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine/amba-pl08x : reset phychan_hold on terminate all
  dma: pl330: fix a couple of compilation warnings
  dma/ste_dma40: fix erroneous comparison
  dma/ste_dma40: explicitly include regulator consumer header
  dma40: Improve the logic of stopping logical chan
  dmaengine: at_hdmac: remove clear-on-read in atc_dostart()
  dma: mxs-dma: enable channel in device_issue_pending call
  dmaengine: imx-dma: dont complete descriptor for cyclic dma

12 years agoMerge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Thu, 26 Apr 2012 22:32:39 +0000 (15:32 -0700)]
Merge tag 'sound-3.4' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A workaround for an ASUS laptop and a few ASoC changes; most of the
  commits are tagged for stable, too."

* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: wm8994: Improve sequencing of AIF channel enables
  ALSA: HDA: Add external mic quirk for Asus Zenbook UX31E
  ASoC: fsi: update for dmaengine prep_slave_sg fallout.
  ASoC: core: Fix card RTD count for deferred probe.
  ASoC: cs42l73: don't use negative array index
  ASoC: dapm: Ensure power gets managed for line widgets

12 years agoMerge git://www.linux-watchdog.org/linux-watchdog
Linus Torvalds [Thu, 26 Apr 2012 22:31:53 +0000 (15:31 -0700)]
Merge git://www.linux-watchdog.org/linux-watchdog

Pull a watchdog fix from Wim Van Sebroeck:
 "It will fix the size when reading or writing to WD Timer port 0x72 in
  the hpwdt driver."

* git://www.linux-watchdog.org/linux-watchdog:
  hpwdt: Only BYTE reads/writes to WD Timer port 0x72

12 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 26 Apr 2012 22:30:26 +0000 (15:30 -0700)]
Merge branch 'timers-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull timer fixes from Thomas Gleixner.

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  tick: Fix the spurious broadcast timer ticks after resume
  tick: Ensure that the broadcast device is initialized
  tick: Fix oneshot broadcast setup really

12 years agoMerge branch 'akpm' (Andrew's patch-bomb)
Linus Torvalds [Thu, 26 Apr 2012 22:24:45 +0000 (15:24 -0700)]
Merge branch 'akpm' (Andrew's patch-bomb)

Merge fixes from Andrew Morton:
 "13 fixes.  The acerhdf patches aren't (really) fixes.  But they've
  been stuck in my tree for up to two years, sent to Matthew multiple
  times and the developers are unhappy."

* emailed from Andrew Morton <akpm@linux-foundation.org>: (13 patches)
  mm: fix NULL ptr dereference in move_pages
  mm: fix NULL ptr dereference in migrate_pages
  revert "proc: clear_refs: do not clear reserved pages"
  drivers/rtc/rtc-ds1307.c: fix BUG shown with lock debugging enabled
  arch/arm/mach-ux500/mbox-db5500.c: world-writable sysfs fifo file
  hugetlbfs: lockdep annotate root inode properly
  acerhdf: lowered default temp fanon/fanoff values
  acerhdf: add support for new hardware
  acerhdf: add support for Aspire 1410 BIOS v1.3314
  fs/buffer.c: remove BUG() in possible but rare condition
  mm: fix up the vmscan stat in vmstat
  epoll: clear the tfile_check_list on -ELOOP
  mm/hugetlb: fix warning in alloc_huge_page/dequeue_huge_page_vma

12 years agohpwdt: Only BYTE reads/writes to WD Timer port 0x72
Mingarelli, Thomas [Tue, 3 Apr 2012 05:37:01 +0000 (05:37 +0000)]
hpwdt: Only BYTE reads/writes to WD Timer port 0x72

This patch is to correct the use of the iLO port 0x72 usage.
The port 0x72 is a byte size write/read and hpwdt is currently
writing a WORD.

Signed-off by: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
12 years agoMerge tag 'nfs-for-3.4-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Thu, 26 Apr 2012 04:38:44 +0000 (21:38 -0700)]
Merge tag 'nfs-for-3.4-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:
 - Fix NFSv4 infinite loops on open(O_TRUNC)
 - Fix an Oops and an infinite loop in the NFSv4 flock code
 - Don't register the PipeFS filesystem until it has been set up
 - Fix an Oops in nfs_try_to_update_request
 - Don't reuse NFSv4 open owners: fixes a bad sequence id storm.

* tag 'nfs-for-3.4-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFSv4: Keep dropped state owners on the LRU list for a while
  NFSv4: Ensure that we don't drop a state owner more than once
  NFSv4: Ensure we do not reuse open owner names
  nfs: Enclose hostname in brackets when needed in nfs_do_root_mount
  NFS: put open context on error in nfs_flush_multi
  NFS: put open context on error in nfs_pagein_multi
  NFSv4: Fix open(O_TRUNC) and ftruncate() error handling
  NFSv4: Ensure that we check lock exclusive/shared type against open modes
  NFSv4: Ensure that the LOCK code sets exception->inode
  NFS: check for req==NULL in nfs_try_to_update_request cleanup
  SUNRPC: register PipeFS file system after pernet sybsystem

12 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 26 Apr 2012 04:29:26 +0000 (21:29 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from H. Peter Anvin.

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x32, siginfo: Provide proper overrides for x32 siginfo_t
  asm-generic: Allow overriding clock_t and add attributes to siginfo_t
  x32: Check __ILP32__ instead of __LP64__ for x32
  x86, acpi: Call acpi_enter_sleep_state via an asmlinkage C function from assembler
  ACPI: Convert wake_sleep_flags to a value instead of function
  x86, apic: APIC code touches invalid MSR on P5 class machines
  i387: ptrace breaks the lazy-fpu-restore logic
  x86/platform: Remove incorrect error message in x86_default_fixup_cpu_id()
  x86, efi: Add dedicated EFI stub entry point
  x86/amd: Remove broken links from comment and kernel message
  x86, microcode: Ensure that module is only loaded on supported AMD CPUs
  x86, microcode: Fix sysfs warning during module unload on unsupported CPUs

12 years agoMerge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86
Linus Torvalds [Thu, 26 Apr 2012 04:28:10 +0000 (21:28 -0700)]
Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86

Pull x86 platform driver fixes from Matthew Garrett:
 "One annoyance fix (make intel_ips stop complaining unnecessarily) and
  one oops fix (unterminated list in dell-laptop).  Both have been in
  -next for a while with no complaints."

* 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86:
  dell-laptop: Terminate quirks list properly
  intel_ips: Hush the i915 symbols message