1. 10 Jun, 2009 8 commits
    • Linus Torvalds's avatar
      Merge branch 'sched-core-for-linus' of... · 99e97b86
      Linus Torvalds authored
      Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        sched: fix typo in sched-rt-group.txt file
        ftrace: fix typo about map of kernel priority in ftrace.txt file.
        sched: properly define the sched_group::cpumask and sched_domain::span fields
        sched, timers: cleanup avenrun users
        sched, timers: move calc_load() to scheduler
        sched: Don't export sched_mc_power_savings on multi-socket single core system
        sched: emit thread info flags with stack trace
        sched: rt: document the risk of small values in the bandwidth settings
        sched: Replace first_cpu() with cpumask_first() in ILB nomination code
        sched: remove extra call overhead for schedule()
        sched: use group_first_cpu() instead of cpumask_first(sched_group_cpus())
        wait: don't use __wake_up_common()
        sched: Nominate a power-efficient ilb in select_nohz_balancer()
        sched: Nominate idle load balancer from a semi-idle package.
        sched: remove redundant hierarchy walk in check_preempt_wakeup
      99e97b86
    • Linus Torvalds's avatar
      Merge branch 'x86-kbuild-for-linus' of... · 82782ca7
      Linus Torvalds authored
      Merge branch 'x86-kbuild-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'x86-kbuild-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (46 commits)
        x86, boot: add new generated files to the appropriate .gitignore files
        x86, boot: correct the calculation of ZO_INIT_SIZE
        x86-64: align __PHYSICAL_START, remove __KERNEL_ALIGN
        x86, boot: correct sanity checks in boot/compressed/misc.c
        x86: add extension fields for bootloader type and version
        x86, defconfig: update kernel position parameters
        x86, defconfig: update to current, no material changes
        x86: make CONFIG_RELOCATABLE the default
        x86: default CONFIG_PHYSICAL_START and CONFIG_PHYSICAL_ALIGN to 16 MB
        x86: document new bzImage fields
        x86, boot: make kernel_alignment adjustable; new bzImage fields
        x86, boot: remove dead code from boot/compressed/head_*.S
        x86, boot: use LOAD_PHYSICAL_ADDR on 64 bits
        x86, boot: make symbols from the main vmlinux available
        x86, boot: determine compressed code offset at compile time
        x86, boot: use appropriate rep string for move and clear
        x86, boot: zero EFLAGS on 32 bits
        x86, boot: set up the decompression stack as early as possible
        x86, boot: straighten out ranges to copy/zero in compressed/head*.S
        x86, boot: stylistic cleanups for boot/compressed/head_64.S
        ...
      
      Fixed trivial conflict in arch/x86/configs/x86_64_defconfig manually
      82782ca7
    • Linus Torvalds's avatar
      Merge branch 'irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip · f0d5e12b
      Linus Torvalds authored
      * 'irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (76 commits)
        x86, apic: Fix dummy apic read operation together with broken MP handling
        x86, apic: Restore irqs on fail paths
        x86: Print real IOAPIC version for x86-64
        x86: enable_update_mptable should be a macro
        sparseirq: Allow early irq_desc allocation
        x86, io-apic: Don't mark pin_programmed early
        x86, irq: don't call mp_config_acpi_gsi() if update_mptable is not enabled
        x86, irq: update_mptable needs pci_routeirq
        x86: don't call read_apic_id if !cpu_has_apic
        x86, apic: introduce io_apic_irq_attr
        x86/pci: add 4 more return parameters to IO_APIC_get_PCI_irq_vector(), fix
        x86: read apic ID in the !acpi_lapic case
        x86: apic: Fixmap apic address even if apic disabled
        x86: display extended apic registers with print_local_APIC and cpu_debug code
        x86: read apic ID in the !acpi_lapic case
        x86: clean up and fix setup_clear/force_cpu_cap handling
        x86: apic: Check rev 3 fadt correctly for physical_apic bit
        x86/pci: update pirq_enable_irq() to setup io apic routing
        x86/acpi: move setup io apic routing out of CONFIG_ACPI scope
        x86/pci: add 4 more return parameters to IO_APIC_get_PCI_irq_vector()
        ...
      f0d5e12b
    • Harald Welte's avatar
      CPUFREQ: Mark e_powersaver driver as EXPERIMENTAL and DANGEROUS · 0fea615e
      Harald Welte authored
      The e_powersaver driver for VIA's C7 CPU's needs to be marked as
      DANGEROUS as it configures the CPU to power states that are out
      of specification.
      
      According to Centaur, all systems with C7 and Nano CPU's support
      the ACPI p-state method.  Thus, the acpi-cpufreq driver should
      be used instead.
      Signed-off-by: default avatarHarald Welte <HaraldWelte@viatech.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0fea615e
    • Harald Welte's avatar
      CPUFREQ: Enable acpi-cpufreq driver for VIA/Centaur CPUs · 0de51088
      Harald Welte authored
      The VIA/Centaur C7, C7-M and Nano CPU's all support ACPI based cpu p-states
      using a MSR interface.  The Linux driver just never made use of it, since in
      addition to the check for the EST flag it also checked if the vendor is Intel.
      Signed-off-by: default avatarHarald Welte <HaraldWelte@viatech.com>
      [ Removed the vendor checks entirely  - Linus ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0de51088
    • Linus Torvalds's avatar
      Make /dev/zero reads interruptible by signals · 2b838687
      Linus Torvalds authored
      This helps with bad latencies for large reads from /dev/zero, but might
      conceivably break some application that "knows" that a read of /dev/zero
      cannot return early.  So do this early in the merge window to give us
      maximal test coverage, even if the patch is totally trivial.
      
      Obviously, no well-behaved application should ever depend on the read
      being uninterruptible, but hey, bugs happen.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2b838687
    • Linus Torvalds's avatar
      Linux 2.6.30 · 07a2039b
      Linus Torvalds authored
      07a2039b
    • Peter Botha's avatar
      char: mxser, fix ISA board lookup · 96050dfb
      Peter Botha authored
      There's a bug in the mxser kernel module that still appears in the
      2.6.29.4 kernel.
      
      mxser_get_ISA_conf takes a ioaddress as its first argument, by passing the
      not of the ioaddr, you're effectively passing 0 which means it won't be
      able to talk to an ISA card.  I have tested this, and removing the !
      fixes the problem.
      
      Cc: "Peter Botha" <peterb@goldcircle.co.za>
      Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
      Acked-by: default avatarAlan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      96050dfb
  2. 09 Jun, 2009 16 commits
    • Jan Kara's avatar
      jbd: fix race in buffer processing in commit code · a61d90d7
      Jan Kara authored
      In commit code, we scan buffers attached to a transaction.  During this
      scan, we sometimes have to drop j_list_lock and then we recheck whether
      the journal buffer head didn't get freed by journal_try_to_free_buffers().
       But checking for buffer_jbd(bh) isn't enough because a new journal head
      could get attached to our buffer head.  So add a check whether the journal
      head remained the same and whether it's still at the same transaction and
      list.
      
      This is a nasty bug and can cause problems like memory corruption (use after
      free) or trigger various assertions in JBD code (observed).
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Cc: <stable@kernel.org>
      Cc: <linux-ext4@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a61d90d7
    • Ian Kent's avatar
      autofs4: remove hashed check in validate_wait() · 463aea1a
      Ian Kent authored
      The recent ->lookup() deadlock correction required the directory inode
      mutex to be dropped while waiting for expire completion.  We were
      concerned about side effects from this change and one has been identified.
      
      I saw several error messages.
      
      They cause autofs to become quite confused and don't really point to the
      actual problem.
      
      Things like:
      
      handle_packet_missing_direct:1376: can't find map entry for (43,1827932)
      
      which is usually totally fatal (although in this case it wouldn't be
      except that I treat is as such because it normally is).
      
      do_mount_direct: direct trigger not valid or already mounted
      /test/nested/g3c/s1/ss1
      
      which is recoverable, however if this problem is at play it can cause
      autofs to become quite confused as to the dependencies in the mount tree
      because mount triggers end up mounted multiple times.  It's hard to
      accurately check for this over mounting case and automount shouldn't need
      to if the kernel module is doing its job.
      
      There was one other message, similar in consequence of this last one but I
      can't locate a log example just now.
      
      When checking if a mount has already completed prior to adding a new mount
      request to the wait queue we check if the dentry is hashed and, if so, if
      it is a mount point.  But, if a mount successfully completed while we
      slept on the wait queue mutex the dentry must exist for the mount to have
      completed so the test is not really needed.
      
      Mounts can also be done on top of a global root dentry, so for the above
      case, where a mount request completes and the wait queue entry has already
      been removed, the hashed test returning false can cause an incorrect
      callback to the daemon.  Also, d_mountpoint() is not sufficient to check
      if a mount has completed for the multi-mount case when we don't have a
      real mount at the base of the tree.
      Signed-off-by: default avatarIan Kent <raven@themaw.net>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      463aea1a
    • Mike Frysinger's avatar
      shm: fix unused warnings on nommu · 586c7e6a
      Mike Frysinger authored
      The massive nommu update (8feae131) resulted in these warnings:
      ipc/shm.c: In function `sys_shmdt':
      ipc/shm.c:974: warning: unused variable `size'
      ipc/shm.c:972: warning: unused variable `next'
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      586c7e6a
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus · 13df635f
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
        kvm: fix kvm reboot crash when MAXSMP is used
        cpumask: alloc zeroed cpumask for static cpumask_var_ts
        cpumask: introduce zalloc_cpumask_var
      13df635f
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block · 9cdba302
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
        bsg: setting rq->bio to NULL
      9cdba302
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · fd4d3429
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
        cls_cgroup: Fix oops when user send improperly 'tc filter add' request
        r8169: fix crash when large packets are received
      fd4d3429
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://neil.brown.name/md · 4d11eff6
      Linus Torvalds authored
      * 'for-linus' of git://neil.brown.name/md:
        md/raid5: fix bug in reshape code when chunk_size decreases.
        md/raid5 - avoid deadlocks in get_active_stripe during reshape
        md/raid5: use conf->raid_disks in preference to mddev->raid_disk
      4d11eff6
    • FUJITA Tomonori's avatar
      bsg: setting rq->bio to NULL · c1d4c41f
      FUJITA Tomonori authored
      Due to commit 1cd96c24 ("block: WARN
      in __blk_put_request() for potential bio leak"), BSG SMP requests get
      the false warnings:
      
      WARNING: at block/blk-core.c:1068 __blk_put_request+0x52/0xc0()
      
      This sets rq->bio to NULL to avoid that false warnings.
      Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      c1d4c41f
    • Avi Kivity's avatar
      kvm: fix kvm reboot crash when MAXSMP is used · 8437a617
      Avi Kivity authored
      one system was found there is crash during reboot then kvm/MAXSMP
      Sending all processes the KILL signal...                              done
      Please stand by while rebooting the system...
      [ 1721.856538] md: stopping all md devices.
      [ 1722.852139] kvm: exiting hardware virtualization
      [ 1722.854601] BUG: unable to handle kernel NULL pointer dereference at (null)
      [ 1722.872219] IP: [<ffffffff8102c6b6>] hardware_disable+0x4c/0xb4
      [ 1722.877955] PGD 0
      [ 1722.880042] Oops: 0000 [#1] SMP
      [ 1722.892548] last sysfs file: /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/host0/target0:2:0/0:2:0:0/vendor
      [ 1722.900977] CPU 9
      [ 1722.912606] Modules linked in:
      [ 1722.914226] Pid: 0, comm: swapper Not tainted 2.6.30-rc7-tip-01843-g2305324-dirty #299 ...
      [ 1722.932589] RIP: 0010:[<ffffffff8102c6b6>]  [<ffffffff8102c6b6>] hardware_disable+0x4c/0xb4
      [ 1722.942709] RSP: 0018:ffffc900010b6ed8  EFLAGS: 00010046
      [ 1722.956121] RAX: 0000000000000000 RBX: ffffc9000e253140 RCX: 0000000000000009
      [ 1722.972202] RDX: 000000000000b020 RSI: ffffc900010c3220 RDI: ffffffffffffd790
      [ 1722.977399] RBP: ffffc900010b6f08 R08: 0000000000000000 R09: 0000000000000000
      [ 1722.995149] R10: 00000000000004b8 R11: 966912b6c78fddbd R12: 0000000000000009
      [ 1723.011551] R13: 000000000000b020 R14: 0000000000000009 R15: 0000000000000000
      [ 1723.019898] FS:  0000000000000000(0000) GS:ffffc900010b3000(0000) knlGS:0000000000000000
      [ 1723.034389] CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
      [ 1723.041164] CR2: 0000000000000000 CR3: 0000000001001000 CR4: 00000000000006e0
      [ 1723.056192] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [ 1723.072546] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      [ 1723.080562] Process swapper (pid: 0, threadinfo ffff88107e464000, task ffff88047e5a2550)
      [ 1723.096144] Stack:
      [ 1723.099071]  0000000000000046 ffffc9000e253168 966912b6c78fddbd ffffc9000e253140
      [ 1723.115471]  ffff880c7d4304d0 ffffc9000e253168 ffffc900010b6f28 ffffffff81011022
      [ 1723.132428]  ffffc900010b6f48 966912b6c78fddbd ffffc900010b6f48 ffffffff8100b83b
      [ 1723.141973] Call Trace:
      [ 1723.142981]  <IRQ> <0> [<ffffffff81011022>] kvm_arch_hardware_disable+0x26/0x3c
      [ 1723.158153]  [<ffffffff8100b83b>] hardware_disable+0x3f/0x55
      [ 1723.172168]  [<ffffffff810b95f6>] generic_smp_call_function_interrupt+0x76/0x13c
      [ 1723.178836]  [<ffffffff8104cbea>] smp_call_function_interrupt+0x3a/0x5e
      [ 1723.194689]  [<ffffffff81035bf3>] call_function_interrupt+0x13/0x20
      [ 1723.199750]  <EOI> <0> [<ffffffff814ad3b4>] ? acpi_idle_enter_c1+0xd3/0xf4
      [ 1723.217508]  [<ffffffff814ad3ae>] ? acpi_idle_enter_c1+0xcd/0xf4
      [ 1723.232172]  [<ffffffff814ad4bc>] ? acpi_idle_enter_bm+0xe7/0x2ce
      [ 1723.235141]  [<ffffffff81a8d93f>] ? __atomic_notifier_call_chain+0x0/0xac
      [ 1723.253381]  [<ffffffff818c3dff>] ? menu_select+0x58/0xd2
      [ 1723.258179]  [<ffffffff818c2c9d>] ? cpuidle_idle_call+0xa4/0xf3
      [ 1723.272828]  [<ffffffff81034085>] ? cpu_idle+0xb8/0x101
      [ 1723.277085]  [<ffffffff81a80163>] ? start_secondary+0x1bc/0x1d7
      [ 1723.293708] Code: b0 00 00 65 48 8b 04 25 28 00 00 00 48 89 45 e0 31 c0 48 8b 04 cd 30 ee 27 82 49 89 cc 49 89 d5 48 8b 04 10 48 8d b8 90 d7 ff ff <48> 8b 87 70 28 00 00 48 8d 98 90 d7 ff ff eb 16 e8 e9 fe ff ff
      [ 1723.335524] RIP  [<ffffffff8102c6b6>] hardware_disable+0x4c/0xb4
      [ 1723.342076]  RSP <ffffc900010b6ed8>
      [ 1723.352021] CR2: 0000000000000000
      [ 1723.354348] ---[ end trace e2aec53dae150aa1 ]---
      
      it turns out that we need clear cpus_hardware_enabled in that case.
      Reported-and-tested-by: default avatarYinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      8437a617
    • Yinghai Lu's avatar
      cpumask: alloc zeroed cpumask for static cpumask_var_ts · eaa95840
      Yinghai Lu authored
      These are defined as static cpumask_var_t so if MAXSMP is not used,
      they are cleared already.  Avoid surprises when MAXSMP is enabled.
      Signed-off-by: default avatarYinghai Lu <yinghai.lu@kernel.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      eaa95840
    • Yinghai Lu's avatar
      cpumask: introduce zalloc_cpumask_var · 0281b5dc
      Yinghai Lu authored
      So can get cpumask_var with cpumask_clear
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      0281b5dc
    • Minoru Usui's avatar
      cls_cgroup: Fix oops when user send improperly 'tc filter add' request · 52ea3a56
      Minoru Usui authored
      I found a bug in cls_cgroup_change() in cls_cgroup.c.
      cls_cgroup_change() expected tca[TCA_OPTIONS] was set from user space properly,
      but tc in iproute2-2.6.29-1 (which I used) didn't set it.
      
      In the current source code of tc in git, it set tca[TCA_OPTIONS].
      
        git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git
      
      If we always use a newest iproute2 in git when we use cls_cgroup, 
      we don't face this oops probably.
      But I think, kernel shouldn't panic regardless of use program's behaviour. 
      Signed-off-by: default avatarMinoru Usui <usui@mxm.nes.nec.co.jp>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      52ea3a56
    • Eric Dumazet's avatar
      r8169: fix crash when large packets are received · fdd7b4c3
      Eric Dumazet authored
      Michael Tokarev reported receiving a large packet could crash
      a machine with RTL8169 NIC.
      ( original thread at http://lkml.org/lkml/2009/6/8/192 )
      
      Problem is this driver tells that NIC frames up to 16383 bytes
      can be received but provides skb to rx ring allocated with
      smaller sizes (1536 bytes in case standard 1500 bytes MTU is used)
      
      When a frame larger than what was allocated by driver is received,
      dma transfert can occurs past the end of buffer and corrupt
      kernel memory.
      
      Fix is to tell to NIC what is the maximum size a frame can be.
      
      This bug is very old, (before git introduction, linux-2.6.10), and 
      should be backported to stable versions.
      Reported-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Tested-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fdd7b4c3
    • NeilBrown's avatar
      md/raid5: fix bug in reshape code when chunk_size decreases. · 0e6e0271
      NeilBrown authored
      Now that we support changing the chunksize, we calculate
      "reshape_sectors" to be the max of number of sectors in old
      and new chunk size.
      However there is one please where we still use 'chunksize'
      rather than 'reshape_sectors'.
      This causes a reshape that reduces the size of chunks to freeze.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      0e6e0271
    • NeilBrown's avatar
      md/raid5 - avoid deadlocks in get_active_stripe during reshape · a8c906ca
      NeilBrown authored
      md has functionality to 'quiesce' and array so that all pending
      IO completed and no new IO starts.  This is used to achieve a
      stable state before making internal changes.
      
      Currently this quiescing applies equally to normal IO, resync
      IO, and reshape IO.
      However there is a problem with applying it to reshape IO.
      Reshape can have multiple 'stripe_heads' that must be active together.
      If the quiesce come between allocating the first and the last of
      such a collection, then we deadlock, as the last will not be allocated
      until the quiesce is lifted, the quiesce will not be lifted until the
      first (which has been allocated) gets used, and that first cannot be
      used until the last is allocated.
      
      It is not necessary to inhibit reshape IO when a quiesce is
      requested.  Those places in the code that require a full quiesce will
      ensure the reshape thread is not running at all.
      
      So allow reshape requests to get access to new stripe_heads without
      being blocked by a 'quiesce'.
      
      This only affects in-place reshapes (i.e. where the array does not
      grow or shrink) and these are only newly supported.  So this patch is
      not needed in earlier kernels.
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      a8c906ca
    • NeilBrown's avatar
      md/raid5: use conf->raid_disks in preference to mddev->raid_disk · f001a70c
      NeilBrown authored
      mddev->raid_disks can be changed and any time by a request from
      user-space.  It is a suggestion as to what number of raid_disks is
      desired.
      
      conf->raid_disks can only be changed by the raid5 module with suitable
      locks in place.  It is a statement as to the current number of
      raid_disks.
      
      There are two places where the latter should be used, but the former
      is used.  This can lead to a crash when reshaping an array.
      
      This patch changes to mddev-> to conf->
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      f001a70c
  3. 08 Jun, 2009 14 commits
  4. 07 Jun, 2009 2 commits
    • Alessandro Rubini's avatar
      [ARM] 5543/1: arm: serial amba: add missing declaration in serial.h · aa853f85
      Alessandro Rubini authored
      This header is sometimes included in the uncompress stage to get
      register values, but no <linux/amba/bus.h> can be included there.
      So declare "struct amba_device" here before using it in a prototype.
      Signed-off-by: default avatarAlessandro Rubini <rubini@unipv.it>
      Acked-by: default avatarAndrea Gallo <andrea.gallo@stericsson.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      aa853f85
    • Cyrill Gorcunov's avatar
      x86, apic: Fix dummy apic read operation together with broken MP handling · 103428e5
      Cyrill Gorcunov authored
      Ingo Molnar reported that read_apic is buggy novadays:
      
      [    0.000000] Using APIC driver default
      [    0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs
      [    0.000000] Local APIC disabled by BIOS -- you can enable it with "lapic"
      [    0.000000] APIC: disable apic facility
      [    0.000000] ------------[ cut here ]------------
      [    0.000000] WARNING: at arch/x86/kernel/apic/apic.c:254 native_apic_read_dummy+0x2d/0x3b()
      [    0.000000] Hardware name: HP OmniBook PC
      
      Indeed we still rely on apic->read operation for SMP compiled
      kernel. And instead of disfigure the SMP code with #ifdef we
      allow to call apic->read. To capture any unexpected results
      we check for apic->read being called for sane reason via
      WARN_ON_ONCE but(!) instead of OR we should use AND logical
      operation (thanks Yinghai for spotting the root of the problem).
      
      Along with that we could be have bad MP table and we are
      to fix it that way no SMP started and no complains about
      BIOS bug if apic was just disabled via command line.
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      LKML-Reference: <20090607124840.GD4547@lenovo>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      103428e5