Commit Graph

57492 Commits

Author SHA1 Message Date
Paul Mundt
dd9505879c fs: hugetlbfs: Disable for shnommu.
SH can turn CONFIG_MMU on and off, don't let us get to a state
where hugetlbfs/hugetlbpage gets built when building for nommu.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-11 15:35:34 +09:00
Paul Mundt
9f9a5de466 sh: Fixup misaligned data for sh2 lockdep.
lockdep/irqflags tracing on SH-2 ends up with a misaligned
branch, fix it.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-11 15:33:44 +09:00
Paul Mundt
357d59469c sh: Tidy up dependencies for SH-2 build.
SH-2 can presently get in to some pretty bogus states, so
we tidy up the dependencies a bit and get it all building
again.

This gets us a bit closer to a functional allyesconfig
and allmodconfig, though there are still a few things to
fix up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-11 15:32:07 +09:00
Yoshihiro Shimoda
54039591ce sh: Provide a defconfig for R7780MP.
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-11 10:26:56 +09:00
Paul Mundt
14bea95b84 sh: Compile fix for SH7604 removal.
There was a last remaining reference to CPU_SH7604 that broke
the build, kill that off too.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-11 10:18:45 +09:00
Robert P. J. Day
711be60522 sh: Warn against direct inclusion of <asm/rwsem.h>.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 11:56:31 +09:00
Paul Mundt
b9601c5e59 sh: Kill off dead SH7604 support.
This was added during 2.5.x, but was never moved along. This
can easily be resurrected if someone has one they wish to work
with, but it's not worth keeping around in its current form.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 11:55:28 +09:00
Paul Mundt
33d63bd83b sh: memory hot-add for sparsemem users support.
This enables simple hotplug support for sparsemem users. Presently
this only permits memory being added in to node 0 on ZONE_NORMAL.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:51 +00:00
Paul Mundt
05a117847b sh: Fix up cpu to node mapping in sysfs.
Currently cpu_to_node() is always 0 in the UP case, though
we do want to have the CPU association linked in under sysfs
even in the cases where we're only on a single CPU.

Fix this up, so we have the cpu0 link on all of the available
nodes that don't already have a CPU link of their own.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:50 +00:00
Paul Mundt
5bbeafca8d sh: Fix the SH7722 flatmem build.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:50 +00:00
Paul Mundt
1300b1b177 sh: Make NUMA depend on sparsemem.
The only platforms that are supporting NUMA are doing so via
sparsemem, so update the dependency.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:49 +00:00
Paul Mundt
520588f47f sh: URAM node support for SH7722.
This adds the URAM block on SH7722 as a separate node.
Sparsemem is required for this, or it can simply be disabled
by explicitly selecting a flatmem model.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:49 +00:00
Paul Mundt
b241cb0c88 sh: Support for multiple nodes.
This adds basic support for multiple nodes on SH machines.
This is primarily useful for boards with many different
memory blocks that are otherwise unused (SH7722/SH7785 URAM
and so forth).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:49 +00:00
Paul Mundt
07cbb41b53 sh: Use asm/sections.h for linker section symbols.
Kill off a bunch of externs, and use sections.h instead..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:48 +00:00
Paul Mundt
2de212ebd8 sh: Fix up max_zone_pfns[] with multiple nodes.
Currently using multiple nodes tramples the ZONE_NORMAL
max low pfn, tidy up the logic a bit to get it all working
as expected.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:48 +00:00
Paul Mundt
cbd2d9d8fc sh: Default to 4-byte alignment for SLUB objects.
Slub currently defaults to 8-byte alignment for the kmalloc
and slab minalign values, where 4 will suffice. In the slab
case BYTES_PER_WORD == 4 already, so defining the minalign
values outright doesn't cause any regressions there either.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:48 +00:00
Paul Mundt
f11b71e657 sh: Wire up mempolicy syscalls.
Wire up mbind and get/set_mempolicy() in their reserved places.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:47 +00:00
Paul Mundt
b66d51cb80 sh: Tidy compiler warnings for SH-2A build.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:46 +00:00
Paul Mundt
6240d92f2f sh: Wrap CPU tuning through cc-option.
Some compilers don't support the explicit CPU tuning, while binutils
is still able to handle the special subtype-specific opcodes. Make
the CFLAG optional, falling back on the compiler default if nothing
better exists.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:46 +00:00
Paul Mundt
fa1ec92e1d sh: Enable IPR-IRQ for SH7206.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:46 +00:00
Paul Mundt
2826fa61c1 sh: Mark sparsemem regions present earlier.
We have to call in to sparse_memory_present_with_active_regions()
earlier in order for sparsemem to be happy. This was being called
too late, and was causing troubles with the platforms that needed
to enable sparsemem.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:45 +00:00
Paul Mundt
d22d9b3a1d sh: Register multiple nodes in topology_init().
If we have multiple nodes, register these at topology_init() time.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:45 +00:00
Paul Mundt
91e656aacf sh: Allow for bootmem debug support.
Handy for debugging bootmem troubles.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:43 +00:00
Paul Mundt
dfbb904280 sh: sparsemem support.
This implements basic sparsemem support for SH. Presently this only
uses static sparsemem, and we still permit explicit selection of
flatmem. Those boards that want sparsemem can select it as usual.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:43 +00:00
Paul Mundt
5900711ad7 sh: pfn_valid() depends on flatmem.
pfn_valid() is already defined in the sparsemem case, so we only
need to define this for CONFIG_FLATMEM.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:42 +00:00
Nobuhiro Iwamatsu
678597be5e sh: Add L-BOX RE2 to mach-types.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:42 +00:00
Takashi YOSHII
3a3c60fc0b sh: Align .machvec.init section on a 4-byte boundary.
.machvec.init can be misaligned with the recent machvec changes,
forcibly align it on the boundary that it expects, as before.

Signed-off-by: Takashi YOSHII <takashi.yoshii.ze@hitachi.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:41 +00:00
Paul Mundt
05627486ab sh: Fix SH-4 CPU selects.
Now that select no longer works for selecting the "closest" CPU,
we have to explicitly reference the precise sub-type in the few
places where it actually matters (presently only setup code and
some legacy sh-sci cruft).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:40 +00:00
Paul Mundt
fd8f20e8e2 sh: Rip out special unknown machvec.
This kills off the BareCPU board as a "special" machvec, rather,
we leave this as a default for when no other vector is available,
or when we want to use it in combination with other vectors for
testing with generic ops. As sh_mv is copied out anyways (or
overloaded when an alternate vector is explicitly selected), this
doesn't consume any additional memory.

The generic machvec can be forcibly selected with sh_mv=generic,
or by not having any other boards enabled.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:40 +00:00
Paul Mundt
82f81f4784 sh: Kill off machvec aliases.
We now throw all of the machvecs in to .machvec.init and either
select one on the command line, or copy out the first (and
usually only) one to sh_mv. The rest are freed as usual.

This gets rid of all of the silly sh_mv aliasing and makes the
selection explicit rather than link-order dependent.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:39 +00:00
Paul Mundt
25f8151bdc sh: Get multiple boards in one image working again.
This tidies up the build rules and permits multiple boards to be
linked in to the same kernel. The earlier Kconfig work ensures that
the CPU configuration is consistent across the boards, as this is
the only thing that we can't do dynamically.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:39 +00:00
Paul Mundt
ba36197cf4 sh: Fixup cmdline handling from machvec changes.
The command line wasn't being saved off properly after the machvec
changes went in, fix it up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:38 +00:00
Paul Mundt
f3d2229852 sh: Rework CPU/board dependencies.
This was a big mess, rework the logic a bit so that we constrain
to a particular subtype and figure out the board support based
on that. This makes building subtype specific kernels supporting
multiple boards possible again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:38 +00:00
Paul Mundt
882c12c4e1 sh: Shut up SH2-DSP compile warnings.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:37 +00:00
Paul Mundt
9655ad03af sh: Fixup machvec support.
This fixes up much of the machvec handling, allowing for it to be
overloaded on boot. Making practical use of this still requires
some Kconfig munging, however.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:37 +00:00
Paul Mundt
e08f457c7c sh: __user annotations for __get/__put_user().
This adds in some more __user annotations. These weren't being
handled properly in some of the __get_user and __put_user paths,
so tidy those up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:36 +00:00
Paul Mundt
7a302a9674 sh: Split out CPU topology initialization.
Split out the CPU topology initialization to a separate file,
and switch it to a percpu type, rather than an NR_CPUS array.

At the same time, switch to only registering present CPUs,
rather than using the possible CPU map.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-08 02:43:35 +00:00
Bryan Wu
85f6038f21 RAMFS NOMMU: missed POSIX UID/GID inode attribute checking
This bug was caught by LTP testcase fchmod06 on Blackfin platform.

In the manpage of fchmod, "EPERM: The effective UID does not match the
owner of the file, and the process is not privileged (Linux: it does not
have the CAP_FOWNER capability)."

But the ramfs nommu code missed the inode_change_ok POSIX UID/GID
verification. This patch fixed this.

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-07 17:11:13 -07:00
Linus Torvalds
c8d8170feb Merge git://git.linux-xtensa.org/kernel/xtensa-feed
* git://git.linux-xtensa.org/kernel/xtensa-feed:
  Xtensa: use asm-generic/fcntl.h
  [XTENSA] Remove non-rt signal handling
  [XTENSA] Move common sections into bss sections
  [XTENSA] clean-up header files
  [XTENSA] Use generic 64-bit division
  [XTENSA] Remove multi-exported symbols from xtensa_ksyms.c
  [XTENSA] fix sources using deprecated assembler directive
  [XTENSA] Spelling fixes in arch/xtensa
  [XTENSA] fix bit operations in bitops.h
2007-06-07 17:10:19 -07:00
Linus Torvalds
34750bb156 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Fix SBUS IRQ regression caused by PCI-E driver.
  [SPARC64]: Fix 2 bugs in PCI Sabre bus scanning.
2007-06-07 17:09:01 -07:00
Linus Torvalds
df3872a966 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (24 commits)
  xfrm: Add security check before flushing SAD/SPD
  [NET_SCHED]: Fix filter double free
  [NET]: Avoid duplicate netlink notification when changing link state
  [UDP]: Revert 2-pass hashing changes.
  [AF_UNIX]: Fix stream recvmsg() race.
  [NETFILTER]: nf_conntrack_amanda: fix textsearch_prepare() error check
  [NETFILTER]: ip_tables: fix compat related crash
  [NETFILTER]: nf_conntrack: fix helper module unload races
  [RTNETLINK]: ifindex 0 does not exist
  [NETLINK]: Mark netlink policies const
  [TCP] tcp_probe: Attach printf attribute properly to printl().
  [TCP]: Use LIMIT_NETDEBUG in tcp_retransmit_timer().
  [NET]: Merge dst_discard_in and dst_discard_out.
  [RFKILL]: Make rfkill->name const
  [IPV4]: Restore old behaviour of default config values
  [IPV4]: Add default config support after inetdev_init
  [IPV4]: Convert IPv4 devconf to an array
  [IPV4]: Only panic if inetdev_init fails for loopback
  [TCP]: Honour sk_bound_dev_if in tcp_v4_send_ack
  [BNX2]: Update version and reldate.
  ...
2007-06-07 17:08:06 -07:00
Steven Rostedt
e5e3c84b70 enable interrupts in user path of page fault.
This is a minor fix, but what is currently there is essentially wrong.
In do_page_fault, if the faulting address from user code happens to be
in kernel address space (int *p = (int*)-1; p = 0xbed;)  then the
do_page_fault handler will jump over the local_irq_enable with the

  goto bad_area_nosemaphore;

But the first line there sees this is user code and goes through the
process of sending a signal to send SIGSEGV to the user task. This whole
time interrupts are disabled and the task can not be preempted by a
higher priority task.

This patch always enables interrupts in the user path of the
bad_area_nosemaphore.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-07 17:05:03 -07:00
Linus Torvalds
c52ecdab06 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] pxa: fix pxa27x keyboard driver
  [ARM] Fix 4417/1: Serial: Fix AMBA drivers locking
  [ARM] 4421/1: AT91: Value of _KEY fields.
  [ARM] Solve buggy smp_processor_id() usage
  [ARM] 4422/1: Fix default value handling in gpio_direction_output (PXA)
  [ARM] 4419/1: AT91: SAM9 USB clocks check for suspending
  [ARM] 4418/1: AT91: Number of programmable clocks differs
  [ARM] 4392/2: Do not corrupt the SP register in compressed/head.S
2007-06-07 17:02:29 -07:00
Linus Torvalds
dc31501131 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Fix warning by moving do_default_vi into CONFIG_CPU_MIPSR2_SRS
  [MIPS] Fix some minor typoes in arch/mips/Kconfig.
  [MIPS] Remove prototype for deleted function qemu_handle_int
  [MIPS] Fix some system calls with long long arguments
  [MIPS] Make dma_map_sg handle sg elements which are longer than one page
  [MIPS] Drop __ARCH_WANT_SYS_FADVISE64
  [MIPS] Fix VGA corruption on RM300C
  [MIPS] RM300: Fix MMIO problems by marking the PCI INT ACK region busy
  [MIPS] EMMA2RH: remove dead KGDB code
  [MIPS] Remove duplicate fpu enable hazard code.
  [MIPS] Atlas, Malta, SEAD: Remove scroll from interrupt handler.
2007-06-07 17:00:37 -07:00
Peter Zijlstra
2c750edd39 frv: build fix
In file included from /usr/src/linux-2.6-2/net/ipv4/ip_input.c:118:

  include2/asm/system.h:245: error: parse error before "__cmpxchg_32"
  include2/asm/system.h:245: error: parse error before '*' token
  include2/asm/system.h:245: warning: type defaults to `int' in declaration of `__cmpxchg_32'
  include2/asm/system.h:245: warning: function declaration isn't a prototype
  include2/asm/system.h:245: warning: data definition has no type or storage class

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-07 17:00:25 -07:00
David S. Miller
ec4d18f219 [SPARC64]: Fix SBUS IRQ regression caused by PCI-E driver.
We used to access the 64-bit IRQ IMAP and ICLR registers of bus
controllers 4-bytes in and as a 32-bit register word, since only the
low 32-bits were relevant.  This seemed like a good idea at the time.

But the PCI-E controller requires full 8-byte 64-bit access to
these registers, so we switched over to accessing them fully.

SBUS was not adjusted properly, which broke interrupts completely.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-07 16:59:51 -07:00
David S. Miller
321566c250 [SPARC64]: Fix 2 bugs in PCI Sabre bus scanning.
If we are on hummingbird, bus runs at 66MHZ.

pbm->pci_bus should be setup with the result of pci_scan_one_pbm()
or else we deref NULL pointers in the error interrupt handlers.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-07 16:59:46 -07:00
Joy Latten
4aa2e62c45 xfrm: Add security check before flushing SAD/SPD
Currently we check for permission before deleting entries from SAD and
SPD, (see security_xfrm_policy_delete() security_xfrm_state_delete())
However we are not checking for authorization when flushing the SPD and
the SAD completely. It was perhaps missed in the original security hooks
patch.

This patch adds a security check when flushing entries from the SAD and
SPD.  It runs the entire database and checks each entry for a denial.
If the process attempting the flush is unable to remove all of the
entries a denial is logged the the flush function returns an error
without removing anything.

This is particularly useful when a process may need to create or delete
its own xfrm entries used for things like labeled networking but that
same process should not be able to delete other entries or flush the
entire database.

Signed-off-by: Joy Latten<latten@austin.ibm.com>
Signed-off-by: Eric Paris <eparis@parisplace.org>
Signed-off-by: James Morris <jmorris@namei.org>
2007-06-07 13:42:46 -07:00
Patrick McHardy
b00b4bf94e [NET_SCHED]: Fix filter double free
cbq and atm destroy their filters twice when destroying inner classes
during qdisc destruction.

Reported-and-tested-by: Strobl Anton <a.strobl@aws-it.at>

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-07 13:41:05 -07:00
Thomas Graf
7c355f532d [NET]: Avoid duplicate netlink notification when changing link state
When changing the link state from userspace not affecting any other
flags. Two duplicate notification are being sent, once as action
in the NETDEV_UP/NETDEV_DOWN notification chain and a second time
when comparing old and new device flags after the change has been
completed. Although harmless, the duplicates should be avoided.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-07 13:40:56 -07:00