Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109984
b: refs/heads/master
c: c9bab96
h: refs/heads/master
v: v3
  • Loading branch information
Kevin Lloyd authored and Greg Kroah-Hartman committed Sep 23, 2008
1 parent ba3915e commit a886f29
Show file tree
Hide file tree
Showing 19 changed files with 26 additions and 90 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8553f321e0fd29821135ac4797b5f37bf80ae2e9
refs/heads/master: c9bab96bbfdda59fa8a35ba536c22e66055669e5
22 changes: 6 additions & 16 deletions trunk/arch/x86/kernel/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,23 +101,21 @@ static int iommu_queue_command(struct amd_iommu *iommu, struct iommu_cmd *cmd)
*/
static int iommu_completion_wait(struct amd_iommu *iommu)
{
int ret = 0, ready = 0;
int ret, ready = 0;
unsigned status = 0;
struct iommu_cmd cmd;
unsigned long flags, i = 0;
unsigned long i = 0;

memset(&cmd, 0, sizeof(cmd));
cmd.data[0] = CMD_COMPL_WAIT_INT_MASK;
CMD_SET_TYPE(&cmd, CMD_COMPL_WAIT);

iommu->need_sync = 0;

spin_lock_irqsave(&iommu->lock, flags);

ret = __iommu_queue_command(iommu, &cmd);
ret = iommu_queue_command(iommu, &cmd);

if (ret)
goto out;
return ret;

while (!ready && (i < EXIT_LOOP_COUNT)) {
++i;
Expand All @@ -132,8 +130,6 @@ static int iommu_completion_wait(struct amd_iommu *iommu)

if (unlikely((i == EXIT_LOOP_COUNT) && printk_ratelimit()))
printk(KERN_WARNING "AMD IOMMU: Completion wait loop failed\n");
out:
spin_unlock_irqrestore(&iommu->lock, flags);

return 0;
}
Expand All @@ -144,19 +140,16 @@ static int iommu_completion_wait(struct amd_iommu *iommu)
static int iommu_queue_inv_dev_entry(struct amd_iommu *iommu, u16 devid)
{
struct iommu_cmd cmd;
int ret;

BUG_ON(iommu == NULL);

memset(&cmd, 0, sizeof(cmd));
CMD_SET_TYPE(&cmd, CMD_INV_DEV_ENTRY);
cmd.data[0] = devid;

ret = iommu_queue_command(iommu, &cmd);

iommu->need_sync = 1;

return ret;
return iommu_queue_command(iommu, &cmd);
}

/*
Expand All @@ -166,7 +159,6 @@ static int iommu_queue_inv_iommu_pages(struct amd_iommu *iommu,
u64 address, u16 domid, int pde, int s)
{
struct iommu_cmd cmd;
int ret;

memset(&cmd, 0, sizeof(cmd));
address &= PAGE_MASK;
Expand All @@ -179,11 +171,9 @@ static int iommu_queue_inv_iommu_pages(struct amd_iommu *iommu,
if (pde) /* PDE bit - we wan't flush everything not only the PTEs */
cmd.data[2] |= CMD_INV_IOMMU_PAGES_PDE_MASK;

ret = iommu_queue_command(iommu, &cmd);

iommu->need_sync = 1;

return ret;
return iommu_queue_command(iommu, &cmd);
}

/*
Expand Down
17 changes: 5 additions & 12 deletions trunk/arch/x86/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,21 +246,16 @@ static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c)
return 1;
}

static cpumask_t c1e_mask = CPU_MASK_NONE;
static int c1e_detected;

void c1e_remove_cpu(int cpu)
{
cpu_clear(cpu, c1e_mask);
}

/*
* C1E aware idle routine. We check for C1E active in the interrupt
* pending message MSR. If we detect C1E, then we handle it the same
* way as C3 power states (local apic timer and TSC stop)
*/
static void c1e_idle(void)
{
static cpumask_t c1e_mask = CPU_MASK_NONE;
static int c1e_detected;

if (need_resched())
return;

Expand All @@ -270,10 +265,8 @@ static void c1e_idle(void)
rdmsr(MSR_K8_INT_PENDING_MSG, lo, hi);
if (lo & K8_INTP_C1E_ACTIVE_MASK) {
c1e_detected = 1;
if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC))
mark_tsc_unstable("TSC halt in AMD C1E");
printk(KERN_INFO "System has AMD C1E enabled\n");
set_cpu_cap(&boot_cpu_data, X86_FEATURE_AMDC1E);
mark_tsc_unstable("TSC halt in C1E");
printk(KERN_INFO "System has C1E enabled\n");
}
}

Expand Down
1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/process_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ static void cpu_exit_clear(void)
cpu_clear(cpu, cpu_callin_map);

numa_remove_cpu(cpu);
c1e_remove_cpu(cpu);
}

/* We don't actually take CPU down, just spin without interrupts. */
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/x86/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ DECLARE_PER_CPU(int, cpu_state);
static inline void play_dead(void)
{
idle_task_exit();
c1e_remove_cpu(raw_smp_processor_id());

mb();
/* Ack it */
__get_cpu_var(cpu_state) = CPU_DEAD;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/vsmp_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static void vsmp_irq_enable(void)
native_restore_fl((flags | X86_EFLAGS_IF) & (~X86_EFLAGS_AC));
}

static unsigned __init_or_module vsmp_patch(u8 type, u16 clobbers, void *ibuf,
static unsigned __init vsmp_patch(u8 type, u16 clobbers, void *ibuf,
unsigned long addr, unsigned len)
{
switch (type) {
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/x86/oprofile/nmi_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,10 @@ static void nmi_cpu_shutdown(void *dummy)

static void nmi_shutdown(void)
{
struct op_msrs *msrs;

struct op_msrs *msrs = &get_cpu_var(cpu_msrs);
nmi_enabled = 0;
on_each_cpu(nmi_cpu_shutdown, NULL, 1);
unregister_die_notifier(&profile_exceptions_nb);
msrs = &get_cpu_var(cpu_msrs);
model->shutdown(msrs);
free_msrs();
put_cpu_var(cpu_msrs);
Expand Down
12 changes: 0 additions & 12 deletions trunk/drivers/usb/storage/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -146,18 +146,6 @@ config USB_STORAGE_KARMA
on the resulting scsi device node returns the Karma to normal
operation.

config USB_STORAGE_SIERRA
bool "Sierra Wireless TRU-Install Feature Support"
depends on USB_STORAGE
help
Say Y here to include additional code to support Sierra Wireless
products with the TRU-Install feature (e.g., AC597E, AC881U).

This code switches the Sierra Wireless device from being in
Mass Storage mode to Modem mode. It also has the ability to
support host software upgrades should full Linux support be added
to TRU-Install.

config USB_STORAGE_CYPRESS_ATACB
bool "SAT emulation on Cypress USB/ATA Bridge with ATACB"
depends on USB_STORAGE
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/usb/storage/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ usb-storage-obj-$(CONFIG_USB_STORAGE_JUMPSHOT) += jumpshot.o
usb-storage-obj-$(CONFIG_USB_STORAGE_ALAUDA) += alauda.o
usb-storage-obj-$(CONFIG_USB_STORAGE_ONETOUCH) += onetouch.o
usb-storage-obj-$(CONFIG_USB_STORAGE_KARMA) += karma.o
usb-storage-obj-$(CONFIG_USB_STORAGE_SIERRA) += sierra_ms.o
usb-storage-obj-$(CONFIG_USB_STORAGE_CYPRESS_ATACB) += cypress_atacb.o

usb-storage-objs := scsiglue.o protocol.o transport.o usb.o \
initializers.o $(usb-storage-obj-y)
initializers.o sierra_ms.o $(usb-storage-obj-y)

ifneq ($(CONFIG_USB_LIBUSUAL),)
obj-$(CONFIG_USB) += libusual.o
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/usb/storage/unusual_devs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,6 @@ UNUSUAL_DEV( 0x10d6, 0x2200, 0x0100, 0x0100,
US_SC_DEVICE, US_PR_DEVICE, NULL,
0),

#ifdef CONFIG_USB_STORAGE_SIERRA
/* Reported by Kevin Lloyd <linux@sierrawireless.com>
* Entry is needed for the initializer function override,
* which instructs the device to load as a modem
Expand All @@ -1587,7 +1586,6 @@ UNUSUAL_DEV( 0x1199, 0x0fff, 0x0000, 0x9999,
"USB MMC Storage",
US_SC_DEVICE, US_PR_DEVICE, sierra_ms_init,
0),
#endif

/* Reported by Jaco Kroon <jaco@kroon.co.za>
* The usb-storage module found on the Digitech GNX4 (and supposedly other
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/usb/storage/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@
#ifdef CONFIG_USB_STORAGE_CYPRESS_ATACB
#include "cypress_atacb.h"
#endif
#ifdef CONFIG_USB_STORAGE_SIERRA
#include "sierra_ms.h"
#endif

/* Some informational data */
MODULE_AUTHOR("Matthew Dharm <mdharm-usb@one-eyed-alien.net>");
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/asm-x86/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate)
boot_cpu_data.x86_model <= 0x05 &&
boot_cpu_data.x86_mask < 0x0A)
return 1;
else if (boot_cpu_has(X86_FEATURE_AMDC1E))
return 1;
else
return max_cstate;
}
Expand Down
1 change: 0 additions & 1 deletion trunk/include/asm-x86/cpufeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
#define X86_FEATURE_LFENCE_RDTSC (3*32+18) /* Lfence synchronizes RDTSC */
#define X86_FEATURE_11AP (3*32+19) /* Bad local APIC aka 11AP */
#define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */
#define X86_FEATURE_AMDC1E (3*32+21) /* AMD C1E detected */

/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
#define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/asm-x86/idle.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ void idle_notifier_register(struct notifier_block *n);
void enter_idle(void);
void exit_idle(void);

void c1e_remove_cpu(int cpu);

#endif
2 changes: 1 addition & 1 deletion trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ hotplug_hrtick(struct notifier_block *nfb, unsigned long action, void *hcpu)
return NOTIFY_DONE;
}

static __init void init_hrtick(void)
static void init_hrtick(void)
{
hotcpu_notifier(hotplug_hrtick, 0);
}
Expand Down
12 changes: 2 additions & 10 deletions trunk/kernel/time/tick-broadcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ static void tick_do_broadcast_on_off(void *why)
case CLOCK_EVT_NOTIFY_BROADCAST_FORCE:
if (!cpu_isset(cpu, tick_broadcast_mask)) {
cpu_set(cpu, tick_broadcast_mask);
if (bc->mode == TICKDEV_MODE_PERIODIC)
if (td->mode == TICKDEV_MODE_PERIODIC)
clockevents_shutdown(dev);
}
if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE)
Expand All @@ -245,7 +245,7 @@ static void tick_do_broadcast_on_off(void *why)
if (!tick_broadcast_force &&
cpu_isset(cpu, tick_broadcast_mask)) {
cpu_clear(cpu, tick_broadcast_mask);
if (bc->mode == TICKDEV_MODE_PERIODIC)
if (td->mode == TICKDEV_MODE_PERIODIC)
tick_setup_periodic(dev, 0);
}
break;
Expand Down Expand Up @@ -575,12 +575,4 @@ void tick_shutdown_broadcast_oneshot(unsigned int *cpup)
spin_unlock_irqrestore(&tick_broadcast_lock, flags);
}

/*
* Check, whether the broadcast device is in one shot mode
*/
int tick_broadcast_oneshot_active(void)
{
return tick_broadcast_device.mode == TICKDEV_MODE_ONESHOT;
}

#endif
10 changes: 4 additions & 6 deletions trunk/kernel/time/tick-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ DEFINE_PER_CPU(struct tick_device, tick_cpu_device);
*/
ktime_t tick_next_period;
ktime_t tick_period;
int tick_do_timer_cpu __read_mostly = TICK_DO_TIMER_BOOT;
int tick_do_timer_cpu __read_mostly = -1;
DEFINE_SPINLOCK(tick_device_lock);

/*
Expand Down Expand Up @@ -109,8 +109,7 @@ void tick_setup_periodic(struct clock_event_device *dev, int broadcast)
if (!tick_device_is_functional(dev))
return;

if ((dev->features & CLOCK_EVT_FEAT_PERIODIC) &&
!tick_broadcast_oneshot_active()) {
if (dev->features & CLOCK_EVT_FEAT_PERIODIC) {
clockevents_set_mode(dev, CLOCK_EVT_MODE_PERIODIC);
} else {
unsigned long seq;
Expand Down Expand Up @@ -149,7 +148,7 @@ static void tick_setup_device(struct tick_device *td,
* If no cpu took the do_timer update, assign it to
* this cpu:
*/
if (tick_do_timer_cpu == TICK_DO_TIMER_BOOT) {
if (tick_do_timer_cpu == -1) {
tick_do_timer_cpu = cpu;
tick_next_period = ktime_get();
tick_period = ktime_set(0, NSEC_PER_SEC / HZ);
Expand Down Expand Up @@ -301,8 +300,7 @@ static void tick_shutdown(unsigned int *cpup)
if (*cpup == tick_do_timer_cpu) {
int cpu = first_cpu(cpu_online_map);

tick_do_timer_cpu = (cpu != NR_CPUS) ? cpu :
TICK_DO_TIMER_NONE;
tick_do_timer_cpu = (cpu != NR_CPUS) ? cpu : -1;
}
spin_unlock_irqrestore(&tick_device_lock, flags);
}
Expand Down
7 changes: 0 additions & 7 deletions trunk/kernel/time/tick-internal.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
/*
* tick internal variable and functions used by low/high res code
*/

#define TICK_DO_TIMER_NONE -1
#define TICK_DO_TIMER_BOOT -2

DECLARE_PER_CPU(struct tick_device, tick_cpu_device);
extern spinlock_t tick_device_lock;
extern ktime_t tick_next_period;
Expand Down Expand Up @@ -35,7 +31,6 @@ extern void tick_broadcast_oneshot_control(unsigned long reason);
extern void tick_broadcast_switch_to_oneshot(void);
extern void tick_shutdown_broadcast_oneshot(unsigned int *cpup);
extern int tick_resume_broadcast_oneshot(struct clock_event_device *bc);
extern int tick_broadcast_oneshot_active(void);
# else /* BROADCAST */
static inline void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
{
Expand All @@ -44,7 +39,6 @@ static inline void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
static inline void tick_broadcast_oneshot_control(unsigned long reason) { }
static inline void tick_broadcast_switch_to_oneshot(void) { }
static inline void tick_shutdown_broadcast_oneshot(unsigned int *cpup) { }
static inline int tick_broadcast_oneshot_active(void) { return 0; }
# endif /* !BROADCAST */

#else /* !ONESHOT */
Expand Down Expand Up @@ -74,7 +68,6 @@ static inline int tick_resume_broadcast_oneshot(struct clock_event_device *bc)
{
return 0;
}
static inline int tick_broadcast_oneshot_active(void) { return 0; }
#endif /* !TICK_ONESHOT */

/*
Expand Down
Loading

0 comments on commit a886f29

Please sign in to comment.