1. 19 11月, 2008 1 次提交
  2. 18 11月, 2008 2 次提交
    • Y
      x86: fix wakeup_cpu with numaq/es7000, v2, fix · 54ac14a8
      Yinghai Lu 提交于
      Impact: fix wakeup_secondary_cpu with hotplug
      
      We can not put that into x86_quirks, because that is __initdata.
      So try to move that to genapic, and add update_genapic in x86_quirks.
      
      later we even could use that stub to:
      
       1. autodetect CONFIG_ES7000_CLUSTERED_APIC
       2. more correct inquire_remote_apic with apic_verbosity setting.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      54ac14a8
    • Y
      x86: fix wakeup_cpu with numaq/es7000, v2 · 569712b2
      Yinghai Lu 提交于
      Impact: fix secondary-CPU wakeup/init path with numaq and es7000
      
      While looking at wakeup_secondary_cpu for WAKE_SECONDARY_VIA_NMI:
      
      |#ifdef WAKE_SECONDARY_VIA_NMI
      |/*
      | * Poke the other CPU in the eye via NMI to wake it up. Remember that the normal
      | * INIT, INIT, STARTUP sequence will reset the chip hard for us, and this
      | * won't ... remember to clear down the APIC, etc later.
      | */
      |static int __devinit
      |wakeup_secondary_cpu(int logical_apicid, unsigned long start_eip)
      |{
      |        unsigned long send_status, accept_status = 0;
      |        int maxlvt;
      |...
      |        if (APIC_INTEGRATED(apic_version[phys_apicid])) {
      |                maxlvt = lapic_get_maxlvt();
      
      I noticed that there is no warning about undefined phys_apicid...
      
      because WAKE_SECONDARY_VIA_NMI and WAKE_SECONDARY_VIA_INIT can not be
      defined at the same time. So NUMAQ is using wrong wakeup_secondary_cpu.
      
      WAKE_SECONDARY_VIA_NMI, WAKE_SECONDARY_VIA_INIT and
      WAKE_SECONDARY_VIA_MIP are variants of a weird and fragile
      preprocessor-driven "HAL" mechanisms to specify the kind of secondary-CPU
      wakeup strategy a given x86 kernel will use.
      
      The vast majority of systems want to use INIT for secondary wakeup - NUMAQ
      uses an NMI, (old-style-) ES7000 uses 'MIP' (a firmware driven in-memory
      flag to let secondaries continue).
      
      So convert these mechanisms to x86_quirks and add a
      ->wakeup_secondary_cpu() method to specify the rare exception
      to the sane default.
      
      Extend genapic accordingly as well, for 32-bit.
      
      While looking further, I noticed that functions in wakecup.h for numaq
      and es7000 are different to the default in mach_wakecpu.h - but smpboot.c
      will only use default mach_wakecpu.h with smphook.h.
      
      So we need to add mach_wakecpu.h for mach_generic, to properly support
      numaq and es7000, and vectorize the following SMP init methods:
      
      	int trampoline_phys_low;
      	int trampoline_phys_high;
      	void (*wait_for_init_deassert)(atomic_t *deassert);
      	void (*smp_callin_clear_local_apic)(void);
      	void (*store_NMI_vector)(unsigned short *high, unsigned short *low);
      	void (*restore_NMI_vector)(unsigned short *high, unsigned short *low);
      	void (*inquire_remote_apic)(int apicid);
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      569712b2
  3. 17 11月, 2008 3 次提交
  4. 16 11月, 2008 19 次提交
  5. 15 11月, 2008 15 次提交
    • T
      libata: improve phantom device detection · 6a6b97d3
      Tejun Heo 提交于
      Currently libata uses four methods to detect device presence.
      
      1. PHY status if available.
      2. TF register R/W test (only promotes presence, never demotes)
      3. device signature after reset
      4. IDENTIFY failure detection in SFF state machine
      
      Combination of the above works well in most cases but recently there
      have been a few reports where a phantom device causes unnecessary
      delay during probe.  In both cases, PHY status wasn't available.  In
      one case, it passed #2 and #3 and failed IDENTIFY with ATA_ERR which
      didn't qualify as #4.  The other failed #2 but as it passed #3 and #4,
      it still caused failure.
      
      In both cases, phantom device reported diagnostic failure, so these
      cases can be safely worked around by considering any !ATA_DRQ IDENTIFY
      failure as NODEV_HINT if diagnostic failure is set.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      6a6b97d3
    • R
      9p: restrict RDMA usage · 4ff429e6
      Randy Dunlap 提交于
      linux-next:
      
      Make 9p's RDMA option depend on INET since it uses Infiniband rdma_*
      functions and that code depends on INET.  Otherwise 9p can try to
      use symbols which don't exist.
      
      ERROR: "rdma_destroy_id" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_connect" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_create_id" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_create_qp" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_resolve_route" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_disconnect" [net/9p/9pnet_rdma.ko] undefined!
      ERROR: "rdma_resolve_addr" [net/9p/9pnet_rdma.ko] undefined!
      
      I used an if/endif block so that the menu items would remain
      presented together.
      
      Also correct an article adjective.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      4ff429e6
    • R
      Create/use more directory structure in the Documentation/ tree. · 31c00fc1
      Randy Dunlap 提交于
      Create Documentation/blockdev/ sub-directory and populate it.
      Populate the Documentation/serial/ sub-directory.
      Move MSI-HOWTO.txt to Documentation/PCI/.
      Move ioctl-number.txt to Documentation/ioctl/.
      Update all relevant 00-INDEX files.
      Update all relevant Kconfig files and source files.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      31c00fc1
    • M
      [S390] fix s390x_newuname · d2f019fe
      Martin Schwidefsky 提交于
      The uname system call for 64 bit compares current->personality without
      masking the upper 16 bits. If e.g. READ_IMPLIES_EXEC is set the result
      of a uname system call will always be s390x even if the process uses
      the s390 personality.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      d2f019fe
    • S
      [S390] dasd: log sense for fatal errors · a9cffb22
      Stefan Haberland 提交于
      The logging of sense data for fatal errors was accidentally removed
      during Hyper PAV implementation.
      Signed-off-by: NStefan Haberland <stefan.haberland@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      a9cffb22
    • H
      [S390] cpu topology: fix locking · 74af2831
      Heiko Carstens 提交于
      cpu_coregroup_map used to grab a mutex on s390 since it was only
      called from process context.
      Since c7c22e4d "block: add support
      for IO CPU affinity" this is not true anymore.
      It now also gets called from softirq context.
      
      To prevent possible deadlocks change this in architecture code and
      use a spinlock instead of a mutex.
      
      Cc: stable@kernel.org
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      74af2831
    • C
      [S390] cio: Fix refcount after moving devices. · 85acc407
      Cornelia Huck 提交于
      In ccw_device_move_to_orphanage(), a replacing ccw_device
      is searched via get_{disc,orphaned}_ccwdev_by_dev_id()
      which obtain a reference on the returned ccw_device.
      This reference must be given up again after the device
      has been moved to its new parent.
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      85acc407
    • H
      [S390] ftrace: fix kernel stack backchain walking · 50bec4ce
      Heiko Carstens 提交于
      With CONFIG_IRQSOFF_TRACER the trace_hardirqs_off() function includes
      a call to __builtin_return_address(1). But we calltrace_hardirqs_off()
      from early entry code. There we have just a single stack frame.
      So this results in a kernel stack backchain walk that would walk beyond
      the kernel stack. Following the NULL terminated backchain this results
      in a lowcore read access.
      
      To fix this we simply call trace_hardirqs_off_caller() and pass the
      current instruction pointer.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      50bec4ce
    • H
      [S390] ftrace: disable tracing on idle psw · 632448f6
      Heiko Carstens 提交于
      Disable tracing on idle psw. Otherwise it would give us huge
      preempt off times for idle. Which is rather pointless.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      632448f6
    • H
      [S390] lockdep: fix compile bug · af4c6874
      Heiko Carstens 提交于
      arch/s390/kernel/built-in.o: In function `cleanup_io_leave_insn':
      mem_detect.c:(.text+0x10592): undefined reference to `lockdep_sys_exit'
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      af4c6874
    • C
      [S390] kvm_s390: Fix oops in virtio device detection with "mem=" · cc835f78
      Christian Borntraeger 提交于
      The current virtio model on s390 has the descriptor page above the main
      memory. The guest virtio detection will oops if the mem= parameter is
      used to reduce/change the memory size.
      We have to use real_memory_size instead of max_pfn to detect the virtio
      descriptor pages.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      cc835f78
    • H
    • G
      [S390] Fix range for add_active_range() in setup_memory() · fb2e7c5e
      Gerald Schaefer 提交于
      add_active_range() expects start_pfn + size as end_pfn value, i.e. not
      the pfn of the last page frame but the one behind that.
      We used the pfn of the last page frame so far, which can lead to a
      BUG_ON in move_freepages(), when the kernelcore parameter is specified
      (page_zone(start_page) != page_zone(end_page)).
      Signed-off-by: NGerald Schaefer <gerald.schaefer@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      fb2e7c5e
    • M
      V4L/DVB (9624): CVE-2008-5033: fix OOPS on tvaudio when controlling bass/treble · 01a1a3cc
      Mauro Carvalho Chehab 提交于
      This bug were supposed to be fixed by 5ba2f67a,
      where a call to NULL happens.
      
      Not all tvaudio chips allow controlling bass/treble. So, the driver
      has a table with a flag to indicate if the chip does support it.
      
      Unfortunately, the handling of this logic were broken for a very long
      time (probably since the first module version). Due to that, an OOPS
      were generated for devices that don't support bass/treble.
      
      This were the resulting OOPS message before the patch, with debug messages
      enabled:
      
      tvaudio' 1-005b: VIDIOC_S_CTRL
      BUG: unable to handle kernel NULL pointer dereference at 00000000
      IP: [<00000000>]
      *pde = 22fda067 *pte = 00000000
      Oops: 0000 [#1] SMP
      Modules linked in: snd_hda_intel snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device
      snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_hwdep snd soundcore tuner_simple tuner_types tea5767 tuner
      tvaudio bttv bridgebnep rfcomm l2cap bluetooth it87 hwmon_vid hwmon fuse sunrpc ipt_REJECT
      nf_conntrack_ipv4 iptable_filter ip_tables ip6t_REJECT xt_tcpudp nf_conntrack_ipv6 xt_state nf_conntrack
      ip6table_filter ip6_tables x_tables ipv6 dm_mirrordm_multipath dm_mod configfs videodev v4l1_compat
      ir_common 8139cp compat_ioctl32 v4l2_common 8139too videobuf_dma_sg videobuf_core mii btcx_risc tveeprom
      i915 button snd_page_alloc serio_raw drm pcspkr i2c_algo_bit i2c_i801 i2c_core iTCO_wdt
      iTCO_vendor_support sr_mod cdrom sg ata_generic pata_acpi ata_piix libata sd_mod scsi_mod ext3 jbdmbcache
      uhci_hcd ohci_hcd ehci_hcd [last unloaded: soundcore]
      
      Pid: 15413, comm: qv4l2 Not tainted (2.6.25.14-108.fc9.i686 #1)
      EIP: 0060:[<00000000>] EFLAGS: 00210246 CPU: 0
      EIP is at 0x0
      EAX: 00008000 EBX: ebd21600 ECX: e2fd9ec4 EDX: 00200046
      ESI: f8c0f0c4 EDI: f8c0f0c4 EBP: e2fd9d50 ESP: e2fd9d2c
       DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      Process qv4l2 (pid: 15413, ti=e2fd9000 task=ebe44000 task.ti=e2fd9000)
      Stack: f8c0c6ae e2ff2a00 00000d00 e2fd9ec4 ebc4e000 e2fd9d5c f8c0c448 00000000
             f899c12a e2fd9d5c f899c154 e2fd9d68 e2fd9d80 c0560185 e2fd9d88 f8f3e1d8
             f8f3e1dc ebc4e034 f8f3e18c e2fd9ec4 00000000 e2fd9d90 f899c286 c008561c
      Call Trace:
       [<f8c0c6ae>] ? chip_command+0x266/0x4b6 [tvaudio]
       [<f8c0c448>] ? chip_command+0x0/0x4b6 [tvaudio]
       [<f899c12a>] ? i2c_cmd+0x0/0x2f [i2c_core]
       [<f899c154>] ? i2c_cmd+0x2a/0x2f [i2c_core]
       [<c0560185>] ? device_for_each_child+0x21/0x49
       [<f899c286>] ? i2c_clients_command+0x1c/0x1e [i2c_core]
       [<f8f283d8>] ? bttv_call_i2c_clients+0x14/0x16 [bttv]
       [<f8f23601>] ? bttv_s_ctrl+0x1bc/0x313 [bttv]
       [<f8f23445>] ? bttv_s_ctrl+0x0/0x313 [bttv]
       [<f8b6096d>] ? __video_do_ioctl+0x1f84/0x3726 [videodev]
       [<c05abb4e>] ? sock_aio_write+0x100/0x10d
       [<c041b23e>] ? kmap_atomic_prot+0x1dd/0x1df
       [<c043a0c9>] ? enqueue_hrtimer+0xc2/0xcd
       [<c04f4fa4>] ? copy_from_user+0x39/0x121
       [<f8b622b9>] ? __video_ioctl2+0x1aa/0x24a [videodev]
       [<c04054fd>] ? do_notify_resume+0x768/0x795
       [<c043c0f7>] ? getnstimeofday+0x34/0xd1
       [<c0437b77>] ? autoremove_wake_function+0x0/0x33
       [<f8b62368>] ? video_ioctl2+0xf/0x13 [videodev]
       [<c048c6f0>] ? vfs_ioctl+0x50/0x69
       [<c048c942>] ? do_vfs_ioctl+0x239/0x24c
       [<c048c995>] ? sys_ioctl+0x40/0x5b
       [<c0405bf2>] ? syscall_call+0x7/0xb
       [<c0620000>] ? cpuid4_cache_sysfs_exit+0x3d/0x69
       =======================
      Code:  Bad EIP value.
      EIP: [<00000000>] 0x0 SS:ESP 0068:e2fd9d2c
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      01a1a3cc
    • M
      V4L/DVB (9623): tvaudio: Improve debug msg by printing something more human · c6241b6c
      Mauro Carvalho Chehab 提交于
      Before the patch, the used ioctl were printed as an hexadecimal code,
      hard to be understand without consulting the way _IO macros work.
      Instead, use the V4L default handler for printing such errors into a way
      that would be easier to understand.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      c6241b6c