]> err.no Git - linux-2.6/log
linux-2.6
18 years ago[MIPS] The o32 fstatat syscall behaves differently on 32 and 64 bit kernels
Richard Sandiford [Sun, 17 Sep 2006 19:30:46 +0000 (20:30 +0100)]
[MIPS] The o32 fstatat syscall behaves differently on 32 and 64 bit kernels

While working on a glibc patch to support the fstatat() functions[1],
I noticed that the o32 implementation behaves differently on 32-bit and
64-bit kernels; the former provides a stat64 while the latter provides
a plain (o32) stat.  I think the former is what's intended, as there is
no separate fstatat64.  It's also what x86 does.

I think this is just a case of a compat too far.

[1] I've seen Khem's patch, but I don't think it's right.

Signed-off-by: Richard Sandiford <richard@codesourcery.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Remove EV96100 as previously announced.
Ralf Baechle [Wed, 20 Sep 2006 19:56:02 +0000 (20:56 +0100)]
[MIPS] Remove EV96100 as previously announced.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Replace BARRIER with more appropriate hazard barrier.
Ralf Baechle [Fri, 8 Sep 2006 02:16:21 +0000 (04:16 +0200)]
[MIPS] Replace BARRIER with more appropriate hazard barrier.

This is the unchanged part 2 of Chris' hazard cleanup.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Cleanup hazard handling.
Ralf Baechle [Fri, 8 Sep 2006 02:13:49 +0000 (04:13 +0200)]
[MIPS] Cleanup hazard handling.

Mostly based on patch by Chris Dearman and cleanups from Yoichi.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] IP27: Delete useless declaration of allocate_irqno().
Ralf Baechle [Thu, 7 Sep 2006 00:29:57 +0000 (02:29 +0200)]
[MIPS] IP27: Delete useless declaration of allocate_irqno().

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Fix USER_PTRS_PER_PGD for 64K page size.
Peter Watkins [Wed, 23 Aug 2006 15:15:49 +0000 (11:15 -0400)]
[MIPS] Fix USER_PTRS_PER_PGD for 64K page size.

The code in pgtable-64.h assumes TASK_SIZE is always bigger than a first
level PGDIR_SIZE. This is not the case for 64K pages, where task size is
40 bits (1TB) and a pgd entry can map 42 bits. This leads to
USER_PTRS_PER_PGD being zero for 64K pages.

Signed-off-by: Peter Watkins <treestem@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Add configuration variables for RM9xxx processor
thomas@koeller.dyndns.org [Sun, 27 Aug 2006 11:51:48 +0000 (13:51 +0200)]
[MIPS] Add configuration variables for RM9xxx processor

This patch introduces a number of configuration variables. These allow to
specify presence/absence of integrated peripherals found on the MIPS
RM9xxx processor family, based on the particular processor model used.

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Move excite_fpga.h to include/asm-mips/mach-excite
thomas@koeller.dyndns.org [Sun, 27 Aug 2006 11:54:31 +0000 (13:54 +0200)]
[MIPS] Move excite_fpga.h to include/asm-mips/mach-excite

excite_fpga.h, like all platform headers, really belongs in the
platform header directory.

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Suppress compiler warnings
thomas@koeller.dyndns.org [Sun, 27 Aug 2006 11:53:16 +0000 (13:53 +0200)]
[MIPS] Suppress compiler warnings

The excite platform exports hardware resources for device drivers to use.
Any driver wanting to use these resources will look up them by their names.
Since these resources are declared to have static linkage, but are not
used in the source file defining them, the compiler used to emit an
'unused' warning, which this patch suppresses.

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Reformat missformated SMTC bits.
Ralf Baechle [Fri, 25 Aug 2006 11:34:33 +0000 (12:34 +0100)]
[MIPS] Reformat missformated SMTC bits.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Qemu does not have D-cache aliases
Atsushi Nemoto [Sat, 19 Aug 2006 15:33:38 +0000 (00:33 +0900)]
[MIPS] Qemu does not have D-cache aliases

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Remove F_SETSIG and F_GETSIG in favor of the asm-generic definitions.
Yoichi Yuasa [Wed, 16 Aug 2006 14:10:00 +0000 (23:10 +0900)]
[MIPS] Remove F_SETSIG and F_GETSIG in favor of the asm-generic definitions.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Move definition of IRIX compat constant into IRIX compat code.
Ralf Baechle [Fri, 4 Aug 2006 00:49:31 +0000 (01:49 +0100)]
[MIPS] Move definition of IRIX compat constant into IRIX compat code.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Use common definitions from asm-generic/signal.h
Yoichi Yuasa [Mon, 31 Jul 2006 14:01:37 +0000 (23:01 +0900)]
[MIPS] Use common definitions from asm-generic/signal.h

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] c-r4k: Convert init functions from inline to __init.
Ralf Baechle [Tue, 1 Aug 2006 22:39:42 +0000 (23:39 +0100)]
[MIPS] c-r4k: Convert init functions from inline to __init.

With more recent compilers inline doesn't necessarily means a function
will always be inlined.  So leave that decission to the compiler and
make the function as __init.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] TLS: set_thread_area returns asmlinkage int not void.
Ralf Baechle [Tue, 19 Sep 2006 16:18:53 +0000 (17:18 +0100)]
[MIPS] TLS: set_thread_area returns  asmlinkage int not void.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] TLS: Delete unused sys32_set_thread_area
Ralf Baechle [Tue, 19 Sep 2006 16:16:56 +0000 (17:16 +0100)]
[MIPS] TLS: Delete unused sys32_set_thread_area

There is no need for a compat version.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Make PROT_WRITE imply PROT_READ.
Ralf Baechle [Sat, 16 Sep 2006 00:29:37 +0000 (01:29 +0100)]
[MIPS] Make PROT_WRITE imply PROT_READ.

18 years ago[MIPS] Atlas: update interrupt handling
Maciej W. Rozycki [Tue, 12 Sep 2006 18:12:18 +0000 (19:12 +0100)]
[MIPS] Atlas: update interrupt handling

The following change updates the Atlas interrupt handling to match that
of Malta.  Tested with a 5Kc and a 34Kf successfully.

Signed-off-by: Maciej W. Rozycki <macro@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Atlas: Fix building the RTC driver
Maciej W. Rozycki [Tue, 12 Sep 2006 18:02:44 +0000 (19:02 +0100)]
[MIPS] Atlas: Fix building the RTC driver

Atlas maps its RTC chip in the host mmio space rather than using the
"traditional" location in the PCI/ISA port space.  A change that has
happened to the generic RTC header requires to define ARCH_RTC_LOCATION
now.

Signed-off-by: Maciej W. Rozycki <macro@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Patch to arch/mips/mips-boards/generic/time.c
Kevin D. Kissell [Tue, 12 Sep 2006 10:08:08 +0000 (12:08 +0200)]
[MIPS] Patch to arch/mips/mips-boards/generic/time.c

In hooking up the perf counter overflow interrupt to the experimental
deprecated-real-soon-now /proc/perf interface last night, I had to
revisit arch/mips/mips-boards/generic/time.c, and discovered that
when the 2.6.9-based SMTC prototype was merged with the more
recent tree, it was missed that arch/mips/kernel/time.c had changed
so that even in SMP kernels, timer_interrupt() calls
local_timer_interrupt(), so there is no longer a need to invoke it
directly from mips_timer_interrupt() in those cases where
timer_interrupt() has been called.  So I got rid of that, and added the
invocation of perf_irq() if Cause.PCI is set, more-or-less following the
same logic as in the non-SMTC case, with the modifications that (a) a
runtime check for Release 2 isn't done, because it's redundant in SMTC),
and (b) we check for a clock interrupt regardless of the value returned
by the perf counter service - I don't understand why we'd want to control
that with perf_irq(), but maybe one of you knows the story.  I also got
rid of the stupid warning about the unused variable when compiled for
SMTC (another artifact of the merge). The result hasn't been beaten to
death, but boots, seems stable, and supports extended precision event
counting.

Signed-off-by: Kevin D. Kissell <kevink@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Reduce race between cpu_wait() and need_resched() checking
Atsushi Nemoto [Wed, 7 Jun 2006 16:09:01 +0000 (01:09 +0900)]
[MIPS] Reduce race between cpu_wait() and need_resched() checking

If a thread became runnable between need_resched() and the WAIT
instruction, switching to the thread will delay until a next interrupt.
Some CPUs can execute the WAIT instruction with interrupt disabled, so
we can get rid of this race on them (at least UP case).

Original Patch by Atsushi with fixing up for MIPS Technology's cores by
Ralf based on feedback from the RTL designers.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Wire up set_robust_list(2) and get_robust_list(2)
Atsushi Nemoto [Wed, 6 Sep 2006 13:42:02 +0000 (22:42 +0900)]
[MIPS] Wire up set_robust_list(2) and get_robust_list(2)

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Fix errors detected by "make headers_check"
Atsushi Nemoto [Wed, 6 Sep 2006 16:00:22 +0000 (01:00 +0900)]
[MIPS] Fix errors detected by "make headers_check"

* export asm/sgidefs.h
* include asm/isadep.h only if in kernel
* do not export contents of asm/timex.h and asm/user.h

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Do not lose upper 32-bit on MIPS32 with 64-bit addresses in __pte().
Ralf Baechle [Thu, 31 Aug 2006 18:39:09 +0000 (19:39 +0100)]
[MIPS] Do not lose upper 32-bit on MIPS32 with 64-bit addresses in __pte().

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Replace generic__raw_read_trylock usage
Ralf Baechle [Thu, 31 Aug 2006 13:16:06 +0000 (14:16 +0100)]
[MIPS] Replace generic__raw_read_trylock usage

generic__raw_read_trylock() is a defect generic function actually doing
a __raw_read_lock ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] SEAD defconfig build fix
Maciej W. Rozycki [Wed, 30 Aug 2006 13:29:57 +0000 (14:29 +0100)]
[MIPS] SEAD defconfig build fix

Signed-off-by: Maciej W. Rozycki <macro@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Fix for pci config_access on alchemy au1x000
Alexander Bigga [Tue, 29 Aug 2006 14:48:34 +0000 (16:48 +0200)]
[MIPS] Fix for pci config_access on alchemy au1x000

I've encountered a serious problem with PCI config space access on Au1x000
platforms with recent 2.6.x-kernel. With 2.4.31 the same hardware works fine.
So I was looking for the differences:

Symptoms:
- no PCI-device is seen on bootup though two or three cards are present
- lspci output is empty
- OR: lspci shows 20 times the same device
(- OR: in some slot-configurations it worked anyhow)

System(s):
1. platform with Au1500 and three PCI-devices (actually a mycable XXS1500
    with backplane for three PCI-devices)
2. platform with Au1550 and two PCI-devices (custom board)

Debugging:
I digged down to the config_access() of the au1xxx-processors in
arch/mips/pci/ops-au1000.c and switched on DEBUG.

The code of config_access() seems to be almost the same as of the
2.4.x-kernel. But the "pci_cfg_vm->addr" returned by get_vm_area(0x2000, 0)
once on booting is different. That's of course not forbidden. But the
alignment seems to be wrong. In my case, I received:

2.4.31: pci_cfg_vm->addr = c0000000
2.6.18-rc5: pci_cfg_vm->addr = c0101000

To make it short: With 2.6.x it fails on the first config-access with:
"PCI ERR detected: status 83a00356".

Fixup:
My fix is now, to use the VM_IOREMAP-flag in the get_vm_area call. This flag
seems to be introduced in mm/vmalloc.c a long time ago (in 2.6.7-bk13, I
found in gitweb).
Now, the returned address is pci_cfg_vm->addr = c0104000 and everything works
fine.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Make prepare_frametrace() not clobber v0
Atsushi Nemoto [Tue, 29 Aug 2006 03:10:22 +0000 (12:10 +0900)]
[MIPS] Make prepare_frametrace() not clobber v0

Since lmo commit 323a380bf9e1a1679a774a2b053e3c1f2aa3f179 ("Simplify
dump_stack()") made prepare_frametrace() always inlined, using $2 (v0)
in __asm__ is not safe anymore.  We can use $1 (at) instead.  Also we
should use "dla" instead of "la" for 64-bit kernel.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Do not use drop_mmu_context to flusing other task's VIPT I-cache.
Atsushi Nemoto [Fri, 25 Aug 2006 08:55:31 +0000 (17:55 +0900)]
[MIPS] Do not use drop_mmu_context to flusing other task's VIPT I-cache.

c-r4k.c and c-sb1.c use drop_mmu_context() to flush virtually tagged
I-caches, but this does not work for flushing other task's icache.  This
is for example triggered by copy_to_user_page() called from ptrace(2).
Use indexed flush for such cases.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] MT: Fix setting of XTC.
Elizabeth Oldham [Thu, 17 Aug 2006 11:39:21 +0000 (12:39 +0100)]
[MIPS] MT: Fix setting of XTC.

XTC can only be set if VPA is clear, which it may not be. There is
also the possibility of a back to back c0 register access hazard to
take care of.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] SMTC Build fix.
Ralf Baechle [Wed, 16 Aug 2006 13:05:11 +0000 (14:05 +0100)]
[MIPS] SMTC Build fix.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Fix 32-bit kernel by replacing 64-bit-only code.
Ralf Baechle [Tue, 15 Aug 2006 23:59:40 +0000 (00:59 +0100)]
[MIPS] Fix 32-bit kernel by replacing 64-bit-only code.

dclz() expects its 64-bit argument being passed as a single register
but on 32-bit kernels it'll actually be in a register pair.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] MT: When doing "select SMP" also select SMP's prerequesites or ...
Ralf Baechle [Tue, 15 Aug 2006 18:36:40 +0000 (19:36 +0100)]
[MIPS] MT: When doing "select SMP" also select SMP's prerequesites or ...

... kconfig will do weird stuff.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] eXcite: Don't set SERIAL_RM9000.
Ralf Baechle [Sat, 12 Aug 2006 21:56:03 +0000 (22:56 +0100)]
[MIPS] eXcite: Don't set SERIAL_RM9000.

The driver has not been merged yet so selecting it results in a warning
message.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Retire flush_icache_page from mm use.
Ralf Baechle [Sat, 12 Aug 2006 15:40:08 +0000 (16:40 +0100)]
[MIPS] Retire flush_icache_page from mm use.

On the 34K the redundant cache operations were causing excessive stalls
resulting in realtime code running on the second VPE missing its deadline.
For all other platforms this patch is just a significant performance
improvment as illustrated by below benchmark numbers.

Processor, Processes - times in microseconds - smaller is better
------------------------------------------------------------------------------
Host                 OS  Mhz null null      open slct sig  sig  fork exec sh
                             call  I/O stat clos TCP  inst hndl proc proc proc
--------- ------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
25Kf      2.6.18-rc4     533 0.49 1.16 7.57 33.4 30.5 1.34 12.4 5497 17.K 54.K
25Kf      2.6.18-rc4-p   533 0.49 1.16 6.68 23.0 30.7 1.36 8.55 5030 16.K 48.K
4Kc       2.6.18-rc4      80 4.21 15.0 131. 289. 261. 16.5 258. 18.K 70.K 227K
4Kc       2.6.18-rc4-p    80 4.34 13.1 128. 285. 262. 18.2 258. 12.K 52.K 176K
34Kc      2.6.18-rc4      40 5.01 14.0 61.6 90.0 477. 17.9 94.7 29.K 108K 342K
34Kc      2.6.18-rc4-p    40 4.98 13.9 61.2 89.7 475. 17.6 93.7 8758 44.K 158K
BCM1480   2.6.18-rc4     700 0.28 0.60 3.68 5.92 16.0 0.78 5.08 931. 3163 15.K
BCM1480   2.6.18-rc4-p   700 0.28 0.61 3.65 5.85 16.0 0.79 5.20 395. 1464 8385
TX49-16K  2.6.18-rc3     197 0.73 2.41 19.0 37.8 82.9 2.94 17.5 4438 14.K 56.K
TX49-16K  2.6.18-rc3-p   197 0.73 2.40 19.9 36.3 82.9 2.94 23.4 2577 9103 38.K
TX49-32K  2.6.18-rc3     396 0.36 1.19 6.80 11.8 41.0 1.46 8.17 2738 8465 32.K
TX49-32K  2.6.18-rc3-p   396 0.36 1.19 6.82 10.2 41.0 1.46 8.18 1330 4638 18.K

Original patch by me with enhancements by Atsushi Nemoto.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
18 years ago[MIPS] Avoid double signal restarting.
Ralf Baechle [Tue, 8 Aug 2006 02:47:01 +0000 (03:47 +0100)]
[MIPS] Avoid double signal restarting.

In entry.S resume_userspace ... jal do_notify_resume form a loop through
which the kernel will iterate as long as work is pending.  If we
iterate through this loop more than once with no signal pending for at
least one but the last iteration we will take do the syscall restarting
multiple times resulting in a syscall return prior to the the syscall
instruction in userspace.  This may happen when debugging a multithreaded
program.

Debugging and original fix by Maciej; extended to other ABIs by me.

Signed-off-by: Maciej W. Rozycki <macro@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] MT: Initialise all writable bits in Cause register to zero.
Chris Dearman [Mon, 7 Aug 2006 14:08:01 +0000 (15:08 +0100)]
[MIPS] MT: Initialise all writable bits in Cause register to zero.

Recent 34Ks come out of reset with WP enabled on VPE 1 so we take an
immediate exception when starting the second VPE.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Fix EV64120 PCI fixup in Makefile
Yoichi Yuasa [Mon, 31 Jul 2006 14:05:04 +0000 (23:05 +0900)]
[MIPS] Fix EV64120 PCI fixup in Makefile

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Add missing returns in signal code.
Ralf Baechle [Thu, 3 Aug 2006 20:54:13 +0000 (21:54 +0100)]
[MIPS] Add missing returns in signal code.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] IRIX: Crapectopy.
Ralf Baechle [Thu, 3 Aug 2006 20:53:10 +0000 (21:53 +0100)]
[MIPS] IRIX: Crapectopy.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Don't call try_to_freeze in do_signal & co.
Ralf Baechle [Thu, 3 Aug 2006 18:36:37 +0000 (19:36 +0100)]
[MIPS] Don't call try_to_freeze in do_signal & co.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Cleanup leftovers of ARCH_HAS_IRQ_PER_CPU
Ralf Baechle [Thu, 3 Aug 2006 16:34:24 +0000 (17:34 +0100)]
[MIPS] Cleanup leftovers of ARCH_HAS_IRQ_PER_CPU

CONFIG_IRQ_PER_CPU now controls the IRQ_PER_CPU stuff.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Improve unwind_stack()
Franck Bui-Huu [Thu, 3 Aug 2006 07:29:21 +0000 (09:29 +0200)]
[MIPS] Improve unwind_stack()

This patch allows unwind_stack() to return ra for leaf function.
But it tries to detects cases where get_frame_info() wrongly
consider nested function as a leaf one.

It also pass 'unsinged long *sp' instead of 'unsigned long **sp'
as second parameter. The code looks cleaner.

Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Make get_frame_info() more robust
Franck Bui-Huu [Thu, 3 Aug 2006 07:29:20 +0000 (09:29 +0200)]
[MIPS] Make get_frame_info() more robust

Now get_frame_info() wants to detect move sp instruction first. It
assumes that the save ra in the stack instruction can't happen
before allocating frame size space into the stack.

Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Simplify dump_stack()
Franck Bui-Huu [Thu, 3 Aug 2006 07:29:19 +0000 (09:29 +0200)]
[MIPS] Simplify dump_stack()

Make dump_stack() code not depend on CONFIG_KALLSYMS.

It also make prepare_frametrace() always inlined to get
less false entries reported by show_raw_backtrace().

Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Make frame_info_init() more readable.
Franck Bui-Huu [Thu, 3 Aug 2006 07:29:18 +0000 (09:29 +0200)]
[MIPS] Make frame_info_init() more readable.

Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Miscellaneous cleanup in prologue analysis code
Franck Bui-Huu [Thu, 3 Aug 2006 07:29:17 +0000 (09:29 +0200)]
[MIPS] Miscellaneous cleanup in prologue analysis code

We usually use backtrace term for dumping a call tree during
debug. Therefore this patch renames show_frametrace() into
show_backtrace() and show_trace() into show_raw_backtrace().

It also uses the new function print_ip_sym().

Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Remove unused MODULE_RANGE macro.
Franck Bui-Huu [Thu, 3 Aug 2006 07:29:16 +0000 (09:29 +0200)]
[MIPS] Remove unused MODULE_RANGE macro.

Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Make get_frame_info() more readable.
Franck Bui-Huu [Thu, 3 Aug 2006 07:29:15 +0000 (09:29 +0200)]
[MIPS] Make get_frame_info() more readable.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] c-r4k: Typo fix.
Ralf Baechle [Tue, 1 Aug 2006 22:42:30 +0000 (23:42 +0100)]
[MIPS] c-r4k: Typo fix.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] N32 rt_sigqueueinfo uses O32 padding, not N64
Peter Watkins [Thu, 27 Jul 2006 20:05:49 +0000 (16:05 -0400)]
[MIPS] N32 rt_sigqueueinfo uses O32 padding, not N64

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] dump_stack() based on prologue code analysis
Atsushi Nemoto [Sat, 29 Jul 2006 14:27:20 +0000 (23:27 +0900)]
[MIPS] dump_stack() based on prologue code analysis

Instead of dump all possible address in the stack, unwind the stack frame
based on prologue code analysis, as like as get_wchan() does.  While the
code analysis might fail for some reason, there is a new kernel option
"raw_show_trace" to disable this feature.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] db1x00: Remove unused mirage_ts.c
Yoichi Yuasa [Wed, 26 Jul 2006 14:34:19 +0000 (23:34 +0900)]
[MIPS] db1x00: Remove unused mirage_ts.c

CONFIG_WM97XX_COMODULE doesn't exist.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Rearrange show_stack, show_trace
Atsushi Nemoto [Tue, 25 Jul 2006 14:51:36 +0000 (23:51 +0900)]
[MIPS] Rearrange show_stack, show_trace

Print call-trace in show_stack() (like on other archs).  Also make
show_trace() static and simplify its argument list.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Updat mpc30x defconfig
Yoichi Yuasa [Tue, 25 Jul 2006 14:26:09 +0000 (23:26 +0900)]
[MIPS] Updat mpc30x defconfig

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Updat workpad defconfig
Yoichi Yuasa [Tue, 25 Jul 2006 14:24:54 +0000 (23:24 +0900)]
[MIPS] Updat workpad defconfig

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Update e55 defconfig
Yoichi Yuasa [Tue, 25 Jul 2006 14:24:47 +0000 (23:24 +0900)]
[MIPS] Update e55 defconfig

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years ago[MIPS] Honour "panic_on_oops" sysctl.
Maxime Bizon [Thu, 20 Jul 2006 16:52:02 +0000 (18:52 +0200)]
[MIPS] Honour "panic_on_oops" sysctl.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
18 years agopciehp - fix wrong return value
Kenji Kaneshige [Wed, 20 Sep 2006 00:04:33 +0000 (17:04 -0700)]
pciehp - fix wrong return value

This patch fixes the problem that trying to enable already enabled
slot disables the slot by returning the proper value from
pciehp_enable_slot()/pciehp_disable_slot().

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoIA64: PCI: dont disable irq which is not enabled
Satoru Takeuchi [Tue, 12 Sep 2006 17:24:14 +0000 (10:24 -0700)]
IA64: PCI: dont disable irq which is not enabled

This patch prevents pcibios_disable_device() from disabling interrupts
of devices which is not enabled.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoacpiphp: add support for ioapic hot-remove
Satoru Takeuchi [Tue, 12 Sep 2006 17:22:53 +0000 (10:22 -0700)]
acpiphp: add support for ioapic hot-remove

This patch adds support for ioapics hot-remove.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoPCI: assign ioapic resource at hotplug
Satoru Takeuchi [Tue, 12 Sep 2006 17:21:44 +0000 (10:21 -0700)]
PCI: assign ioapic resource at hotplug

We need to assign resources to ioapics being hot-added. This patch
changes pbus_assign_resources_sorted() to assign resources if the
ioapic has no assigned resources.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoacpiphp: disable bridges
Satoru Takeuchi [Tue, 12 Sep 2006 17:19:00 +0000 (10:19 -0700)]
acpiphp: disable bridges

Currently acpiphp calls pci_enable_device() against all
hot-added bridges, but acpiphp does not call pci_disable_device()
against them in hot-remove. So ioapic hot-remove would fail.
This patch fixes this issue.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoacpiphp: stop bus device before acpi_bus_trim
Satoru Takeuchi [Tue, 12 Sep 2006 17:17:46 +0000 (10:17 -0700)]
acpiphp: stop bus device before acpi_bus_trim

Contrary to PCI bridge hot-add, we need to follow the sequence below
for PCI bridge hot-removal.

  (1) Stop devices (detach drivers, remove from the global list, etc.)
  (2) Unbind ACPI node from the devices (remove the _PRT entries)
  (3) Remove devices (remove from the device list, etc.)

This patch fixes acpiphp driver to follow above sequence for P2P
bridge hot-removal.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoPCI: add pci_stop_bus_device
Satoru Takeuchi [Tue, 12 Sep 2006 17:16:36 +0000 (10:16 -0700)]
PCI: add pci_stop_bus_device

This patch adds pci_stop_bus_device() which stops a PCI device (detach
the driver, remove from the global list and so on) and any children.
This is needed for ACPI based PCI-to-PCI bridge hot-remove, and it will
be also needed for ACPI based PCI root bridge hot-remove.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoacpiphp: do not initialize existing ioapics
Satoru Takeuchi [Tue, 12 Sep 2006 17:15:10 +0000 (10:15 -0700)]
acpiphp: do not initialize existing ioapics

Currently acpiphp initializes all ioapics under the bus on which
hot-add event occured. It also initializes already working ioapics.
This patch fixes this bug.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoacpiphp: initialize ioapics before starting devices
Satoru Takeuchi [Tue, 12 Sep 2006 17:13:44 +0000 (10:13 -0700)]
acpiphp: initialize ioapics before starting devices

Currently acpiphp initializes ioapics after starting devices,
but ioapics should be initialized before starting devices.
This patch fixes this bug.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoacpiphp: set hpp values before starting devices
Satoru Takeuchi [Tue, 12 Sep 2006 17:12:16 +0000 (10:12 -0700)]
acpiphp: set hpp values before starting devices

Currently acpiphp sets hpp values after starting devices, but
the values should be set before starting devices. This patch
fixes this bug.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoPCI Hotplug: cleanup pcihp skeleton code.
Satoru Takeuchi [Wed, 6 Sep 2006 07:47:28 +0000 (16:47 +0900)]
PCI Hotplug: cleanup pcihp skeleton code.

Cleanup pcihp skeleton code.

Fix some typos and remove some unnecessary blank lines.

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoPCI: Restore PCI Express capability registers after PM event
Michael S. Tsirkin [Mon, 21 Aug 2006 13:22:22 +0000 (16:22 +0300)]
PCI: Restore PCI Express capability registers after PM event

Restore PCI Express capability registers after PM event.
This includes maxumum MTU for PCI express and other vital data.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoPCI: drivers/pci/hotplug/acpiphp_glue.c: make a function static
Adrian Bunk [Tue, 15 Aug 2006 06:07:38 +0000 (23:07 -0700)]
PCI: drivers/pci/hotplug/acpiphp_glue.c: make a function static

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoPCI: Multiprobe sanitizer
Alan Cox [Wed, 16 Aug 2006 16:42:18 +0000 (17:42 +0100)]
PCI: Multiprobe sanitizer

There are numerous drivers that can use multithreaded probing but having
some kind of global flag as the way to control this makes migration to
threaded probing hard and since it enables it everywhere and is almost
as likely to cause serious pain as holding a clog dance in a minefield.

If we have a pci_driver multithread_probe flag to inherit you can turn
it on for one driver at a time.

From playing so far however I think we need a different model at the
device layer which serializes until the called probe function says "ok
you can start another one now". That would need some kind of flag and
semaphore plus a helper function.

Anyway in the absence of that this is a starting point to usefully play
with this stuff

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoPCI: fix __must_check warnings
Greg Kroah-Hartman [Mon, 28 Aug 2006 18:43:25 +0000 (11:43 -0700)]
PCI: fix __must_check warnings

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoPCI Hotplug: fix __must_check warnings
Greg Kroah-Hartman [Mon, 28 Aug 2006 18:43:25 +0000 (11:43 -0700)]
PCI Hotplug: fix __must_check warnings

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoSHPCHP: fix __must_check warnings
Greg Kroah-Hartman [Mon, 28 Aug 2006 18:43:25 +0000 (11:43 -0700)]
SHPCHP: fix __must_check warnings

Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoPCI-Express AER implemetation: pcie_portdrv error handler
Zhang, Yanmin [Mon, 31 Jul 2006 07:26:16 +0000 (15:26 +0800)]
PCI-Express AER implemetation: pcie_portdrv error handler

Patch 4 implements error handlers for pcie_portdrv.

Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoPCI-Express AER implemetation: AER core and aerdriver
Zhang, Yanmin [Mon, 31 Jul 2006 07:21:33 +0000 (15:21 +0800)]
PCI-Express AER implemetation: AER core and aerdriver

Patch 3 implements the core part of PCI-Express AER and aerdrv
port service driver.

When a root port service device is probed, the aerdrv will call
request_irq to register irq handler for AER error interrupt.

When a device sends an PCI-Express error message to the root port,
the root port will trigger an interrupt, by either MSI or IO-APIC,
then kernel would run the irq handler. The handler collects root
error status register and schedules a work. The work will call
the core part to process the error based on its type
(Correctable/non-fatal/fatal).

As for Correctable errors, the patch chooses to just clear the correctable
error status register of the device.

As for the non-fatal error, the patch follows generic PCI error handler
rules to call the error callback functions of the endpoint's driver. If
the device is a bridge, the patch chooses to broadcast the error to
downstream devices.

As for the fatal error, the patch resets the pci-express link and
follows generic PCI error handler rules to call the error callback
functions of the endpoint's driver. If the device is a bridge, the patch
chooses to broadcast the error to downstream devices.

Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoPCI-Express AER implemetation: export pcie_port_bus_type
Zhang, Yanmin [Mon, 31 Jul 2006 07:18:39 +0000 (15:18 +0800)]
PCI-Express AER implemetation: export pcie_port_bus_type

Patch 2 exports pcie_port_bus_type.

Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoPCI-Express AER implemetation: aer howto document
Zhang, Yanmin [Mon, 31 Jul 2006 07:15:18 +0000 (15:15 +0800)]
PCI-Express AER implemetation: aer howto document

PCI-Express AER (Advanced Error Reporting) provides more robust error reporting.
The series of patches enable kernel support to AER.

The initial patches were written by Tom Long Nguyen. I ported them to the kernel
2.6.18-rc3. Many thanks to Rajesh Shah and Narayanan Chandramouli for their great
review comments and testing help.

Patch 1 consists of the pciaer-howto.txt document.

Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoPCIE: check and return bus_register errors
Randy Dunlap [Sun, 9 Jul 2006 05:58:25 +0000 (22:58 -0700)]
PCIE: check and return bus_register errors

Have pcie_port_bus_register() notice and return errors.
Mark it __must_check so that its caller(s) must check its return value.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoMSI: Blacklist PCI-E chipsets depending on Hypertransport MSI capability
Brice Goglin [Thu, 31 Aug 2006 05:55:32 +0000 (01:55 -0400)]
MSI: Blacklist PCI-E chipsets depending on Hypertransport MSI capability

Introduce msi_ht_cap_enabled() to check the MSI capability in the
Hypertransport configuration space.
It is used in a generic quirk quirk_msi_ht_cap() to check whether
MSI is enabled on hypertransport chipset, and a nVidia specific quirk
quirk_nvidia_ck804_msi_ht_cap() where two 2 HT MSI mappings have to
be checked.
Both quirks set the PCI_BUS_FLAGS_NO_MSI bus flag when MSI is disabled.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoMSI: Rename PCI_CAP_ID_HT_IRQCONF into PCI_CAP_ID_HT
Brice Goglin [Thu, 31 Aug 2006 05:55:24 +0000 (01:55 -0400)]
MSI: Rename PCI_CAP_ID_HT_IRQCONF into PCI_CAP_ID_HT

0x08 is the HT capability, while PCI_CAP_ID_HT_IRQCONF would be
the subtype 0x80 that mpic_scan_ht_pic() uses.
Rename PCI_CAP_ID_HT_IRQCONF into PCI_CAP_ID_HT.

And by the way, use it in the ipath driver instead of defining its
own HT_CAPABILITY_ID.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoMSI: Export the PCI_BUS_FLAGS_NO_MSI flag in sysfs
Brice Goglin [Thu, 31 Aug 2006 05:55:15 +0000 (01:55 -0400)]
MSI: Export the PCI_BUS_FLAGS_NO_MSI flag in sysfs

Export the PCI_BUS_FLAGS_NO_MSI flag of a PCI bus in the sysfs files
of its parent device and make it writable. Could be used to:
* disable MSI on a device which has not been blacklisted yet
* allow MSI when some setpci hacks enable MSI support (for instance
  on the ServerWorks HT2000 chipset where the MSI HT cap is disabled
  by default).
Architecture where some bus have no parent chipset cannot use this
strategy to change MSI support.

If the chipset does not have a subordinate bus, its 'bus_msi' file
is empty.

Also document and warn about the possible danger of changing the flag.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoMSI: Factorize common code in pci_msi_supported()
Brice Goglin [Thu, 31 Aug 2006 05:55:07 +0000 (01:55 -0400)]
MSI: Factorize common code in pci_msi_supported()

pci_enable_msi() and pci_enable_msix() use the same code to detect
whether MSI might be enabled on this device. Factorize this code in
pci_msi_supported(). And improve the documentation about the fact
that only the root chipset must support MSI, but it is hard to
find the root bus so we check all parent busses MSI flags.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoMSI: Cleanup existing MSI quirks
Brice Goglin [Thu, 31 Aug 2006 05:54:56 +0000 (01:54 -0400)]
MSI: Cleanup existing MSI quirks

Move MSI quirks in CONFIG_PCI_MSI, document why the serverworks quirk
does not simply set PCI_BUS_FLAGS_NO_MSI, and create a generic quirk
for other chipsets where setting PCI_BUS_FLAGS_NO_MSI is fine.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoResources: insert identical resources above existing resources
Matthew Wilcox [Fri, 30 Jun 2006 09:31:24 +0000 (02:31 -0700)]
Resources: insert identical resources above existing resources

If you have two resources which aree exactly the same size,
insert_resource() currently inserts the new one below the existing one.
This is wrong because there's no way to insert a resource of the same size
above an existing one.

I took this opportunity to rewrite the initial loop to be a for-loop
instead of a goto-loop and fix the documentation.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoi2c: Drop unimplemented slave functions
Jean Delvare [Sun, 3 Sep 2006 20:41:08 +0000 (22:41 +0200)]
i2c: Drop unimplemented slave functions

i2c: Drop unimplemented slave functions

Drop the function declarations for slave mode support of i2c adapters.
This was never implemented, and by the time it is I bet we will want
something different anyway.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoi2c: Constify i2c_algorithm declarations, part 2
Jean Delvare [Sun, 3 Sep 2006 20:39:46 +0000 (22:39 +0200)]
i2c: Constify i2c_algorithm declarations, part 2

i2c: Constify i2c_algorithm declarations, part 2

Make struct i2c_algorithm declarations const in all i2c bus drivers
where it is possible.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoi2c: Constify i2c_algorithm declarations, part 1
Jean Delvare [Sun, 3 Sep 2006 20:38:52 +0000 (22:38 +0200)]
i2c: Constify i2c_algorithm declarations, part 1

i2c: Constify i2c_algorithm declarations, part 1

Make struct i2c_algorithm declarations const in all i2c algorithm
drivers.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoi2c: Let drivers constify i2c_algorithm data
David Brownell [Sun, 3 Sep 2006 20:37:11 +0000 (22:37 +0200)]
i2c: Let drivers constify i2c_algorithm data

i2c: Let drivers constify i2c_algorithm data

Let drivers constify I2C algorithm method operations tables,
moving them from ".data" to ".rodata".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoi2c-isa: Restore driver owner
Jean Delvare [Sun, 3 Sep 2006 20:36:14 +0000 (22:36 +0200)]
i2c-isa: Restore driver owner

i2c-isa: Restore driver owner

Commit 2b48716d1d2f2edb1e7cbc5ecf1cb2cb39373e33 back in January
2006 was a bit overzealous. It removed .owner from all i2c drivers,
including i2c-isa ones, while they still need it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoi2c-viapro: Add support for the VT8237A and VT8251
Rudolf Marek [Sun, 3 Sep 2006 20:35:21 +0000 (22:35 +0200)]
i2c-viapro: Add support for the VT8237A and VT8251

i2c-viapro: Add support for the VT8237A and VT8251

Documentation update included. Compile tested.

Signed-off-by: Rudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoi2c: Warn on i2c client creation failure
Jean Delvare [Sun, 3 Sep 2006 20:25:04 +0000 (22:25 +0200)]
i2c: Warn on i2c client creation failure

i2c: Warn on i2c client creation failure

Warn when an i2c client creation fails. If we don't, the user will
never know something wrong happened, as i2c client creation is
typically called through an attach_adapter callback, those return value
we currently ignore for technical reasons.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoi2c-core: Drop useless bitmaskings
Jean Delvare [Sun, 3 Sep 2006 20:24:00 +0000 (22:24 +0200)]
i2c-core: Drop useless bitmaskings

i2c-core: Drop useless bitmaskings

The code generated is exactly the same.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoi2c-algo-pcf: Discard the mdelay data struct member
Adrian Bunk [Sun, 3 Sep 2006 20:22:50 +0000 (22:22 +0200)]
i2c-algo-pcf: Discard the mdelay data struct member

i2c-algo-pcf: Discard the mdelay data struct member

Just as i2c-algo-bit, i2c-algo-pcf has an unused mdelay struct member,
which we can get rid of to spare some code and memory.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoi2c-algo-bit: Cleanups
Jean Delvare [Sun, 3 Sep 2006 20:22:12 +0000 (22:22 +0200)]
i2c-algo-bit: Cleanups

i2c-algo-bit: Cleanups

* Uninline long functions (saves around 1 kB or 15%)
* Refactor code in sclhi()
* Drop redundant udelay on repeated start

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoi2c-isa: Fail adding driver on attach_adapter error
David Hubbard [Sun, 3 Sep 2006 20:21:20 +0000 (22:21 +0200)]
i2c-isa: Fail adding driver on attach_adapter error

i2c-isa: Fail adding driver on attach_adapter error

Signed-off-by: David Hubbard <david.c.hubbard@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoi2c: __must_check fixes (chip drivers)
Jean Delvare [Sun, 3 Sep 2006 20:20:24 +0000 (22:20 +0200)]
i2c: __must_check fixes (chip drivers)

i2c: __must_check fixes (chip drivers)

Check for error on sysfs file creation.
Delete sysfs files on device removal.

The approach taken for the most complex case (pcf8591) is similar to
what Mark M. Hoffman proposed for hardware monitoring chip drivers.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ben Gardner <bgardner@wabtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 years agoi2c-dev: attach/detach_adapter cleanups
Jean Delvare [Sun, 3 Sep 2006 20:19:25 +0000 (22:19 +0200)]
i2c-dev: attach/detach_adapter cleanups

i2c-dev: attach/detach_adapter cleanups

* Only print that an adapter was attached when it succeeds.
* i2c_dev == NULL on detach simply means that the attach failed
  before, this isn't an error per se.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>