1. 12 Oct, 2006 38 commits
    • Linus Torvalds's avatar
      Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6 · 9eb20074
      Linus Torvalds authored
      * master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6:
        sh: SH-4A UBC support
        sh: interrupt exception handling rework
        sh: Default enable R7780RP IRQs.
        sh: Zero-out coherent buffer in consistent_alloc().
        sh: Convert IPR-IRQ to IRQ chip.
        sh: Convert INTC2 IRQ handler to irq_chip.
        sh: Fix pr_debug statements for sh4
        sh: Convert r7780rp IRQ handler to IRQ chip.
        sh: Updates for IRQ handler changes.
        sh: Kill off timer_ops get_frequency().
        sh: First step at generic timeofday support.
      9eb20074
    • Jens Axboe's avatar
      8770c018
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block · da79cbae
      Linus Torvalds authored
      * 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block:
        [PATCH] block layer: ioprio_best function fix
        [PATCH] ide-cd: fix breakage with internally queued commands
        [PATCH] block layer: elv_iosched_show should get elv_list_lock
        [PATCH] splice: fix pipe_to_file() ->prepare_write() error path
        [PATCH] block layer: elevator_find function cleanup
        [PATCH] elevator: elevator_type member not used
      da79cbae
    • Linus Torvalds's avatar
      Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 · 9ff4680e
      Linus Torvalds authored
      * master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
        [PKT_SCHED] sch_htb: use rb_first() cleanup
        [RTNETLINK]: Fix use of wrong skb in do_getlink()
        [DECNET]: Fix sfuzz hanging on 2.6.18
        [NET]: Do not memcmp() over pad bytes of struct flowi.
        [NET]: Introduce protocol-specific destructor for time-wait sockets.
        [NET]: Use typesafe inet_twsk() inline function instead of cast.
        [NET]: Use hton{l,s}() for non-initializers.
        [TCP]: Use TCPOLEN_TSTAMP_ALIGNED macro instead of magic number.
        [IPV6]: Seperate sit driver to extra module (addrconf.c changes)
        [IPV6]: Seperate sit driver to extra module
        [NET]: File descriptor loss while receiving SCM_RIGHTS
        [SCTP]: Fix the RX queue size shown in /proc/net/sctp/assocs output.
        [SCTP]: Fix receive buffer accounting.
        SELinux: Bug fix in polidydb_destroy
        IPsec: fix handling of errors for socket policies
        IPsec: correct semantics for SELinux policy matching
        IPsec: propagate security module errors up from flow_cache_lookup
        NetLabel: use SECINITSID_UNLABELED for a base SID
        NetLabel: fix a cache race condition
      9ff4680e
    • Linus Torvalds's avatar
      Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 · 83d3d3c5
      Linus Torvalds authored
      * master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
        [SPARC32]: Fix sparc32 modpost warnings.
        [SPARC32]: Fix sparc32 modpost warnings with sunzilog
        [SPARC32]: Mark srmmu_nocache_init as __init.
        [SPARC32]: pcic.c needs asm/irq_regs.h
      83d3d3c5
    • Eric W. Biederman's avatar
      [PATCH] x86_64 irq: Properly update vector_irq · 994bd4f9
      Eric W. Biederman authored
      This patch fixes my one line thinko where I was clearing
      the vector_irq entries on the wrong cpus.
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      994bd4f9
    • Vasily Tarasov's avatar
      [PATCH] block layer: ioprio_best function fix · d58cdfb8
      Vasily Tarasov authored
      Currently ioprio_best function first checks wethere aioprio or bioprio equals
      IOPRIO_CLASS_NONE (ioprio_valid() macros does that) and if it is so it returns
      bioprio/aioprio appropriately. Thus the next four lines, that set aclass/bclass
      to IOPRIO_CLASS_BE, if aclass/bclass == IOPRIO_CLASS_NONE, are never executed.
      
      The second problem: if aioprio from class IOPRIO_CLASS_NONE and bioprio from
      class IOPRIO_CLASS_IDLE are passed to ioprio_best function, it will return
      IOPRIO_CLASS_IDLE. It means that during __make_request we can merge two
      requests and set the priority of merged request to IDLE, while one of
      the initial requests originates from a process with NONE (default) priority.
      So we can get a situation when a process with default ioprio will experience
      IO starvation, while there is no process from real-time class in the system.
      
      Just removing ioprio_valid check should correct situation.
      Signed-off-by: default avatarVasily Tarasov <vtaras@openvz.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      d58cdfb8
    • Jens Axboe's avatar
      [PATCH] ide-cd: fix breakage with internally queued commands · cea2885a
      Jens Axboe authored
      We still need to maintain a private PC style command, since it
      isn't completely unified with REQ_TYPE_BLOCK_PC yet.
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      cea2885a
    • Vasily Tarasov's avatar
      [PATCH] block layer: elv_iosched_show should get elv_list_lock · c5841642
      Vasily Tarasov authored
      elv_iosched_show function iterates other elv_list, hence
      elv_list_lock should be got.
      Signed-off-by: default avatarVasily Tarasov <vtaras@openvz.org>
      Signed-off-by: default avatarVasily Tarasov <jens.axboe@oracle.com>
      c5841642
    • Jens Axboe's avatar
      [PATCH] splice: fix pipe_to_file() ->prepare_write() error path · e6e80f29
      Jens Axboe authored
      Don't jump to the unlock+release path, we already did that.
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      e6e80f29
    • Vasily Tarasov's avatar
      [PATCH] block layer: elevator_find function cleanup · a22b169d
      Vasily Tarasov authored
      We can easily produce search through the elevator list
      without introducing additional elevator_type variable.
      Signed-off-by: default avatarVasily Tarasov <vtaras@openvz.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      a22b169d
    • Jens Axboe's avatar
      [PATCH] elevator: elevator_type member not used · 2b1191af
      Jens Axboe authored
      elevator_type field in elevator_type structure is useless:
      it isn't used anywhere in kernel sources.
      Signed-off-by: default avatarVasily Tarasov <vtaras@openvz.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      2b1191af
    • Akinbou Mita's avatar
      [PKT_SCHED] sch_htb: use rb_first() cleanup · 30bdbe39
      Akinbou Mita authored
      Use rb_first() to get first entry in rb tree.
      Signed-off-by: default avatarAkinbou Mita <akinobu.mita@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      30bdbe39
    • Patrick McHardy's avatar
      [RTNETLINK]: Fix use of wrong skb in do_getlink() · b974179a
      Patrick McHardy authored
      skb is the netlink query, nskb is the reply message.
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b974179a
    • Patrick McHardy's avatar
      [DECNET]: Fix sfuzz hanging on 2.6.18 · 52c41a32
      Patrick McHardy authored
      Dave Jones wrote:
      > sfuzz         D 724EF62A  2828 28717  28691                     (NOTLB)
      >        cd69fe98 00000082 0000012d 724ef62a 0001971a 00000010 00000007 df6d22b0 
      >        dfd81080 725bbc5e 0001971a 000cc634 00000001 df6d23bc c140e260 00000202 
      >        de1d5ba0 cd69fea0 de1d5ba0 00000000 00000000 de1d5b60 de1d5b8c de1d5ba0 
      > Call Trace:
      >  [<c05b1708>] lock_sock+0x75/0xa6
      >  [<e0b0b604>] dn_getname+0x18/0x5f [decnet]
      >  [<c05b083b>] sys_getsockname+0x5c/0xb0
      >  [<c05b0b46>] sys_socketcall+0xef/0x261
      >  [<c0403f97>] syscall_call+0x7/0xb
      > DWARF2 unwinder stuck at syscall_call+0x7/0xb
      > 
      > I wonder if the plethora of lockdep related changes inadvertantly broke something?
      
      Looks like unbalanced locking.
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      52c41a32
    • David S. Miller's avatar
      [NET]: Do not memcmp() over pad bytes of struct flowi. · 8238b218
      David S. Miller authored
      They are not necessarily initialized to zero by the compiler,
      for example when using run-time initializers of automatic
      on-stack variables.
      
      Noticed by Eric Dumazet and Patrick McHardy.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8238b218
    • YOSHIFUJI Hideaki's avatar
    • YOSHIFUJI Hideaki's avatar
    • YOSHIFUJI Hideaki's avatar
    • YOSHIFUJI Hideaki's avatar
    • Joerg Roedel's avatar
      [IPV6]: Seperate sit driver to extra module (addrconf.c changes) · 0be669bb
      Joerg Roedel authored
      This patch contains the changes to net/ipv6/addrconf.c to remove sit
      specific code if the sit driver is not selected.
      Signed-off-by: default avatarJoerg Roedel <joro-lkml@zlug.org>
      Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0be669bb
    • Joerg Roedel's avatar
      [IPV6]: Seperate sit driver to extra module · 989e5b96
      Joerg Roedel authored
      This patch removes the driver of the IPv6-in-IPv4 tunnel driver (sit)
      from the IPv6 module. It adds an option to Kconfig which makes it
      possible to compile it as a seperate module.
      Signed-off-by: default avatarJoerg Roedel <joro-lkml@zlug.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      989e5b96
    • Miklos Szeredi's avatar
      [NET]: File descriptor loss while receiving SCM_RIGHTS · effee6a0
      Miklos Szeredi authored
      If more than one file descriptor was sent with an SCM_RIGHTS message,
      and on the receiving end, after installing a nonzero (but not all)
      file descritpors the process runs out of fds, then the already
      installed fds will be lost (userspace will have no way of knowing
      about them).
      
      The following patch makes sure, that at least the already installed
      fds are sent to userspace.  It doesn't solve the issue of losing file
      descriptors in case of an EFAULT on the userspace buffer.
      Signed-off-by: default avatarMiklos Szeredi <miklos@szeredi.hu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      effee6a0
    • Vlad Yasevich's avatar
      [SCTP]: Fix the RX queue size shown in /proc/net/sctp/assocs output. · 6aa2551c
      Vlad Yasevich authored
      Show the true receive buffer usage.
      Signed-off-by: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
      Signed-off-by: default avatarSridhar Samudrala <sri@us.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6aa2551c
    • Vlad Yasevich's avatar
      [SCTP]: Fix receive buffer accounting. · 331c4ee7
      Vlad Yasevich authored
      When doing receiver buffer accounting, we always used skb->truesize.
      This is problematic when processing bundled DATA chunks because for
      every DATA chunk that could be small part of one large skb, we would
      charge the size of the entire skb.  The new approach is to store the
      size of the DATA chunk we are accounting for in the sctp_ulpevent
      structure and use that stored value for accounting.
      Signed-off-by: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
      Signed-off-by: default avatarSridhar Samudrala <sri@us.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      331c4ee7
    • Chad Sellers's avatar
      SELinux: Bug fix in polidydb_destroy · 6e8c751e
      Chad Sellers authored
      This patch fixes two bugs in policydb_destroy. Two list pointers
      (policydb.ocontexts[i] and policydb.genfs) were not being reset to NULL when
      the lists they pointed to were being freed. This caused a problem when the
      initial policy load failed, as the policydb being destroyed was not a
      temporary new policydb that was thrown away, but rather was the global
      (active) policydb. Consequently, later functions, particularly
      sys_bind->selinux_socket_bind->security_node_sid and
      do_rw_proc->selinux_sysctl->selinux_proc_get_sid->security_genfs_sid tried
      to dereference memory that had previously been freed.
      Signed-off-by: default avatarChad Sellers <csellers@tresys.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      6e8c751e
    • Venkat Yekkirala's avatar
      IPsec: fix handling of errors for socket policies · 3bccfbc7
      Venkat Yekkirala authored
      This treats the security errors encountered in the case of
      socket policy matching, the same as how these are treated in
      the case of main/sub policies, which is to return a full lookup
      failure.
      Signed-off-by: default avatarVenkat Yekkirala <vyekkirala@TrustedCS.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      3bccfbc7
    • Venkat Yekkirala's avatar
      IPsec: correct semantics for SELinux policy matching · 5b368e61
      Venkat Yekkirala authored
      Currently when an IPSec policy rule doesn't specify a security
      context, it is assumed to be "unlabeled" by SELinux, and so
      the IPSec policy rule fails to match to a flow that it would
      otherwise match to, unless one has explicitly added an SELinux
      policy rule allowing the flow to "polmatch" to the "unlabeled"
      IPSec policy rules. In the absence of such an explicitly added
      SELinux policy rule, the IPSec policy rule fails to match and
      so the packet(s) flow in clear text without the otherwise applicable
      xfrm(s) applied.
      
      The above SELinux behavior violates the SELinux security notion of
      "deny by default" which should actually translate to "encrypt by
      default" in the above case.
      
      This was first reported by Evgeniy Polyakov and the way James Morris
      was seeing the problem was when connecting via IPsec to a
      confined service on an SELinux box (vsftpd), which did not have the
      appropriate SELinux policy permissions to send packets via IPsec.
      
      With this patch applied, SELinux "polmatching" of flows Vs. IPSec
      policy rules will only come into play when there's a explicit context
      specified for the IPSec policy rule (which also means there's corresponding
      SELinux policy allowing appropriate domains/flows to polmatch to this context).
      
      Secondly, when a security module is loaded (in this case, SELinux), the
      security_xfrm_policy_lookup() hook can return errors other than access denied,
      such as -EINVAL.  We were not handling that correctly, and in fact
      inverting the return logic and propagating a false "ok" back up to
      xfrm_lookup(), which then allowed packets to pass as if they were not
      associated with an xfrm policy.
      
      The solution for this is to first ensure that errno values are
      correctly propagated all the way back up through the various call chains
      from security_xfrm_policy_lookup(), and handled correctly.
      
      Then, flow_cache_lookup() is modified, so that if the policy resolver
      fails (typically a permission denied via the security module), the flow
      cache entry is killed rather than having a null policy assigned (which
      indicates that the packet can pass freely).  This also forces any future
      lookups for the same flow to consult the security module (e.g. SELinux)
      for current security policy (rather than, say, caching the error on the
      flow cache entry).
      
      This patch: Fix the selinux side of things.
      
      This makes sure SELinux polmatching of flow contexts to IPSec policy
      rules comes into play only when an explicit context is associated
      with the IPSec policy rule.
      
      Also, this no longer defaults the context of a socket policy to
      the context of the socket since the "no explicit context" case
      is now handled properly.
      Signed-off-by: default avatarVenkat Yekkirala <vyekkirala@TrustedCS.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      5b368e61
    • James Morris's avatar
      IPsec: propagate security module errors up from flow_cache_lookup · 134b0fc5
      James Morris authored
      When a security module is loaded (in this case, SELinux), the
      security_xfrm_policy_lookup() hook can return an access denied permission
      (or other error).  We were not handling that correctly, and in fact
      inverting the return logic and propagating a false "ok" back up to
      xfrm_lookup(), which then allowed packets to pass as if they were not
      associated with an xfrm policy.
      
      The way I was seeing the problem was when connecting via IPsec to a
      confined service on an SELinux box (vsftpd), which did not have the
      appropriate SELinux policy permissions to send packets via IPsec.
      
      The first SYNACK would be blocked, because of an uncached lookup via
      flow_cache_lookup(), which would fail to resolve an xfrm policy because
      the SELinux policy is checked at that point via the resolver.
      
      However, retransmitted SYNACKs would then find a cached flow entry when
      calling into flow_cache_lookup() with a null xfrm policy, which is
      interpreted by xfrm_lookup() as the packet not having any associated
      policy and similarly to the first case, allowing it to pass without
      transformation.
      
      The solution presented here is to first ensure that errno values are
      correctly propagated all the way back up through the various call chains
      from security_xfrm_policy_lookup(), and handled correctly.
      
      Then, flow_cache_lookup() is modified, so that if the policy resolver
      fails (typically a permission denied via the security module), the flow
      cache entry is killed rather than having a null policy assigned (which
      indicates that the packet can pass freely).  This also forces any future
      lookups for the same flow to consult the security module (e.g. SELinux)
      for current security policy (rather than, say, caching the error on the
      flow cache entry).
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      134b0fc5
    • paul.moore@hp.com's avatar
      NetLabel: use SECINITSID_UNLABELED for a base SID · 388b2405
      paul.moore@hp.com authored
      This patch changes NetLabel to use SECINITSID_UNLABLELED as it's source of
      SELinux type information when generating a NetLabel context.
      Signed-off-by: default avatarPaul Moore <paul.moore@hp.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      388b2405
    • paul.moore@hp.com's avatar
      NetLabel: fix a cache race condition · ffb733c6
      paul.moore@hp.com authored
      Testing revealed a problem with the NetLabel cache where a cached entry could
      be freed while in use by the LSM layer causing an oops and other problems.
      This patch fixes that problem by introducing a reference counter to the cache
      entry so that it is only freed when it is no longer in use.
      Signed-off-by: default avatarPaul Moore <paul.moore@hp.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      ffb733c6
    • Martin Habets's avatar
      [SPARC32]: Fix sparc32 modpost warnings. · ab5da288
      Martin Habets authored
      Fix these 2.6.19-rc1 build warnings from modpost:
      
      WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'core_kernel_text' (at offset 0x3e060) and '__kernel_text_address'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'core_kernel_text' (at offset 0x3e064) and '__kernel_text_address'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'core_kernel_text' (at offset 0x3e07c) and '__kernel_text_address'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'core_kernel_text' (at offset 0x3e080) and '__kernel_text_address'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'is_ksym_addr' (at offset 0x4b3a4) and 'kallsyms_expand_symbol'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'is_ksym_addr' (at offset 0x4b3a8) and 'kallsyms_expand_symbol'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'is_ksym_addr' (at offset 0x4b3b4) and 'kallsyms_expand_symbol'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'is_ksym_addr' (at offset 0x4b3e4) and 'kallsyms_expand_symbol'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'get_symbol_pos' (at offset 0x4b640) and 'kallsyms_lookup_size_offset'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'get_symbol_pos' (at offset 0x4b644) and 'kallsyms_lookup_size_offset'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'get_symbol_pos' (at offset 0x4b654) and 'kallsyms_lookup_size_offset'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'get_symbol_pos' (at offset 0x4b658) and 'kallsyms_lookup_size_offset'
      WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'get_symbol_pos' (at offset 0x4b68c) and 'kallsyms_lookup_size_offset'
      
      The crux of the matter is that modpost only checks the relocatable
      sections. i386 vmlinux has none, so modpost does no checking on it (it
      does on the modules).  However, sparc vmlinux has plenty of
      relocatable sections because it is being built with 'ld -r' (to allow
      for btfixup processing).  So for sparc, modpost does do a lot of
      checking. Sure enough, running modpost on arch/sparc/boot/image yields
      no output (i.e. all is well).
      
      modpost.c check_sec_ref() has:
                      /* We want to process only relocation sections and not .init */
                      if (sechdrs[i].sh_type == SHT_RELA) {
      			// check here
                      } else if (sechdrs[i].sh_type == SHT_REL) {
      			// check here
      		}
      Signed-off-by: default avatarMartin Habets <errandir_news@mph.eclipse.co.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ab5da288
    • Martin Habets's avatar
      [SPARC32]: Fix sparc32 modpost warnings with sunzilog · eba8cefc
      Martin Habets authored
      Fix this 2.6.19-rc1 build warnings from modpost:
      
      WARNING: vmlinux - Section mismatch: reference to .init.text:sunzilog_console_setup from .data between 'sunzilog_console' (at offset 0x8394) and 'devices_subsys'
      Signed-off-by: default avatarMartin Habets <errandir_news@mph.eclipse.co.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eba8cefc
    • Martin Habets's avatar
      [SPARC32]: Mark srmmu_nocache_init as __init. · e3096de3
      Martin Habets authored
      Fix these 2.6.19-rc1 build warnings from modpost:
      
      WARNING: vmlinux - Section mismatch: reference to .init.text:__alloc_bootmem from .text between 'srmmu_nocache_init' (at offset 0x1a0f8) and 'srmmu_mmu_info'
      WARNING: vmlinux - Section mismatch: reference to .init.text:__alloc_bootmem from .text between 'srmmu_nocache_init' (at offset 0x1a118) and 'srmmu_mmu_info'
      WARNING: vmlinux - Section mismatch: reference to .init.text:srmmu_early_allocate_ptable_skeleton from .text between 'srmmu_nocache_init' (at offset 0x1a188) and 'srmmu_mmu_info'
      Signed-off-by: default avatarMartin Habets <errandir_news@mph.eclipse.co.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3096de3
    • David S. Miller's avatar
      c2baeb05
    • Ryusuke Sakato's avatar
      sh: SH-4A UBC support · 8ae91b9a
      Ryusuke Sakato authored
      A simple patch to enable the UBC on SH-4A.
      Signed-off-by: default avatarRyusuke Sakato <sakato@hsdv.com>
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      8ae91b9a
    • Paul Mundt's avatar
      sh: interrupt exception handling rework · baf4326e
      Paul Mundt authored
      Kill off interrupt_table for all of the CPU subtypes, we now
      default in to stepping in to do_IRQ() for _all_ IRQ exceptions
      and counting the spurious ones, rather than simply flipping on
      the ones we cared about. This and enabling the IRQ by default
      automatically has already uncovered a couple of bugs and IRQs
      that weren't being caught, as well as some that are being
      generated far too often (SCI Tx Data Empty, for example).
      
      The general rationale is to use a marker for interrupt exceptions,
      test for it in the handle_exception() path, and skip out to
      do_IRQ() if it's found. Everything else follows the same behaviour
      of finding the cached EXPEVT value in r2/r2_bank, we just rip out
      the INTEVT read from entry.S entirely (except for in the kGDB NMI
      case, which is another matter).
      
      Note that while this changes the do_IRQ() semantics regarding r4
      handling, they were fundamentally broken anyways (relying entirely
      on r2_bank for the cached code). With this, we do the INTEVT read
      from do_IRQ() itself (in the CONFIG_CPU_HAS_INTEVT case), or fall
      back on r4 for the muxed IRQ number, which should also be closer
      to what SH-2 and SH-2A want anyways.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      baf4326e
    • Paul Mundt's avatar
      sh: Default enable R7780RP IRQs. · 8884c4cb
      Paul Mundt authored
      Now that we've started accounting for spurious IRQs, change the
      logic somewhat so that we have a better chance of catching them.
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      8884c4cb
  2. 11 Oct, 2006 2 commits