Commit graph

67692 commits

Author SHA1 Message Date
David S. Miller fd2b79b7bf sparc32: Kill unused defines from asm/head_32.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11 21:43:11 -07:00
David S. Miller 0301a6cbcc sparc32: Remove some more sun4c code from floppy glue.
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11 21:39:48 -07:00
David S. Miller 4c84d26c9a sparc32: Remove sun4c tlb/vac insn patching from entry.S
No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11 21:35:36 -07:00
David S. Miller db41cf2df6 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>
2012-05-11 21:31:49 -07:00
David S. Miller 2a4b69c482 sparc32: Remove sun4{,c} control reg definitions from contregs.h.
No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11 21:29:17 -07:00
David S. Miller c1e3cb54f2 sparc32: Remove sparc_lvl15_nmi().
No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11 21:27:04 -07:00
David S. Miller 96061a91a1 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>
2012-05-11 21:23:05 -07:00
David S. Miller 716a5d73a7 sparc32: Kill asm/vac-ops.h
All sun4/sun4c stuff and unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11 21:07:50 -07:00
David S. Miller 6b7679dd65 sparc32: Stop warning about sun4/sun4c in SMP Kconfig option.
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11 21:01:47 -07:00
David S. Miller 288e58cd03 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>
2012-05-11 20:59:57 -07:00
David S. Miller 59a0c3d91e sparc32: Put back SPARC_BRANCH.
It's needed for the floppy interrupt trap table patching.

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11 20:57:29 -07:00
David S. Miller 4419f11b45 sparc32: Kill SUN4C_LOCK_{VADDR,END} and associated comment.
No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11 20:51:51 -07:00
David S. Miller 58fa4dcbc4 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>
2012-05-11 20:45:18 -07:00
David S. Miller 8695c37d06 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>
2012-05-11 20:33:22 -07:00
David S. Miller b55e81b9f8 sparc32: Remove inline strncmp "optimization" for constant counts.
Let the compiler do stuff like this.

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11 19:53:29 -07:00
Sam Ravnborg afaedde7c9 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>
2012-05-11 19:29:10 -07:00
Sam Ravnborg e7b7e0c356 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>
2012-05-11 19:29:09 -07:00
Sam Ravnborg 323206a1d5 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>
2012-05-11 19:29:00 -07:00
Sam Ravnborg 3c23a7665b 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>
2012-05-11 19:27:53 -07:00
Sam Ravnborg ef136bc91e 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>
2012-05-11 19:27:52 -07:00
Sam Ravnborg e098ff92f6 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>
2012-05-11 19:27:51 -07:00
Sam Ravnborg 054768a132 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>
2012-05-11 19:27:50 -07:00
Sam Ravnborg 28de2f7339 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>
2012-05-11 19:27:50 -07:00
Sam Ravnborg 1ee0e14407 sparc32: delete pgtsun4c.h
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11 19:27:49 -07:00
Sam Ravnborg 582a0baee5 sparc32: remove all uses of ARCH_SUN4C
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11 19:27:48 -07:00
Sam Ravnborg 593fc6ea47 sparc32: drop sun4c specific ___xchg32 implementation
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-11 19:27:47 -07:00
Sam Ravnborg 306f123162 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>
2012-05-11 19:27:46 -07:00
Sam Ravnborg e7eaf5b8ab 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>
2012-05-11 19:27:45 -07:00
Sam Ravnborg 2c1cfb2db6 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>
2012-05-11 19:27:44 -07:00
Paul Gortmaker aa6f079075 sparc: fix build fail in mm/init_64.c when NEED_MULTIPLE_NODES is off
Commit 625d693e97 (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>
2012-05-09 19:58:07 -07:00
David S. Miller 799d40cc10 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>
2012-04-27 10:55:08 -07:00
David S. Miller 5ed56f1ad9 sparc64: Use node local allocations for IRQ stacks.
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-26 20:50:34 -07:00
David S. Miller 625d693e97 sparc64: Convert over to NO_BOOTMEM.
With help from Sam Ravnborg.

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-26 20:02:23 -07:00
David S. Miller 8fe5f56c8a Merge git://git.kernel.org/pub/scm/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>
2012-04-26 20:00:35 -07:00
Linus Torvalds 82b7690635 Merge branch 'stable' of git://git.kernel.org/pub/scm/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
2012-04-26 15:36:27 -07:00
Linus Torvalds 110a5c8b38 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
2012-04-26 15:24:45 -07:00
Linus Torvalds 86ec090e58 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/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
2012-04-25 21:29:26 -07:00
Vasiliy Kulikov db7b122cf5 arch/arm/mach-ux500/mbox-db5500.c: world-writable sysfs fifo file
Don't allow everybody to use a modem.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-25 21:26:34 -07:00
Chris Metcalf 05ef1b79d4 arch/tile: fix a couple of functions that should be __init
They were marked __devinit by mistake, causing some warnings at link time.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2012-04-25 12:45:26 -04:00
Linus Torvalds ce1ee9f5b9 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel
Pull Hexagon fixes from Richard Kuo:
 "It's mostly compile fixes and the Hexagon portion of a CPU hotplug
  patch set."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel:
  hexagon: add missing cpu.h include
  hexagon/CPU hotplug: Add missing call to notify_cpu_starting()
  hexagon:  use renamed tick_nohz_idle_* functions
  Hexagon: misc compile warning/error cleanup due to missing headers
2012-04-23 19:50:48 -07:00
H. Peter Anvin 89b8835ec8 x32, siginfo: Provide proper overrides for x32 siginfo_t
Provide the proper override macros for x32 siginfo_t.  The combination
of a special type here and an overall alignment constraint actually
ends up with all the types being properly aligned, but the hack is
needed to keep the substructures inside siginfo_t from adding padding.

Note: use __attribute__((aligned())) since __aligned() is not exported
to user space.

[ v2: fix stray semicolon ]

Reported-by: H.J. Lu <hjl.rools@gmail.com>
Cc: Bruce J. Beare <bruce.j.beare@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: http://lkml.kernel.org/r/CAMe9rOqF6Kh6-NK7oP0Fpzkd4SBAWU%2BG53hwBbSD4iA2UzyxuA@mail.gmail.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2012-04-23 18:11:40 -07:00
H.J. Lu 98e5272fe7 x32: Check __ILP32__ instead of __LP64__ for x32
Check __LP64__ isn't a reliable way to tell if we are compiling for x32
since __LP64__ isnn't specified by x86-64 psABI.  Not all x86-64
compilers define __LP64__, which was added to GCC 3.3. The updated x32
psABI:

https://sites.google.com/site/x32abi/documents

definse _ILP32 and __ILP32__ for x32.  GCC trunk and 4.7 branch have
been updated to define _ILP32 and __ILP32__ for x32.  This patch
replaces __LP64__ check with __ILP32__.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2012-04-23 14:51:14 -07:00
Konrad Rzeszutek Wilk cd74257b97 x86, acpi: Call acpi_enter_sleep_state via an asmlinkage C function from assembler
With commit a2ef5c4fd4
"ACPI: Move module parameter gts and bfs to sleep.c" the
wake_sleep_flags is required when calling acpi_enter_sleep_state.

The assembler code in wakeup_*.S did not do that. One solution
is to call it from assembler and stick the wake_sleep_flags on
the stack (for 32-bit) or in %esi (for 64-bit). hpa and rafael
both suggested however to create a wrapper function to call
acpi_enter_sleep_state and call said wrapper function
("acpi_enter_s3") from assembler.

For 32-bit, the acpi_enter_s3 ends up looking as so:

  push   %ebp
  mov    %esp,%ebp
  sub    $0x8,%esp
  movzbl 0xc1809314,%eax [wake_sleep_flags]
  movl   $0x3,(%esp)
  mov    %eax,0x4(%esp)
  call   0xc12d1fa0 <acpi_enter_sleep_state>
  leave
  ret

And 64-bit:

  movzbl 0x9afde1(%rip),%esi        [wake_sleep_flags]
  push   %rbp
  mov    $0x3,%edi
  mov    %rsp,%rbp
  callq  0xffffffff812e9800 <acpi_enter_sleep_state>
  leaveq
  retq

Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Suggested-by: H. Peter Anvin <hpa@zytor.com>
[v2: Remove extra assembler operations, per hpa review]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Link: http://lkml.kernel.org/r/1335150198-21899-3-git-send-email-konrad.wilk@oracle.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2012-04-23 13:29:18 -07:00
Konrad Rzeszutek Wilk 2a14e541ed ACPI: Convert wake_sleep_flags to a value instead of function
With commit a2ef5c4fd4
"ACPI: Move module parameter gts and bfs to sleep.c" the wake_sleep_flags
is required when calling acpi_enter_sleep_state, which means
that if there are functions outside the sleep.c code they
can't get the wake_sleep_flags values.

This converts the function in to a exported value and converts
the module config operands to a function.

Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Lin Ming <ming.m.lin@intel.com>
[v2: Parameters can be turned on/off dynamically]
[v3: unsigned char -> u8]
[v4: val -> kp->arg]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Link: http://lkml.kernel.org/r/1335150198-21899-2-git-send-email-konrad.wilk@oracle.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2012-04-23 13:29:07 -07:00
Richard Kuo e00574b7f3 hexagon: add missing cpu.h include
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2012-04-23 12:57:24 -05:00
Srivatsa S. Bhat 57f27cca7a hexagon/CPU hotplug: Add missing call to notify_cpu_starting()
The scheduler depends on receiving the CPU_STARTING notification, without
which we end up into a lot of trouble. So add the missing call to
notify_cpu_starting() in the bringup code.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2012-04-23 12:57:11 -05:00
Richard Kuo e8e42a5cff hexagon: use renamed tick_nohz_idle_* functions
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2012-04-23 12:56:57 -05:00
Richard Kuo 6bbbc30ce6 Hexagon: misc compile warning/error cleanup due to missing headers
Fixed warnings/errors for EXPORT_SYMBOL, linux_binprm, elf related
defines

Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2012-04-23 12:56:41 -05:00
Linus Torvalds e895bd7992 Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King:
 "Here's my usual Sunday push, just for one revert which PeterZ hollered
  about after last weeks push.  Other than that, all seems strangely
  quiet as far as fixes go in non-platform ARM land at the moment."

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
  Revert "ARM: 7359/2: smp_twd: Only wait for reprogramming on active cpus"
2012-04-22 21:19:15 -07:00
Linus Torvalds 205b9c9c6e Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc fixes from Benjamin Herrenschmidt:
 "Here are a few fixes for powerpc.  Note the addition to the generic
  irq.h.  This is part of a 3-patches regression fix for mpic due to
  changes in how IRQ_TYPE_NONE is being handled.  Thomas agreed to the
  addition of the new IRQ_TYPE_DEFAULT contant, however he hasn't
  replied with an Ack to the actual patch yet.  I don't to wait much
  longer with these patches tho."

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/mpic: Properly set default triggers
  irq: Add IRQ_TYPE_DEFAULT for use by PIC drivers
  powerpc/mpic: Fix confusion between hw_irq and virq
  powerpc/pmac: Don't add_timer() twice
  powerpc/eeh: Fix crash caused by null eeh_dev
  powerpc/mpc85xx: add MPIC message dts node
  powerpc/mpic_msgr: fix offset error when setting mer register
  powerpc/mpic_msgr: add lock for MPIC message global variable
  powerpc/mpic_msgr: fix compile error when SMP disabled
  powerpc: fix build when CONFIG_BOOKE_WDT is enabled
  powerpc/85xx: don't call of_platform_bus_probe() twice
2012-04-22 21:07:51 -07:00