dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

573 Commits

Author SHA1 Message Date
David S. Miller 344e53f562 [SPARC]: Merge asm-sparc{,64}/a.out.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 22:25:50 -08:00
David S. Miller 9f747d6c47 [SPARC]: Merge asm-sparc{,64}/fb.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 04:18:29 -08:00
David S. Miller 3cfe17fdf1 [SPARC]: Merge asm-sparc{,64}/errno.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 04:18:23 -08:00
David S. Miller f11fa82708 [SPARC]: Merge asm-sparc{,64}/emergency-restart.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 04:18:14 -08:00
David S. Miller 4b9b77916f [SPARC]: Merge asm-sparc{,64}/div64.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 04:18:08 -08:00
David S. Miller 04c3ddf965 [SPARC]: Merge asm-sparc{,64}/device.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 04:18:02 -08:00
David S. Miller ba89f59ab8 [SPARC]: Merge asm-sparc{,64}/current.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 04:17:54 -08:00
David S. Miller cec6dc5d73 [SPARC]: Merge asm-sparc{,64}/cputime.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 04:17:47 -08:00
David S. Miller d113fcd9cf [SPARC]: Merge asm-sparc{,64}/cache.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 04:17:37 -08:00
David S. Miller f610bbc6ac [SPARC]: Merge asm-sparc{,64}/byteorder.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 04:17:28 -08:00
David S. Miller 145dea0098 [SPARC]: Merge asm-sparc{,64}/bugs.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 04:00:37 -08:00
David S. Miller e10195c232 [SPARC]: Merge asm-sparc{,64}/bug.h
Note that because of minimum compiler version enforcement in
linux/compiler.h these days the check for sparc32 buggy
__builtin_trap() can be safely removed.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 04:00:32 -08:00
David S. Miller c79ca3f841 [SPARC]: Kill BSD errno translation table and header files.
Completely unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 04:00:22 -08:00
David S. Miller ff99b923e6 [SPARC]: Merge asm-sparc{,64}/bpp.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 04:00:12 -08:00
David S. Miller 9ab8273606 [SPARC]: Merge include/asm-sparc{,64}/auxvec.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 04:00:03 -08:00
David S. Miller 75b2a0254d [SPARC]: Merge include/asm-sparc{,64}/of_device.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 03:58:32 -08:00
David S. Miller 97b4872c8d [SPARC]: Merge include/asm-sparc{,64}/prom.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 03:56:20 -08:00
Stephen Rothwell 7b98ac24ef [SPARC]: Remove of_platform_device_create
There are no callers of this on the Sparc platforms.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 03:49:58 -08:00
David S. Miller d38f122066 [SPARC64]: Add kretprobe support.
Passes the smoke tests at least, powerpc implementation was used
as a guide.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 03:42:22 -08:00
David S. Miller 13fa14e185 [SPARC64]: Add SG merging support back into IOMMU code.
Mimicks almost perfectly the powerpc IOMMU code, except that it
doesn't have the IOMMU_PAGE_SIZE != PAGE_SIZE handling, and it also
lacks the device dma mask support bits.

I'll add that later as time permits, but this gets us at least back to
where we were beforehand.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 03:15:36 -08:00
David S. Miller d284142cba [SPARC64]: IOMMU allocations using iommu-helper layer.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 03:15:04 -08:00
Linus Torvalds f3aafa6c25 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Make use of the new fs/compat_binfmt_elf.c
  [SPARC64]: Make use of compat_sys_ptrace()

Manually fixed trivial delete/modift conflict in arch/sparc64/kernel/binfmt_elf32.c
2008-02-08 09:29:39 -08:00
Martin Schwidefsky 2f569afd9c CONFIG_HIGHPTE vs. sub-page page tables.
Background: I've implemented 1K/2K page tables for s390.  These sub-page
page tables are required to properly support the s390 virtualization
instruction with KVM.  The SIE instruction requires that the page tables
have 256 page table entries (pte) followed by 256 page status table entries
(pgste).  The pgstes are only required if the process is using the SIE
instruction.  The pgstes are updated by the hardware and by the hypervisor
for a number of reasons, one of them is dirty and reference bit tracking.
To avoid wasting memory the standard pte table allocation should return
1K/2K (31/64 bit) and 2K/4K if the process is using SIE.

Problem: Page size on s390 is 4K, page table size is 1K or 2K.  That means
the s390 version for pte_alloc_one cannot return a pointer to a struct
page.  Trouble is that with the CONFIG_HIGHPTE feature on x86 pte_alloc_one
cannot return a pointer to a pte either, since that would require more than
32 bit for the return value of pte_alloc_one (and the pte * would not be
accessible since its not kmapped).

Solution: The only solution I found to this dilemma is a new typedef: a
pgtable_t.  For s390 pgtable_t will be a (pte *) - to be introduced with a
later patch.  For everybody else it will be a (struct page *).  The
additional problem with the initialization of the ptl lock and the
NR_PAGETABLE accounting is solved with a constructor pgtable_page_ctor and
a destructor pgtable_page_dtor.  The page table allocation and free
functions need to call these two whenever a page table page is allocated or
freed.  pmd_populate will get a pgtable_t instead of a struct page pointer.
 To get the pgtable_t back from a pmd entry that has been installed with
pmd_populate a new function pmd_pgtable is added.  It replaces the pmd_page
call in free_pte_range and apply_to_pte_range.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 09:22:42 -08:00
Mike Frysinger 531d7d4256 asm-*/posix_types.h: scrub __GLIBC__
Some arches (like alpha and ia64) already have a clean posix_types.h header.
This brings all the others in line by removing all references to __GLIBC__
(and some undocumented __USE_ALL).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 09:22:34 -08:00
David Howells 1eb1141123 aout: remove unnecessary inclusions of {asm, linux}/a.out.h
Remove now unnecessary inclusions of {asm,linux}/a.out.h.

[akpm@linux-foundation.org: fix alpha build]
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 09:22:30 -08:00
David Howells 7fa3031500 aout: suppress A.OUT library support if !CONFIG_ARCH_SUPPORTS_AOUT
Suppress A.OUT library support if CONFIG_ARCH_SUPPORTS_AOUT is not set.

Not all architectures support the A.OUT binfmt, so the ELF binfmt should not
be permitted to go looking for A.OUT libraries to load in such a case.  Not
only that, but under such conditions A.OUT core dumps are not produced either.

To make this work, this patch also does the following:

 (1) Makes the existence of the contents of linux/a.out.h contingent on
     CONFIG_ARCH_SUPPORTS_AOUT.

 (2) Renames dump_thread() to aout_dump_thread() as it's only called by A.OUT
     core dumping code.

 (3) Moves aout_dump_thread() into asm/a.out-core.h and makes it inline.  This
     is then included only where needed.  This means that this bit of arch
     code will be stored in the appropriate A.OUT binfmt module rather than
     the core kernel.

 (4) Drops A.OUT support for Blackfin (according to Mike Frysinger it's not
     needed) and FRV.

This patch depends on the previous patch to move STACK_TOP[_MAX] out of
asm/a.out.h and into asm/processor.h as they're required whether or not A.OUT
format is available.

[jdike@addtoit.com: uml: re-remove accidentally restored code]
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 09:22:30 -08:00
David Howells 922a70d327 aout: move STACK_TOP[_MAX] to asm/processor.h
Move STACK_TOP[_MAX] out of asm/a.out.h and into asm/processor.h as they're
required whether or not A.OUT format is available.

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08 09:22:29 -08:00
David S. Miller 48c946a482 [SPARC64]: Make use of the new fs/compat_binfmt_elf.c
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-08 00:08:10 -08:00
David S. Miller 2ba85f3a58 [SPARC64]: Make use of compat_sys_ptrace()
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-07 22:46:09 -08:00
Linus Torvalds 0afc2edfad Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC32]: Use regsets in arch_ptrace().
  [SPARC64]: Use regsets in arch_ptrace().
  [SPARC32]: Use regsets for ELF core dumping.
  [SPARC64]: Use regsets for ELF core dumping.
  [SPARC64]: Remove unintentional ptrace debugging messages.
  [SPARC]: Move over to arch_ptrace().
  [SPARC]: Remove PTRACE_SUN* handling.
  [SPARC]: Kill DEBUG_PTRACE code.
  [SPARC32]: Add user regset support.
  [SPARC64]: Add user regsets.
  [SPARC64]: Fix booting on non-zero cpu.
2008-02-07 10:21:26 -08:00
Mathieu Desnoyers 80af4eeb72 Add cmpxchg_local to sparc64
Use cmpxchg_u32 and cmpxchg_u64 for cmpxchg_local and cmpxchg64_local. For other
type sizes, use the new generic cmpxchg_local (disables interrupt).

Change:
Since the header depends on local_irqsave/local_irqrestore, it must be
included after their declaration.

Actually, being below the
#include <linux/irqflags.h> should be enough, and on sparc64 it is
included at the beginning of system.h.

So it makes sense to move it up for sparc64.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07 08:42:33 -08:00
Kirill A. Shutemov 516c25a86f Cleanup asm/{elf,page,user}.h: #ifdef __KERNEL__ is no longer needed
asm/elf.h, asm/page.h and asm/user.h don't export to userspace now, so we can
drop #ifdef __KERNEL__ for them.

[k.shutemov@gmail.com: remove #ifdef __KERNEL_]
Signed-off-by: Kirill A. Shutemov <k.shutemov@gmail.com>
Reviewed-by: David Woodhouse <dwmw2@infradead.org>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Kirill A. Shutemov <k.shutemov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-07 08:42:30 -08:00
David S. Miller 3389742f3c [SPARC64]: Use regsets for ELF core dumping.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-07 04:19:34 -08:00
David S. Miller 9775369ec0 [SPARC]: Move over to arch_ptrace().
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-07 03:00:17 -08:00
David S. Miller 190aa9f60f [SPARC]: Remove PTRACE_SUN* handling.
Supporting SunOS ptrace() is pretty pointless and these
kinds of quirks keep us from being able to share more
code with other platforms.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-07 02:59:22 -08:00
Linus Torvalds e33f6635da Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Temporarily remove IOMMU merging code.
  [SPARC64]: Update defconfig.
  [SPARC]: Add new timerfd syscall entries.
2008-02-06 10:46:58 -08:00
Andrew Morton 941e492bdb read_current_timer() cleanups
- All implementations can be __devinit

- The function prototypes were in asm/timex.h but they all must be the same,
  so create a single declaration in linux/timex.h.

- uninline the sparc64 version to match the other architectures

- Don't bother #defining ARCH_HAS_READ_CURRENT_TIMER to a particular value.

[ezk@cs.sunysb.edu: fix build]
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06 10:41:02 -08:00
David S. Miller 38192d52f1 [SPARC64]: Temporarily remove IOMMU merging code.
Changeset fde6a3c82d ("iommu sg merging:
sparc64: make iommu respect the segment size limits") broke sparc64
because whilst it added the segment limiting code to the first pass of
SG mapping (in prepare_sg()) it did not add matching code to the
second pass handling (in fill_sg())

As a result the two passes disagree where the segment boundaries
should be, resulting in OOPSes, DMA corruption, and corrupted
superblocks.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-06 04:12:25 -08:00
David S. Miller 3db1d97a81 [SPARC]: Add new timerfd syscall entries.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-06 04:12:23 -08:00
Benjamin Herrenschmidt 5e5419734c add mm argument to pte/pmd/pud/pgd_free
(with Martin Schwidefsky <schwidefsky@de.ibm.com>)

The pgd/pud/pmd/pte page table allocation functions get a mm_struct pointer as
first argument.  The free functions do not get the mm_struct argument.  This
is 1) asymmetrical and 2) to do mm related page table allocations the mm
argument is needed on the free function as well.

[kamalesh@linux.vnet.ibm.com: i386 fix]
[akpm@linux-foundation.org: coding-syle fixes]
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:18 -08:00
Marcin Ślusarz 8b3de0df4e asm-*/compat.h: fix typo in comment
Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 16:32:51 +02:00
Laszlo Attila Toth 4a19ec5800 [NET]: Introducing socket mark socket option.
A userspace program may wish to set the mark for each packets its send
without using the netfilter MARK target. Changing the mark can be used
for mark based routing without netfilter or for packet filtering.

It requires CAP_NET_ADMIN capability.

Signed-off-by: Laszlo Attila Toth <panther@balabit.hu>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-31 19:27:19 -08:00
travis@sgi.com 3afc620229 SPARC64: use generic percpu
Sparc64 has a way of providing the base address for the per cpu area of the
currently executing processor in a global register.

Sparc64 also provides a way to calculate the address of a per cpu area
from a base address instead of performing an array lookup.

Cc: David Miller <davem@davemloft.net>
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-01-30 23:27:58 +01:00
Ingo Molnar 5398f9854f x86: remove flush_agp_mappings()
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-30 13:34:07 +01:00
travis@sgi.com 5280e004fc percpu: move arch XX_PER_CPU_XX definitions into linux/percpu.h
- Special consideration for IA64: Add the ability to specify
  arch specific per cpu flags

- remove .data.percpu attribute from DEFINE_PER_CPU for non-smp case.

The arch definitions are all the same. So move them into linux/percpu.h.

We cannot move DECLARE_PER_CPU since some include files just include
asm/percpu.h to avoid include recursion problems.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-01-30 13:32:52 +01:00
David S. Miller bcea1db16b [SPARC64]: Implement pci_resource_to_user()
This makes libpciaccess able to mmap() resources of the
device properly.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-12-26 19:33:46 -08:00
David S. Miller 36bb61346d [SPARC64]: Fix OOPS in dma_sync_*_for_device()
I included these operations vector cases for situations
where we never need to do anything, the entries aren't
filled in by any implementation, so we OOPS trying to
invoke NULL pointer functions.

Really make them NOPs, to fix the bug.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-12-20 01:29:45 -08:00
David S. Miller 8f361453d8 [SPARC64]: Fix two kernel linear mapping setup bugs.
This was caught and identified by Greg Onufer.

Since we setup the 256M/4M bitmap table after taking over the trap
table, it's possible for some 4M mapping to get loaded in the TLB
beforhand which later will be 256M mappings.

This can cause illegal TLB multiple-match conditions.  Fix this by
setting up the bitmap before we take over the trap table.

Next, __flush_tlb_all() was not doing anything on hypervisor
platforms.  Fix by adding sun4v_mmu_demap_all() and calling it.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-12-13 06:13:38 -08:00
Robert P. J. Day 6f78a19702 [SPARC64]: Use "is_power_of_2" macro for simplicity.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-07 02:24:33 -08:00
David S. Miller 52eb053b71 [SPARC64]: Fix linkage of enormous kernels.
This was found by make randconfig

If the kernel .text is very large, the .fixup section branches
are too far away to be relocated correctly.

Use "sethi %hi(label), reg; jmpl reg + %lo(label); %g0" sequence
instead of the branch to fix this.

There is another case in switch_to() involving a branch, which
is fixed similarly.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-31 15:30:56 -07:00