05 Dec, 2008
1 commit
-
of_node_put is needed before discarding a value received from
of_find_node_by_name, eg in error handling code or when the device
node is no longer used.The semantic match that catches the bug is as follows:
(http://www.emn.fr/x-info/coccinelle/)//
@r exists@
local idexpression struct device_node *n;
position p1, p2;
struct device_node *n1;
statement S;
identifier f;
expression E;
expression *ptr != NULL;
@@n@p1 = of_find_node_by_name(...)
...
if (!n) S
... when != of_node_put(n)
when != n1 = f(n,...)
when != E = n
when any
when strict
(
return \(0\|\|ptr\);
|
return@p2 ...;
|
of_node_put(n);
|
n1 = f(n,...)
|
E = n
)@script:python@
p1 << r.p1;
p2 << r.p2;
@@print "* file: %s of_find_node_by_name %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
//Signed-off-by: Nicolas Palix
Signed-off-by: Julia Lawall
Signed-off-by: David S. Miller
08 Oct, 2008
1 commit
-
Here is an updated version of a patch I wrote 6 years ago
http://marc.info/?l=linux-sparc&m=103939103607617&w=2
that simplifies interrupt mask lookup. It's main purpose
is to add VME bus support but it's really a cleanup of the mask code.Signed-off-by: Robert Reif
Signed-off-by: David S. Miller
20 Sep, 2008
6 commits
-
Signed-off-by: David S. Miller
-
Unused.
Signed-off-by: David S. Miller
-
It is only set, never used.
Signed-off-by: David S. Miller
-
Unused.
Signed-off-by: David S. Miller
-
This is the only use of the clear_profile_irq() btfixup entry,
which just eats up lots of dead space on other platform types.A subsequent commit will delete the other implementations and
the btfixup entry as well.Signed-off-by: David S. Miller
-
Signed-off-by: David S. Miller
14 Sep, 2008
1 commit
-
Signed-off-by: David S. Miller
29 Aug, 2008
2 commits
-
Use of_ioremap() and of_iounmap() instead.
Signed-off-by: David S. Miller
-
IRQs are obtained by drivers from the of_device struct.
Signed-off-by: David S. Miller
18 Jul, 2008
1 commit
-
This patch contains the following possible cleanups:
- make the following needlessly global code static:
- apc.c: apc_swift_idle()
- ebus.c: ebus_blacklist_irq()
- ebus.c: fill_ebus_child()
- ebus.c: fill_ebus_device()
- entry.S: syscall_is_too_hard
- etra: tsetup_sun4c_stackchk
- head.S: cputyp
- head.S: prom_vector_p
- idprom.c: Sun_Machines[]
- ioport.c: _sparc_find_resource()
- ioport.c: create_proc_read_entry()
- irq.c: struct sparc_irq[]
- rtrap.S: sun4c_rett_stackchk
- setup.c: prom_sync_me()
- setup.c: boot_flags
- sun4c_irq.c: sun4c_sbint_to_irq()
- sun4d_irq.c: sbus_tid[]
- sun4d_irq.c: struct sbus_actions
- sun4d_irq.c: sun4d_sbint_to_irq()
- sun4m_irq.c: sun4m_sbint_to_irq()
- sun4m_irq.c: sun4m_get_irqmask()
- sun4m_irq.c: sun4m_timers
- sun4m_smp.c: smp4m_cross_call()
- sun4m_smp.c: smp4m_blackbox_id()
- sun4m_smp.c: smp4m_blackbox_current()
- time.c: sp_clock_typ
- time.c: sbus_time_init()
- traps.c: instruction_dump()
- wof.S: spwin_sun4c_stackchk
- wuf.S: sun4c_fwin_stackchk
- #if 0 the following unused code:
- process.c: sparc_backtrace_lock
- process.c: __show_backtrace()
- process.c: show_backtrace()
- process.c: smp_show_backtrace_all_cpus()
- remove the following unused code:
- entry.S: __handle_exception
- smp.c: smp_num_cpus
- smp.c: smp_activated
- smp.c: __cpu_number_map[]
- smp.c: __cpu_logical_map[]
- smp.c: bitops_spinlock
- traps.c: trap_curbuf
- traps.c: trapbuf[]
- traps.c: linux_smp_still_initting
- traps.c: thiscpus_tbr
- traps.c: thiscpus_midSigned-off-by: Adrian Bunk
Signed-off-by: David S. Miller
22 Jul, 2007
1 commit
-
Move stuff used only by arch/sparc/kernel/* into arch/sparc/kernel/irq.h
and into individual files in there (e.g. macros internal to sun4m_irq.c,
etc.)Signed-off-by: Al Viro
Signed-off-by: David S. Miller
12 May, 2007
1 commit
-
Spelling fixes in arch/sparc/.
Signed-off-by: Simon Arlott
Signed-off-by: David S. Miller
09 Oct, 2006
2 commits
-
Use the new typedef for interrupt handler function pointers rather than
actually spelling out the full thing each time. This was scripted with the
following small shell script:#!/bin/sh
egrep -nHrl -e 'irqreturn_t[ ]*[(][*]' $* |
while read i
do
echo $i
perl -pi -e 's/irqreturn_t\s*[(]\s*[*]\s*([_a-zA-Z0-9]*)\s*[)]\s*[(]\s*int\s*,\s*void\s*[*]\s*[)]/irq_handler_t \1/g' $i || exit $?
doneSigned-Off-By: David Howells
-
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds
03 Jul, 2006
1 commit
-
Use the new IRQF_ constants and remove the SA_INTERRUPT define
Signed-off-by: Thomas Gleixner
Cc: Ingo Molnar
Cc: "David S. Miller"
Cc: Benjamin Herrenschmidt
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 Jul, 2006
1 commit
-
Signed-off-by: Jörn Engel
Signed-off-by: Adrian Bunk
20 Jun, 2006
1 commit
-
This ugly hack was long overdue to die.
It was a way to print out Sparc interrupts in a more freindly format,
since IRQ numbers were arbitrary opaque 32-bit integers which vectored
into PIL levels. These 32-bit integers were not necessarily in the
0-->NR_IRQS range, but the PILs they vectored to were.The idea now is that we will increase NR_IRQS a little bit and use a
virtualreal IRQ number mapping scheme similar to PowerPC.That makes this IRQ printing hack irrelevant, and furthermore only a
handful of drivers actually used __irq_itoa() making it even less
useful.Signed-off-by: David S. Miller
17 Apr, 2005
1 commit
-
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.Let it rip!